Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO GPS Tracker with GSM Module and Battery Power

View and Edit Project In Cirkit DesignerImage of Arduino UNO GPS Tracker with GSM Module and Battery Power

Circuit Documentation

Summary

This circuit involves multiple Arduino UNO microcontrollers, a GPS NEO 6M module, a SIM800L EVB GSM module, a 3.7V LiPo battery, and a Voltage Regulator. The primary function of this circuit is to read GPS data and send the coordinates via SMS using the GSM module. The circuit is powered by a 3.7V LiPo battery regulated to the required voltage levels.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. GPS NEO 6M

    • Description: A GPS module used for receiving GPS signals.
    • Pins: VCC, RX, TX, GND
  3. 3.7V LiPo

    • Description: A 3.7V Lithium Polymer battery used for powering the circuit.
    • Pins: +Ve, GND
  4. Voltage Regulator

    • Description: A component used to regulate the voltage from the LiPo battery to the required levels.
    • Pins: GND, IN, OUT
  5. SIM800L EVB GSM

    • Description: A GSM module used for sending SMS.
    • Pins: RST, GND, TXD, RXD, VDD, VCC

Wiring Details

Arduino UNO

GPS NEO 6M

3.7V LiPo

Voltage Regulator

SIM800L EVB GSM

Documented Code

Arduino UNO (Primary Microcontroller)

#include <SoftwareSerial.h>

// GPS module connections
SoftwareSerial gpsSerial(3, 4); // RX, TX

// GSM module connections
SoftwareSerial gsmSerial(5, 6); // RX, TX

void setup() {
  // Initialize serial communications
  Serial.begin(9600);
  gpsSerial.begin(9600);
  gsmSerial.begin(9600);

  // Initialize GSM module
  gsmSerial.println("AT");
  delay(1000);
  gsmSerial.println("AT+CMGF=1"); // Set SMS to text mode
  delay(1000);
}

void loop() {
  // Read data from GPS module
  if (gpsSerial.available()) {
    String gpsData = gpsSerial.readStringUntil('\n');
    Serial.println(gpsData);

    // Extract GPS coordinates from gpsData
    String latitude = extractLatitude(gpsData);
    String longitude = extractLongitude(gpsData);

    // Send GPS coordinates via SMS
    sendSMS(latitude, longitude);
  }

  delay(10000); // Wait for 10 seconds before next reading
}

String extractLatitude(String gpsData) {
  // Implement GPS data parsing to extract latitude
  return "latitude";
}

String extractLongitude(String gpsData) {
  // Implement GPS data parsing to extract longitude
  return "longitude";
}

void sendSMS(String latitude, String longitude) {
  gsmSerial.println("AT+CMGS=\"+1234567890\""); // Replace with your phone number
  delay(1000);
  gsmSerial.print("GPS Coordinates: ");
  gsmSerial.print("Latitude: ");
  gsmSerial.print(latitude);
  gsmSerial.print(", Longitude: ");
  gsmSerial.print(longitude);
  delay(1000);
  gsmSerial.write(26); // ASCII code for CTRL+Z to send the SMS
  delay(1000);
}

Other Arduino UNO Microcontrollers

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

This concludes the documentation for the circuit.