Using and programming a NEO-6 GPS receiver module
I recently had to programm a NEO-6 GPS receiver module for a friend of mine, that needed it to have a specific baudrate and specific NMEA sentences to be sent. The module was to be connected to a ham radio station for tracking data transmission. However the software on the station was already programmed and needed a fixed 57600 baudrate.
The module I got was marked as NEO6MV2 module and has NEO-6M module onboard. The marking on pcb is GY-GPS6MV2. On pcb there are also a 3.3V regulator (so you can connect board to 5V power supply), a small battery for retaining data, nonvolatile storage for configuration and a green LED which starts blinking when the module has GPS data. Antenna is external active antenna and connects to the module via ufl connector.
The module seems to have quite good reception and also the start times are pretty nice, usually under a minute even under a bit more difficult conditions (in house).
The module itself is quite easy to use as for basic operation you must only connect the power supply to it and listen to the messages going out of the TX pin. By default my module was programmed to send the basic location information once per second (1Hz data) and at the baudrate of 9600 baud. At this low baudrate the module can easily be used with arduino and softserial (see here for example of hardware connections and software – on arduino you really only need to connect GPS TX->Arduino Rx, VCC->Arduino 5V and GND-> Arduino GND).
For testing and programming, however you need to connect the module to a PC. I used CP2102 USB to serial converter to connect the module to PC. You need to make the following connections:
NEO6 module VCC – CP2102 VCC (5V)
NEO6 module GND – CP2102 GND
NEO6 module TX – CP2102 RX
NEO6 module RX – CP2102 TX
For programming and testing purposes the u-Center software from the producer of the modules uBlox is a great tool (you may also use it to test other GPS modules that output NMEA strings). You can get u-Center on this page.
When first running the program you can already see some of the status displays, but as we have not connected our GPS to the program there is not yet any data.
Click the connector icon (also accessible under Receiver->Port menu) and select the COM port of the USB to TTL converter / your GPS. By default the baudrate is set to 9600 baud, if your GPS is set to any other setting you will also have to change the baudrate under square wave icon (also accessible under Receiver->Baudrate menu). As default receiver baudrate is usually also 9600 this may not be needed.
(This post has been broken into multiple pages for easier reading)
I’m working at the default 9600 an receive NMEA data OK ,tries to modify first polling i see a blocked speed 57600 baud and nothing possible to modify and continues to work at 9600.
how i can solve?
You should configure the baudrate under View->Configuration View under PRT (Ports) as outlined in the post. After sending the new baudrate configuration, the module will imidiately switch to a new baudrate, so you need to choose the new baudrate to reconnect the u-center to the gps module. If it works ok, you can then use CFG (Config) to write the configuration permanently to the module.
What happen if battery removed. ., will it work without battery ?
The battery is only to keep the backup RAM contents and clock/latest data. When programming you can choose where to save the configuration – if you save it to flash it won’t be wiped even if the battery dies. Without the battery the GPS will also always cold-start so the initial GPS lock may take more time than normally… Normal operation shouldn’t be affected by backup battery absence.
U have given only the directions to use the required software.what about the programing thing. Plz give a bit of instructions for the coding too.
Thanks for the suggestion. I will try to write a post on connecting the GPS module to arduino and getting some useful information from it with a library like TinyGPS (or without it) when I have some spare time 🙂
Most readers need just the configuration part for the module as they want to integrate it with other systems that usually come preprogrammed (eg. loggers, flight controllers, radio stations).
All the commands that are available in uCenter can also be input “manually” using the binary UBX protocol. The protocol is well documented in the module manual. You can also observe the communication in u-center by opening View->Packet Console/Binary Console/Text Console/Messages View windows while doing some configuration. I guess this is a bit more on advanced side but can be useful if you want to change the module configuration on-the-fly from your own program.
I’m currently playing with RTKLib on NEO-6M and NEO-M8 modules. 🙂 With RTKLib and these cheap GPS modules you can get down to a few centimeters accuracy…
I also have this GPS module,but having a problem using it for an APRS encoder.The place I purchased the encoder from said it needs to be 4800 baud rate,not 9600.Using U-Center,I changed the baud rate to 4800 and clicked send in CFG.It now works using that baud rate,but still does not work on the encoder I bought.The builder said it needs to be 4800 8,N,1 .Is this something that needs to be changed in the GPS besides the baud?
You should write the configuration to flash to avoid it being reverted back to the default setting every time you power off the module. To test this you can power off the module for a few minutes and then connect it back to the computer. If module keeps its 4800 baudrate setting then you have set it up correctly, otherwise it will just revert to 9600.
8-N-1 as far as I know is the default setting for the serial port communication so you should not need to change anything for this.
Depending on what APRS station/transciever are you using and what data you are sending you could also turn some of the unneeded $GP messages off, however I don’t think this is really necessary.
How you know if you have a 3D lock at the flight line? Do I give it X amount of time? Is their a light that I am missing? I do see lights on the bottom, do they tell us any thing? Their hard to see in the sun.
I think the PPS led (the blinking one) will only be blinking when there was an initial time lock. Not sure if it will turn off on loss of signal though. Also no way to tell what kind of fix the receiver is getting and the quality of positioning.
The easiest way to get the information you want is to examine the received NMEA sentences. $GPGGA sentence includes basic 3D location data and will also give you indication of the fix and accuracy. $GPGSA sentence will give you further information on the type of fix, sattelite status and accuracy of determined position. $GPRMC will also give you an indication if the fix is valid or not (A/N) in addition to 2D fix data. Here you can find a nice writeup on some of the more common NMEA sentences: http://www.gpsinformation.org/dale/nmea.htm
I’ve flashed GNSS config to the NVRAM on my Crius Neo-6M v3 unit. It removes all the unwanted info for a Naze32 quad controller. If I want to default it back to standard, can I just coldstart the unit? or is there something else I have to do?
Hello Ian, in the same window where you can save the configuration you can also revert it to default settings. Note that this will wipe all the custom settings, which may also change the baudrate to the default.
Hello, i have the exact same gps module as you. I connected it with my arduino, but i dont get a fix. I do it outside with the side with the small metal dot up, wait for over 30 minutes. Most of the time i only get the time and date form the gps. sometimes a blue led start blinking. I never seen a green led lighting up. One time it worked. It worked decently accurate, but sometimes it goes of like 10 meters away from my real position. Last time i could’t even get the blue led to blink. I waited over an hour outside. I got only the time and the date again. Inside it doesnt work at all. Is mine broken?
thanks in advance!
Hello Cody, you may be in a position, where most of the sattelites are shaded (or reflected heavily) by buildings and/or landscape. In such conditions it may take a very long time to get a fix. There is also an option that either the module or the antenna are simply faulty. If you have a friend or someone with similiar receiver you can try swapping them and see if there is any difference. If you can connect your NEO-6 GPS module to a PC you can check which sattelites are visible and their signal levels using u-center. There is also u-center for android (by uBlox), so you can check how many sattelites are visible to your mobile phone.
Is it possible to get the position of the drone with the GPS but checking out in a laptop or mobile phone? I mean, I undesrtand that the GPS send the coordinates to FC through RX/TX and you get it into your radio. But I would like to open my laptop and see the position all time of my drone. OR thie GPS only works as getting coords and sending to the FC ??
Yes it is possible, some of the RC radios (mostly 2.4G) may support it out of the box (GPS Telemetry channel). Most radios should also allow for connecting external devices such as PC or mobile phone. If your Tx/Rx combination doesn’t support it natively, you may want to use a dedicated telemetry transciever such as 3DR Radio which uses HM-TRP radio modules with custom SiK firmware. Similiar solution that uses factory HM-TRP firmware is eggfinder. Both solutions allow you to track the location of your RC model / drone on laptop and opitionally using bluetooth module also on mobile phone. With pretty basic antennas more than 1km line of sight links are easily possible.
Hi dejko1! Thanks for your great article. I own the same GPS receiver but I have no luck with the permanent configuration. The configuration gets lost after a few minutes without power. I read some datasheets and circuit diagrams. So far I understood the U-Blox NEO-6M can not store the configuration without power BUT the circuit board (GPS6MV2) is equipped with an EEPROM connected by I2C. The GPS receiver itself has a ROM and no FLASH.
Can you do me a favor? What is the label of your SOP-8 chip (EEPROM) next of the GPS module on your board? In my case it’s labeled “ST 432RK K427”. It is right I have to select “2 – I2C-EEPROM” instead of BBR & FLASH at UBX-CFG to store my configuration permanent? Unfortunately the receiver returns a “ACK” if I send the configuration to the I2C-EEPROM but on boot-up a few minutes later the configuration is lost again. 🙁 🙁
The onboard battery / supercapacitor seems to be pretty weak on most of these boards so it doesn’t save the BRR configuration for long. I suggest you to save to all available devices at the same time.
Three of the GPS boards I have on hand have a “ST 432RP” chip on them, the second line seems to be varying (probably production location/date/bin).
the post is very old but I get the same problem as many person: on my NEO 8 it is used a ST 432 ( eeprom ? ) but I have tried many different way to save a new configuration and after one night wiht power off ,the parameters are lost and the modul return in defaut state . For my application I need 4800 baud and tje modul return in 9600 !
may the ST432 is out of order ? I need help to solve the problem
I apologize my language :I am French !
I bought the GY-GPS6MV2 and faced the same problem. After saving the configuration (EEPROM) and power off, wait and on again, the config is lost. Did you find a solution ? Setting the configuration by sending works fine.
This worked out really well and I changed and saved both the baud rate and the sentences. But changing the sample rate it would not save that. It changes and runs at 250ms until I do the save config and send. Then it reverts back to 1000ms. I don’t know why that would be. Maybe I’m doing it wrong but baud rate and sentences changed and saved just fine.
Any way to add a led for the blox neo-6m to the outside of the drone
Fredie B. Freeloader
There is a LED diode indicating fix onboard (1PPS output), it will start blinking when GPS gets initial fix. You could add another led parallel to the one already mounted. To do this you would have to solder thin wires to the 1PPS (pin3 on the module) and GND connections. External LED should be connected in series with a current limiting resistor.
[wire-GND]—-|<-----[ 3k ]----[wire-1PPS] But note that 1PPS led may not be the most reliable indication of GPS position quality. Also i'm not entirely sure if it will go off if the fix is lost (would have to try that).
I tried to change module to send only GPGGA but no response it still sending all NMEA ..any ideas
PS :i only changed this from MSG then send ,then send from CFG do i forgot something ?
Hi, someone knows the voltage of the small battery needed to keep it in memory. I have a problem with a neo-m8n that always loses data in memory. I measured the battery voltage and it turns out to be 2.4 volt. Thank you
Most modules actually contain a supercapacitor that looks like a button battery. The module should retain data down to 1.4V voltage. The supercapacitor is not meant for permanent data storage, but will help retain time and last position to get a faster time to first fix in case you interminiently use / power the module.
I am hobbyist and I fly balloons at high altitude I have used lipac,Garmin,Earthmate GPS receivers and also using NEO-6 but NEO-6 module shutdown and stop sending signals after reaching altitude of 45 km may be the restrictions… But can we remove this using programming.
You can try selecting an airborne mode if that helps. 45km actually seems quite high, 18km is the normal limitation I think. With such high altitudes the normal equations used by the chipset may get bad results (just my assumption). Do you have a writeup of your system maybe? What kind of communication did you use or did you reteive the data after flight?
How to configure neo 6m v2 for apm. I tried a lot but fail. Please help me for that.
Do you have a sattelite lock problem or does apm not connect to the gps? My guess is you may need to at least set the communication baudrate to the correct one (try 38400 maybe?). You could also change the navigation modes and data frequency, but I think recent versions of APM will actually do that by themselves. To check for the fix you can watch the led on the GPS receiver board.
To change the baudrate try:
– connect to the gps module using uart-usb dongle at 9600 baud with uCenter
– change the gps module baudrate to 38400 with uCenter
– changing the baudrate will break uCenter connection, reconnect to the module with 38400 baudrate
– save / write the configuration
– unplug the module for a few minutes and then replug it and try connecting at the 38400 baudrate again to verify it is working correctly
How to interface a GPS module (NEO-6M) with Arduino Mega. The data for longitude and latitude is displayed on the serial monitor.
You should be able to interface the GPS to another (software or hardware) uart pins. Sorry, advertising links are not allowed unless they contain useful content. I like your store anyways 😉