Page 107 - KEC Khaitan C8.2 Flipbook
P. 107
BASICS OF THE ULTRASONIC SENSOR
Components and Pinout
The HC-SR04 ultrasonic sensor has four pins:
Pin Functions:
o VCC – Power supply (+5V)
o GND – Ground
o TRIG – Sends the ultrasonic pulse
o ECHO – Receives the reflected pulse
HOW ULTRASONIC SENSORS WORK
The TRIG pin sends an ultrasonic pulse (sound wave).
The pulse bounces off an object and returns to the ECHO pin.
The sensor calculates distance based on the time it takes for
the pulse to return.
Formula for Distance Calculation:
Distance= 2(Time×Speed of Sound)
(Speed of sound ≈ 343 m/s)
SENSING TIME : DISTANCE MEASUREMENT
As you know how an ultrasonic sensor works, try an activity to calculate and display the distance
of an obstacle from an ultrasonic sensor.
Tinkercad Design
Fundamentals of Sensors & Data 105

