HC-SR-04 Ultrasonic Sensor
The HC-SR04 ultrasonic sensor is used to detect the distance of an object between 2-400cm with an accuracy of up to 3mm. It is based on the SONAR principle and hence its working is not affected by sunlight or other ambient lighting conditions making it ideal for outdoor applications also. The sensor works by transmitting a signal and starting a timer simultaneously, it then stops the timer when the receiver receives the signal after bouncing back from the object.
Note: The HC-SR04 has a 5V output (which needs to be reduced to 3.3V to work with the Raspberry Pi).
- Used to avoid and detect obstacles with robots like biped robots, obstacle avoider robots, path finding robots, etc.
- Used to measure the distance within a wide range of 2cm to 400cm
- Can be used to map the objects surrounding the sensor by rotating it
- Depth of certain places like wells, pits, etc can be measured since the waves can penetrate through the water
- 1 x HC-SR04 ultrasonic sensor
|Power Supply||+5V DC|
|Output Signal||Electrical frequency signal|
|Ranging Distance||2cms – 400 cms|
|Measuring Angle||30 degree|
|Dimensions||3 x 2 x 1cms|
Frequently Asked Questions
1. How does ultrasonic sensor work?
- As we connect the ultrasonic sensor to 5V and initialize the input pin, it starts transmitting the sound waves which then travel through the air and hit the required object. These waves hit and bounce back from the object and then collected by the receiver of the module. Distance is directly proportional to the time these waves require to come back at the receiving end. The more the time taken, more the distance will be.
2. Is ultrasonic sensor better or IR sensor for my project?
- Choosing sensor is completely dependent upon your application. There are a lot of limitations in infrared sensors, like the inability to use them in sunlight due to interference. It can make outdoor applications or dark indoor applications difficult. Ultrasonic sensors work using sound waves, detecting obstacles is not affected by as many factors. &qnbsp;If reliability is an important factor in your sensor selection, ultrasonic sensors are more reliable than IR sensors.