Your shopping cart is empty!
Differences Between Newer and Earlier Versions of Ultrasonic Sensor HC-SR04P
The HC-SR04P ultrasonic sensor also known as proximity/distance sensor uses sonar to determine the distance to an object like bats or dolphins do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package. From 2cm to 400 cm or 1” to 13 feet. Its operation is not affected by sunlight or black material like Sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with an ultrasonic transmitter and receiver module.
What is Ultrasonic?
Ultrasound is high-pitched sound waves with frequencies higher than the audible limit of human hearing.
Human ears can hear sound waves that vibrate in the range from about 20 times a second (a deep rumbling noise) to about 20,000 times a second (a high-pitched whistling). However, ultrasound has a frequency of over 20,000 Hz and is therefore inaudible to humans.
Basic working principle of ultrasonic sensor
- IO trigger for at 10µs high-level signal
- The Module automatically sends eight cycles of ultrasonic burst at 40 kHz and detects whether there is a pulse signal back.
- If the signal is reflected back, through a high level, time of high output IO duration is
the time from sending ultrasonic to returning.
|Distance = [high-level time × velocity of sound (340M ⁄ s)] ⁄ 2|
Alright, let's get straight into the topic and see what are the difference between the two newer and older versions of HC-SR04-P ultrasonic sensors. Well, to be frank, both of them actually provide an approximately similar outcome in terms of distance measuring same goes for the working principle which consists of 1 transmitter and 1 receiver.
To clarify this is NOT the same as the HC-SR04 since the name of the ultrasonic sensor is very similar and it operates at 5V only. The ones we will be looking at and comparing is the 2021 and 2022 version of HC-SR04-P ultrasonic sensors, both operate at the voltage 3V - 5V.
2021 HC-SR04P and 2022 HC-SR04P
As you can see the changes for the latest version of the sensor isn't obvious when observed from the front. But from the back view of the 2022 version sensor that is labeled "RCWL-9610 design", the circuit layout on PCB is more neat compared to its previous version.
Limitations for Both Sensors
- The distance between the sensor and the object/obstacle should be within 2cm to 450cm.
- The object has its reflective surface at a shallow angle so that sound will not be reflected back towards the sensor. This is why it is ideal to measure on a plain surface facing the object or obstacles.
- The object is too small to reflect enough sound back to the sensor. In addition, if your HC-SR04 sensor is mounted low on your device, you may detect sound reflecting off of the floor.
- Some objects with soft, irregular surfaces (such as stuffed animals) absorb rather than reflect sound and therefore can be difficult for the HC-SR04 sensor to detect.
Blind zone for both sensors
The "Blind Zone” is the shortest permissible sensing range. This means that no objects or targets are permitted within the minimum working area “Blind Zone” as this would falsely trigger the sensor.
The blind zone is important for the functioning of an ultrasonic sensor. This zone is the first area, right in front of the transducer of the sensor. Within this zone, it is impossible to perform measurements. The size of the blind zone of a sensor depends on a variety of factors. These are:
- The duration of the sound pulse;
- The frequency with which sound moves through air (or another medium).
The combination of these two factors makes it impossible to perform a reliable measurement in the first area right in front of the sensor. This is because of the fact that an ultrasonic sensor emits sound and has to switch in order to receive these. Transmitting and receiving can not be done simultaneously, so a blind zone is formed in the measurement. When an object is in the blind zone, it is not detected. In essence, it can be said that the blind zone lies between 5% and 10% of the maximum measuring range of the sensor: the shorter the detection range, the smaller the blind zone.
Hence, although the operation range for both sensors is stated to be from 2cm to 450cm, measure the distance within 10cm to 250cm for the best result.
ZOOM:BIT MakeCode example update for the new HC-SR04P sensor
If you're using the new 2022 version of the HCSR04-P ultrasonic sensor on ZOOM:BIT, when you follow the step accordingly in ZOOMBIT Quick Start Guide Book Chapter 7 and upload the code to your micro:bit, you will notice that ZOOM:BIT doesn't follow the brake command when the distance between the object is close.
It is recommended to place the distance value into a variable, especially for the if-else statement. The reason behind that is to prevent reading the sensor value (in this case, distance in cm) too fast in order to get the perfect readings for the code to proceed to its next move and makes the next decision.
In short, the change for the case mentioned is to declare the ultrasonic distance (cm) as a variable in the looping of your coding.
Just like this:
To prove that both newer and older version of HC-SR04P sensors works very similarly and perfectly fine, I've decided to run a test using Arduino and micro:bit on both of them.
All things considered, there isn't much in terms of change for both the 2021 and 2022 versions of ultrasonic sensors - HC-SR04P. Both are usable for most of the microcontrollers out there such as raspberry pi, Arduino and micro:bit. Just perhaps take note of the way we users code it like the example shown in the ZOOM:BIT section above.