What if we were able to continuosly monitor a specific area and was able to know if some anonymous activity such as tresspassing (only examples) or any such activities took place, it would be great isn't? This project aims even though not completely but still in a way of doing that. If I were to give an example to justify my statement, lets take the case of India abt 10-20 elephants die every year due to train collisions, how miserable ! what if we were able to detect the prescence of elephants near the rail track and readily send an sms / phone call to the locomotive driver or forest officials so that they can come in time to save the lives of elephants. My project needs to be integrated with lot of other sensors such as IR sensor, PIR sensor, Seismo sensor, Alarms and much more to be able to completely achieve this, but this is a sort of miniature model., Well, there can be more uses like these with this project...So lets see the working principle
WORKING PRINCIPLEThe ultrasonic sensor continuosly monitors for any objects present between 30 cm and 70 cm and since i've attached a servo it could monitor more area and if an object is found then bolt fetches the serial data from arduino and sends the distance as an sms to your phone using Twilio. Thus a specific area is continuosly monitored
HARDWARE CONNECTIONS & SENSOR EXPLANATIONSThe ultrasonic sensor and servo motor are connected to arduino
There are 4 pins in the ultrasonic sensor out of which 2 are for the power i.e. vcc (+5v) and gnd(0v).The other two pins are trigger and echo connected to the digital pins of the Arduino with which we can measure the distance between an obstacle and the sensor. So I would briefly explain how it works, one of the sensor(the 2 big circles that you see on either side) continuously sends an ultrasonic signal and the other one will recieve the signal only if it has been rebounded from any obstacle and if it receives the signal then the time taken for the signal to travel from the sensor to obstacle and back to the sensor can be determined using echo pin and thus distance can be calculated. The trigger pin is used to send the ultrasonic signal.
Servo motor consists of 3 pins vcc(+5v), Gnd( 0v) and Control(PWM).The vcc and gnd pin can be connected to the vcc and gnd of arduino respectively where as the control pin should be connected to digital PWM pin of the Arduino (PWM pins can be found by looking for a tilde( ~ ) symbol near the pin number. This servo motor can sweep an area between 0 and 180 degrees
The tx and rx of arduino are connected to rx and tx of the bolt respectively which helps in serial communication between the 2 devices.
SETTING UP THE SENSOR WITH THE SERVO MOTORFor connecting the servo to the sensor, An L shaped bracket of foam board was made and the ultrasonic sensor can be attached to this bracket using double sided tape and the bracket is attached to the servo motor and screwed in place.
SOFTWARE CONFIGURATIONIf 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.
After doing all these follow the below instructions:
1. Once you've logged in, You could see an arrow on the left top side. Click on it.
2. Now 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 remember to save it, This will be the twilio number that we have to give in the python code
5. Also note down Auth Token and SID of your twilio account, these are also needed.
6. After all this is done, your sms part is ready!!!
Comments
Please log in or sign up to comment.