The HC-SR04 Ultrasonic Distance Sensor is a sensor used for detecting the distance to an object using sonar. It’s ideal for any robotics projects your have which require you to avoid objects, by detecting how close they are you can steer away from them!
The HC-SR04 uses non-contact ultrasound sonar to measure the distance to an object, and consists of two ultrasonic transmitters (basically speakers), a receiver, and a control circuit. The transmitters emit a high frequency ultrasonic sound, which bounce off any nearby solid objects, and the reciever listens for any return echo. That echo is then processed by the control circuit to calculate the time difference between the signal being transmitted and received.
The HC-SR04 is great, as it’s low cost, can be powered via the Raspberry Pi’s 5V output, and is relatively accurate! Please Note. The HC-SR04 has a 5V output (which needs to be reduced to 3.3V to work with the Raspberry Pi, and if you use it with Arduino compatible boards, no voltage reduction is needed).
The HC-SR04 sensor works best between 2cm – 400 cm (1″ – 13ft) within a 30 degree cone, and is accurate to the nearest 0.3cm.
- Input Voltage: 5V
- Current Draw: 20mA (Max)
- Digital Output: 5V
- Digital Output: 0V (Low)
- Working Temperature: -15°C to 70°C
- Sensing Angle: 30° Cone
- Angle of Effect: 15° Cone
- Ultrasonic Frequency: 40kHz
- Range: 2cm – 400cm
- Length: 43mm
- Width: 20mm
- Height (with transmitters): 15mm
- Centre screw hole distance: 40mm x 15mm
- Screw hole diameter: 1mm (M1)
- Transmitter diameter: 8mm