Introduction
NEO-6M GPS Receiver Module
Global Positioning System (GPS) makes use of signals sent by satellites in space and ground stations on Earth to accurately determine its position on Earth.
The NEO-6M GPS receiver module uses USART communication to communicate with microcontroller or PC terminal.
It receives information like latitude, longitude, altitude, UTC time, etc. from the satellites in the form of NMEA string. This string needs to be parsed to extract the information that we want to use.
For more information about GPS and how to use it, refer the topic GPS Receiver Module in the sensors and modules section.
Interfacing Diagram
Interfacing NEO-6M GPS Receiver Module withParticle Photon
Example
We are going to displaydata (latitude, longitude, altitude and time) received by the GPS receivermoduleon a serial monitor using particle photon.
Here, we will be usedTinyGPSPlus library from Particle Photon.
Follow the steps given below to add the library.
1. Go to library and type Particle-GPS and open it.
2. Type Particle-GPS and open it.
3. Then open example of parse-data.ino and click on it for use this example.
4. After clicking on example then click on USE THIS EXAMPLE
Note: The GPS may require some time to lock on to satellites. Give it around 20-30 seconds so that it can start giving you correct data. It usually takes no more than 5 seconds to lock on to satellites if you are in an open space, but occasionally it may take more time (for example if 3 or more satellites are not visible to the GPS receiver).
Output window of GPS:
Degrees Minutes Seconds to Degrees Minutes.m
Degrees = Degrees
Minutes.m = Minutes + (Seconds / 60)
Degrees Minutes.m to Decimal Degrees
.d = M.m / 60
Decimal Degrees = Degrees + .d
Example:
Latitude: 1832.9625
Longitude: 07347.4187
Here in Latitude:1832.9625
Degree = 18
Minutes = 32
Seconds = 0.9625
Then,
(32+0.9650/60)/60 = 0.53360138.
Similarly, calculate for Longitude.
Components Used |
||
---|---|---|
Particle Photon PHNTRAYH |
X 1 | |
Ublox NEO-6m GPS Ublox Neo 6m GPS |
X 1 |