ESP32

Real Time GPS Tracker using SIM7600G 4G LTE, ESP32, and Adafruit Map

Real Time GPS Tracker:

Real Time GPS Tracker using SIM7600G 4G LTE, ESP32, and Adafruit Map- Before making the real time GPS tracker, I had thought about using the Blynk application, you can see I have purchased the Maker Plan.

real time gps tracker

However, even in this plan, the Map widget is not available. The Map widget is available in the Pro Plan. If you click on the “Compare All Plans” and then click on the ‘i button’, you will see that the Map is a Pro widget and it is only available in the PRO plan. And the PRO plan’s monthly subscription is 99 dollars per month, which is very expensive. No sensible person would ever purchase such an expensive plan just for GPS tracking unless he is a businessman.

If you provide services to people, then you can purchase this plan. Because with the Pro Plan, you can set up an entire organization. But for personal use, it’s way too expensive. So, I dropped the idea of using the Blynk application for real-time GPS tracking. Because we can do real time GPS tracking in Adafruit as well, and that too for free.




Amazon Links:

SIM7600G 4G LTE Module

ESP32 WiFi + Bluetooth Module(Recommended)

Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Real Time GPS Tracker Circuit Diagram:

I recommend you should read my previous article on the ESP32 Development board. In that article I have already explained everything. Anyway, here is a basic circuit diagram.

real time gps tracker

  • Connect the VCC of the SIM7600G with 5V
  • Connect the Ground of the SIM7600G with Ground of the ESP32
  • Connect the TX pin of the SIM7600G with GPIO 4 pin of the ESP32
  • Connect the RX pin of the SIM7600G with GPIO 2 pin of the ESP32



real time gps tracker

My hardware setup is completely ready. In the previous article and video, I explained in great detail; how to make this ESP32 WiFi + Bluetooth based development board for the SIM7600G 4G LTE Module. In that article, I practically demonstrated how to control a 220Vac bulb; each time I would send a command to turn ON or Turn OFF the Bulb, the ESP32 would also send me a feedback message obviously with the help of SIM7600G 4G LTE module.

I made this board with certain things in mind. Let me explain it one by one, and then you can decide for yourself whether you should make this board or not.

real time gps tracker

First, with this board, you can remove the SIM7600G if you want to use this board in a location where WiFi is already available. You can use it in your office or home to control different loads or to remotely monitor sensors. I will explain this in one of my upcoming videos. Today, we will use it as a real-time GPS tracker.

Second, the power supply on this board is quite powerful. It’s a 5V and 3A power supply. Using this power supply, we can easily power up all these onboard components including the SIM7600G GSM module. And not only that, we can also power up other sensors and breakout boards using the same power supply.

Third, you can see, on the left and right sides of the ESP32, I have added female headers, in case someone wants to monitor some sensors along with GPS tracking or wants to control their car’s doors or ignition.



Fourth, on this board, you can see that I have not used any DC socket; you can attach 12V and GND wires over here. The advantage of this is that you can easily use it in any waterproofed enclosure.

The power supply on this board can take up to 28 volts input, which means you can power it up using your car’s battery. I will practically demonstrate this when I track my car. Anyway, you can also power up this board with a solar panel.

Fifth, I have also added a relay on this board which you can use to completely disconnect your car or any vehicle’s computer system if someone tries to steal your car; to be more specific, you can use it as an anti-theft switch.

6th, on this board, I have also added terminals for the A02YYUW Waterproof Ultrasonic Sensor. So, you can use the Ultrasonic sensor for car parking and also as an accident avoidance system. When a car comes too close, you can turn on an indicator or a buzzer. I have added these female headers so that you can add sensors and output devices according to your preference. This is basically a development board that you can use to test thousands of projects.

How do you like this board? Let me know in a comment. I have to make many projects using this board; so consider subscribing if you don’t want to miss any of my upcoming articles and videos.

If you don’t want to make this board, you can use a ready-made IoT development board, which is based on the ESP32 and SIM7600G-H 4G LTE module.

real time gps tracker

I have already used it as a GPS tracker in my previous project. In that project, I used to request the GPS location through SMS. The controller would send me Google’s map URL.



real time gps tracker

I was amazed by its GPS tracking and accuracy. It pinpointed my car’s location accurately, and then I used my cell phone’s GPS to track and find my car’s location in just a few minutes. Its GPS antenna is so powerful that it can connect to the GPS satellites within 2 minutes even when it’s inside a room.

Today, we will test the GPS antenna of the SIM7600G 4G LTE module in the same way. We will see if it can connect to the GPS satellites from inside a room.

And this time, instead of requesting the GPS location through SMS, I will track the car location in realtime and then I will go and find it. But, before doing all this, first, let’s set up the Adafruit map.




Adafruit Map setup:

While you are logged in into your registered account on the io.adafruit.com and while the IO tab is selected; click on the Feeds and then click on the New Feed.

real time gps tracker

Write the name and then click on the Create button.

real time gps tracker

Goto the Dashboards and click on New Dashboard.

real time gps tracker

Write the Dashboard name.

real time gps tracker

Open the dashboard.

real time gps tracker

Click on Dashboard Settings and Create New Block.

real time gps tracker

Search for the MAP block and add it.

real time gps tracker

Select the Feed Name and click on the Next Step button.

real time gps tracker

Write the Block Title.

real time gps tracker

Select the Light Mode Map Type as per your needs, in my case I selected Satellite Imagery and select the Dark Mode Map Type. Finally, click on the Create Block button.

Again go to the Dashboard settings and this time click on the Edit Layout…resize the Map… Click on the Save Layout.

real time gps tracker

Then copy the adafruit io credentials

real time gps tracker

Paste the credentials in the code.



Real Time GPS Tracker Program:

Finally, you can upload this program. In my case, I have already uploaded this program so let’s go ahead and start the practical demonstration.

Note: You will also need to install the ESP32 in the Arduino IDE. I highly recommend you should read my getting started article on the ESP32 and how to install it in the Arduino IDE.



Practical Demonstration:

real time gps tracker

Our hardware setup is already complete. As you can see, I have inserted the SIM card, the GPS Antenna is connected, and the Full band LTE antenna is also connected. And as you know, I am using the ESP32 WiFi + Bluetooth Module. So, let’s go ahead and power up this GPS tracking system and see if the GPS antenna will connect to the GPS satellites from inside this room. Let’s go ahead and connect it to the laptop.

real time gps tracker

The Green LED started to blink, which means the SIM7600G GSM module is now connected to the Network, and now we will see how much time the GPS antenna will take to connect to the GPS satellites. For this, I am going to open the Serial monitor on my laptop.

real time gps tracker

It’s been two minutes and still, I can’t see the Longitude and latitude values. Let’s wait for another 5 to 8 minutes.

real time gps tracker

It took almost 5 to 6 minutes to connect to the GPS Satellites and now you can see the Latitude and Longitude values. Last time when I used the SIM7600G-H 4G LTE module; it connected to the GPS satellites within 2 minutes whereas the SIM7600G module took around 6 minutes which still I think is great. Because I have tested other GPS Modules which even take more than 30 minutes and some of them would not even connect to the satellites.



Anyway, the ESP32 sends the Latitude and Longitude values to the Adafruit map and then enters into the sleep mode and then again wakes up and sends the Latitude and longitude values to the Adafruit Map. You can change the sleep duration in the programming. Right now, the sleep duration is 5 seconds.

real time gps tracker

This is the Adafruit Map and you can see we have successfully tracked the GPS location. This is the exact location where I am using this GPS Antenna. Now with the help of this Map, we can track the location of this GPS tracker in real-time.

real time gps tracker

I am using the Car’s battery to power up this tracker. It’s already connected to the network and GPS satellites as I can see the current location of my car. Now I will stand here and watch where my brother takes the car.




real time gps tracker

This is also creating a track which makes it quite easy to track and locate the car; because in real-time we can see which routes the car is taking.

So as you can see, the Car has stopped. And my brother is now waiting at this location just to check if I can find him or not. So let’s go.

real time gps tracker

There’s my Car. Using this GPS tracker, we can track anything in real-time. With this Real Time GPS Tracker you can track a stolen car.

Next, we will use the SIM7600G 4G LTE module with the Blynk application for monitoring a sensor and for controlling some loads. So, consider subscribing if you don’t want to miss that video. So, that’s all for now.



Watch Video Tutorial:

 

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button