The HC-SR04 Ultrasonic Distance Sensor Module is a popular non-contact distance measuring sensor that uses ultrasonic sound waves to accurately detect the distance of objects. It is widely used in Arduino, Raspberry Pi, ESP32, robotics, obstacle avoidance systems, smart parking, water level monitoring, and automation projects.
Features
- Full Name: HC-SR04 Ultrasonic Distance Measuring Sensor Module
- Non-contact distance measurement
- High accuracy and stable performance
- Measuring range from 2 cm to 400 cm
- Easy 4-pin interface
- Low power consumption
- Fast response time
- Compact and lightweight design
- Compatible with Arduino, Raspberry Pi, ESP32, STM32, and other microcontrollers
- Ideal for indoor measurement and obstacle detection
Specifications
| Specification | Value |
|---|---|
| Product Type | Ultrasonic Distance Sensor Module |
| Model | HC-SR04 |
| Operating Voltage | 5V DC |
| Operating Current | 15mA (Typical) |
| Measuring Range | 2 cm – 400 cm |
| Measuring Accuracy | ±3 mm |
| Operating Frequency | 40 kHz |
| Detection Angle | ≤15° |
| Trigger Pulse | 10µs TTL Pulse |
| Interface | 4-Pin Header |
Applications / Uses
- Obstacle avoidance robots
- Arduino and ESP32 projects
- Distance measurement systems
- Smart parking systems
- Water level monitoring
- Automatic door systems
- Object detection
- Security and surveillance systems
- Industrial automation
- Smart dustbins
- Educational electronics projects
- DIY robotics and IoT applications
Pin Configuration
| Pin | Function |
|---|---|
| VCC | 5V Power Supply |
| Trig | Trigger Input |
| Echo | Echo Output |
| GND | Ground |
Working Principle
- The Trig pin receives a 10µs pulse from the microcontroller.
- The sensor transmits an ultrasonic wave at 40 kHz.
- The wave reflects from the object and returns to the sensor.
- The Echo pin outputs a pulse whose duration is proportional to the distance.
- The distance is calculated using the travel time of the ultrasonic wave.
Size
- Length: Approx. 45 mm
- Width: Approx. 20 mm
- Height: Approx. 15 mm
- Weight: Approximately 9–10 g
Package Includes
- 1 × HC-SR04 Ultrasonic Distance Sensor Module
Note
The HC-SR04 operates at 5V logic levels. When interfacing with 3.3V microcontrollers (such as ESP32, ESP8266, or Raspberry Pi Pico), use a logic level converter or voltage divider on the Echo pin to protect the microcontroller.







Reviews
There are no reviews yet.