Trigger and echo
Use one GPIO output to start the burst and a separate input timer to measure echo pulse width.
The HC-SR04 sends a 40 kHz ultrasonic burst and reports the round-trip time as the width of a logic pulse.
The high pulse width measures acoustic round-trip time. The 5 V wiring below assumes a 5 V host.
| Pin | Signal | Direction | Function |
|---|---|---|---|
| 1 | VCC Supply input | Supply input | Primary device supply. Place the bypass capacitor close to this pin. |
| 2 | Trig Input | Input | A high pulse of at least 10 µs starts one measurement. |
| 3 | Echo Output | Output | The high pulse width measures acoustic round-trip time. The 5 V wiring below assumes a 5 V host. |
| 4 | GND Supply return | Supply return | Connect to the common ground plane or bench return. |
| Parameter | Limit | Conditions and source |
|---|---|---|
| Supply5 V DC | 5 V DC | The guide lists 15 mA operating current. ELECFREAKS HC-SR04 User Guide, §§ 2.3–2.5 and 3.1. |
| Trigger width10 µs minimum | 10 µs minimum | The module emits eight 40 kHz cycles per trigger. ELECFREAKS HC-SR04 User Guide, §§ 2.3–2.5 and 3.1. |
| Ranging interval2 cm to 4 m | 2 cm to 4 m | The documented range depends on target size, angle, and acoustic conditions. ELECFREAKS HC-SR04 User Guide, §§ 2.3–2.5 and 3.1. |
This map follows the 5 V ELECFREAKS HC-SR04. Check the markings and voltage limits on lookalike modules.