**Sending SMS and Receiving GPS Coordinates using the Arduino Uno**
Next we need to send an SMS which is also easily accomplished by entering two commands of which the second one contains the phone number of the receiver. Then we enter the text of the SMS and ultimately send it, which appears to also work fine.
To utilize the 3G and email capabilities of the board in order to send an email with the GPS coordinates, but no matter what I tried there always seemed to occur a server error so I had to scratch that idea. Nevertheless after converting the command lines for sending an SMS and receiving the GPS data into a standalone sketch by also utilizing a bit of the Adafruit phon library it was time to create a shock sensor for that. I used a p Electric transducer after replacing its thin and fragile wires with something a bit more robust.
We can hook it up to an oscilloscope in order to observe that it creates a small ac voltage, with peaks of up to 500 Ms whenever the transducer shakes and that is basically how we can detect when our vehicle moves around. But the small voltage peaks of 500 Ms are not microcontroller compatible yet to solve that I used an MCP 602 opamp in a differential amplifier configuration with four resistors to reach a gain of 34 and thus achieve output voltages of around 4 to 5 volts.
This outputs directly connects to the noninverted input of the other opamp inside the IC to create a comparator through the help of a 50 kiloohm trimmer on the inverted inputs this way we can set the sensitivity level of the system and thus only get a 5vt output of the comparator whenever the voltage of the pzo electric transducer is higher than the voltage of the trimmer AKA voltage div. The output of the comparator then directly connects to pin 2 of the uino and will act as an interrupt to reset a timer variable that would put the uino into sleep mode after no occurring shocks for 70 minutes to also save power.
I added a m fets with pull down resistor and gate resistor on pin 13 of the uino in order to turn off the sim 5320 board when it does not need to acquire and send the GPS location. The last mandatory component was a low Dropout 5vt regulator in combination with a key switch to turn the maximum 6.5 Vols of my utilized 6vt battery into suitable 5 volts.
**Creating a Shock Sensor Circuit**
After the circuit was complete on a breadboard, let's try to summarize the code after the power up through the key switch the microcontroller enters sleep mode after a 10-second delay once the shock occurs the microcontroller wakes up resets the timer and since timer two was zero to begin with it starts with getting the GPS location and sending it afterwards both timers count up through the Millies function and once timer tour reaches a time of 30 minutes it once again gets the GPS location sends it and resets its own value this counting up Madness then repeats and eventually reaches the sleep mode after 70 minutes.
Once I tested the circuit with the codes one last time, I gathered the required components for the circuit and connected them onto a piece of perfboard according to my finalized schematic only difference to before was that this time I used an Arduiono Pro Mini whose status LEDs and voltage regulator I removed to save power and of course you can find more information to recreate this project as always in the video description.
**Assembling and Testing the Circuit**
Once the circuit was complete, I drill a 10 mm hole into a suitable Project Box secured the circuit inside it and attached the p Electric transducer the GPS NG's M antenna and the key switch to the circuits after small battery tests everything still functioned correctly and Drew around 3.1 milliamp in sleep mode this equals a battery run time of around 60 days with a battery capacity of 4.5 amp hours.
The last step was to drill an 18 mm hole and secure the key switch inside it as well as the Project Box along with the transducer through the help of double-sided tape inside my vehicle and with that being done I will never have to worry about my precious M kick anymore.
WEBVTTKind: captionsLanguage: enif you are like me then you probably have a precious vehicle in my case a moi which you don't want to get stolen at all costs so to let me sleep better during the night I will show you in this project video how to build a shock activated SMS GPS tracking system which will send you the position of your beloved vehicle when it is moved around without you knowing it let's get started the main component of this build is a zim 5320 development board which possesses quite a lot of useful features even 3G capability and a GPS mode to use it though we firstly need to insert a proper SIM card on the back of the board and to make our life easier it is also a good idea to insert the SIM card into an old phone beforehand in order to remove the SIM lock then we can simply hook up the included GSM and GPS antenna and connect the 5vt and bmcu pin to the positive terminal of a 5vt power source and the ground pin to the negative terminal during the power up of the board both LEDs should light up and once the net LED starts to Blink you know you did everything correctly to communicate with it I connected its St XD pin to pin 10 of notu Uno the SR XD pin to pin 11 and its ground potential to the ground potential of the uino as a first test I used the software seral library to turn pin 10 and 11 into seral Data pins and simply directed or receive data from them to the common serial Monitor and vice versa but before upload in the codes you might have noticed that I set the B rate for the Sim 532 to 4,800 even though its standard B rate is 115,200 the reason for that is that I use the Ada food phoner Library wfix example sketch set B rate beforehand in order to change it but getting back to topic after uploading the software seal sketch we can open the SE monitor set the board rate and both new line and carriage return and send over the command a if the board replies with okay everything works fine and we can now use dozens of different AT commands from the 500 pages at command sets to tell the board what to do for the GPS location though we basically just need these two commands one after the other but keep in mind that the second commands can take quite a while to return anything useful here I'm censoring the received information for obvious reasons but the first and most important part of this long line should look something like this the first number is the latitude and the second the longitude so by converting those coordinates to a more common degrees format we can copy them into for example Google Maps and thus see the position of the Zim 5320 next we need to send an SMS which is also easily accomplished by entering two commands of which the second one contains the phone number of the receiver then we enter the text of the SMS and ultimately send it which appears to also work fine last but not least I wanted to utilize the 3G and email capabilities of the board in order to send an email with the GPS coordinates but no matter what I tried there always seemed to occur a server error so I had to scratch that idea but nevertheless after converting the command lines for sending an SMS and receiving the GPS data into a standalone sketch by also utilizing a bit of the Ada food phono Library it was time to create a shock sensor for that I used a p Electric transducer after replacing its thin and fragile wires with something a bit more robust we can hook it up to an oscilloscope in order to observe that it creates a small ac voltage volage with peaks of up to 500 Ms whenever the transducer shakes and that is basically how we can detect when our vehicle moves around but the small voltage peaks of 500 MT are not microcontroller compatible yet to solve that I used an mCP 602 opamp in a differential amplifier configuration with four resistors to reach a gain of 34 and thus achieve output voltages of around 4 to 5 volts this outputs directly connects to the noninverted input of the other opamp inside the IC to create a comparator through the help of a 50 kiloohm trimmer on the inverted inputs this way we can set the sensitivity level of the system and thus only get a 5vt output of the comparator whenever the voltage of the pzo electric transducer is higher than the voltage of the trimmer AKA voltage div the output of the comparator then directly connects to pin 2 of the uino and will act as an interrupt to reset a timer variable that would put the uino into sleep mode after no occurring shocks for 70 minutes to also save power I added a m fets with pull down resistor and gate resistor on pin 13 of the uino in order to turn off the sim 5320 board when it does not need to acquire and send the GPS location the last mandatory component was a low Dropout 5vt regulator in combination with a key switch to turn the maximum 6.5 Vols of my utilized 6vt battery into suitable 5 volt and now that the circuit was complete on a breadboard let's try to summarize the code after the power up through the key switch the microcontroller enters sleep mode after a 10-second delay once the shock occurs the microcontroller wakes up resets the timer and since timer two was zero to begin with it starts with getting the GPS location and sending it afterwards both timers count up through the Millies function and once timer tour reaches a time of 30 minutes it once again gets the GPS location sends it and resets its own value this counting up Madness then repeats and eventually reaches the sleep mode after 70 minutes once I tested the circuit with the codes one last time I gathered the required components for the circuit and connected them onto a piece of perfboard according to my finalized schematic only difference to before was that this time I used an alino Pro Mini whose status LEDs and voltage regulator I removed to save power and of course you can find more information to recreate this project as always in the video description once the circuit was complete I drill a 10 mm hole into a suitable Project Box secur the circuit inside it and attach the p Electric transducer the GPS NG's M antenna and the key switch to the circuits after small battery tests everything still functioned correctly and Drew around 3.1 milliamp in sleep mode this equals a battery run time of around 60 days with a battery capacity of 4.5 amp hours the last step was to drill an 18 mm hole and secure the key switch inside it as well as the Project Box along with the transducer through the help of double-sided tape inside my vehicle and with that being done I will never have to worry about my precious M kick anymore I hope you like this project if so don't forget to like share and subscribe that would be awesome stay creative and I will see you next timeif you are like me then you probably have a precious vehicle in my case a moi which you don't want to get stolen at all costs so to let me sleep better during the night I will show you in this project video how to build a shock activated SMS GPS tracking system which will send you the position of your beloved vehicle when it is moved around without you knowing it let's get started the main component of this build is a zim 5320 development board which possesses quite a lot of useful features even 3G capability and a GPS mode to use it though we firstly need to insert a proper SIM card on the back of the board and to make our life easier it is also a good idea to insert the SIM card into an old phone beforehand in order to remove the SIM lock then we can simply hook up the included GSM and GPS antenna and connect the 5vt and bmcu pin to the positive terminal of a 5vt power source and the ground pin to the negative terminal during the power up of the board both LEDs should light up and once the net LED starts to Blink you know you did everything correctly to communicate with it I connected its St XD pin to pin 10 of notu Uno the SR XD pin to pin 11 and its ground potential to the ground potential of the uino as a first test I used the software seral library to turn pin 10 and 11 into seral Data pins and simply directed or receive data from them to the common serial Monitor and vice versa but before upload in the codes you might have noticed that I set the B rate for the Sim 532 to 4,800 even though its standard B rate is 115,200 the reason for that is that I use the Ada food phoner Library wfix example sketch set B rate beforehand in order to change it but getting back to topic after uploading the software seal sketch we can open the SE monitor set the board rate and both new line and carriage return and send over the command a if the board replies with okay everything works fine and we can now use dozens of different AT commands from the 500 pages at command sets to tell the board what to do for the GPS location though we basically just need these two commands one after the other but keep in mind that the second commands can take quite a while to return anything useful here I'm censoring the received information for obvious reasons but the first and most important part of this long line should look something like this the first number is the latitude and the second the longitude so by converting those coordinates to a more common degrees format we can copy them into for example Google Maps and thus see the position of the Zim 5320 next we need to send an SMS which is also easily accomplished by entering two commands of which the second one contains the phone number of the receiver then we enter the text of the SMS and ultimately send it which appears to also work fine last but not least I wanted to utilize the 3G and email capabilities of the board in order to send an email with the GPS coordinates but no matter what I tried there always seemed to occur a server error so I had to scratch that idea but nevertheless after converting the command lines for sending an SMS and receiving the GPS data into a standalone sketch by also utilizing a bit of the Ada food phono Library it was time to create a shock sensor for that I used a p Electric transducer after replacing its thin and fragile wires with something a bit more robust we can hook it up to an oscilloscope in order to observe that it creates a small ac voltage volage with peaks of up to 500 Ms whenever the transducer shakes and that is basically how we can detect when our vehicle moves around but the small voltage peaks of 500 MT are not microcontroller compatible yet to solve that I used an mCP 602 opamp in a differential amplifier configuration with four resistors to reach a gain of 34 and thus achieve output voltages of around 4 to 5 volts this outputs directly connects to the noninverted input of the other opamp inside the IC to create a comparator through the help of a 50 kiloohm trimmer on the inverted inputs this way we can set the sensitivity level of the system and thus only get a 5vt output of the comparator whenever the voltage of the pzo electric transducer is higher than the voltage of the trimmer AKA voltage div the output of the comparator then directly connects to pin 2 of the uino and will act as an interrupt to reset a timer variable that would put the uino into sleep mode after no occurring shocks for 70 minutes to also save power I added a m fets with pull down resistor and gate resistor on pin 13 of the uino in order to turn off the sim 5320 board when it does not need to acquire and send the GPS location the last mandatory component was a low Dropout 5vt regulator in combination with a key switch to turn the maximum 6.5 Vols of my utilized 6vt battery into suitable 5 volt and now that the circuit was complete on a breadboard let's try to summarize the code after the power up through the key switch the microcontroller enters sleep mode after a 10-second delay once the shock occurs the microcontroller wakes up resets the timer and since timer two was zero to begin with it starts with getting the GPS location and sending it afterwards both timers count up through the Millies function and once timer tour reaches a time of 30 minutes it once again gets the GPS location sends it and resets its own value this counting up Madness then repeats and eventually reaches the sleep mode after 70 minutes once I tested the circuit with the codes one last time I gathered the required components for the circuit and connected them onto a piece of perfboard according to my finalized schematic only difference to before was that this time I used an alino Pro Mini whose status LEDs and voltage regulator I removed to save power and of course you can find more information to recreate this project as always in the video description once the circuit was complete I drill a 10 mm hole into a suitable Project Box secur the circuit inside it and attach the p Electric transducer the GPS NG's M antenna and the key switch to the circuits after small battery tests everything still functioned correctly and Drew around 3.1 milliamp in sleep mode this equals a battery run time of around 60 days with a battery capacity of 4.5 amp hours the last step was to drill an 18 mm hole and secure the key switch inside it as well as the Project Box along with the transducer through the help of double-sided tape inside my vehicle and with that being done I will never have to worry about my precious M kick anymore I hope you like this project if so don't forget to like share and subscribe that would be awesome stay creative and I will see you next time