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.

Views: 148080


Developer
Comment by Doug Weibel on March 14, 2010 at 2:50pm
Nice tutorial Chris. Is the file you have linked the "old" or "new" configuration. I ought to update mine to use the new # of satellite metrics.....

3D Robotics
Comment by Chris Anderson on March 14, 2010 at 3:03pm
It's Jordi's configuration as of Nov. I think the "old" vs "new" thing may have had to do with the uBlox firmware, not the configuration settings.
Comment by David Ankers on March 14, 2010 at 7:54pm
Some thing we found with these modules that I'd like to pass on.

Sometimes the first ever fix can seems to take a while, this is normal but can be worrying. Leave the GPS on for 15 minutes so it can populate its sat location table (it downloads some data and apparently this can take 15 minutes).

Watch out for some of the newer firmware, it can half the update rate. I believe these are a 4Hz unit with version 5 and with version 6 they become a 2Hz unit. This could be old information, please check.

If using with a Quad, use the u-center to set the filter type to pedestrian, this way position hold is a little better.
Comment by Curt Olson on March 15, 2010 at 4:20pm
Hi Chris and Jordi,

This is a very timely tutorial ... I just got my ublox adapter hooked up and the 0.1" header soldered on. The gps is up and running and talking so everything is good.

I had one question just for my own better understanding. Is it possible to post a summary of what configuration changes you guys make for the ardupilot.

I went the route of making manual configuration changes ... you know ... trying to learn something here. ;-)

I switched to UBX (binary) protocol, I switched to 5 hz output rates, I bumped up the baud rate, and then I did some custom message selection.

What else should I worry about or pay attention to?

Thanks,

Curt.

Developer
Comment by Mark Colwell on March 15, 2010 at 4:55pm
The parser can fail if you add extra messages, Data rates will need to be changed for all ancillary systems too. 38400 is ArduPilot std rate now. I have had mine for a while now and just switched it to 5hz It may not improve AP performance, I also enable SBAS, WAAS, I turn on the Sky View and watch the sat track. This is the best piece of UAV kit !! I haven't quite figured out setting up DGPS_FIX some time works but, I need to "read the manual" for some of this!
When I'm done with uCenter I am sure to reset configuration for only 3 standard messages POSLLH, STATUS, & VELNED. Plans for SOL to replace STATUS are in the works, by Jordi & GCS team,
Maybe we could try to get the uBlox dead recognizing functions working by feeding uBlox gyro an airspeed data..
I also added Info in the RINV in case I lose it, It will have my ID, so I can prove its mine.
Comment by Curt Olson on March 15, 2010 at 5:41pm
I'm writing my own parsing functions and talking to a gumstix, so I actually pushed the baud rate up to 115,200.

One interesting observation (I think) is that if you switch to NAV-SOL (instead of POSLLH + VELNED) you get both position and velocity simultaneously in the same packet. If you are feeding pos+vel into a kalman filter, it might be an advantage to have these come together in a single packet so you can feed them together into your filter without additional time delay waiting for the next packet. The only hitch is that NAV-SOL reports position and velocity in ECEF coordinates which requires you do to a bit of transformation work ... that might be a bit expensive on lower powered CPU's.

3D Robotics
Comment by Chris Anderson on March 15, 2010 at 10:51pm
@Curt: This previous tutorial had the exact settings if your want to DIY.

Moderator
Comment by Alex on May 17, 2010 at 11:34am
Hey, thanks for the tutorial, I upgraded my firmware to 6.02 and used the config file provided (v11) I got a warning when flashing the config file saying that the config file is for version 6, and my firmware is 6.02, however i still continued with the flash and it worked fine. I can get a GPS lock and seems to be correct position but there is a problem. I cant see the time stamp, or see how many satellites the GPS module is connected to in ucenter? (the sky view remains blank, so does the other appropriate windows), but my speed, heading position all work fine. Is there any reason why?
Comment by Taylor Cox on May 18, 2010 at 4:18pm
When I try to upload the configuration file it gives me the "wrong gps version" error message......and the GPS will only work on 9600.........I exported the config file on the GPS and it matches up perfectly with the configuration file that I am supposed to download....so why is it not working on 38400 baud? I had it working for weeks.and all of a sudden...it wont' work

3D Robotics
Comment by Chris Anderson on May 18, 2010 at 4:35pm
Update the right firmware first. Remember that the new firmware defaults to 9600. Change the baud rate and try again. Just follow the process word for word and you should be okay...

But out of curiosity, why are you doing this anyway? Your GPS was configured at the DIY Drones store, wasn't it? There's no need to go through this if so...

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service