HC-SR04 Ultrasonic Distance Sensor

Sensor

HC-SR04 Ultrasonic Distance Sensor

Active 2 Projects 0 Videos

The HC-SR04 is an ultrasonic sensor that measures distance by sending out sound waves and timing how long they take to bounce back. It's widely used in beginner electronics projects for detecting objects and measuring distance without physical contact.

Difficulty

Beginner → Advanced

Category

Electronics

How it works

How this sensor works

The sensor has two parts: a transmitter and a receiver. The Trig pin sends out a short ultrasonic pulse (sound wave above human hearing range). This pulse travels through the air, hits an object, and bounces back to the Echo pin. By measuring the time between sending and receiving the pulse, and knowing the speed of sound, the sensor calculates the distance to the object.

Applications

Common use cases

Obstacle detection
parking sensors
robotics navigation
water level monitoring
home automation

Required

Components needed

Arduino Uno
Raspberry Pi Pico
ESP32
HC-SR04 Sensor
Jumper Wires
Breadboard

Projects

Related projects

Build something with this sensor.