Ultrasonic Wave Detector Ranging Module HC-SR04 HC SR04 HCSR04 Distance Sensor

109.00 + 18% GST

SKU: SSRSIMO63 Category:



The ultrasonic sensor works on the principle of SONAR and RADAR system which is used to determine the distance to an object.

An ultrasonic sensor generates the high-frequency sound (ultrasound) waves. When this ultrasound hits the object, it reflects as echo which is sensed by the receiver as shown in below figure.

Ultrasonic Working Principle

Ultrasonic Working Principle

By measuring the time required for the echo to reach to the receiver, we can calculate the distance. This is the basic working principle of Ultrasonic module to measure distance.

HC-SR-04 Ultrasonic Module

Ultrasonic Module

Ultrasonic Module

HC-SR-04 has an ultrasonic transmitter, receiver and control circuit.

In ultrasonic module HCSR04, we have to give trigger pulse, so that it will generate ultrasound of frequency 40 kHz. After generating ultrasound i.e. 8 pulses of 40 kHz, it makes echo pin high. Echo pin remains high until it does not get the echo sound back. So the width of echo pin will be the time for sound to travel to the object and return back. Once we get the time we can calculate distance, as we know the speed of sound.

HC-SR04 can measure up to range from 2 cm – 400 cm.


HC-SR04 Pin Description

Ultrasonic Module Pin Description

VCC – +5 V supply

TRIG – Trigger input of sensor. Microcontroller applies 10 us trigger pulse to the HC-SR04 ultrasonic module.

ECHO–Echo output of sensor. Microcontroller reads/monitors this pin to detect the obstacle or to find the distance.

GND – Ground


HC-SR04 Working Principle

HC-SR04 Ultrasonic Module Timing Diagram

HC-SR04 Ultrasonic Module Timing Diagram

  1. We need to transmit trigger pulse of at least 10 us to the HC-SR04 Trig Pin.
  2. Then the HC-SR04 automatically sends Eight 40 kHz sound wave and wait for rising edge output at Echo pin.
  3. When the rising edge capture occurs at Echo pin, start the Timer and wait for falling edge on Echo pin.
  4. As soon as the falling edge is captured at the Echo pin, read the count of the Timer. This time count is the time required by the sensor to detect an object and return back from an object.

Now how to calculate distance?

We know that,

textbf{Distance = Speed x Time}

The speed of sound waves is 343 m/s.


textbf{Total Distance }= frac{textbf{343 x } textbf{Time of High(Echo) Pulse}}{textbf{2}}

Total distance is divided by 2 because signal travels from HC-SR04 to object and returns to the module HC-SR-04.

Additional information

Weight 0.3 g
Dimensions 150 × 150 × 150 mm


There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.