U-Blox Neo M8N U-Center configuration and Arduino parser sketch
!! U-Blox Neo M8N configuration file and Arduino sketch available on my gitHub toskyRocker account !!
Today I’ll explain how to configure the outstanding U-Blox Neo M8N GPS/GLONASS receiver for multirotors usage.
Introduction to the U-Blox Neo M8N
Why this receiver?
Well, the answer is pretty simple: it’s one of the best receivers you can get for 50€ . It can be used with many concurrent navigation satellite systems, like GPS+GLONASS, allowing better performance.
Not all the boards including M8N have the same performance, I suggest you to buy the board developed by DroTek since it seems to have a better accuracy. Different boards with the same M8N receiver have been tested here: DIY Drones forum.
First of all you need to:
- Download the free tool U-Center available on U-Blox Website.
- Install U-Blox Neo M8N driver
- Choose a way to connect the U-Blox to your PC. You can use either a FTDI Cable or the PL2303 USB to UART converter (this last needs its driver)
U-Blox Neo M8N configuration with U-Center
U-Center is a smart tool that allows you to choose the configuration you need for the GPS receiver and store it in its non volatile memory. With U-Center you can test the accuracy of the receiver with visual instruments displaying info about: satellites, DOP, output messages, baudrate, FIX mode etc..
There’s a simple way to upload a configuration on the non-volatile memory of the receiver.
- Connect the receiver to your PC and open U-Center
- Go to: Tools-> GNSS Configuration
My configuration affects:
- Dynamic model configured on Pedestrian (low speed and acceleration)
- 10Hz refresh
- SBAS On. Be sure your area is covered by SBAS
- Static Hold 0.01 m/s
- Baudrate fixed to 115200
If you want to change many more parameters, go to View->Message View
Arduino parser for the U-Blox Neo M8N
Do you want to read GPS/GLONASS info on your Arduino?
You need to parse NMEA output strings from your GPS/GLONASS receiver!
Wire your receiver on whatever Arduino (e.g. Yun/Micro/Leonardo etc..) having the Atmega32u4. This is essential since we’re going to use Serial1, unfortunately unavailable on Arduino Uno (Atmega328).
Now compile and run my sketch on Arduino and enjoy your M8N!
The parser takes into account 5 NMEA messages :
- GNGGA: latitude, longitude, altitude, fix quality, HDOP, satellites in view, satellites in use
- GNGSA: Fix Mode, PDOP, HDOP, VDOP
- GPGSV: Satellites in view, elevation, azimuth, SNR, satellites info
- GNRMC: Time, latitude, longitude, speed over ground, course, magnetic variation
- GNVTG: Track made good e ground speed