Control of Ultrasonic Sensor With Arduino 1
Control of Ultrasonic Sensor With Arduino 1
TEAM MEMBERS:
1. SASIDHAR V (211231101015)
2. PRASANTH P (211231101608)
1. ULTRASONIC SENSOR
An ultrasonic sensor is an instrument that measures the distance to an object using ultrasonic sound waves. An
ultrasonic sensor uses a transducer to send and receive ultrasonic pulses that relay back information about an
object’s proximity. High-frequency sound waves reflect from boundaries to produce distinct echo patterns.
3. WORKING PRINCIPLE
When an electrical pulse of high voltage is applied to the ultrasonic transducer it vibrates across a specific
spectrum of frequencies and generates a burst of sound waves. Whenever any obstacle comes ahead of the
ultrasonic sensor the sound waves will reflect back in the form of echo and generates an electric pulse. It
calculates the time taken between sending sound waves and receiving echo. The echo patterns will be
compared with the patterns of sound waves to determine detected signal’s condition.
THE ULTRASONIC SENSOR PIN DIAGRAM IS:
ECHO – This pin is used for sending signals to the Arduino board
where the Arduino calculates the pulse duration to know the distance.
This pin is the ECHO output of the sensor.
WORKING PRINCIPLE
5. HC-SR04 ULTRASONIC SENSOR As shown in picture, the HC-SR04 Ultrasonic sensor is a 4 pin module,
whose pin names are Vcc, Trigger, Echo and Ground respectively. This sensor is a very popular sensor used in
many applications where measuring distance or sensing objects are required. The module has two eyes like
projects in the front which forms the Ultrasonic transmitter and Receiver.
6. HC-SR04 Pin Number Pin Name Description 1 Vcc The Vcc pin powers the sensor, typically with +5V 2
Trigger Trigger pin is an Input pin. This pin has to be kept high for 10µs to initialize measurement by sending
Ultrasonic wave. 3 Echo Echo pin is an Output pin. This 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 This pin is connected to the
Ground of the system.
8. HC-SR04 OPERATION ◦ The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and
when it gets objected by any material it gets reflected back toward the sensor this reflected wave is observed by
the Ultrasonic receiver module as shown in the picture below
9.HC-SR04 OPERATION Power the Sensor using a regulated +5V through the Vcc ad Ground
pins of the sensor. The current consumed by the sensor is less than 15mA and hence can be directly powered by the
on board 5V pins (If available). The Trigger and the Echo pins are both I/O pins and hence they can be connected to
I/O pins of the microcontroller. To start the measurement, the trigger pin has to be made high for 10uS and then
turned off. This action will trigger an ultrasonic wave at frequency of 40Hz from the transmitter and the receiver will
wait for the wave to return.
10. HC-SR04 OPERATION Once the wave is returned after it getting reflected by any object the Echo pin goes high
for a particular amount of time which will be equal to the time taken for the wave to return back to the sensor. The
amount of time during which the Echo pin stays high is measured by the MCU/MPU as it gives the information about
the time taken for the wave to return back to the Sensor. Using this information the distance is measured as explained
in the above head. HC-SR04 is commonly used w
APPLICATION OF ULTRASONIC SENSOR