Ultrasonic Sensor Introduction of Ultrasonic Sensor It is













- Slides: 13
Ultrasonic Sensor
Introduction of Ultrasonic Sensor • It is the device or sensor which measures the distance of an object or obstacle using sound waves. • It has two parts in front of it, one is transmitter and one is receiver. • Bat uses sound waves to detect obstacles.
Working Principle • As the name indicates, ultrasonic sensors measure distance by using ultrasonic waves. The sensor head emits an ultrasonic wave and receives the wave reflected back from the target. Ultrasonic Sensors measure the distance to the target by measuring the time between the emission and reception.
Distance calculation • The distance can be calculated with the following formula: Distance L = 1/2 × T × C • where L is the distance, T is the time between the emission and reception, and C is the sonic speed. (The value is multiplied by 1/2 because T is the time for go-and-return distance. )
Range & Applications • Ultrasonic sensor works on high frequency range i. e. 40 k. Hz • Range to detect obstacle - 3 cm to 400 cm • where we have seen ultrasonic sensor?
Some more Applications • Tank Level- Liquid level sensors or ultrasonic sensors are integral to process control and inventory management in many industries to indicate tank level. • Distance Measurement-Ultrasonic sensors can measure the distance to a wide range of objects regardless of shape, color or surface texture. • People detection for counting • Robotic sensing
Let’s make program on m. Bot using Ultrasonic sensor 1. Program for m. Bot to measure the distance In above program we made one variable to store distance calculated by ultrasonic sensor Output: -
2. Program for m. Bot to turn ON Light when obstacle is detected Logic of the program is when distance between m. Bot and obstacle is less than 10 cm turn ON the light otherwise turn OFF the light
3. Obstacle Avoider m. Bot Logic of the program 1. start the m. Bot 2. If there is no obstacle move m. Bot in forward direction 3. If obstacle is detected go backward for 0. 5 seconds and take right turn to avoid obstacle
4. Obstacle Attacker m. Bot Logic of the program 1. start the m. Bot 2. If there is no obstacle move m. Bot in forward direction with 50% power 3. If obstacle is detected stop moving for 0. 5 seconds and then attack on obstacle with 100% power
5. Wall follower m. Bot Logic of the program 1. start the m. Bot 2. If there is no wall move m. Bot in forward direction with 50% power 3. If wall is detected take 90 degree turn with the help of motors and follow the wall
Thank You!