Trigger and echo
Use one GPIO output to start the burst and a separate input timer to measure echo pulse width. For a 3.3 V input without 5 V tolerance, reduce the Echo level with a suitable divider or level shifter.
The HC-SR04 sends a 40 kHz ultrasonic burst and reports the round-trip time as the width of a logic pulse.
Connect to a regulated 5 V supply.
| Pin | Signal | Direction | Function |
|---|---|---|---|
| 1 | VCC Supply input | Supply input | Connect to a regulated 5 V supply. |
| 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. |
| 4 | GND Supply return | Supply return | Share ground with the host and the 5 V supply. |
| Parameter | Limit | Conditions and source |
|---|---|---|
| Supply5 V DC | 5 V DC | The guide lists 15 mA operating current. ELECFREAKS HC-SR04 User Guide, pp. 3–4, §§ 2.3–2.5 and 3.1. |
| Trigger width10 µs minimum | 10 µs minimum | The module emits eight 40 kHz cycles per trigger. The guide specifies a TTL pulse without a numeric VIH. ELECFREAKS HC-SR04 User Guide, pp. 3–4, §§ 2.3–2.5 and 3.1. |
| Echo outputTTL pulse | TTL pulse | The guide shows a 5 V host and gives no numeric VOH. For a 3.3 V input without 5 V tolerance, reduce the Echo level with a suitable divider or level shifter. ELECFREAKS HC-SR04 User Guide, pp. 3–4, §§ 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, pp. 3–4, §§ 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.