
The HC-SR04 is a highly popular, low-cost ultrasonic distance sensor. It uses sonar (sound navigation and ranging) to measure the distance to an object, working on the same echolocation principles used by bats and dolphins. The module consists of two main transducers: an ultrasonic transmitter and an ultrasonic receiver, alongside an onboard control circuit. When triggered, the transmitter emits a short burst of high-frequency sound waves. If these waves hit a solid object, they bounce back and are detected by the receiver. By measuring the exact time it takes for the echo to return, a connected microcontroller (like an Arduino or Raspberry Pi) can calculate the distance to the object based on the speed of sound in the air. Because it uses sound rather than light, it is not affected by sunlight or dark materials, making it highly reliable for robotics, obstacle avoidance, and proximity detection.
Operating Voltage: 5V DC
Operating Current: ~15mA
Operating Frequency: 40 kHz
Measurement Range: 2 cm to 400 cm (approx. 13 feet)
Ranging Accuracy: ±3 mm
Measuring Angle: < 15 degrees
Trigger Input Signal: 10µS TTL pulse
Echo Output Signal: TTL pulse (duration is directly proportional to the measured distance)
Dimensions: 45 mm x 20 mm x 15 mm
The HC-SR04 communicates using a straightforward 4-pin interface:
VCC: Connects to the 5V power supply.
Trig (Trigger): The input pin. Pulling this pin HIGH for at least 10 microseconds commands the sensor to send out the ultrasonic burst.
Echo: The output pin. This pin goes HIGH immediately after the burst is sent and stays HIGH until the echo returns. The total time this pin remains HIGH represents the time of flight of the sound wave.
GND: Connects to the system ground.
| Weight |
0.05 kg |
|---|---|
| Dimensions | 1.5 × 2.0 × 4.5 cm |