Connecting a NEO-6M GPS to a Arduino Atmega 2560

The following shows quickly getting a NEO-6M GPS receiver running.

Manufacturer Details

NEO-6 series | u-blox

The NEO-6 module series is a family of stand-alone GPS receivers featuring the high performance u-blox 6 positioning engine. These flexible and cost effective receivers offer numerous connectivity options in a miniature 16 x 12.2 x 2.4 mm package. Their compact architecture and power and memory options make NEO-6 modules ideal for battery operated mobile devices with very strict cost and space constraints.

NEO-6_DataSheet_(GPS.G6-HW-09005).pdf (866.1 KB)

u-blox6_ReceiverDescrProtSpec_(GPS.G6-SW-10018)_Public.pdf (3.7 MB)

Diagram

Pin Wiring

I put it to 5v, but the spec sheet says to do 3.3v so listing that as the pin to use

Arduino Neo-6pm
3.3V VCC
GND GND
D13 (pwm) TXD
D4 RXD
- PPS


The PPS min is for Pulse-per-second, but I didn’t use.

Code

#include <SoftwareSerial.h>

const unsigned long TX_PIN = 13;
const unsigned long RX_PIN = 4;
const unsigned long BAUD_RATE = 9600;

SoftwareSerial ss(TX_PIN, RX_PIN);

void setup(){
  Serial.begin(BAUD_RATE);
  ss.begin(BAUD_RATE);
}

void loop(){
  while (ss.available() > 0){
    byte gpsData = ss.read();
    Serial.write(gpsData);
  }
}

Which when connected resulted in

$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,00*79
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,01,03,,,27*7E
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,00*79
$GPGLL,,,,,,V,N*64
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,1,1,00*79
$GPGLL,,,,,,V,N*64

Which doesn’t look like it got a connection to a satellite.

$GPGGA is the basic GPS NMEA message.
NMEA Data

$GPGGA,,,,,,0,00,99.99,,,,,,*48

Which would be

  • Time at location in UTC
  • ##::MM::SS UTC
  • Latitude,N\S
  • Longitude,W\E
  • Fix Quality
  • Number of Satelites
  • Horizontal dilution of position
  • Altitude meters above sea level
  • Mean sea level (?)
  • empty
  • empty
  • Checksum

Pic

1 Like

this is awesome! were you able to get it to find satellites?

I hooked up the Neo-7m because since I had a better Antenna and it was newer…

The pinouts are the same so same program worked.

I got the following data

$GPRMC,144003.00,A,34XX.57656,S,138XX.69470,E,1.517,325.56,181124,,,A*7E
$GPVTG,325.56,T,,M,1.517,N,2.809,K,A*3B
$GPGGA,144003.00,34XX.57656,S,138XX.69470,E,1,04,3.36,47.6,M,-2.9,M,,*67
$GPGSA,A,3,30,03,11,07,,,,,,,,,4.06,3.36,2.28*09
$GPGSV,2,1,07,03,14,016,29,07,67,231,20,11,08,255,28,14,10,336,16*76
$GPGSV,2,2,07,16,,,25,20,21,227,,30,38,274,27*74
$GPGLL,34XX.57656,S,138XX.69470,E,144003.00,A,A*73

Main GPS Line

$GPGGA,144003.00,34XX.57656,S,138XX.69470,E,1,04,3.36,47.6,M,-2.9,M,*67

Which translates to

-34.XX576
138.XX694

Which you can look up in OpenStreetMap using

https://www.openstreetmap.org/#map=15/[LAT]/[LONG]

Like

https://www.openstreetmap.org/#map=15/-34.XX576/138.XX


1 Like