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

Arduino Nano GPS and GSM Tracker with Battery Power

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

Circuit Documentation

Summary

This circuit interfaces an Arduino Nano with a GPS NEO 6M module and a SIM800c GSM module. The GPS module provides location data, which is then transmitted via the GSM module. The circuit also includes a TP4056 battery charging module and a 3.7V battery to power the system.

Component List

  1. Arduino Nano

    • Description: A small, complete, and breadboard-friendly board based on the ATmega328P.
    • Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK
  2. GPS NEO 6M

    • Description: A GPS module that provides location data.
    • Pins: VCC, RX, TX, GND
  3. SIM800c GSM Module

    • Description: A GSM module used for sending and receiving SMS and data.
    • Pins: SPK-, SPK+, MIC-, MIC+, DTR, RING, GND, TXD, RXD, LINK GND, ANT, VCC(3.7 - 4.2)
  4. TP4056

    • Description: A lithium battery charger module.
    • Pins: OUT-, B-, B+, OUT+, IN-, IN+
  5. 3.7V Battery

    • Description: A rechargeable lithium-ion battery.
    • Pins: +, -
  6. Pushbutton (1)

    • Description: A simple pushbutton switch.
    • Pins: Pin 3 (out), Pin 4 (out), Pin 1 (in), Pin 2 (in)
  7. Pushbutton (2)

    • Description: A simple pushbutton switch.
    • Pins: Pin 3 (out), Pin 4 (out), Pin 1 (in), Pin 2 (in)

Wiring Details

Arduino Nano

GPS NEO 6M

SIM800c GSM Module

TP4056

3.7V Battery

Pushbutton (1)

Pushbutton (2)

Code Documentation

/*
 * Arduino Nano GPS and GSM Module Interface
 *
 * This code reads GPS data from the NEO 6M module and sends it via the
 * SIM800c GSM module. The GPS module is connected to pins D2 (TX) and D3 (RX)
 * of the Arduino Nano. The GSM module is connected to pins D4 (TXD) and D5 (RXD).
 */

#include <SoftwareSerial.h>

// GPS module connections
#define GPS_TX_PIN 2
#define GPS_RX_PIN 3

// GSM module connections
#define GSM_TX_PIN 4
#define GSM_RX_PIN 5

SoftwareSerial gpsSerial(GPS_TX_PIN, GPS_RX_PIN); // RX, TX
SoftwareSerial gsmSerial(GSM_TX_PIN, GSM_RX_PIN); // RX, TX

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

  // Wait for GSM module to initialize
  delay(1000);
  Serial.println("GSM Module Initialized");
}

void loop() {
  // Read data from GPS module
  if (gpsSerial.available()) {
    String gpsData = gpsSerial.readString();
    Serial.println("GPS Data: " + gpsData);

    // Send GPS data via GSM module
    gsmSerial.println(gpsData);
    Serial.println("Data sent via GSM");
  }

  // Small delay to avoid flooding
  delay(1000);
}

This code initializes the GPS and GSM modules and continuously reads GPS data, which is then sent via the GSM module. The GPS module is connected to pins D2 (TX) and D3 (RX) of the Arduino Nano, while the GSM module is connected to pins D4 (TXD) and D5 (RXD).