Introduction to Ultrasonic Sensor

An ultrasonic sensor is an electronic device that measures the distance of a target object by emitting ultrasonic sound waves, and converts the reflected sound into an electrical signal.

HC-SR04 Ultrasonic Sensor Pin Configuration

Pin Number

Pin Name

Description

1

Vcc

This Vcc pin powers the sensor, with +5V

2

Trigger

This pin is an Input pin. Trigger pin must be kept high for 10us to initialize measurement by sending US wave.

3

Echo

This pin is an Output pin. Echo pin goes high for a period of time which will be equal to the time taken for the Ultrasonic wave to return back to the sensor.

4

Ground

Ground pin is connected to the Ground with -V.