Skip to content

Neo-6M GPS Module

In my next test, I tried to catch the time via GPS.

I used a Wavgat Neo-6M GPS module.

Wiring

The module communicates with a serial interface. Connecting the module with the Arduino Nano is also very simple.

NEO-6M Nano
RXD D3
TXD D4
GND GND
VCC 5V

The input pins on the Arduino can be defined in the sketch. I used D3 and D4 with no special reason.

First Test

Installing the TinyGPS Library

First I tried the TinyGPS Library which can be installed with the Arduino-IDE Library-Manager.

Programming

I used the test_with_gps_device example sketch.
The TXD and RXD pins can be set in the SoftwareSerial definition.

SoftwareSerial ss(4, 3);

And the SoftwareSerial Baudrate had to be changed to 9600 baud for the Neo-6M Module.

ss.begin(9600);

The complete sketch can be downloaded HERE

Testing

After programming and opening a serial monitor, I’ve got the following output

14:32:42.285 -> Testing TinyGPS library v. 13
14:32:42.285 -> by Mikal Hart
14:32:42.285 -> 
14:32:42.285 -> Sats HDOP Latitude  Longitude  Fix  Date       Time     Date Alt    Course Speed Card  Distance Course Card  Chars Sentences Checksum
14:32:42.285 ->           (deg)     (deg)      Age                      Age  (m)    --- from GPS ----  ---- to London  ----  RX    RX        Fail
14:32:42.285 -> -------------------------------------------------------------------------------------------------------------------------------------
14:32:42.324 -> **** **** ********* ********** **** ********** ******** **** ****** ****** ***** ***   *******  ****** ***   51    0         1        
14:32:43.364 -> **** **** ********* ********** **** ********** ******** **** ****** ****** ***** ***   *******  ****** ***   256   0         1        
14:32:44.372 -> **** **** ********* ********** **** ********** ******** **** ****** ****** ***** ***   *******  ****** ***   426   0         1        
14:32:45.402 -> **** **** ********* ********** **** ********** ******** **** ****** ****** ***** ***   *******  ****** ***   596   0         1        
14:32:46.416 -> **** **** ********* ********** **** ********** ******** **** ****** ****** ***** ***   *******  ****** ***   766   0         1        

I don’t know why, but I wasn’t able to run the module with that library.

Second Test

Installing the TinyGPS++ Library

I’ve found another Library on Github called TinyGPS++
After downloading GITHUB-LINK, the library has to be extracted into the sketchbook/libraries folder

Programming

For this library are also examples available. I used the FullExample sketch.

As above, the RXD, TXD and Baudrate can be defined in sketch

static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;  //9600 baud for NEO-6M Module

The complete sketch can be downloaded HERE

Testing

After programming and opening a serial monitor, the output looked much better

11:36:23.021 -> An extensive example of many interesting TinyGPS++ features
11:36:23.021 -> Testing TinyGPS++ library v. 1.0.2
11:36:23.021 -> by Mikal Hart
11:36:23.021 -> 
11:36:23.021 -> Sats HDOP  Latitude   Longitude   Fix  Date       Time     Date Alt    Course Speed Card  Distance Course Card  Chars Sentences Checksum
11:36:23.021 ->            (deg)      (deg)       Age                      Age  (m)    --- from GPS ----  ---- to London  ----  RX    RX        Fail
11:36:23.068 -> ----------------------------------------------------------------------------------------------------------------------------------------
11:36:23.068 -> **** ***** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
11:36:24.052 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 785  ****** ****** ***** ***   ******** ****** ***   162   0         0        
11:36:25.086 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 791  ****** ****** ***** ***   ******** ****** ***   324   0         0        
11:36:26.057 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 797  ****** ****** ***** ***   ******** ****** ***   486   0         0        
11:36:27.075 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 803  ****** ****** ***** ***   ******** ****** ***   648   0         0        
11:36:28.103 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 810  ****** ****** ***** ***   ******** ****** ***   810   0         0        
11:36:29.087 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 815  ****** ****** ***** ***   ******** ****** ***   972   0         0        

and after less then 3 Minutes, the Time was synced

11:39:02.347 -> 0    100.0  ********** *********** **** 00/00/2000 09:39:14 367  ****** ****** ***** ***   ******** ****** ***   26947 0         0        
11:39:03.333 -> 0    100.0  ********** *********** **** 00/00/2000 09:39:15 224  ****** ****** ***** ***   ******** ****** ***   27144 0         0        
11:39:04.353 -> 0    100.0  ********** *********** **** 00/00/2000 09:39:16 384  ****** ****** ***** ***   ******** ****** ***   27341 0         0        
11:39:05.372 -> 0    100.0  ********** *********** **** 04/01/2021 09:39:17 383  ****** ****** ***** ***   ******** ****** ***   27544 0         0        
11:39:06.359 -> 0    100.0  ********** *********** **** 04/01/2021 09:39:18 390  ****** ****** ***** ***   ******** ****** ***   27747 0         0        
11:39:07.389 -> 0    100.0  ********** *********** **** 04/01/2021 09:39:19 395  ****** ****** ***** ***   ******** ****** ***   27950 0         0        

Indoor Test

I did the above tests outdoor with my laptop. Let’s see, how it is indoor…