Tutorial to Communicate Neo-6M GPS to Arduino

by mybotic in Circuits > Arduino

142962 Views, 96 Favorites, 0 Comments

Tutorial to Communicate Neo-6M GPS to Arduino

2.jpg

Description

This is an updated GPS module that can used with ardupilot mega v2. This GPS module uses the latest technology to give the best possible position information, allowing for better performance with your Ardupilot or other Multirotor control platform. You may require to configure this module for use with your flight controller (MultiWii Copter I2C GPS board requires 115200 baud). You will require a USB to FTDI adaptor board to do this. Please note that this module ships with defualt settings and a buad rate of 38400.


Specification

• Standalone GPS receiver

• Under 1 second time-to-first-fix for hot and aided starts

• SuperSense ® Indoor GPS: -162 dBm tracking sensitivity

• Anti-jamming technology

• Support SBAS (WAAS, EGNOS, MSAS, GAGAN)

• U-blox 6 50 channel positioning engine with over 2 million effective correlators

• 5Hz position update rate

• Operating temperature range: -40 TO 85°C

• UART TTL socket

• EEprom to store settings

• Build in 18X18mm GPS antenna

Material Preparation

2016-11-15 11.37.53 1.jpg
2016-11-16 12.49.03 1.jpg

In this tutorial, you will need to prepare as below :

1. NEO-6M GPS Module

2. Arduino Uno Board and USB

3. Female-Male Jumper Wire

4. GPS Antenna (optional, allow you to get signal more easily)

Pinout Details

2016-11-16 12.41.41 1.jpg

You could see the pinout labeled at the back of the module. It has 5 pins that is VCC, GND, RX , TX and PPS. VCC and GND are for power supply and RX and TX are for serial communication between microcontroller and GPS module.

Pin Connection

2016-11-16 02.04.14 1.jpg

Connect GPS Module to Arduino UNO as following :

  • VCC to 5V
  • GND to GND
  • RX to 9
  • TX to 10

Then, Connect your Arduino UNO Board to your computer via USB Cable.

Libraries

1.jpg

SoftwareSerial is a library of Arduino which enables serial data communication through other digital pins of Arduino. The library replicates hardware functions and handles the task of serial communication. TinyGPS is a library that converts all those NMEA messages into a readable format by stuffing the character sequences into variables. To be able to interface GPS Module with arduino, you will have to download these libraries and extract it into your Arduino's libraries.

Sample Source Code

3.png

Download the sample source code below and open it on your Arduino IDE. Select the correct board and port. Then, upload it into your Arduino Uno Board.

Downloads

Editing Hour

3.png

Some country have different time zone and some share the same time zone. Thus, you have to change the hour in the sample source code to make it exactly the same with your country's time zone unless you are from Malaysia or Singapore. As for Malaysia, it is UTC +08:00 (refer image above). Thus you can find the code below in the sample source code in the previous step.

Serial.print(static_cast(hour+8));

UTC is the time standard commonly used across the world. You can check your country's UTC +##:## on your computer's or phone's time zone.

Result

1.png
2.png

After you has succesfully uploaded your source code, open your serial monitor. Serial monitor will display the data that your gps required. If you didnt get anything, make sure your connection is correct and try it outside or near the window where it is easy to get the signal. Signal may not reach inside a building.