1

member

Easy Basics: Project 053b NEO-6M GY-GPS6MV2 GPS module

of Lex C. in UNO

Basics: Project 053b

Project name: NEO-6M GY-GPS6MV2 GPS module

Tags: Arduino Uno, NEO-6M GPS module, GY-NEO6MV2 GPS Module, GY-GPS6MV2, NEO6MV2, TinyGPS, TinyGPSPlus, TinyGPS++, NeoGPS, USB to TTL, UART

Attachments: serialsketch; TinyGPSPlus_sketch and library; TinyGPS sketch and library; NeoGPS_sketch and library; GPSneo_sketch and library;

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1.Arduino Uno R3 (you can also use the other version of Arduino)

2. NEO-6M GY-GPS6MV2 GPS module (it comes with an external antenna, and does’t come with header pins. So, you’ll need to get and solder some) 1pc

3.Arduino IDE ( you can download it from here  )

4.Jumper cables F-M, M-M

5.Resistor 2 pcs (10 KOhm 1pc and 4.7KOhm 1 pc)

6.Breadboard half size or small size 1 pc

7. USB to TTL/Serial adaptor/converter 1 pc

General

We will learn how to connect NEO-6M GY-GPS6MV2 GPS module to Arduino board and use it.

Understanding the USB to TTL converter

You can read more about them here.

Understanding the NEO-6M GY-GPS6MV2 GPS module

NEO-6M GY-GPS6MV2 GPS module features the u-blox NEO-6M GPS module with antenna and built-in EEPROM. This is compatible with various flight controller boards designed to work with a GPS module.

  • NEO-6M GPS Chip. It can track up to 22 satellites on 50 channels and achieves the industry’s highest level of sensitivity i.e. -161 dB tracking, while consuming only 45mA supply current. Unlike other GPS modules, it can do up to 5 location updates a second with 2.5m Horizontal position accuracy. The u-blox 6 positioning engine also boasts a Time-To-First-Fix (TTFF) of under 1 second. One of the best features the chip provides is Power Save Mode(PSM). It allows a reduction in system power consumption by selectively switching parts of the receiver ON and OFF. This dramatically reduces power consumption of the module to just 11mA making it suitable for power sensitive applications like GPS wristwatch. The necessary data pins of NEO-6M GPS chip are broken out to a 0.1″ pitch headers. This includes pins required for communication with a microcontroller over UART. The module supports baud rate from 4800bps to 230400bps with default baud of 9600.
  • Position Fix LED Indicator. There is an LED on the NEO-6M GPS Module which indicates the status of Position Fix. It’ll blink at various rates depending on what state it’s in: No Blinking – It’s searching for satellites; Blink every 1s – Position Fix is found(The module can see enough satellites).
  • 3.3V LDO Regulator. The operating voltage of the NEO-6M chip is from 2.7 to 3.6V. But the good news is that, the module comes with MIC5205 ultra-low dropout 3V3 regulator from MICREL. The logic pins are also 5-volt tolerant, so we can easily connect it to an Arduino or any 5V logic microcontroller without using any logic level converter.
  • Battery and EEPROM. The module is equipped with an HK24C32 two wire serial EEPROM. It is 4KB in size and connected to the NEO-6M chip via I2C. The module also contains a rechargeable button battery which acts as a super-capacitor. An EEPROM together with battery helps retain the battery backed RAM (BBR). The BBR contains clock data, latest position data(GNSS orbit data) and module configuration. But it’s not meant for permanent data storage. As the battery retains clock and last position, time to first fix (TTFF) significantly reduces to 1s. This allows much faster position locks. Without the battery the GPS always cold-start so the initial GPS lock takes more time. The battery is automatically charged when power is applied and maintains data for up to two weeks without power.
  • Antenna. An antenna is required to use the module for any kind of communication. So, the module comes with a patch antenna having -161 dBm sensitivity. The GPS antenna should be kept with the ceramic part upwards, looking to the skies!  You can snap-fit this antenna to small U.FL connector located on the module. Patch antenna is great for most projects. But if you want to achieve more sensitivity or put your module inside a metal case, you can also snap on any 3V active GPS antenna via the U.FL connector. Please note that U.FL connectors are small, delicate and are not rated for strain. To prevent damaging the U.FL connection, we recommend threading the U.FL cable through the mounting hole, then attach the U.FL connectors.
  • Pins. There are four main pins: VCC, TX, RX, GND.

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. The 50-channel u-blox 6 positioning engine boasts a Time-To-First-Fix (TTFF) of under 1 second. The dedicated acquisition engine, with 2 million correlators, is capable of massive parallel time/frequency space searches, enabling it to find satellites instantly. Innovative design and technology suppresses jamming sources and mitigates multipath effects, giving NEO-6 GPS receivers excellent navigation performance even in the most challenging environments. 

Specification:

  • GPS Module NEO-6M
  • Model: GY-GPS6MV2
  • Input Supply Voltage Range: 3.3V-6V, on board voltage regulator maintains 3.3V
  • I/O Maximum Logic Level: 3.6V
  • WAAS (Wide Area Augmentation System) enabled GPS unit
  • <1 second to first fix (TTFF) for hot starts
  • 27 seconds to first fix (TTFF) for cold starts
  • On board LED will blink after module acquires a position fix and will continue blinking as long as the module has a fix
  • 50 Channel NEMA GPS receiver
  • UART: 9600 baud by default, but is configurable from 4800 to 115200 baud
  • 5Hz max update rate
  • External EEPROM for configuration storage
  • Four plated mounting holes, 3mm in diameter
  • One additional non-plated mounting/antenna cable hole, 4mm in diameter
  • Position Accuracy: 2 m and better with multiple good satellite signals
  • Velocity Accuracy: 0.1 m/s
  • Maximum Velocity: 500 m/s
  • Heading Accuracy: 0.5 degrees while moving
  • On board battery for battery backed RAM (BBR). Battery is recharged through a simple diode and resistor charger circuit from the on board voltage regulator's 3.3V output
  • Ceramic antenna
  • -156dBm Hotstart sensitivity
  • Weight: 17.6g (0.6oz)
  • Dimensions of GPS Module: 36mm (1.42in) x 25.8mm (1.02in) x 4mm (0.16in)
  • Dimensions of Antenna: 25.5mm (1in) x 25.5mm (1in) x 8.8mm (0.35in)
  • Compatible with various flight control modules that provide GPS computer test software
  • Compatible with UART capable devices including Arduino, Raspberry Pi, MSP430, and MSP432.
  • Interface: RS232 TTL

Power modes 

Two continuous operating modes:

Maximum Performance Mode - continuously uses the acquisition engine, resulting in the best possible time to first fix (TTFF)

Eco Mode - optimizes the use of the acquisition engine to minimize current consumption

One intermittent operating mode:

Power Save Mode - draws only 11mA - Utilizes cyclic tracking, with configurable update periods, which reduces the average power consumption significantly

** This GPS module does not have onboard compass. You need to get one I2C (Compass) separately if your flight controller does not have one onboard. 

You can find product datasheet here and schematic here. If you want to read more : Ublox 6 GPS Receiver and Protocol DescriptionUblox_LEA 6_NEO 6_MAX 6 Hardware Integration Manual.

You can find this module M24C32-R (432RP marking) EEPROM datasheet here.

You can find this module voltage regulator MIC5205 (marked KB33) datasheet here.

Handling GPS Data

Once the GPS receiver has transmitted the NMEA sentences to the Arduino, and they have been properly read and stored in nice and "simple format", then what follows?

There are several options to convert the "simple format" data into more general format (GPX, KMZ, etc.). For instance:

  1. GPS Visualizer is a free online utility "that creates maps and profiles from geographic data". You can input a CSV or tabbed file, a spreadsheet, or drag and drop the data. The appearance of the page is a bit odd but the content is good.
  2. GPS Prune is intended to view, edit and convert GPS data. It allows to load text files as well as NMEA files, among quite a number of other options.
  3. GPS Babel seems to be the most known GPS data converter. It reads text files with NMEA sentences.

U‑center GNSS evaluation software for Windows

The u‑center GNSS evaluation software for automotive, mobile terminal and infrastructure applications provides a powerful tool for evaluation, performance analysis and configuration of u‑blox GNSS receivers. Its unique flexibility makes the u‑center GNSS evaluation software an invaluable tool for evaluation, analysis and configuration of u‑blox GNSS receivers. u‑blox GNSS receivers can be configured using the u‑center evaluation software.

  • Highly interactive and easy to use
  • Full support of all u‑blox GNSS receivers
  • Extensive configuration and control features 
  • Real‑time display from a GNSS receiver via RS232 and USB interface

See more details here.

Signals and connections of the NEO-6M GY-GPS6MV2 GPS module

The NEO6MV2 GPS module comes with 4 connections: RX, TX, VCC and GND, which is quite easy to incorporate with using SoftwareSerial on an Arduino Uno or a serial interface on an Arduino Mega. The power supply of the NEO6M should be 3.6V at max according to the datasheet. The typical China-produced breakout-boards contain a voltage regulator so that 3-5V VCC so it does not harm the board. Since the digital pins also produce 5V, the voltage divider is used on the receivers RX channel since this is not regulated.

RX (or RXD) - receive pin. Connected to Arduino board TX pin.

TX (or TXD) - transmit pin. Connected to Arduino board RX pin.

VCC - power supply. Can be connected to +5VDC or +3.3VDC pin of Arduino board.

GND - ground. Connected to Arduino board GND pin.

PPS - Pulse per second. This is an output pin on some GPS modules. Generally, when this pin toggles, once a second, you can synchronize your system clock to the GPS clock.

Wiring

1. Using Arduino board

2. Using USB to TTL converter


Step by Step instruction

1. Getting raw data with Arduino Board

  1. Do wiring.
  2. Open Arduino IDE.
  3. Plug your Adruino Uno board into your PC and select the correct board and com port
  4. Verify and upload the serialsketch to your Adruino Uno
  5. Open the Serial Monitor at a baud rate of 9600.
  6. You will receive a lot of information in the GPS standard language, NMEA (National Marine Electronics Association) data format. Each line you get int the serial monitor is an NMEA sentence.
  7. As you can see NMEA sentences start with the $ character, and each data field is separated by a comma. The GP after the $ indicates it is a GPS position.  $GPGGA is the basic GPS NMEA message, that provides 3D location and accuracy data. 
  8. Other NMEA sentences provide: $GPGSA – GPS DOP and active satellites; $GPGSV – Detailed GPS satellite information; $GPGLL – Geographic Latitude and Longitude; $GPRMC – Essential GPS pvt (position, velocity, time) data; $GPVTG – Velocity made good
  9. You can find more details about NMEA data format  here.

2. Getting raw data with USB to TTL converter

  1. Do wiring.
  2. Plug your USB to TTL converter into your PC USB port
  3. To get the raw data from GPS module you can use u‑center GNSS evaluation software for Windows. Download it here. You need to specify port and baud rate in Receiver section.

3. Using libraries with Arduino board

  1. Let's convert NMEA messages into a readable and useful format, by saving the characters sequences into variables with the use of libraries. 
  2. Do wiring.
  3. Open Arduino IDE.
  4. Plug your Adruino Uno board into your PC and select the correct board and com port.
  5. Verify and upload the sketch to your Adruino Uno.
  6. Open the Serial Monitor at a baud rate of 9600.
  7. You will see NMEA messages converted into a readable and useful format.

Summary

We learnt how to connect NEO-6M GY-GPS6MV2 GPS module to Arduino board and use it. We are planing to make a GPS data logger with the NEO-6M GPS module and the SD card module, so stay tuned.

Notes:

  • It takes for about half a minute or one to read the data by the GPS module initially when you run it, so do not panic for this it’s very usual.
  • It happens in some case that it is unable to detect the data that might be the issue with antenna, so unplug the antenna( if it is detachable) and attach it again.
  • If, code says “Check Connection”, then you should definitely check it twice, before giving up. Also, sometimes interchanging the TX and RX pins is preferable and surprisingly works.

You have enough knowledge now to make other projects like:

  • GPS Car tracker
  • GPS Data logger
  • IOT GPS tracker

Code

1. TinyGPS++ library.

The TinyGPS++ library allows you to get way more information than just the location, and in a simple way. Besides the location, you can get: date, time, speed, course, altitude, satellites, hdop and so on. You can read more  about the TinyGPS++ library here.

2. NeoGPS library.

This fully-configurable Arduino library uses minimal RAM, PROGMEM and CPU time, requiring as few as 10 bytes of RAM, 866 bytes of PROGMEM, and less than 1mS of CPU time per sentence. You can read more about that library here. Some sketches from examples require additional libraries: AltSoftSerial and NeoTee. You also need to check that the configuration files setup done properly in subfolder SRC of NeoGPS library folder: NMEAGPS_cfg.h, GPSfix_cfg.h, GPSport.h, NeoGPS_cfg.h.

We have used AltSoftSerial library as using the SoftwareSerial library is NOT RECOMMENDED. The Rx/Tx configuration for this library is different:

The module RX pin is connected to Arduino pin 9

The module TX pin is connected to Arduino pin 8

GND/VCC is the same.


3. TinyGPS library.

TinyGPS library provides most of the NMEA GPS functionality – position, date, time, altitude, speed and course – without the large size that seems to accompany similar bodies of code.  To keep resource consumption low, the library avoids any mandatory floating point dependency and ignores all but a few key GPS fields.You can read more about it here.

4.Gpsneo library

The library arises from the need to simplify the use of the module, using the NMEA standart. It does not generate excess memory consumption, it is implemented with own functions to handle the pointers of the buffers. You can get the link to see your place on Google Maps. Read more about the library here and here.

We tried to use this library but IT DID NOT WORK - PROBLEM WITH CODING.

Library

  • All libraries attached on the begining of the project description
  • We used NeoGPS library. Download, unzip  and add to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. 
  • We used Gpsneo library. Download, unzip  and add to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC.
  • We used TinyGPS++ library. Download, unzip  and add to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. 
  • We have used TinyGPS library. Download, unzip  and add to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. 
  • We used SoftwareSerial library. It's installed with Arduino IDE. 
    The library has the following known limitations:
    If using multiple software serial ports, only one can receive data at a time.
    Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).
    Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
    On Arduino or Genuino 101 the current maximum RX speed is 57600bps
    On Arduino or Genuino 101 RX doesn't work on Pin 13
    The library has the following known limitations: If using multiple software serial ports, only one can receive data at a time;Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69);Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI);On Arduino or Genuino 101 the current maximum RX speed is 57600bps; On Arduino or Genuino 101 RX doesn't work on Pin 13

Sketch

  • See attachment on the begining of this project
  • We have modified all sketches and adopted configuration files for you, so you can just do wiring, upload sketch, download library and start to use your Neo 6M GPS module


Other projects of Lex C.

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 07-01-2018
Viewed: 11811 times