UART GPS NEO-6M (Waveshare 8465) UART GPS Module, u-blox

uart-gps-neo-6m-waveshare-8465-uart-gps-module-u-blox

uart-gps-neo-6m-waveshare-8465-uart-gps-module-u-blox2

uart-gps-neo-6m-waveshare-8465-uart-gps-module-u-blox3

UART GPS NEO-6M (Waveshare 8465) UART GPS Module, u-blox
UART GPS Module, u-blox NEO-6M onboard, curved/horizontal pinheader

Features

  • u-blox NEO-6M onboard, with high-gain active antenna
  • IPX interface, for connecting different active antennas
  • Chargeable backup battery, keeps the ephemeris data when power down, supports hot starts
  • Onboard EEPROM for storing config information

Specifications

  • TTL level, compatible with 3.3V/5V systems
  • Default baud rate 9600, configurable via u-center

Applications

  • GPS Navigator
  • Quadcopter Positioning

How to Use
In the case of working with a MCU:

  • VCC: connects to 3.3V/5V
  • GND: connects to GND
  • TXD: connects to MCU.RX
  • RXD: connects to MCU.TX
  • PPS: connects to MCU.IO, timepulse output (optional)

Software Demo
The UART GPS NEO-6M module supports software like u-center, GoogleEarth, etc., pretty easy to use. The following pictures show that using the module with u-center:
u-center user interface:
NEO-6M-u-center-1
Positioning info on the text console:
NEO-6M-u-center-2
Downloads
Development resources: demo codes, schematic, datasheets, etc.
Wiki: www.waveshare.com/wiki/UART_GPS_NEO-6M

Selection Guide

Part Number UARTGPS NEO-6M UART GPS NEO-6M (B) UART GPS NEO-6M-C UART GPS NEO-7M-C UART GPS NEO-7M-C (B)
GPS Module U-BLOX NEO-6M U-BLOX NEO-6M NEO-6M NEO-7M NEO-7M
Pinheader curved/horizontal straight/vertical curved/horizontal curved/horizontal straight/vertical
EEPROM X X
GLONASS X X X
Receive channel 50 50 50 56 56
Operating current 45mA 45mA 45mA 35mA 35mA
Tracking sensitivity -161dBm -161dBm -161dBm -162dBm -162dBm
Acquisition sensitivity (cold starts) -147dBm -147dBm -147dBm -148dBm -148dBm
Navigation update rate 5Hz 5Hz 5Hz 5Hz 5Hz
Oscillator Crystal Crystal TCXO TCXO TCXO

UART GPS NEO-6M-C UserManual

Interface GPS Module (NEO-6m) with Arduino

schematics-gps-arduino-module_fk9PnyryPm

THINGS USED IN THIS PROJECT

  • Arduino Mega 2560 & Genuino Mega 2560
  • u-blox NEO-6M GPS module
  • Adafruit RGB Backlight LCD - 16x2

1. Information about GPS

What is GPS
The Global Positioning System (GPS) is a satellite-based navigation system made up of at least 24 satellites. GPS works in any weather conditions, anywhere in the world, 24 hours a day, with no subscription fees or setup charges.

How GPS works
GPS satellites circle the Earth twice a day in a precise orbit. Each satellite transmits a unique signal and orbital parameters that allow GPS devices to decode and compute the precise location of the satellite. GPS receivers use this information and trilateration to calculate a user's exact location. Essentially, the GPS receiver measures the distance to each satellite by the amount of time it takes to receive a transmitted signal. With distance measurements from a few more satellites, the receiver can determine a user's position and display it.

To calculate your 2-D position (latitude and longitude) and track movement, a GPS receiver must be locked on to the signal of at least 3 satellites. With 4 or more satellites in view, the receiver can determine your 3-D position (latitude, longitude and altitude). Generally, a GPS receiver will track 8 or more satellites, but that depends on the time of day and where you are on the earth.

Once your position has been determined, the GPS unit can calculate other information, such as:

  • Speed
  • Bearing
  • Track
  • Trip dist
  • Distance to destination

What's the signal?
GPS satellites transmit at least 2 low-power radio signals. The signals travel by line of sight, meaning they will pass through clouds, glass and plastic but will not go through most solid objects, such as buildings and mountains. However, modern receivers are more sensitive and can usually track through houses.

A GPS signal contains 3 different types of information:

  • Pseudorandom code is an I.D. code that identifies which satellite is transmitting information. You can see which satellites you are getting signals from on your device's satellite page.

  • Ephemeris data is needed to determine a satellite's position and gives important information about the health of a satellite, current date and time.

  • Almanac data tells the GPS receiver where each GPS satellite should be at any time throughout the day and shows the orbital information for that satellite and every other satellite in the system.

2. Download and install required libraries for GPS to work in Arduino IDE

3. NEO-6M GPS module and Arduino UNO

image_shuuhAez0I

image_FUYrpdC91e

4. Connection of Arduino UNO and GPS module

Connect the four pins from UBLOX to an Arduino as follows:

  • Ublox - Arduino
  • GND - GND
  • TX - Digital pin (D3)
  • RX - Digital pin (D4)
  • Vcc - 5Vdc

Here, we suggest you to use external power supply to power the GPS module because minimum power requirement for GPS module to work is 3.3 V and Arduino is not capable of providing that much voltage.

To provide voltage use prolific USB TTL.
image_H5H7SoAFXw

One more thing we have found while working with GPS antenna comes with module is its not receiving signal inside the house so we used this antenna - it's much better.

5. Connection of Arduino UNO and JHD162a LCD

image_Q79BIGbnL4

LCD ======= Arduino
VSS ======= GND
VCC ======= 5V
VEE ======= 10K Resistor
RS ======= A0 (Analog pin)
R/W ======== GND
E ======== A1
D4 ======== A2
D5 ======== A3
D6 ======== A4
D7 ======== A5
LED+ ======= VCC
LED- ======= GND

Programming
Arduino IDE

#include <LiquidCrystal.h> 
#include <SoftwareSerial.h> 
#include <TinyGPS.h> 
float lat = 28.5458,lon = 77.1703; // create variable for latitude and longitude object  
SoftwareSerial gpsSerial(3,4);//rx,tx 
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5); 
TinyGPS gps; // create gps object 
void setup(){ 
Serial.begin(9600); // connect serial 
//Serial.println("The GPS Received Signal:"); 
gpsSerial.begin(9600); // connect gps sensor 
lcd.begin(16,2); 
} 
void loop(){ 
  while(gpsSerial.available()){ // check for gps data 
  if(gps.encode(gpsSerial.read()))// encode gps data 
  {  
  gps.f_get_position(&lat,&lon); // get latitude and longitude 
  // display position 
  lcd.clear(); 
  lcd.setCursor(1,0); 
  lcd.print("GPS Signal"); 
  //Serial.print("Position: "); 
  //Serial.print("Latitude:"); 
  //Serial.print(lat,6); 
  //Serial.print(";"); 
  //Serial.print("Longitude:"); 
  //Serial.println(lon,6);  
  lcd.setCursor(1,0); 
  lcd.print("LAT:"); 
  lcd.setCursor(5,0); 
  lcd.print(lat); 
  //Serial.print(lat); 
  //Serial.print(" "); 
  lcd.setCursor(0,1); 
  lcd.print(",LON:"); 
  lcd.setCursor(5,1); 
  lcd.print(lon); 
 } 
} 
String latitude = String(lat,6); 
  String longitude = String(lon,6); 
Serial.println(latitude+";"+longitude); 
delay(1000); 
} 

In Visual Studio, we have made an application in which current GPS location can be find.Its only work when it is connected serially with PC or laptop.

GPS map application and program

If you want to make some changes in application, you can do it by opening sln file in Visual Studio (2012 and above) or you can directly install setup and use it.
image_xW9dyI2iav
Result
image_mB4BkSZCKI

image_OCYN5qpWiF-1

image_VLLElEiPYF
image_TFIhzN5gHK

CODE

#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include <TinyGPS.h>
float lat = 28.5458,lon = 77.1703; // create variable for latitude and longitude object 
SoftwareSerial gpsSerial(3,4);//rx,tx
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
TinyGPS gps; // create gps object
void setup(){
Serial.begin(9600); // connect serial
//Serial.println("The GPS Received Signal:");
gpsSerial.begin(9600); // connect gps sensor
lcd.begin(16,2);
}
 
void loop(){
    while(gpsSerial.available()){ // check for gps data
    if(gps.encode(gpsSerial.read()))// encode gps data
    { 
    gps.f_get_position(&lat,&lon); // get latitude and longitude
    // display position
    lcd.clear();
    lcd.setCursor(1,0);
    lcd.print("GPS Signal");
    //Serial.print("Position: ");
    //Serial.print("Latitude:");
    //Serial.print(lat,6);
    //Serial.print(";");
    //Serial.print("Longitude:");
    //Serial.println(lon,6); 
    lcd.setCursor(1,0);
    lcd.print("LAT:");
    lcd.setCursor(5,0);
    lcd.print(lat);
    //Serial.print(lat);
    //Serial.print(" ");
    
    lcd.setCursor(0,1);
    lcd.print(",LON:");
    lcd.setCursor(5,1);
    lcd.print(lon);
    
   }
  }
  
  String latitude = String(lat,6);
    String longitude = String(lon,6);
  Serial.println(latitude+";"+longitude);
  delay(1000);
  
}

Tutorial to Communicate Neo-6M GPS to Arduino

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

Step 1: Material Preparation

FHHG7M8IVHQGM81.MEDIUM

FZK7BM5IVHQK9EJ.MEDIUM

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)

Step 2: Pinout Details

FKA83UFIVHQK8PF.MEDIUM

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.

Step 3: Pin Connection

FHHG7M8IVHQGM81.MEDIUM-1

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.

Step 4: Libraries
FTZ82VDIVHQGH09.MEDIUM
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.

TinyGPS.rar

SoftwareSerial.rar

Step 5: Sample Source Code

F57PEEXIVHQK4XG.MEDIUM

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.

NEO-6MGPS.rar

Step 6: Editing Hour

F9H8PX8IVHQK558.MEDIUM-1

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.

Step 7: Result
F5ZEFINIVHQK440.MEDIUM

FRNCZN5IVHQK4WW.MEDIUM
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.

Raspberry Pi & the Neo 6M GPS

FKLQ62OICJLZ1YR.MEDIUM

Parts Needed:

Raspberry PI (any version)

Neo-6M GPS

Female to Female Jumpers

Raspberry Pi accessories like a >1a 5v power supply, SD Card, keyboard, mouse, and a HDMI monitor are needed for any RPI project.

Step 1: Electrical Connection

FP7CQBOICJLZ1TL.MEDIUM
The first step is to connect the GPS module to the Raspberry PI. There are only 4 wires (F to F), so it's a simple connection.

  1. Neo-6M RPI
  2. VCC to Pin 1, which is 3.3v
  3. TX to Pin 10, which is RX (GPIO15)
  4. RX to Pin 8, Which is TX (GPIO14)
  5. Gnd to Pin 6, which is Gnd

Step 2: Turn Off the Serial Console
By default, the Raspberry Pi uses the UART as a serial console. We need to turn off that functionality so that we can use the UART for our own application.

Open a terminal session on the Raspberry Pi.

The first thing we will do is backup the file cmdline.txt before we edit it.

sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt and press Enter.

The we need to edit cmdlint.txt and remove the serial interface.

Type in sudo nano /boot/cmdline.txt and press Enter.

Delete console=ttyAMA0,115200 and save the file by pressing Ctrl X, Y, and Enter.

Now type in sudo nano /etc/inittab and press enter.

Find ttyAMA0 by pressing Ctrl W and typing ttyAMA0 on the search line.

When it finds that line, press home, insert a # symbol to comment out that line, and Ctrl X, Y, Enter to save.

Type sudo reboot and press Enter to restart the Pi.

Step 3: Testing the GPS

FXBYF5PICJLZTOQ.MEDIUM

Before we start writing our own code, let's test the GPS by using some off the shelf programs.

Open a terminal session and type sudo apt-get install gpsd gpsd-clients and press Enter.

After that installs, let's start the serial port:

Type stty -F /dev/ttyAMA0 9600 and press Enter.

Now start GPSD:

Type sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock and press Enter.

Now display by typing cgps -s and press Enter.

https://github.com/mcauser/Raspberry-Pi-ITead-Studio-GPS-NEO-6M