HC-SR04 Ultrasonic Distance Sensor Module
The HC-SR04 Ultrasonic Sensor is a reliable and affordable distance measuring sensor that offers non-contact measurement between 2 cm and 400 cm with an accuracy of up to 3 mm. It’s widely used in obstacle avoidance, robotics, object detection, and automation projects.
Key Features:
Operating Voltage: DC 5V
Operating Current: <15mA
Measuring Distance:
Theoretical Range: 2 cm to 450 cm
Practical Range: 2 cm to 80 cm (for best accuracy)
Accuracy: ±3 mm
Measuring Angle: <15°
Ultrasonic Frequency: 40 kHz
Resolution: 0.3 cm
Trigger Input Pulse Width: 10 µs
Response Time: ~750 ms
Mounting Holes: 4 for easy installation
Pin Configuration:
Pin | Name | Function |
---|---|---|
1 | VCC | Power Supply (+5V DC) |
2 | Trigger | Input pin. Set HIGH for 10µs to start measurement |
3 | Echo | Output pin. Goes HIGH for the time taken by the sound wave to return |
4 | GND | Ground (-) |
Working Principle:
The Trig pin is set HIGH for 10 microseconds to send an ultrasonic pulse.
The sensor emits an ultrasonic wave at 40 kHz.
When the wave hits an object, it reflects back to the sensor.
The Echo pin outputs a HIGH pulse equal to the time taken for the echo to return.
The microcontroller reads the duration and calculates distance using the formula:
- Distance (cm)=Time (µs)×0.03432\text{Distance (cm)} = \frac{\text{Time (µs)} \times 0.0343}{2}Distance (cm)=2Time (µs)×0.0343
How to Use with Microcontrollers (Arduino, Raspberry Pi, etc.):
Power the sensor with 5V (VCC and GND).
Connect Trigger and Echo pins to digital I/O pins.
Send a 10µs HIGH pulse on the Trigger.
Measure the duration of the HIGH signal on the Echo pin.
Calculate the distance based on the time taken for the echo to return.
Applications:
Obstacle avoidance in robots (e.g., line-followers, biped robots)
Distance measurement in automation systems
Object detection and mapping (e.g., rotating on servos for 360° scanning)
Depth measurement (e.g., wells, tanks)
Proximity sensing in parking assistance systems
Package Includes:
1 x HC-SR04 Ultrasonic Distance Sensor Module
(No cables included)
Compatible Alternatives:
US Transmitter/Receiver pair
IR Distance Sensor Modules
Analog IR Sensors
Product Details:
Model: HC-SR04 / HCSR04 / SR04
Brand: Generic (No Brand)
SKU: 127856269_BD-1047782944
Product Type: Ultrasonic Distance Measuring Sensor Module
Add your review