3D Robotics

Tutorial: Programming your uBlox GPS module

Although you can buy the uBlox modules pre-programmed from the DIY Drones store, you may want to do it yourself, either because you want to update the firmware or change some settings, or because you've bought the module from Sparkfun because we were out of stock and you need to set it up to use with ArduPilot.

Here's a simple tutorial on how to program your module (it replaces this older tutorial):

First, you'll need the DIY Drones adapter if you don't already have it.

You can use our GPS-to-FTDI cable to connect this directly to your PC, or make your own.

If you're going make your own, solder a four pin header on the pins below the GPS connector on the adapter, as shown above. Now connect it to your FTDI cable, with the pin mappings shown above. I use jumper cables and a six-pin breakaway header for this, as shown below, but you can use any method you want, including making a custom cable, which is the neatest method if you plan to do this more than once:

Jumper wires connected to six-pin header:


Header plugged into FTDI cable:


Once you've made the physical connections, download and install the U-center software from uBlox. (It doesn't work on Windows 7, so if that's what you're using, open a virtual Windows XP mode window to run the software in. You'll also need to "attach" the FTDI USB serial ports, which you should be pretty familiar with if you use virtual XP mode).

Now run the U-center software, selecting the Com port that your FTDI cable is attached to. You also need to tell it what baud rate the GPS module is running at. If you got it from the DIY Drones store, it's 38,400. If you got it from Sparkfun, it's probably 9,600:


You can tell if it's working by going to View/Binary Console. You should see the data flowing through. Also, the icons circled below should be green or flashing green (it's not showing a sat lock because I'm indoors):


If it's not working, check these things:

1) Did you wire it up right?
2) Did you select the right Com port?
3) Did you select the right baud speed?

If you want to update the firmware, you can get the latest uBlox firmware here. Use the one for the "LEA-5H" modules.

To flash the new firmware go to Tools/Firmware update. Make sure the firmware image points to the file you downloaded and unzipped.


To configure a module to use with ArduPilot, download this file.

Go to Tools/GPS configuration, and select the file you just downloaded. Check the "Store configuration..." box and click on "File >>> GPS".



If you were communicating with the module at any speed other than 38,400, you'll find that the configuration process will fail midway through. That's because it's just gotten to the bit that changes the communications speed to 38,400. Set your u-center com speed to 38,400 and run it again. It should work this time.

When you're done, go to Receiver>> Action>> then click Save Config. Otherwise, every time you unplug your gps, it will revert back to the original configuration.
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hi Chriss

    No worries about my post abouve I Found it.

    Thanks
    John
  • Hi Chris

     

    I am looking for the flash definition file that needs to be loaded with the firmware update. I try to update the firmware to v6.00 in order to load your config file. My upload screen all goes well until it looks for the flash definition file and then the screen goes red and the firmware is not flashed. I have used Jordi's older post on setting up with v5.0 as i dont need to update my firmware, and loaded the config file he recommended, changed the setting that he recommended and the ublox get satelite signal but no sat lock. What is, or what does the flash definition file do when updating the firmware of the Ublox LEA 5H? Also, do I need to set the GPS to work with satellites for Africa, Specifically Cape Town where I stay. 

     

    Thanks John

  • I am currently running Windows 7 on my machine. When running under the "classic" theme, uCenter seems to run fine, but are there any operational issues that may rise? I do not have XP mode on my machine.


    My real issue is that I have not been able to connect my GPS (ublox 5) at all, nor has it ever acquired signal. Here is some background:

    - FDTI cable/adapter purchased from diydrones store

    - Ublox 5 purchased from diydrones store

    - GPS has never acquired signal in use with UAV DevBoard

    - GPS is not recognized by uCenter at all (despite being recognized in the device manager as being connected to COM5, baud rate of 38,400), thus firmware cannot be updated

     

    I've followed the instructions, but still cannot acquired signal, nor connected to uCenter. Any ideas or similar problems?  

     

    Is the problem rooted in the fact that I am running Windows 7 (in classic theme)? If it is, why can't the GPS connect even when attached to UBD? May it be a defective unit? Am I not using the correct COM or baud rate?


    Thanks,

    Mike

  • 3D Robotics
    Jarco, it could be a defective module. Some of them have a poor antenna connection. You may want to return it for replacement.
  • Hi,

     

    I did everything according the tutorial and updated everything in the ublox, nevertheless I have the GPS on the uCenter outside the house and after one and an half hour still no fix

     

    What am I doing wrong?

  • For info, the "Flash Description File" is stored in C:\Program Files\u-blox\u-center\content\flash.txt

     

    Another important thing that occured for me during the flash:

    • Flash the last firmware from ublox
    • Change the GPS configuration
    • GPS has been set to 9 600 bauds with new firmware
    • GPS configuration send timeout error by the en of the configuration
    • Set GPS connexion to 38 400 bauds
    • Resend the GPS configuration file to the GPS, everything go smoothly now
  • Hi Chris.  Yeah I was just offering to copy the contents so it's wikified.  Doesn't matter to me.  Thanks!
  • @David noted use of Pedestrian in the Nav config for better performance with quad hover.  Anyone else using this setting?
  • 3D Robotics
    This post is already linked on the wiki here.
  • Yeah, would be nice because I am sure next time it is needed I would have forgotten how to do it 8). You should ask Chris.
This reply was deleted.