GPRS + GPS + Adafruit MQTT + Solar Charging based GPS Tracker | ESP32 Projects | IOT Projects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so I already made a lot of GPS tracker based projects in this channel but this one is little bit different as compared to all others well this is a self-charged GPS tracker in which you just need to insert the battery once and then you automatically charge itself with the help of the solar panel and the solar energy charging IC build on this board so in this video I'm gonna guide you about how to make your own GPS tracker based on t7000 gboard to do live location tracking over internet for absolutely free without paying any single charge to any Cloud platform because here in this project we are going to use the Adafruit IO mqtt broker so this video got a lot of new things to learn so stick around and let's get started this video is sponsored by LTM and they came up with an amazing product called as ldm 365. so LTM 365 is an Electronics product design platform that unites PCB design mcad data management and teamwork so with LTM 365 you can do the PCB designing task you can share your projects over web for review purposes it do cover sharing your PCB file to Mechanical team so that they can create the mechanical product package based on your PCB then it also provides the centralized cloud storage so you don't need to rely on one single computer for your files it also helps you with managing your components and get real-time supply chain data for your components it also allows multiple people to work on single project and in the end it also helps you with sending your design to final manufacturing units so Altium 365 takes care of all other tasks so you put more time and effort in making something creative and useful and the good part is you can try out its free version as well I'll leave its free trial version link down in the description of this video so do check that out and now let's start with this video so for making that project I'll be using the TCM 7000g board which I recently received from Lily go and I already made a detailed getting started video about it in which I talked about different functionalities of this particular board and how to use it with the help of Arduino ID I'll leave its video linked down in the description of this video so do check that out now as this board has built-in GPS GPRS battery charging circuit via solar panel compatibility well the first product idea that came in my mind was to make a battery powered GPS tracker along with the solar charging compatibility and well don't make me wrong uh this not only works with the 2G GPRS connectivity but it also works with the 4G NBI iot connectivity as well so in case you have the nbiot connectivity option well you can go for that as well with the same project so let's start this project by sending the GPS coordinate data directly to the Adafruit IO server and for that let's first configure our adafrudio dashboard so now for those who don't know what Adafruit IO is then aw Tio is then Cloud mqd broker that is available for free to use but of course with some limitation and I already used this platform quite a long time back with the help of the ESP devices to make my own home automation project I'll leave the link of that video down in the description of this video in case you want to know in detail about this particular platform okay now recently I came to know that this Adafruit IO empty broker also provides the map widget to you know track a location or get the GPS coordinates and visualize it on the map widget okay a previously I was thinking of to use the blink iot platform but in the new blink platform the map widget is available inside the paid version only and to use that widget you have to pay somewhere around 619 INR Indian rupees to use that map widget so I thought why not to go for this Adafruit i o to use this feature for absolutely free okay so first of all you need to make an account on this platform and after making the account you just need to go on to the dashboard and here just click on the new dashboard in case there is no dashboard visible in my case I already have a welcome dashboard which you all must be having okay so here's our welcome dashboard now here click on the setting icon and click on create new block now here we'll select this map widget okay and now here we need to create a feed now feed is nothing but the topic in ambiguity protocol okay so let us create a new feed for that just click here and type the name of the feed I will write as GPS loc that stands for GPS location I'll press enter and it will create a new field so I'll select that feed and click on the next step okay you can give the title of the blocks I'll name it as location you can give any name to this particular block okay you can also choose how the map should look like like a straight map or a high contrast map or a satellite imaginary okay so I'll select the straight map for both my light mode type and the dark mode type Okay click on create block and it will automatically create a block to have a map widget on your dashboard now along with the map we it will also need one more widget to visualize the battery percentage so yes we are also sending the real-time data of how much battery backup is still left in our GPS tracker for that again we'll click on this icon click on create new blog and this time we'll select the gauge widget and here I'll type the new feed name as battery I'll press enter I'll select this battery click on next step and block title will be again battery and its value will be from 0 to 100 okay now I'll click on create block and we have successfully created both the blocks now you can change the size of the block and its layout by clicking clicking on the edit layout button I can drag and drop it here I can drag it here and I can also resize this block by just dragging it from the corner okay so yeah so with this we have successfully created the Adafruit mqt dashboard now let's just jump onto the code side and study how to write the code for our own GPS tracker so here's the code for our Sim 7000g impurity tracker and here you need to provide a couple of details to make this code work on your side as well first of all you need to provide the APN name which differs from service provider okay so here I've used the Vodafone IDs SIM card hence I have written the APN name as www well you can easily get the APN name of your network provider by just typing its name on Google and you'll easily get it okay after that you have to provide a couple of details for your ambiguity broker so the mqt broker name is io.edafruit.com it is a common name if you're using data from Q2 broker if you're using any other broker you have to type out the server name here after that here we have to provide the topics on which we need to publish the data okay now here in Adafruit IO there is one particular format of writing the topic first of all it will be your usernames which in my case Sachin underscore SMS in your case it may be different you can just click on this key icon and it will find the username here so you need to type username slash feeds it will be remain same for your case slash the feed name that you have given so for GPS it is GPS loc for battery it is simple battery now here here in the GPS topic we have one more parameter called as forward slash CSV so why is it so well uh I got this particular term when I went through the documentation official documentation from Adafruit which was about using the Adafruit map widget okay and in that documentation uh when I went to the code I found out that I need to write this forward slash CSV to send the GPS data to the Adafruit IO map widget let me take you to that code so yeah here it is so username slash feeds slash location feed name forward slash CSV if you don't write forwards the CSV you won't be able to visualize the data on the map widget so there is a compulsory thing you need to write okay so make sure you change this topic name or feed name according to your project after that what you do is you also need to make couple of more changes let me guide you so here when you come to this line 167 here you need to provide the username and password or we can say the AIO key of your mqd broker now you can get these details by going into the Adafruit i o dashboard click on the key icon then here is your username you just need to copy that and paste it here and here is your password or you can say AIO key again you need to copy that and paste that here okay so these are the credentials to make successful communication with the mqd broker so these are the parameters you need to enter to make this project work on your end as well now let me show you how the project is working and how it is sending the data okay for that we'll go to the loop part directly because setup part is all about connecting to the GPRS Network and connecting to the mqd broker these two things are done in the setup part everything is done in the loop but like all other steps are done in the loop part let me take you to the loop part so in the loop what we are doing is we are running the mqtt logic like all the mqt tasks are running in the background with the help of mqd.loop top Loop function and here transcoordinate function is called which is responsible for transmitting the coordinate so if I show you this particular function then you'll come to know more about it so here's the trans coordinate function so here first of all we are waiting till we get the latitude and longitude data so the code is written in such a manner that until and unless we don't receive any coordinate it will constantly be you know polling uh our uh Sim 7000 G to get the location data and once we get the location data then and then only the code will move ahead until unless it will just asking for the GPS coordinates so once we get the coordinate what we are doing is we are creating a buffer called a send buffer in which we are storing four different values which is the speed value the latitude value the longitude value and the altitude value now this is again a mandatory format to send the data in Adafruit IO map widget particularly okay speed comma latitude comma longitude comma altitude this data went to send and then only we'll be able to visualize the location on the maps so we don't have any speed or altitude value so we have by default send uh zero in both the cases like speed is 0 altitude to zero we are just sending the proper latitude and longer data whatever we are getting from our Sim 7000g Okay so we are just sending it by a single command called as mqd.publish we are publishing on GPS topic and the data to be published is nothing but the send buffer along with the GPS coordinate as I said we are also mapping the battery voltage or battery percentage you can say in which uh and how we are doing it we do have a ready function called as Read Battery which I got from one of the built-in example code where it is just reading the battery voltage so it will range from three three double zero millivolt to four to double zero millivolt ultimately 3 4.2 volt and what I did is uh as soon as I get that data I'm just mapping that data in between 0 to 100 percent okay and I'm just sending the data to the battery topic by using the command mqtt.publish so these two data we are publishing at a particular interval of time and that interval is let me tell you so after sending the data what we are doing is we are making our ESP board to go inside the deep sleep mode to save the battery and until how many time it will go into sleep mode where it is decided by the variable called as time to sleep so if I scroll uh above you will get that variable somewhere here on the line 61. so time to sleep is 120 second that ultimately means two minutes so after every two minute I am sending the new data you can change this time according to your purpose your project okay if you make it more like if you make it 200 seconds it will be more time inside the sleep mode and it will save the battery okay it will increase your battery backup time okay but you will be getting the data after the 200 seconds of time period so it depends upon your project or application so after it go inside sleep would it automatically wake up and restart whole process so this is all about how we are sending the data about the location and about the battery I hope you got the idea about how this code works we'll definitely providing this code into our GitHub repository whose link is down in the description of this video but we will expect a big thumbs up against this code so we are providing it for free we are just wanting your likes and comments on this video so make sure you do click the like button and let me know in the comment section about how was the score and how was this project so yeah we are ready to upload this code and test this project because and I'll connect this Sim 7000 gboard with my laptop and after that I'll select the right board which is ESP today module right com Port which is already selected and I'll straight away hit the upload button so after uploading the code I'll first insert the SIM card in it after SIM card I'll insert the 18650 battery on the back now turn on this device and put it near to the window so that it can get the location and here I have logged into my different IO account through my smartphone so after some times as you can see I got the data of both location and the battery percentage on the dashboard which is awesome and also we can attach a solar panel on the board to charge the battery as well so here we can use a solar panel up to six volt maximum and the charging through the solar panel is indicated by this red LED well this led turns to Green when the battery is completely charged so our project seems working fine now let's just take this project on a long ride and see the results [Music] [Music] so we are not only getting the location update but it is also drawing a complete path of the device which is great for tracking purpose now here one question arises like how long the project lasts on a single charge of a battery well I did some tests for that as well so here I've inserted a fully charged 18650 battery powered up the board and as you can see the light started blinking which reveals that the board started working this time I also attached a solar panel with the board and in the end I placed it near to the window and after some time I received the first readings on 14th Feb 2 49 PM with 100 battery percentage and while also I receive the location data as well so I left that project for the whole day and on the next day when I came back to the studio the lights on the board were turned off only the solar panel charging IC light was turned on and when I removed the battery and tested its voltage then it was around 2.9 volt so the battery was completely drained and when I checked this server for the last data then I received the last data on 15th Feb 4 AM with 81 percent battery left so that was little confusing for me like with the 80 of the battery left why the product stopped working so on the same day I decided to send the raw analog data of the battery directly to the server and let us see what readings we are getting so after changing the code and recharging the battery to 100 once again I repeated those same steps and I put that device turned on near to the window but this time without a solar panel and on the next day when I came back to the studio again the lights were turned off and when I tested the battery voltage it was again completely drained and when I opened the laptop for the last data while it was on 16th Feb 3 22 am with around 4.1 volt battery again this was really very confusing like with 4.1 volt of data the project should have been working but It ultimately it stopped working so ultimately what I concluded was it was the issue of the battery voltage formula that I got from one of the example code of T Sim 7000g board which I'll try to fix later but yeah this is what I concluded but still with a single charge of battery and with two minutes of deep sleep time I got a battery backup of 12 hours long without a solar panel attached of course and if I attach a solar panel I got a battery backup of more than 13 hours so I got more than one hour of extra battery backup with this small solar panel and that too it was exposed to the Sun for only three hours in a day so if you use a bigger solar panel and if you expose that solar panel to the Sun for longer period of time you can expect way more uh you know better battery backup time now here before ending the video I want to let you know one issue which I faced while using this particular board so I have attached the solar panel with the board and also the battery was attached so battery got drained off at 4 am as I've shown in the video but at around eight or nine am when the you know sun rises the sun rays were falling on the panel it was charging the battery of course but the boat then turned on automatically I need to press the power button or reset button to wake up that board or you turn on that board so you require a manual press of a button even if it is charging via solar panel so this is an issue which I faced and this was the issue which I think I should let you know so that you can come to know about this thing while you know making this making use of this particular board so yeah that was the issue which I faced and I think it should be automatic like as soon as the battery gets charged up the board should get turned on automatically this should happen but it was not at all happening but yeah anyways that was our solar panel based GPS tracking project made using Sim 7000 g board I hope you like this project I hope you got to learn something new from it do share your thoughts about this project down in the comments of the video and yeah subscribe the channel for more such Amazing Project and yeah that being said I'm designing this video here and now just wait for my next turn the next floor learn share with me techie SMS [Music] foreign foreign
Info
Channel: techiesms
Views: 23,456
Rating: undefined out of 5
Keywords: techiesms, electronics, electronics projects, tsim7000g, gps tracker, Adafruit mqtt, GSM tracker, gps tracker project, iot gps tracker, gps tracker based on solar panel
Id: CSH1NB8RdKQ
Channel Id: undefined
Length: 17min 30sec (1050 seconds)
Published: Sat Feb 18 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.