Saturday 4 June 2016

Obstacle Detection Using Ultrasonic Sensor

Obstacle Detection Using Ultrasonic Sensor


Ultrasonic Sensor works on the principle of Transmitting Ultrasonic signal of(44Khz) and waits for echo on hearing echo, range of target or obstacle can be calculated as 
Range =(Speed of Ultrasonic wave * echo duration)/2

Speed of Ultrasonic wave = 340m/s
if echo received is in microseconds then effective formula of range reduces to
Range =((17* t(usec))/1000)  (in cm)

Ultra-Sonic Sensor has 4 pins(HC-SR04)
1.Vcc : connect to 5V
2.Trigger: Turn it on for only 10usec (input to sensor)
3.Echo: calculate on-time in usec (output of sensor)
4.Gnd: connect to 0v





download-code



No comments:

Post a Comment