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

Arduino UNO GPS Tracker with SMS Notification using GPS NEO 6M and SIM900A

View and Edit Project In Cirkit DesignerImage of Arduino UNO GPS Tracker with SMS Notification using GPS NEO 6M and SIM900A

Circuit Documentation

Summary

This circuit interfaces an Arduino UNO with a GPS NEO 6M module and a SIM900A module. The Arduino reads GPS data from the GPS module and sends it via SMS using the SIM900A module. The connections between the components are detailed below, along with the embedded code running on the Arduino.

Component List

  1. GPS NEO 6M

    • Description: GPS module for receiving location data.
    • Pins: VCC, RX, TX, GND
  2. Arduino UNO

    • Description: 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
  3. SIM900A

    • Description: GSM/GPRS module for sending SMS.
    • Pins: GND, DB9-3 (RXD), DB9-2 (TXD), 5V, 3VR, 5VR, 3VT, 5VT, VCC, Ring, RESTART, RESET, STATUS

Wiring Details

GPS NEO 6M

Arduino UNO

SIM900A

Code Documentation

/*
 * This Arduino Sketch interfaces with a GPS NEO 6M module and a SIM900A module.
 * It reads GPS data and sends it via SMS using the SIM900A module.
 *
 * Connections:
 * GPS NEO 6M -> Arduino UNO
 * VCC -> 5V
 * GND -> GND
 * RX -> D7
 * TX -> D8
 *
 * SIM900A -> Arduino UNO
 * GND -> GND
 * TXD -> D9
 * RXD -> D10
 */

#include <SoftwareSerial.h>

// GPS NEO 6M connections
const int gpsRxPin = 7;
const int gpsTxPin = 8;

// SIM900A connections
const int sim900TxPin = 9;
const int sim900RxPin = 10;

SoftwareSerial gpsSerial(gpsRxPin, gpsTxPin);
SoftwareSerial sim900Serial(sim900RxPin, sim900TxPin);

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

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

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

    // Send GPS data via SMS
    sim900Serial.println("AT+CMGS=\"+1234567890\""); // Replace with your number
    delay(1000);
    sim900Serial.print(gpsData);
    delay(1000);
    sim900Serial.write(26); // ASCII code for CTRL+Z to send SMS
    delay(1000);
  }
}

This code initializes the GPS and SIM900A modules, reads GPS data, and sends it via SMS. The connections between the components are specified in the comments for clarity.