Home › Parts › Sensors › Ultrasonic distance sensor

Ultrasonic distance sensor (SR04)

Sensors · HC-SR04 · 2–400 cm

HC-SR04 ultrasonic ranger · 5 V · send a 10 µs pulse on TRIG; ECHO then goes HIGH for 58 µs per cm (out to about 4 m) · ECHO is a 5 V signal: divide it down for a 3.3 V board · target now at 50 cm

Ultrasonic distance sensor (SR04) on the simulator's bench

Try it on the benchThe lab drops it on an empty bench and opens its datasheet card.

Typical part: HC-SR04 ultrasonic module

Pins

Ratings and limits

Supply5 V, 15 mA
Range2–400 cm
Resolution≈ 3 mm
ECHO5 V logic

How to use it

Pulse TRIG for 10 µs; the ECHO pulse length is the round trip of the sound: cm = µs ÷ 58. With an ESP32, put a 1 kΩ / 2 kΩ divider on ECHO.

Lessons and builds that use it

More in sensors