Spark Logic

HC-SR04 ultrasonic ranging module connection guide

HC-SR04 ultrasonic ranging module Four-pin module header wiring guide with power, signal assignments, and bench checks.

Four-pin module header

4 contacts Current package

ELECFREAKS ·

Measure a distance with a 5 V host

Required

Use a host with 5 V-compatible inputs and outputs. Share ground and power the module from a regulated 5 V supply.

Bench checks

  • Set Trig low at idle. Send a pulse at least 10 µs long. Configure Echo as an input and impose a timer timeout so a missing echo cannot stall the host.
  • Point the module perpendicularly at a flat target 30 cm away. At about 343 m/s sound speed, the echo pulse should be about 1.75 ms.
  • Wait 60 ms between starts to keep later echoes from overlapping the next measurement.

ELECFREAKS HC-SR04 User Guide, §§ 2.3–2.5 and 3.1.

Four-pin module header wiring map

Highlighted contacts are used in the required step or selected circuit. Select a contact to inspect it.

Four-pin module header
Face the two transducers with the connector below them. VCC, Trig, Echo, and GND run left to right.
Selected pin details

2 · Trig

Input · Inputs

A high pulse of at least 10 µs starts one measurement.

ELECFREAKS HC-SR04 User Guide, §§ 2.3–2.5 and 3.1.

Electrical limits · Pin in the reference

Models and documents

This map follows the 5 V ELECFREAKS HC-SR04. Check the markings and voltage limits on lookalike modules.

HC-SR04
5 V version documented by ELECFREAKS.