GY-GPS6MV2 – NEO6MV2 (Neo 6M) GPS Module with Arduino / USB TTL

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisShare on RedditPin on PinterestPrint this pageEmail this to someone

Ublox Neo 6M (Ublox NEO6MV2) is a I2C compliant GPS module. This post discusses details on wiring Ublox Neo 6M with Arduno or an USB to Serial/TTL adapter, basic interactions with module using serial communication, using u-center GUI in visualizations, as well as using TinyGPS library to extract fine grained results from the module output.

GY-GPS6MV2

Please note that most of the points (except for “TinyGPS” library based sample) can be checked only with USB to Serial/TTL adapters. Hence, all other steps can be followed even without an Arduino.

Wiring

I recently purchased a Neo 6M board labeled “GY-GPS6MV2” and according to descriptions of board, input voltage range was 3.3V – 6V (Caution!! Be careful and check if input voltage of 5V can be directly applied with the board / module being used). But I/O maximum logic level is rated at 3.6V which might be a problem while connecting the device with Arduino (which works with 5V logic level).

After going through ATmega328 datasheet and further reading the nice explanation of jippie, it was clear that 3.6V should be just enough for Arduino to pick up. Therefore, TX pin of NEO 6M can be directly connected with Arduino (Sparkfun has a nice article on serial communication) . However, it is problematic if NEO 6M would be able to handle 5V logic signals coming from Arduino. Even though, some sources confirm that directly connecting module with Arduino does not do any harm, it is not clear if there really is any side effect in long run.

Note : Same applies to USB to Serial/TTL adapters.

Perfect method to overcome all these logic level problems is to use a “Bi-Directional Logic Level Converter“. Advantage of “Bi-Directional Logic Level Converter” is that in can step-down voltage in one direction while being able to step-up the voltage in the reverse direction. For an example, it can step down  5V signal to 3.3V signal and, if signal is sent in reverse direction it will step up the 3.3V signal to 5V. However, “Bi-Directional Logic Level Converter” can be an expensive option for such task (because we are only worried about the RX pin of NEO 6M) and I did not have a converter around to try out.

Bi-Directional Logic Level Converter

Connecting two 1N4148 diods in parallel which gives a voltage drop of around 1.4V is another option.

Final Solution

The optimal solution was to use a voltage divider circuit. Nice voltage divider calculator is available at Raltron as well. After few calculations it was decided to use 4.7K as R1 and 10K as R2. Given input voltage of 5V, mentioned voltage divider will give around 3.4V which is well above the minimum logic level.

Diag

 

?????

 

Note : Same applies to USB to Serial/TTL adapters. If you are using a USB to Serial/TTL adapter, connect TX of GPS module to RX of adapter and RX of GPS module to TX of adapter through the voltage divider. Vcc can be directly attached if you are using “GY-GPS6MV2” board with input voltage range of 3.3V – 6V.

Arduino Code  – Serial Communication

Below serial communication logic will print modules output to Arduino Serial Monitor available in Tools menu of IDE.

#include <SoftwareSerial.h>

//Create software serial object to communicate with GPS
SoftwareSerial gps(4, 3);

void setup() {
  //Begin serial comunication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
  while(!Serial);
  
  //Being serial communication witj Arduino and GPS Module //Important rate must be 9600
  gps.begin(9600);
  delay(1000);
  
  Serial.println("Setup Complete!");
}

void loop() {
  //Read SIM800 output (if available) and print it in Arduino IDE Serial Monitor
  if(gps.available()){
    Serial.write(gps.read());
  }
  //Read Arduino IDE Serial Monitor inputs (if available) and send them to SIM800
  if(Serial.available()){     
    gps.write(Serial.read()); 
  }
}

Output is similar to what is seen below. As GPS data is somewhat sensitive I have masked actual values, leaving headers as they are.

GPS Data

If you are using USB to Serial/TTL adapter, please follow Pololu’s Guide on Communicating via the USB-to-TTL-Serial Adapter using Putty.

NMEA (National Marine Electronics Association) Data

Values printed in the previous experiment are called “NEMA Data”. More details about NEMA data is available at http://www.gpsinformation.org/dale/nmea.htm.

For an example “$GPVTG” seen in screenshot stands for “vector track and speed over ground”, while “$GPRMC” stands for minimum recommend data. Example breakdown of “$GPRMC” is as follows :

$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

RMC Recommended Minimum sentence C
123519 Fix taken at 12:35:19 UTC
A Status A=active or V=Void.
4807.038,N Latitude 48 deg 07.038′ N
01131.000,E Longitude 11 deg 31.000′ E
022.4 Speed over the ground in knots
084.4 Track angle in degrees True
230394 Date – 23rd of March 1994
003.1,W Magnetic Variation
*6A The checksum data, always begins with *

 

U-blox u-center with Google Earth

U-center is an GUI interface usable with U-blox GPS modules to record, visualize and analyze GPS data. Download u-center from the official web site. Close any open Putty sessions with GPS module or Arduino serial monitors. After installation u-center, go to “Tools” menu and select Arduino’s (or USL to Serial device’s) COM port from “Port” list. U-center should now display GPS readings in the right pane.  It is also possible to use “Google Earth” option available in “View” menu to plot coordinates on map.

ucenter

Arduino Code – TinyGPS library

Once library is installed in Arduino IDE File menu, Examples section you will find “TinyGPS” library and withing examples you will find “test_with_gps_device” example. Open the example and change “ss.begin(4800);” in setup menu to “ss.begin(9600);” (based on the module used) and run the sample.

TinyGPS library will process NMEA data and print a formatted output on in the serial output. Data processed by TinyGPS library can be used in other applications to easily extract important GPS information including Latitude, Longitude, Speed and Altitude.

Tiny

It's only fair to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisShare on RedditPin on PinterestPrint this pageEmail this to someone

3 comments on “GY-GPS6MV2 – NEO6MV2 (Neo 6M) GPS Module with Arduino / USB TTL

  1. Sergen Eren September 13, 2016 5:52 PM

    Hi,

    you stated that Ublox NEO6MV2 is i2c compliant module, do you know how to communicate via i2c with this module?

  2. Onno Hoekstra September 17, 2016 11:35 PM

    Hi Ayoma,

    Thanks for the blog about the GPS module with the Arduino.
    It works perfect!

    Regards,
    Onno

  3. Daniel Fernandes December 1, 2016 6:45 PM

    Hi Ayoma!
    Do you have any Digital Clock design with this GPS?
    Thank you

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">