Tutorial: Connecting other GPS modules to ArduPilot

Although we recommend the uBlox GPS module and adapter we sell in the DIY Drones store, which is solid and easy to set up, ArduPilot can support any GPS module in NMEA mode. The tricky bit, however, is usually the connector and programming it to the right baud rate and other settings. Although every GPS module is different, here's a tutorial for two common ones that may help you with others.

First, here are the pinouts for the EM406 connector that we use (pins 5 and 6 are not used):

Option One: Locosys 20031

One excellent module is the Locosys 20031 that's sold by Sparkfun (it's also the module used by AttoPilot). To connect it to ArduPilot, solder wires to the pads on the board as shown here:

Once you've got it soldered up, you need to program it for the right baud rate and 5Hz update rate. The best way to do that is to get a GPS adapter from the DIY Drones store and solder on a four pin header on the spare pins. Then connect them to your FTDI cable with jumper wires and another header, as shown here:

Now plug the Locosys into the GPS adapter and follow this tutorial to reprogram it.

In the ArduPilot code, you'll need to change the configuration file to tell it that you're using the Locosys. Change this line to 0, as shown:

#define GPS_PROTOCOL 0 // 0 = NMEA, 1=SIRF, 2=uBlox, 3 = ArduIMU, 5 = Simulated GPS mode (Debug)

Option Two: Paparazzi GPS module

Another GPS module you can use is the Paparazzi one (which is also a Ublox 5). Here's how to connect it:

Once you're done, use the same adapter board connection shown above and follow this tutorial to reprogram it for ArduPilot.

You can leave the ArduPilot configuration file in its default setting of 2:

#define GPS_PROTOCOL 2 // 0 = NMEA, 1=SIRF, 2=uBlox, 3 = ArduIMU, 5 = Simulated GPS mode (Debug)

Views: 25557

Comment by Troy on April 25, 2010 at 11:01pm

I'm working on interfacing a SUP500F to my AdruPilot. Not sure if I will write a module to talk to it in binary, or just stay with NMEA. I'll post a follow up when I get it working.

Comment by Daniel Gru on April 26, 2010 at 2:11am
Troy, that sounds really interesting.
I was thinking of using the SUP500F on the ArduMEGA, once available.
Just looks like the newest GPS to me, so why not use it right away instead of the Ublox

Comment by AVS on April 27, 2010 at 5:36am
Thanks. I was wondering how to connect the 20031

Is that a battery backup I can see on the GPS adapter?
Comment by Ludovico Antonio on April 27, 2010 at 10:47am
Nice tutorial.
On this side of the ocean a very popular GPS in UAV/FPV is the SaNav FV-M8.
When propely connected, it works with ardupilot NMEA mode with no more additional configuration, may you check that everything is effectively working right? thnks so much!

3D Robotics
Comment by Chris Anderson on April 27, 2010 at 11:07am
@TimL. It's actually a supercap, but it does the same thing.
Comment by michael dunston on December 10, 2010 at 7:05pm

i broke the gps plug on the arupilot can i plug it to the other gps 4 pin input? if yes how?

Comment by AVS on December 11, 2010 at 5:28am

there will be 4 pin holes immediately behind the plug that you can use instead?

Comment by michael dunston on December 11, 2010 at 7:26pm

yes i see them but what cable go where exactly.. ?>

how can i connect the gps to it.


Comment by AVS on December 12, 2010 at 6:10am

I think the pins match the original cable order. so you can either solder pins into the holes and then solder the gps cable wire to the pins or you can solder the cable directly to the pin holes.


or you can buy the ublox adapter from diyD store which I think gives a set of matching pins and an alternative socket

Comment by Richard Warrender on July 1, 2011 at 10:21am

Sorry to drag up an old post but isn't the Locosys 20031 a 3.3v GPS? I thought the ArduPilot gave out 5v on the GPS pins? I don't want to fry the GPS.


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

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service