How to use HC-SR04

HC-SR04 ultrasonic sensor  uses sonar to determine the distance to an object. The transmitter (trig pin) sends a signal: a high-frequency sound.
When the signal finds an object, it is reflected and receiver is waiting for a signal. The signal length is measured and converted into a distance.

Here’s a list of some of the HC-SR04 ultrasonic sensor features and specs:

  • Power Supply :+5V DC
  • Quiescent Current : <2mA
  • Working Current: 15mA
  • Effectual Angle: <15°
  • Ranging Distance : 2cm – 400 cm
  • Resolution : 0.3 cm
  • Measuring Angle: 30 degree
  • Trigger Input Pulse width: 10uS

Fast TuTorial Video:


Pin Echo to pin 12

Pin Trig to pin 11

Pin VCC to pin 5V

Pin GND to pin GND


Leave a Reply