Problem Solving

NEO-6M GPS Module Not Working

The NEO-6M GPS module not working is a common complain from engineer. the truth is 99% of this GPS module you would buy is actually Good. it is just a little bit tricky to use. in this tutorial, i am going to be teaching you how to make this GPS module work.

What to know about the NEO-6M GPS module

  1. The LED indicator on this GPS Module does not represent power, it represents a successful connection to the satellite. This LED will only start blinking when the module has connected to a satellite.
  2. This module has a rechargeable battery. due long-time storage, this battery is most times low when the module is purchased. user should connect the module to power for at least four hours to let this battery charge.
  3. This module might not work or will perform poorly indoors. thus, this module should be used outdoors or should be placed close to the window

Arduino code to test the GPS module

#include <TinyGPS++.h>
#include <SoftwareSerial.h>

static const int RXPin = 4, TXPin = 3;// Here we make pin 4 as RX of arduino & pin 3 as TX of arduino 
static const uint32_t GPSBaud = 9600;


TinyGPSPlus gps;

SoftwareSerial ss(RXPin, TXPin);

void setup()
{
  Serial.begin(9600);
  ss.begin(GPSBaud);

 
}

void loop()
{
  while (ss.available() > 0)
    if (gps.encode(ss.read()))
      displayInfo();

  if (millis() > 5000 && gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
    while(true);
  }
}

void displayInfo()
{
  Serial.print(F("Location: ")); 
  if (gps.location.isValid())
  {
    Serial.print(gps.location.lat(), 6);
    Serial.print(F(","));
    Serial.print(gps.location.lng(), 6);
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  Serial.print(F("  Date "));
  if (gps.date.isValid())
  {
    Serial.print(gps.date.month());
    Serial.print(F("/"));
    Serial.print(gps.date.day());
    Serial.print(F("/"));
    Serial.print(gps.date.year());
  }
  else
  {
    Serial.print(F("INVALID"));
  }

  
  Serial.println();
}

Download the “TinyGPSPlus by Mikal Hart” library.

Leave a Reply

Your email address will not be published. Required fields are marked *