Tekko BDSimSimulatorProjects

GPS ট্র্যাকার: NEO-6M + SIM800L দিয়ে SMS এ লোকেশনArduino GPS Tracker (NEO-6M + SIM800L)

NEO-6M স্যাটেলাইট শুনে NMEA ডেটা পাঠায়, TinyGPS++ সেখান থেকে অক্ষাংশ-দ্রাঘিমাংশ বের করে। বাটন চাপলে Arduino SIM800L কে AT command দিয়ে (CMGF, CMGS, Ctrl+Z) maps লিংক সহ SMS পাঠায়। SIM800L হঠাৎ বড় কারেন্ট নেয়, তাই 18650 ব্যাটারি থেকে চলে — Arduino এর 5 V থেকে না।

The NEO-6M listens to satellites and streams NMEA sentences; TinyGPS++ decodes latitude and longitude. Press the button and the Arduino drives the SIM800L with AT commands (CMGF, CMGS, Ctrl+Z) to text a maps link. The SIM800L eats 2 A bursts — it runs on the 18650 cell, not the Arduino 5 V.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Arduino GPS Tracker (NEO-6M + SIM800L) circuit diagram — Arduino Uno, GPS module (NEO-6M), GSM module (SIM800L), Push button, 18650 Li-ion cell (3.7 V), Jumper wires

যা যা লাগবে · Parts you need

সব part একসাথে · All parts in one box: gps tracker diy kit sim800l neo 6m

তার লাগানো · Wiring

GPS module (NEO-6M) VCC→Arduino Uno 5V
GPS module (NEO-6M) GND→Arduino Uno GND
GPS module (NEO-6M) TX→Arduino Uno D4
GPS module (NEO-6M) RX→Arduino Uno D3
18650 Li-ion cell (3.7 V) +→GSM module (SIM800L) VCC
18650 Li-ion cell (3.7 V) -→GSM module (SIM800L) GND
GSM module (SIM800L) GND→Arduino Uno GND
GSM module (SIM800L) TXD→Arduino Uno D8
Arduino Uno D9→GSM module (SIM800L) RXD
Arduino Uno D2→Push button 1
Push button 2→Arduino Uno GND.3

Code (Arduino C++)

#include <SoftwareSerial.h>
#include <TinyGPS++.h>
// GPS tracker: the NEO-6M keeps listening to satellites; press the button and the
// SIM800L texts the current coordinates to your number. The SIM800L runs on a
// Li-ion cell (3.7-4.2 V), NOT the Arduino 5 V — that is why the 18650 is there.
SoftwareSerial gpsSerial(4, 3);   // NEO-6M TX -> D4
SoftwareSerial gsm(8, 9);         // SIM800L TXD -> D8, RXD <- D9
TinyGPSPlus gps;
const int button = 2;

void sendSms(String text) {
  gsm.println("AT+CMGF=1");                        // text mode
  delay(500);
  gsm.print("AT+CMGS=\"+8801XXXXXXXXX\"\r");      // your number here
  delay(500);
  gsm.print(text);
  gsm.write(26);                                   // Ctrl+Z sends it
  delay(3000);
}

void setup() {
  pinMode(button, INPUT_PULLUP);
  Serial.begin(9600);
  gpsSerial.begin(9600);
  gsm.begin(9600);
  Serial.println("Waiting for fix... press the button to send the location");
}

void loop() {
  while (gpsSerial.available()) gps.encode(gpsSerial.read());
  if (digitalRead(button) == LOW && gps.location.isValid()) {
    String msg = "Location: http://maps.google.com/?q=";
    msg += String(gps.location.lat(), 6);
    msg += ",";
    msg += String(gps.location.lng(), 6);
    Serial.println(msg);
    sendSms(msg);
  }
}

আরো project · More projects