Transmitting GPS Data to Firebase Database via SIM800L Module

Hello, I'm currently engaged in a high-priority project tasked with developing a GPS tracking device within a tight timeframe of just three days. The objective is to construct a streamlined GPS tracker for vehicles utilizing a NEO-6M GPS module, a SIM800L GSM module, an Arduino Nano, and assorted ancillary components. Following the device's assembly, the pivotal requirement involves transmitting processed location data from the Arduino Nano to a Firebase database via the SIM800L module.

Could you please guide me on the process of transmitting GPS data to a Firebase database using the SIM800L module?

The NEO-6M GPS is ancient technology, there are far better GPSs about these days, its also end of life so its an odd choice for a practical modern design.

How much code have you written ?

What is your experience with Arduinos, GPSs, Firebase and the SIM800L ?

1 Like

The NEO-6M GPS is ancient technology, there are far better GPSs about these days, its also end of life so its an odd choice for a practical modern design.

I know it is a bit outdated but one of the project's objectives is to make it as budget-friendly (you can call it "as cheap as possible"). As the deadline is a little bit tight I have to work with this, but I sure plan to upgrade all the components in the future for more advance development.:blush:

How much code have you written ?

as for the code this is the one I've been trying with:

#define TINY_GSM_MODEM_SIM800

#include <TinyGsmClient.h> 
#include <ArduinoHttpClient.h>

#include <SoftwareSerial.h>
 

SoftwareSerial sim800(6, 5);
 
 
const char FIREBASE_HOST[]  = "tracker-2b0fc-default-rtdb.asia-southeast1.firebasedatabase.app";
const String FIREBASE_AUTH  = "Qv2aKCsQjBhbO8jNfLM3q55FVQRNFiPzoAXcNCXj";
const String FIREBASE_PATH  = "/";
const int SSL_PORT          = 443;
 
char apn[]  = "internet";
char user[] = "";
char pass[] = "";
 
 
TinyGsm modem(sim800);
 
TinyGsmClientSecure gsm_client_secure_modem(modem, 0);
HttpClient http_client = HttpClient(gsm_client_secure_modem, FIREBASE_HOST, SSL_PORT);
 
unsigned long previousMillis = 0;
 
 
void setup()
{
  Serial.begin(9600);
  Serial.println("device serial initialize");
 
  sim800.begin(9600);
  Serial.println("SIM800L serial initialize");
 
  Serial.println("Initializing modem...");
  modem.restart();
 
  http_client.setHttpResponseTimeout(10 * 1000); //^0 secs timeout
  Serial.print(F("Connecting to "));
  Serial.print(apn);
}
 
void loop()
{
 
  
  if (!modem.gprsConnect(apn, user, pass))
  {
    Serial.print(F("Connecting to "));
    Serial.print(apn);
    Serial.println(" fail");
    delay(1000);
    return;
  }
  else
  {
    Serial.println("GPRS Connected");
    delay(1000);
    while(1);
  }
}

What is your experience with Arduinos, GPSs, Firebase and the SIM800L ?

I am a beginner at this kind of project, and as for my experience with arduinos, gps, firebase database, and SIM800L, I have previously worked with all these components but this is the first time I'm doing something combining all the components, especially uploading something to an online database from a module in realtime.

If you can assist me in this project this will be a great help!!! Thank you😊

Youre up for a real challange, beginner and three day time to do it.

My tip, you should part your project, get the part-code to work and then put it together. Do you even recive signals from the gps? Both sim800 and the 6m gps typically use rx/tx to recive/send commands. The arduino uno only have one hardware serial port, used for the usb/serial output. The software serial can only be used in one instance. How do you intend to communicate with the modules?

I would not use this hardware myself. Why not use simcom 7000/7600? It has gsm module, gps, rtc, and so on, in the same package. The 2G network that 800L use, is soon shut down anyway.

1 Like

Indeed so.

No way does it make sense to have a project that requires multiple serial comms and uses an ancient Arduino that does not have the required hardware serial ports.

Maybe thats the point of the competition, your supposed to say that the Arduino Nano is just not suitable and use a Mega instead.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.