You are on page 1of 2

Experiment No 2

Aim: Verify and test the working of Ultrasonic sensor by interfacing it to the Arduino Board.
Apparatus Required:

 Arduino UNO
 Ultrasonic sensor
 Jumper wires
Theory:
Ultíasonic sensoís aíe electíonic devices that calculate the taíget’s distance by emission of ultíasonic sound waves and
conveít those waves into electíical signals. ľhe speed of emitted ultíasonic waves tíaveling speed is fasteí than the
audible sound.

ľheíe aíe mainly two essential elements which aíe the tíansmitteí and íeceiveí. Using the
piezoelectíic cíystals, the tíansmitteí geneíates sound, and fíom theíe it tíavels to the taíget and gets
back to the íeceiveí component.

ľo know the distance between the taíget and the sensoí, the sensoí calculates the amount of time íequiíed
foí sound emission to tíavel fíom tíansmitteí to íeceiveí.

Procedure:

 Connect the ground pin to the ground pin of Arduino.


 Connect VCC to the 5V of Arduino.
 Connect Trigger pin of Ultrasonic sensor to Pin no:9 of Arduino board.
 Connect Echo pin of Ultrasonic sensor to Pin no:10 of Arduino board.
 Now verify the program and upload it to the Arduino board.
 Using Serial monitor from the tool bar, run the program.
 Now in the serial monitor, we can find the distance that is sensed by the ultrasonic sensor.

Connection diagram:
Code:

Output:

You might also like