GPS Tracker, Audio Spy, SOS Button | Multipurpose IOT Tracker using A9G & ESP32 | IOT Projects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so we made this multi-purpose iot tracker  version 2 project that will help you to track   the realtime location of anyone or any vehicle  along with the timestamps can help you to spy   someone's conversation secretly with its built-in  microphone and with the Press of the SOS button   you can send your current location and make the  call immediately to your loved ones in case of   some emergency so this is the upgraded version  of our previous multi-purpose IOT tracker project   which we made back in 2022 and you all people  kind of loved that project and the response was   so amazing that we ended up of selling hundred of  units both nationally and internationally and now   we came up with the updated version two of this  project and in this video I'll let you know what's   new in it how we made it and how it works and in  the end if you love this project well you can get   one for yourself from our website I'll be sharing  more details about it in this video so just keep   watching it till the end and let's get started  this video is sponsored by Altium which is a PCB   designer based software company now Altium is not  just another PCB designing software rather it's a   world class and award winning PCB designing tool  that has some features like Advanced interactive   routing with auto completion any angle routing  bus routing face and L tuning follow me more   and much more which makes it an ideal choice  for PCB designing by a lot of companies along   with this they do also have Altium 365 that not  just covers the PCB designing part but also helps   with design sharing via web sharing designs to  Mechanical team for product design centralized   cloud storage and a lot more and along with all  this you do have a very useful search engine made   just for electronic components called as octopart  using octopart you can search for any components   and you will be able to compare its price and  availability around the globe not only that you   can also get the details about the components like  it specifications and data sheet all at one single   place so Altium provides everything to make your  production task a lot easier so do try out all   the services right now as you'll be getting a free  trial version by just clicking the link mentioned   in the description happy making now let's start  with the hardware part so for making this project   we'll be using these all components which are  majority the surface mount components now here   this time we are using the A9G module rather than  the complete development board and also to reduce   the price a bit this time we are using the ESP32  wroom chip rather than the complete XIAO esp32c3   module then we make the complete schematic of  this project and now if I take you through some   important parts then here we have used a TP 4056  as the battery charging circuit with over voltage   protection then we used a microphone on board  for listening to the audio conversation well this   microphone is way more sensitive and clear than  the previous one which comes with the built-in   A9G board and now if I talk about the programming  circuit then here we are using the CH340 based   Auto programming circuit but for the safer side  we also provide the reset and boot Button on   the board so that's the complete schematic and  we'll be providing the schematic in our GitHub   repository whose link is down in the description  of this video so after finalizing the schematic   we turned into the PCB file and after that we gave  the order of this PCB from JLCPCB now when you can   try ordering your own custom PCB project from  JLCPCB by following very simple steps you just   need to follow the Gerber file of the PCB project  select the color masking and just pay for your   order and here if you select the fastest delivery  option well you may get the PCB delivered within   a week and other than pcbs JLCPCB also offers the  SMT assembly service and the 3D printing service   so do check out all those services from the link  mentioned in the description of this video so here   are those PCBs delivered us safely now let's  move on to the complete Soldering Sprocess So all the surface mount components are soldered  on the PCB and now one by one we'll also start   0:03:59.680,1193:02:47.295 [Music] Soldering the dip components and in the end  our final PCB looks like this now this time we   also designed a 3D printed case for this project  and then we attach a printed sticker on it with   all the labels and branding for this project  and that's the complete hardware part of the   project now it's time to test it out [Music] so  this time we made three different codes to play   with this project so let's just test all of them  one by one so the first code is all about testing   our multi-purpose iot tracker using the manual AT  commands so here is the code so I have defined all   the pins like necessary pins for powering on the  A9G board automatically so in the previous version   we need to manually press the power button on the  A9G board to power it up but now the ESP32 board   will take care of powering of the board and those  are the pins and here the SOS button is attached   to the pin 22 okay after that we are beginning  the serial monitor this is for our ESP32 board and   this is for the A9G board which is connected to  the three uh 33 and 25 GPIOS of ESP2 declaring pin   as output and this command is used for powering  up the A9G board okay so rather than pressing the   manual button we are providing the power to the  GPIO pin or the Power Pin you can say then here   we are just using the multi serial communication  code which is uh sending the data from one port   and receiving from another Port now to upload this  this code first of all you need to connect the uh   tracker using a type-c cable with your computer  and make sure the switch is in the on position   after that here I'll select the right board which  is you can select like do it esp32 doit dev kit V1   as well after that I'll select the right COM  port and I will hit the upload button now here   we have already attached the auto programming  circuit to automatically upload the code into   ESP32 board but in case it doesn't get uploaded  well we do have the boot Button on board so you   can press and hold the boot Button and the code  will definitely get uploaded okay so the code   is successfully uploaded I'll open the serial  Monitor and let's try typing the command at to   see if everything is working on not okay so I  got the response as okay which means that ESP32   and A9G are successfully able to communicate with  each other now I let you know a couple of more AT   commands to test out each and everything so next  command is AT+RST=1 now this will reset the A9G   board which will make sure that all the parameters  are set to the default State okay so I'll type uh   enter and it will manually reset the A9G board  let's just wait for a couple of seconds okay so   after resetting now let's just test whether the  SIM card is detected or not for that I'll type   as AT+CPIN? and as you can see it says CPIN ready  which means the SIM card is successfully detected   now let's type out the next AT command to see  the available networks here for that I'll type   AT+COPS=? and this command will definitely take  couple of seconds to get the data so let's just   wait for it and here we got the data so VODAFONE  network is the strongest network available here   that's because I'm using the VI SIM card now here  the A9G board only supports the 2G band so make   sure you use the Sim Card who has the 2G bands  available for India you can use VI and Airtel   so after testing the SIM card and its Network  now let's test out the built-in microphone and   speaker by calling to some other phone now before  making the call we need to do some configurations   for the speaker so yes this time we also attach  the speaker along with the microphone so it's kind   of a two-way communication you can talk with this  IOT tracker with the other person as well so now   for the configuration of the speaker first we need  to select the channel so I'll type the at command   as AT+SNFS=2 it will select the channel two and  now to make the volume as maximum the command   is AT+CLVL=8 now 8 is the maximum volume and now  we are good to go to make a call okay so now to   make the call the at command is ATD and then you  to type the mobile number along with the country   code so I'll type out my office number here and  in the end you need to put the semicolon then   press enter to make the call okay it's ringing  in the [Music] speaker hello hello hello am I   audible yeah you're audible okay so I'm Audible  and I can also listen to the speaker let me just   make the speaker connect to the bigger one uh  bigger microphone yeah tell me how it's going   it's wonderful how's the new Tracker It's amazing  And what do you think how many orders you will get   like thousand sorry thousands okay so hope for the  best and yeah with this we successfully tested the   microphone and the speaker as well and now to cut  down the phone the at command is 0 plus Chu that   is chup right and yeah the call is disconnected  and this we successfully tested the microphone   and the speaker and now we are left with testing  the GPS and for that we need to move towards the   windows side so let me change my position and  we'll test the GPS as well so now I am at the   window location where I place the tracker outside  to get the GPS signal okay and now let's try out   the AT commands for GPS so to turn on the GPS  the AT command is AT+GPS =1 it will turn on the   GPS and now the A9G like the tracker is finding  the satellite connectivity and and to get the   location the at command is AT+Location= 2 okay so  right now it got the satellite connectivity it may   take some time in your case but in my case it find  the network it find the satellite connectivity and   here is the latitude and longitude data and that's  how we came to the conclusion that the GPS is also   working so this was the demo code which I'll be  providing and with this you can know test all   the AT commands and test all the features of this  tracker now let's move on to the next code so now   the second code is kind of same as that we have  used for the IOT tracker version one in which we   used to send the SMS for getting the location  and also there was a feature of SOS button and   stuff like that so we using that same code but  with some modification and with some improvement   so let me show you that code and in the end I'll  show you the demo of that as well okay so here is   the code first of all the pin configurations okay  then necessary variables pretty common now here we   need to type out the SOS number on which we need  to send the SMS and make the call after that here   you need to provide the APN name as well according  to your network Prov provider straight after that   here is the SOS time means now you can change  the time interval so what we're doing is when the   button is pressed and hold for more than 5 second  then only the SOS action will be triggered you can   decrease the number of seconds you can increase  the number of second based upon your application   after the necessary like serial communication  input output declaration now here what we did   is we are turning off the Wi-Fi and Bluetooth of  ESP32 to save the power because we don't require   Wi-Fi and Bluetooth in the whole IOT tracker code  okay straight after that we are waiting for 20   second for initialization of A9G and then what we  are doing is here we have put a different kind of   coding so previously what we were doing is we were  just throwing the AT commands and without waiting   for the response we were providing the next it  command and next and so on but this time what we   did is we are sending the at command and until and  unless we are not getting okay response of that   command we are not moving ahead we are just trying  and trying that at command Okay so with with this   we can be sure that each and every at command is  properly executed before you know providing the   next at command so that kind of improvement we did  in this coding so we are checking the at command   here we are turning on the GPS then GPS low power  then we initializing the sleep mode and this all   at commands for SMS and these all at commands for  speaker okay now straight away moving into the   loop part then Loop part May same pretty much same  but there are little modifications for example   earlier we were we need to send the send location  in all capitals only but now you can send it in   all small and with first letter Capital so all the  three SMS will be considered valid and we'll be   getting the Google Maps link uh with the location  then this feature is newly added here so in this   GPS tracker we can check the battery voltage or  battery percentage as well you just need to type   out the SMS called as battery question mark in  all capitals battery in all smalls and battery   with the first letter capitals with the question  mark and theN board will will send the SMS for the   battery percentage which is really very cool to  check out how much battery is left on our board   okay then other features are same like as soon as  the phone is ringing it will automatically receive   it and after that the SOS button feature is also  provided in which pressing and holding an SOS   button for particular amount of time will trigger  the SOS condition mean send the current location   and give the call to that number so that was the  code like modified code for this new version now   straight away I will select the right board and  comp port and hit the upload button okay so the   code is successfully uploaded now I open the  serial Monitor and here now we need to wait for   at least 20 seconds for all the installation of  A9G commands Okay so commands started executing   one by one and here I have added one more feature  which I missed during the code explanation and now   let me tell you that feature so yeah here is that  feature so once all the commands are successfully   executed uh we will get an SMS on the SOS number  saying that A9G ready so what happens is this   is a battery powered project and you're not sure  whether is connecting to connected to the network   or it is powered on successfully is working or  not but with this SMS you can be sure that your   uh A9G is powered on it's connected and it's  working fine okay so that's a feature we have   added in the new version now let's try out other  features one by one so let's check out the battery   how much battery percentage is there in our uh  like prebuilt in battery so I'll type Battery?   and click on the send button and let's just wait  for it okay so the message is received here and   the received data is 100% that means the battery  is fully charge charge and the response will be   getting here as well great so we got the SMS as  100 which means battery is 100% charge let's just   test out the next command which is send location  and now as I said in the code we can type out in   different different characters like capital and  small okay so I'll type out Send Location oh I   I given the wrong command it's not Send Location  ? it was just Send Location let me just type out   another SMS send location without spaces okay so  I will click on the send button and now let's just   wait for the location data and I have put the  A9G board the tracker board outside the window   for proper satellite Comm uh connections we  received the latitude longitude data here and   now let's just wait for the sms okay we got the  SMS with the Google Maps link and if I click on   the link and click on open it gives me the exact  location of my studio so the GPS feature is also   working fine now let's just test out the auto  call receive feature so I'll make call to this number okay so as you can see the call is received  and it is interference happening so I'll click on   the hangup button so we are successfully able to  receive the call now let's just test out the SOS   feature so I'll press and hold the button for  more than 5 Seconds it says calling in 5 4 3 2   and 1 so s SOS is triggered now it will send the  SMS with the location along with the phone call   let's just wait for it so we received the SMS with  the location like the Google Maps link and we got   the call as well so that was the SOS feature which  is also working completely fine here so that's the   uh uh SMS based firmware or the code which we have  written for the version two improved version with   a couple of added features like battery percentage  and uh what you can say ready message at the   startup now let me take you to the third code  which is about real time location tracking let me   show you that so well this third code was the main  reason why I made the version two of this project   so majority of people who bought the version one  of the product want a feature of realtime location   tracking so till now we are able to get the  location but only when we send the SMS what if we   get want to get the location at every particular  time interval well this code satisfies your   requirement plus it got way more uh features in it  and it is totally customizable like I have written   an MQTT based code like you can transfer the data  by MQTT over internet by GSM network I'm using the   Adafruit MQTT broker here because it was available  for free of cost but you can use any MQTT broker   and you can even use your own MQTT broker deployed  on your own Cloud Server I'll be providing the   example code for for that in my GitHub repository  okay so now let me take you through that code   explain you what kind of things I have added and  in the end I'll show you the demo for that as well   okay so here is the code now I written this code  in a quite a different manner that you'll come   to know while I go through each and every line  so first of all necessary pin configurations   defined here necessary MQTT parameters are defined  here like adafruit broker name in my case it is   io.adafruit.com the port which is1883 then MQTT  username and mqtt password now MQTT username is   nothing but the username of Adafruit io broker  and the MQTT password is nothing but the AIO key   that provided by the MQTT uh sorry adafruit IO  website okay after that here we to provide the   SOS number so in this code as well I have put the  feature of pressing and holding the SOS button to   send the SMS with the current location along on  with the phone call then after that you need to   provide the APN name because this will require  the internet connectivity so you need to provide   the APN name so do search for the APN name of  your network provider and mention that here now   the data sending interval you need to mention  here like what happens is this is a real time   location tracking device so we need to define the  time interval like after how many seconds you want   to send the next data for my testing purpose I'm  sending the data after every 60 seconds that means   1 minute so you can decrease it you can increase  it based upon your application then we have the   SOS time which is mentioned as 5 Second now this  is the time interval of the button press okay   so in my case I have written as if the button is  pressed and hold for more than 5 second then the   SOS activity or SOS task will be triggered you  can change it according to your uh applications   or necessity okay then necessary variables are  declared here now here is the change in the code   so I have made the code based upon tasks okay so  this is is a task based code in which uh I have   divided or made two different task one of which  will be handling only MQTT based application or   services and second will be only responsible  for SOS triggering and SOS activities okay so   MQTT task and SOS button task two different  task which will be running in parallel so   that we can be sure that whenever I press the  button it will definitely send the message and   the call even though the MQTT task is running in  parallels it's a very stable code a lot of time in   making building this code more and more stable  okay then the setup part is pretty much common   now what change we did here is first of all we  are uh resetting the board to make sure all the   parameters are set to default State okay again  this time also we are using the same methodology   of trying and trying that AT command until and  unless that command is successfully executed okay   so first of all resetting the board and waiting  for 20 let's just change it to 15 seconds okay   so waiting for 15 seconds till the A9G board  initializes then after that what we doing doing   first of all we are checking whether the A9G  board is completely wake up or not then we are   making sure the MQTT is disconnected after that  turning on the GPS then this are the condition   for making the connection with the gsm network  then we are establishing the MQTT connection to   the particular broker Port username password that  we have provided once it is connected now here we   are dividing the two tasks all the task will  be running in parallel so that's why the void   Loop is completely empty okay so moving on to the  MQTT task what we are doing is we are getting the   location by providing this command and once we  get the location first of all when we don't get   the location it will just print as no location  data and once we get the location it will be   publishing that location data to my MQTT broker to  this uh what we can say topic which in my case is   my username/gpsloc/CSV this is the topic name on  which the data will be published then this time we   are also publishing the real time battery status  like how much percentage of battery left it's   it's a very important and crucial information that  you should know about your tracker so getting the   battery information and sending it or publishing  it to the topic called a Sachin_SMS feeds battery   that's the two thing that we are doing then we  are waiting for 60 seconds let me just change it   here I will write it as send data after so send  data after into 1000 that means whatever time   you provide into 1000 that much milliseconds it  will wait now here we don't provide delay rather   we provide vTask delay uh that is mandatory so  we don't need to provide delay in this kind of   task based codes rather we need to provide the V  task delay so what we to do is it will definitely   wait for 60 seconds but in the meantime it will  be handling other task it won't stop or hold   that controller it will be running all the task  tasks in parallel that's a beauty of this kind   of coding then we have the different task called  as SOS button task which will only be triggered   when the SOS button is pressed and it will check  whether the button is pressed for more than the   SOS time that we have mentioned in my case it is 5  Second and if is it so the SOS will trigger and it   will will call the function called as get Google  Maps link which will take the location data create   a Google Maps link and send it to the SOS number  provided and it will also make a call to that SOS   number and this will be really helpful in case  of the emergency so realtime location plus SOS   button running in parallel a fantastic code and it  is flawlessly working let me show you the demo so   right now select the right board and comp board  which is already selected and let's just hit the   upload button really we put a lot of effort and  making the hardware and making the code so well   do click the LIKE button you really appreciate  our effort and all this will be giving to you   as well so that you can use it okay so code is  successfully uploaded I'll open the serial Monitor   and let's just wait for a couple of seconds  so first of all it is resetting the board as   we have provided okay it started executing all the  commands Okay it also connected to the MQTT broker   and right now we don't have any location data but  we do have the battery data so it send the battery   data as 100% now it shows as delay that means it  will it is waiting for 60 second but let's just   check whether the battery data is received or not  so I'll go to my Adafruit io dashboard and here   I'll go to feeds and into battery as you can see  I received the battery percentage 100 at the time   10 41 which is time in the clock right now so we  received the battery data or MQTT in real time now   let's just wait for a couple of more seconds to  get the location data as well okay so this time   it got the location data and it is sending the  data and the data is sent and the battery data   is also sent let's just check the back end and as  you can see we got the GPS data and Battery data   less than a minute ago so right now we got the  data now go to the dashboard let's just observe   in the map widget so here is the map widget and  if I zoom it in let just zoom it out a bit okay   here is that dot so let me just zoom into that  dot and it shows the location of my studio and   every 60 second like every minute the data will  be updated on this dashboard which is running over   GSM network using our own made tracker 2.0 and  now they just test the SOS feature whether it is   running parallel or not let me test it out so I'll  open the serial monitor okay and now let's just   press the button okay it says but button press 0  1 2 3 4 and SOS triggered it got the location it's   sending the message let's just wait and in the  parallel as you can see it also publish the data   to MQTT so both tasks are running in parallel wow  what an amazing code it is so I got the data I got   I got the SMS saying that uh I'm here I I don't  know if it is visible or not so yeah this is the   link which I got and I got a call as well so this  is the call which I got and I again receive the   call and I can talk to it and in parallel the data  is being sent by that secondary task so everything   is running in parallel flawlessly without any  interference in between so that was the final code   for our tracker 2.0 so those were the three super  solid codes which you can download from our GitHub   repository now after watching all this one obvious  question must be coming in your mind which is how   long the battery last on this project so well to  give you the answer for this we put this device on   testing mode so we uploaded the realtime tracking  code to send the data after every 60 second and   then we connected 1,000 mAh battery and started  our testing at 11:12 p.m. and the battery was   87% charged at that time and we were successfully  getting the data of both location and the battery   now on the next day when I came back to the studio  at 11:00 a.m. the dashboard shows that the last   data was received 3 hours ago and when I checked  the logs the data was last received at 7:57 a.m.   that means 1,000 mAh battery which was charged  at 87% lasted for almost 9 hours with the data   sending rate of every 60 seconds or we can say  1 minute similarly we also did testing for the   second code which was getting the location based  upon sending SMS so we were fetching the data of   battery and the location every 15 minutes and  this firmware lasted for almost 12 hours on   that same 1,000mAh battery so that was the battery  life which definitely is not that awesome but we   can definitely increase it by changing the code  a bit to make it more battery efficient so now   anyone of you watching this video know how I can  change the code to make it more battery efficient   well do share your suggestions thoughts down in  the comments of the video and definitely try to   modify that code and provide it to the Community  member now if I talk about how you can get one   for yourself then we are definitely selling this  complete project through our website in both the   variations with casing and without casing whose  link you can find in the description of this video   and today on 15th October when I'm launching  this video it's my 28th birthday as well so on   the special occasion I want to give back something  to you so if you purchase this product today till   midnight according to Indian Standard times you  will be getting flat 10% off on the product along   with the techiesms merchandise with my signature  on it so this is kind of a written gift which I   want to give to my subscribers on my 28th birthday  and if you're watching it from outside India and   want to purchase this project well you can DM us  on Instagram and WhatsApp and you can place the   order from there you can get those details in  the description of this video so that was the   version two of our multi-purpose iot tracker  project and I hope you all people really loved   this project and if it's it so well do share your  thoughts down in the comments of the video do let   me know what's good in it or what's bad in it  and we'll try to modify and rectify that in the   version three of the uh multi-purpose IoT tracker  kit so yeah that being said I am just ending this   video here and now just wait for my next video  and then explore learn share with me TechieSMS
Info
Channel: techiesms
Views: 12,343
Rating: undefined out of 5
Keywords: techiesms, electronics, electronics projects, GPS tracker, multipurpose iot tracker, audio spy project, esp32 projects, iot projects, A9G module, Realtime location tracking, Adafruit mqtt, adafruit io
Id: RZd9lCMBnag
Channel Id: undefined
Length: 28min 1sec (1681 seconds)
Published: Sat Oct 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.