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: 29798

Comment by Matthias Badaire on August 17, 2010 at 9:23am
I changed first line from
MON-VER - 0A 04 46 00 36 2E 30 30 20 28 33 33 32 34 37 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 30 30 34 30 30 30 35 00 00 35 2E 30 30 20 28 32 38 34 38 33 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
to this in the file for ucenter to stop complaining about version number
MON-VER - 0A 04 46 00 36 2E 30 32 20 28 33 36 30 32 33 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 30 30 34 30 30 30 35 00 00 35 2E 30 30 20 28 32 38 34 38 33 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Comment by Patrick L on August 28, 2010 at 3:12pm
As I do not have a FTDI adapter, but do have an ArduPilot Mega and oilpan shield, I used this simple arduino sketch to forward GPS input/output from/to the USB connector on the shield:

void setup()
{
Serial.begin(38400); // FTDI
Serial1.begin(9600); // GPS; 9600 first time, 38400 second time
delay(10000);
}
void loop()
{
if (Serial.available())
Serial1.write(Serial.read());
if (Serial1.available())
Serial.write(Serial1.read());
}

Upload the sketch, connect the APM+shield to the pc, and connect u-center to the USB serial port at 38400 baud. The GPS should work Once the configuration is uploaded for the first time, you need to change the baud rate in the sketch and upload it again. Restart u-center, and proceed.

3D Robotics
Comment by Chris Anderson on August 28, 2010 at 3:17pm
Patrick,

Thanks for that! I've added it to the manual..
Comment by MattEvans16 on September 4, 2010 at 7:24pm
I've read all of this, reloaded my config file, and I'm still having issues getting the GPS to work using the UBLOX Library I just downloaded from the repository.

I'm trying to run the GPS_UBLOX_test.pde but my GPS never gets a Fix or NewData according to the library.

It works fine in ucenter (mine did work on Windows7) I can even have the Out pin hooked up to FTDI while it's on the APM, and I can see it has a fix.

Anyone have any ideas while the Arduino Library never says I have a Fix or NewData?

Thanks!
Comment by MattEvans16 on September 4, 2010 at 8:09pm
*Fixed* Make sure you you don't plug the GPS into the connector labeled "I2C Port - NO GPS" I feel foolish..

Developer
Comment by Mark Colwell on September 5, 2010 at 6:23am
I used a marker to label my Mega ports, GPS in red. I2C in black
Comment by Andre Moraes on September 21, 2010 at 6:35pm
I've this back after upload the app "GPS_UBLOX_test"


gps: Lat:GPS UBLOX library test
gps: Lat:29.5844135284 Lon:-95.3655929565 Alt:16.0799999237 GSP:0.64 COG:124.0000000000 SAT:0 FIX:1 TIM:196621250
GPS_UBLOX: checksum error
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:16.9300003051 GSP:0.39 COG:124.0000000000 SAT:0 FIX:1 TIM:196622250
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:16.9300003051 GSP:0.39 COG:124.0000000000 SAT:0 FIX:1 TIM:196622250
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:17.1399993896 GSP:0.17 COG:124.0000000000 SAT:0 FIX:1 TIM:196622500
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:17.4699993133 GSP:0.17 COG:124.0000000000 SAT:0 FIX:1 TIM:196622750
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:17.4699993133 GSP:0.42 COG:124.0000000000 SAT:0 FIX:1 TIM:196622750
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:17.8299999237 GSP:0.42 COG:124.0000000000 SAT:0 FIX:1 TIM:196623000
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:17.8299999237 GSP:0.15 COG:124.0000000000 SAT:0 FIX:1 TIM:196623000
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:17.8299999237 GSP:0.15 COG:124.0000000000 SAT:0 FIX:1 TIM:196623000
gps: Lat:29.5844154357 Lon:-95.3656005859 Alt:17.9899997711 GSP:0.39 COG:124.0000000000 SAT:0 FIX:1 TIM:196623250
....

this is normal? to not have number of sat and have the error : GPS_UBLOX: checksum error?
Comment by flying toh on September 21, 2010 at 7:21pm
hey andre, when u uploaded the GPS_UBLOX_test to arduino, did the values for the gps appear immediately or after some time?
Comment by Andre Moraes on September 21, 2010 at 9:45pm
I'd the ublox for a quite some time after all I used the manufacturer program to upload firmware 6.0 and configuration
so the values appears immediately after start the serial monitor

3D Robotics
Comment by Chris Anderson on September 21, 2010 at 10:40pm
The DIY Drones firmware doesn't report # of sats. We don't use that info. If there were enough demand for it and a reason to include it, we can always change the firmware to add that. But we were just going for a minimal set for processing efficiency.

Comment

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

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service