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

11 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?

    • Robson December 7, 2016 1:51 AM

      Yes I saw this too, bad guy!

      • Robson December 7, 2016 2:00 AM

        1.12 Protocols and interfaces
        All listed protocols are available on UART, USB, and DDC. For specification of the various protocols see the u-blox 6 Receiver Description including Protocol Specification [2].
        1.12.1 UART
        NEO-6 modules include one configurable UART interface for serial communication (for information about configuration see section 1.15).
        1.12.2 USB
        NEO-6 modules provide a USB version 2.0 FS (Full Speed, 12Mbit/s) interface as an alternative to the UART. The pull-up resistor on USB_DP is integrated to signal a full-speed device to the host. The VDDUSB pin supplies the USB interface. u-blox provides a Microsoft® certified USB driver for Windows XP, Windows Vista and Windows 7 operating systems.
        1.12.3 Serial Peripheral Interface (SPI)
        The SPI interface allows for the connection of external devices with a serial interface, e.g. serial flash to save configuration and AssistNow Offline A-GPS data or to interface to a host CPU. The interface can be operated in master or slave mode. In master mode, one chip select signal is available to select external slaves. In slave mode a single chip select signal enables communication with the host.
        The maximum bandwidth is 100kbit/s.
        1.12.4 Display Data Channel (DDC)
        The I2C compatible DDC interface can be used either to access external devices with a serial interface EEPROM or to interface with a host CPU. It is capable of master and slave operation. The DDC interface is I2C Standard Mode compliant. For timing parameters consult the I2C standard.
        The DDC Interface supports serial communication with u-blox wireless modules. See the specification of the applicable wireless module to confirm compatibility.
        The maximum bandwidth is 100kbit/s.
        1.12.4.1 External serial EEPROM
        NEO-6 modules allow an optional external serial EEPROM to be connected to the DDC interface. This can be used to store Configurations permanently.
        For more information see the LEA-6/NEO-6/MAX-6 Hardware Integration Manual [1].
        Use caution when implementing since forward compatibility is not guaranteed.

        https://www.u-blox.com/sites/default/files/products/documents/NEO-6_DataSheet_%28GPS.G6-HW-09005%29.pdf

  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

  4. hidhir lutfi January 22, 2017 12:44 PM

    why my serial port show “***” at all the data

  5. David February 4, 2017 2:24 PM

    Hi, can I use this set up as a GPS speedometer and trip computer for my car? Thanks,

  6. Anderson April 27, 2017 4:52 AM

    I don’t have the same headers for the output on arduino’s serial window:
    $GPRMC,,V,,,,,,,,,,N*53
    $GPVTG,,,,,,,,,N*30
    $GPGGA,,,,,,0,00,$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,04,09,,,11,15,,,08,19,,,22,28,,,22*7A
    $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,04,08,,,26,15,,,15,20,,,29,28,,,23*73
    $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,03,08,,,24,15,,,17,28,,,24*7A

    Plus, on U-center, the field Fix Mode keeps returning “No Fix” and nothing shows up on google earth mapping.
    Could someone help? Thank!

  7. JOHN BRADLEY June 19, 2017 12:23 AM

    How can the print speed to the monitor be slowed down? Ive tried delays everywhere with no results.

  8. peerv August 3, 2017 10:58 PM

    The GY-GPS6MV2 board has an onboard voltage regulator.
    No need to use a voltage divider or a logic level converter.
    See ww.rei-labs.net/using-and-programming-a-neo-6-gps-receiver-module/

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="">