Sensors
HC-SR04 Ultrasonic Distance Sensor
Ultrasonic ranging module, about 2 cm to 400 cm, 5 V supply.
- Supply (VCC)
- 4.5–5.5 V
- Manufacturer
- Generic
- Reference
- Datasheet / documentation
- Catalogue ID
- hc-sr04 v1
Pinout
| Pin | Type | Details |
|---|---|---|
| VCC | Power input | 4.5–5.5 V |
| TrigTRIG | Digital input | - |
| EchoECHO | Digital output | output level = supply voltage |
| GND | Ground | - |
Wiring notes
- ECHO outputs 5 V. On 3.3 V boards use a voltage divider (e.g. 1 kΩ / 2 kΩ) or a 3.3 V-compatible variant.
Projects using the HC-SR04 Ultrasonic Distance Sensor
BeginnerRule-checked
Arduino Ultrasonic Distance Meter with LCD
Measure distance with an HC-SR04, show it on a 16×2 I2C LCD and beep when something gets too close.
Arduino Uno R3 · 40 min