15

Ultrasonic Sensor Programming

  • Upload
    others

  • View
    15

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Ultrasonic Sensor Programming
Page 2: Ultrasonic Sensor Programming

Ultrasonic Sensor Programming

with Arduino

ByProf.Dr. Eng. Tamer Medhat [email protected]

www.kfs.edu.eg/drtamer.html

Page 3: Ultrasonic Sensor Programming
Page 4: Ultrasonic Sensor Programming

For example, if the object is 20 cm away from the sensor, and the speed of thesound is 340 m/s or 0.034 cm/µs the sound wave will need to travel about 588microseconds. But what you will get from the Echo pin will be double thatnumber because the sound wave needs to travel forward and bouncebackward. So in order to get the distance in cm we need to multiply thereceived travel time value from the echo pin by 0.034 and divide it by 2.

Page 5: Ultrasonic Sensor Programming

How does Ultrasonic Sensor?

0.034 cm/µs

Page 6: Ultrasonic Sensor Programming

Questions?

Components for Testing Ultrasonic Sensor

Page 7: Ultrasonic Sensor Programming

UltrasonicSensor with ArduinoAndSerial Monitor

Page 8: Ultrasonic Sensor Programming
Page 9: Ultrasonic Sensor Programming
Page 10: Ultrasonic Sensor Programming

UltrasonicSensor with Arduinoand Buzzer

Page 11: Ultrasonic Sensor Programming
Page 12: Ultrasonic Sensor Programming

UltrasonicSensor with Arduinoand LCD

Page 13: Ultrasonic Sensor Programming
Page 14: Ultrasonic Sensor Programming

Questions?

Page 15: Ultrasonic Sensor Programming