HC-SR04 Ultrasonic Distance Sensor Module
Sensors & Modules

HC-SR04 Ultrasonic Distance Sensor Module

7.4
Great/10
4.3(4,521 reviews)

$5.99

Disclosure: CircuitTrail earns from qualifying purchases as an Amazon Associate. Prices and availability may change.

The HC-SR04 is the perfect starter distance sensor. Great for learning and simple obstacle avoidance, but upgrade to ToF sensors for precision work.

Range2cm - 400cm
Accuracy+/- 3mm
Beam Angle15 degrees
Voltage5V DC

Our Review

The HC-SR04 is the classic distance sensor that every maker encounters early in their journey. Simple, cheap, and remarkably effective for basic obstacle detection and distance measurement.

Operation is straightforward: send a 10-microsecond pulse on the trigger pin, measure the echo pulse duration, and calculate distance using the speed of sound. The NewPing library handles all this in a single function call.

Range is 2cm to 400cm with about 3mm accuracy in ideal conditions. The 15-degree beam angle provides decent spatial resolution for obstacle avoidance in small robots. For tighter beams, look at time-of-flight sensors like the VL53L0X.

The 5V requirement means you'll need a level shifter when pairing with 3.3V boards like the ESP32. This is the biggest usability drawback — newer ultrasonic modules like the JSN-SR04T offer 3.3V compatibility.

Reliability is good indoors but outdoor performance degrades with wind, temperature extremes, and soft absorptive surfaces. Fabric, foam, and angled surfaces can cause missed readings.

What We Like

  • Extremely cheap and widely available
  • Simple trigger/echo interface
  • Good accuracy for indoor obstacle detection

Watch Out For

  • 5V only — needs level shifting for 3.3V boards
  • Soft and angled surfaces cause unreliable readings
  • Beam angle too wide for precise mapping

Specifications

Range2cm - 400cm
Accuracy+/- 3mm
Beam Angle15 degrees
Voltage5V DC
Current15mA
Trigger Signal10us TTL pulse
Frequency40kHz
7.4/10
Great

The Verdict

The HC-SR04 is the perfect starter distance sensor. Great for learning and simple obstacle avoidance, but upgrade to ToF sensors for precision work.

You might also need

Related Sensors & Modules Components