HC-SR04 Ultrasonic Sensor - 2cm to 450cm Distance Measurement Module for Arduino Projects
The HC-SR04 ultrasonic sensor is a 5V distance-measurement module for obstacle detection, ranging experiments, liquid-level demos, and robot navigation. It sends an ultrasonic pulse from the trigger pin, listens for the reflected echo, and lets software calculate distance from the echo pulse width.
This module is easy to prototype with the ELAB Nano V3, an UNO R3 Prototype Expansion Board, or a quick test rig built on the MB 102 Breadboard Kit. It is a good choice when a low-cost non-contact range sensor is enough and the target surface reflects sound well.
The current listing specifies 5V operation, less than 2mA quiescent current, 2cm to 450cm detection range, up to 0.3cm precision, and a sensing angle not more than 15 degrees. Use level shifting for the echo pin when connecting to 3.3V-only controllers.
Technical Specifications
| Parameter | Value |
|---|---|
| SKU | HC-SR04 |
| Product Type | Ultrasonic distance sensor |
| Working Voltage | 5V DC |
| Quiescent Current | Less than 2mA |
| Detection Range | 2cm-450cm |
| Precision | Up to 0.3cm |
| Sensing Angle | Not more than 15 degrees |
| Output Level | 3.3V-5V high level, 0V low level |
| Interface | VCC, Trig, Echo, GND |
| Applications | Robots, obstacle detection, ranging, liquid-level demos |
Board Layout & Label Guide
- VCC - 5V power input.
- Trig - Trigger input; send a 10us pulse to start measurement.
- Echo - Echo pulse output; pulse width represents distance.
- GND - Common ground with controller.
- Ultrasonic Transmitter - Sends the measurement pulse.
- Ultrasonic Receiver - Receives the reflected echo.
- Mounting Note - Keep the sensor face clear and perpendicular to the target.
- Logic Note - Use level shifting for 3.3V-only controller inputs.
Application Scenarios
1. Arduino Distance Readout
Measure echo pulse width and convert it to distance in centimeters.
2. Obstacle Alarm
Trigger an LED when an object is closer than a selected threshold.
3. MicroPython Ultrasonic Check
Read an ultrasonic module from a Pico-style board.
Packing List
- 1 x HC-SR04 Ultrasonic Sensor Module
FAQ
Q: What does it measure?
A: It measures distance by timing ultrasonic echo return.
Q: What voltage does it need?
A: The listing specifies 5V DC.
Q: Can it work with 3.3V boards?
A: Use level shifting for Echo when the host is not 5V tolerant.
Q: What is the range?
A: The current listing specifies 2cm to 450cm.
Q: Why are readings unstable?
A: Soft targets, angled surfaces, airflow, and noise can affect echoes.
Q: Can it measure water level?
A: Yes, for non-contact tank or container demos when mounted above the surface.
Q: Does it work on cloth?
A: Soft materials may absorb sound and reduce reliability.
Q: How do I improve accuracy?
A: Average readings and mount the sensor firmly facing the target.