We know everything produces sound wave just by existence and effect flow of air around them with their natural frequency. These frequencies are beyond hearing range of humans. Wave of frequency range of 20000hz and thereabouts are called ultra-sonic wave and these waves can be detected by an ultrasonic sensor which helps us to get various knowledge. They are used for measuring object position and orientation, collision avoidance system, surveillance system etc.
WORKING: Basically, an ultrasonic sensor sends ultrasonic waves which travels in air and gets reflected after striking any object. By studying the property of reflected wave, we can get knowledge about objects distance, position, speed etc.
One of the most common application of ultra-sonic sensor is range finding. It is also called as sonar which is same as radar in which ultrasonic sound is directed at a particular direction and if there is any object in its path it strikes it and gets reflected back and after calculation time taken to come back we can determine distance of object. in real life this method is used by bats.
Hardware and Programming setup:Step 1: Gathering all the required componentsBolt IOT Wifi module
Jumper wires
Breadboard
Ultrasonic sensor
Arduino UNO
Servo motor
Step 2: Assembling the hardwareHardware system consist of basically 3 components named as Arduino, servo-motor, and ultra-sonic sensor. Ultrasonic sensor is mounded upon a servo motor which helps it to move and provide it a turning mechanism. Both ultrasonic sensor and servo motor are controlled and powered by Arduino.
- > control line of servo motor is connected to D6 pin of Arduino
- >connect echo pin of ultrasonic sensor to D8 pin of Arduino
- >D7 pin of Arduino is connected to Trig pin of sensor
- >VCC pins of servo motor and ultrasonic sensor is connected to 5V pin ofArduino
- >ground pin of Arduino is connected to ground pin of both servo motor and ultra-sonic sensor.
- >Transmitter pin of arduino to receiver pin of bolt and viceversa.
This project is to calculate the distance position of the object placed at some distance from the sensor. Ultrasonic sensor sends the ultrasonic wave in different directions by rotating with help of servo motor. This wave travels in air and gets reflected back after striking some object. This wave is again sensed by the sensor and its characteristics is analysed and output is displayed in screen showing parameters such as distance and position of object.
Arduino IDE is used to write code and upload coding in Arduino and helps us to sense position of servo motor and posting it to the serial port along with the distance of the nearest object in its path. If any object is detected, we get an alert message to the registered moble number from twilio, a third-party SMS functionality provider.
Twilio is a cloud communications platform as a service (PaaS) company. Twilio allows software developers to programmatically make and receive phone calls and also send and receive text messages using its web service APIs.
Step 4: SoftwareConfiguration
If you dont have a twilio account then visit https://www.twilio.com/ and signup.
You will have to verify your e-mail and phone number inorder to use twilio services.
Follow the below instructions:
1. Once you've logged in, Click on an arrow on the left top side.
2. Click on 'Create new project'.
3. Give it a name and some basic questions will be asked on what features we want to use etc.
4. Once you have setup everything you can see 'Get a trial number' and click on choose number and save it.
5. Note down Auth Token and SID of your twilio account as well.
6. Your sms part is ready!!!
Comments