soldr.ai

Docs  /  Components

HC-SR04 ultrasonic sensor: specs and pinout

Ultrasonic ranging module with a trigger input and an echo output, measuring 2 cm to 400 cm.

Every value cites its sourceOfficial pinout

Buy on Compoden

Specs

SpecValueSource
Working voltageDC 5 Vsource
Electric Parameter
Working current15 mAsource
Electric Parameter
Measuring range2 cm to 400 cm (4 m)source
Product features; Electric Parameter (min range 2cm, max range 4m)
Ranging accuracy3 mmsource
Product features
Measuring angle15 degreessource
Electric Parameter
Trigger input10 µs TTL pulsesource
Electric Parameter
Echo outputTTL level; pulse width proportional to rangesource
Electric Parameter
Measurement cycleOver 60 mssource
Timing diagram section
Dimensions45 mm x 20 mm x 15 mmsource
Electric Parameter

Power

ValueSource
SupplyDC 5 Vsource
Electric Parameter
Current15 mA working currentsource
Electric Parameter

Pinout

PinFunctionVoltageNotesSource
Vcc5 V supply5 V DC (working voltage)source
Wire connecting direct as following (Product features page)
TrigTrigger pulse inputDatasheet: 10 us TTL pulse; voltage not given numericallysource
Wire connecting direct as following (Product features page)
EchoEcho pulse outputDatasheet gives the output only as a TTL-level signal proportional to the range; the voltage is not stated numerically, so check it before connecting a 3.3 V-only inputsource
Wire connecting direct as following (Product features page)
GND0 V groundDatasheet: when powering up, connect GND firstsource
Wire connecting direct as following (Product features page)

Common mistakes

What we could not confirm

Sources

Building with the HC-SR04 ultrasonic sensor? Describe your project on Soldr: it assigns pins from the board's published pinout, checks power and logic levels, and shows how to wire every part.