Evaluating the 3DR uBlox LEA-6 GPS

1,415 views
Skip to first unread message

wholder

unread,
Mar 24, 2013, 6:48:09 AM3/24/13
to diyr...@googlegroups.com
I finally had a chance to run some tests on the new 3D Robotics uBlox LEA-6 GPS module I purchased last summer and I've written up my analysis over on my web site.  The link to the article is:


If you have any questions, or can suggest any further analysis I can do, please drop me a note.

Wayne

Ted Meyers

unread,
Mar 24, 2013, 3:02:18 PM3/24/13
to diyr...@googlegroups.com
So, that was distance from average, not absolute, correct?  Still, half a meter +/- is good!  What kind of antenna were you using?  Any ground plane?

Also, could you compute a standard deviation from your data?

The lake you found looks like a good analog, maybe a bit more built-up and more trees than boulder, but otherwise similar.

Thanks for sharing!

Ted

wholder

unread,
Mar 24, 2013, 6:06:11 PM3/24/13
to diyr...@googlegroups.com
I don't have an absolute reference to compare to, but when I looked up the averaged position on google maps, the location shown on the map seemed to match nearly exactly to where I ran the test.

The antenna is part of the module, which you can see in one of the alternate views, here:


One thing that might have biased the test was that I placed the module on a bag on top of my car to keep it safe.  So, the roof of my car was probably acting as a ground plane.  I'll need to rerun the tests with the module mounted in my car to get a more realistic test.

Standard deviation seems to be between .2 and .9 meters, centered on .5 meters.  I tried adding SD error bars to the chart, but there are so many data points it overwhelms the chart.  If that holds up through further tests, it might be good enough to thread the hoop at the AVC, but will also take a bit of luck, too.

Wayne

wholder

unread,
Mar 25, 2013, 3:51:53 AM3/25/13
to diyr...@googlegroups.com
I've updated my article at:


to include Arduino Leonard-based sample code that shows how to talk to the LE-6H chipset using uBlox's binary, UBX protocol.  I found the documentation on this module to be very opaque in places, so I wanted to spare anyone else my learning curve.  The code I've published shows only the basics of operation, but it should be complete enough tor anyone else to get up and running with the module fairly quickly.

Wayne

µDesigner

unread,
Mar 25, 2013, 3:59:21 AM3/25/13
to diyr...@googlegroups.com
Thanks for the update.  I could not help noticing your bread board "interface/power supply".  What is it?  It looks like a neat design.

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/diyrovers/-/OL6ZL_yCLUIJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

µDesigner

unread,
Mar 25, 2013, 4:47:07 AM3/25/13
to diyr...@googlegroups.com
If you wanted to take your testing to the next level.  You should consider collected data at a bench mark.  In case you are unfamiliar the follow description came from the http://www.geocaching.com/mark/default.aspx

"A benchmark is a point whose position is known to a high degree of accuracy and is normally marked in some way. The marker is often a metal disk made for this purpose, but it can also be a church spire, a radio tower, a mark chiseled into stone, or a metal rod driven into the ground. Over two centuries or so, many other objects of greater or lesser permanence have been used. Benchmarks can be found at various locations all over the United States. They are used by land surveyors, builders and engineers, map makers, and other professionals who need an accurate answer to the question, "Where?" Many of these markers are part of the geodetic control network (technically known as the National Spatial Reference System, or NSRS) created and maintained by NOAA's National Geodetic Survey (NGS)."

Collecting data on a benchmark should give you a feel for accuracy as well as update variance.  By entering your zip code at that same website (shown above) a list of benchmarks in increasing distance is presented.  For example, this one should be close by your present test location.

N 32° 56.367 W 117° 03.950 (NAD 83)

Altitude: 468.72


On 25 Mar 13, at 02:51, wholder <wayne....@gmail.com> wrote:

wholder

unread,
Mar 25, 2013, 11:59:10 AM3/25/13
to diyr...@googlegroups.com


On Monday, March 25, 2013 12:59:21 AM UTC-7, Vinny wrote:
Thanks for the update.  I could not help noticing your bread board "interface/power supply".  What is it?  It looks like a neat design.


I frequently use breadboards to patch together experimental designs, or to try out new chips, so I built myself a repackaged version of the Arduino Leonardo in a form factor that fits across the top of a standard breadboard strip.  It plugs into the +/- rails and provides +5V and all the I/O pins are brought to a header on top of the board.  I was using things like the Arduino Nano, but just plugging them into the breadboard used up a lot of pins and I still had to wire up the +/- rails.  I was thinking about doing a small kickstarter in order to get a batch built by a commercial assembly house, as they're a bit tedious to assemble by hand, but I'm still researching how feasible that might be.

Wayne
photo(5).JPG

Wayne Holder

unread,
Mar 25, 2013, 12:11:57 PM3/25/13
to diyr...@googlegroups.com
That's a great idea.  Thanks.  I've looked for these marker in the past and never found one in a convenient location (I used to do a bit of geocaching when my daughter was younger.)  However, my main concern is how well the coords I get in the receiver line up with features displayed in Google maps because, it will comes down to using Google maps to layout my waypoints for the race.

Wayne

µDesigner

unread,
Mar 25, 2013, 12:14:02 PM3/25/13
to diyr...@googlegroups.com
Very clever, I am sure that it will be a big hit.  Is it a two sided board?  It that why it is tedious to build?

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/diyrovers/-/YnaQRRurzGQJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
<photo(5).JPG>

wholder

unread,
Mar 25, 2013, 12:22:43 PM3/25/13
to diyr...@googlegroups.com
It's a two sided PCB, but there are parts only on one side.  It's tedious to build because, at my age, 0603 size parts are hard to see without a big magnifier and placing them with tweezers is not all that easy.  I've gotten better at it with experience, but it's still tedious.  I actually a while set of companion boards designed to fit on breadboards in the same fashion and streamline the process of hacking test cirsuits together.  My first design like this was my AAA battery power board https://sites.google.com/site/wayneholder/breadboardpower (although I've since designed one that can be switched between 5V and 3.3 V)

Wayne

Michael Shimniok

unread,
Mar 25, 2013, 12:39:44 PM3/25/13
to diyr...@googlegroups.com
You should do a tindie fundraiser for these

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/diyrovers/-/YnaQRRurzGQJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
<photo(5).JPG>

µDesigner

unread,
Mar 25, 2013, 12:48:19 PM3/25/13
to diyr...@googlegroups.com
May be you could come up with a method to factor Google maps into your GPS experiments. You know with precision where the benchmark is located.  The GPS will tell you where it measures the location then use Google maps to plot the positions.  You can account for the GPS errors because you have the raw measurements.  Any additional errors will be due to Google maps.  This is not hard science, but rather meant to give you a feel for all the players in the game (baseball metaphor, my dad would be proud).

--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.

Ted Meyers

unread,
Mar 25, 2013, 4:48:52 PM3/25/13
to diyr...@googlegroups.com
The other issue is where exactly Sparkun will actually put the waypoints/obstacles.  The Sparkfun course info seems to be more of a warm fuzzy about positions than an exact survey.

Ted

Wayne Holder

unread,
Apr 13, 2013, 11:33:31 PM4/13/13
to diyr...@googlegroups.com
Pedro, there's a block of code in the setup() method, like this:

  // Modify these to control which messages are sent from module
  enableMsg(POSLLH_MSG, true);    // Enable position messages
  enableMsg(SBAS_MSG, true);      // Enable SBAS messages
  enableMsg(VELNED_MSG, true);    // Enable velocity messages
  enableMsg(STATUS_MSG, true);    // Enable status messages
  enableMsg(SOL_MSG, true);       // Enable soluton messages
  enableMsg(DOP_MSG, true);       // Enable DOP messages
  enableMsg(DGPS_MSG, false);     // Disable DGPS messages

that configures which messages the LEA-6 sends back.  This code needs to run at every power up to the GPS module.  As configured above, the DGPS messages are suppressed, but you should see the others.  Make sure both TX and RX lines are connected to the module, as this setup() code won't have any effect if the commands don't get to the GPS module (I lost many hours trying to debug a problem like this before discovering I had a bad jump connection on the TX connection to the GPS.  As a quick test. try setting all the messages to "false" except for the POSLLH_MSG and verify that the module responds by only sending this message.  Then, turn them all back on and verify that they all come through again.  If not, you may have an issue sending to the GPS module.

Wayne


On Sat, Apr 13, 2013 at 3:35 PM, Pedro Nehme <pedro...@gmail.com> wrote:
I am getting different GPS messages using Wayne's code. Here is an example:

Time: 598345000
NAV-SOL:    week = 1735, gpsFix = 3, pDOP = 2.30, pAcc = 1062 cm, numSV = 7
NAV-STATUS: gpsFix = 3
NAV-POSLLH: lon = -47.8921888, lat = -15.8044581, vAcc = 8894 mm, hAcc = 5803 mm

Time: 598345250
NAV-SOL:    week = 1735, gpsFix = 3, pDOP = 2.30, pAcc = 1060 cm, numSV = 7
NAV-STATUS: gpsFix = 3
NAV-POSLLH: lon = -47.8921861, lat = -15.8044580, vAcc = 8869 mm, hAcc = 5797 mm

It seems that I am missing NAV-DOP, NAV-VELNED, NAV-SBAS and NAV-DGPS messages, although I am not really sure what is going on. Taking a brief look at the code it seems that the variable id is never equal to 0x04, 0x12, 0x32 and 0x31 but I don't know why.

Thanks for sharing!

Pedro
--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/diyrovers/-/OrUsLZxIDgAJ.

Pedro HD Nehme

unread,
Apr 15, 2013, 5:10:03 PM4/15/13
to diyr...@googlegroups.com
Ok! That was it, bad connection in the TX line. Thank you, Wayne!

Pedro

--
You received this message because you are subscribed to a topic in the Google Groups "diyrovers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/diyrovers/lUSCXQLEe8g/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to diyrovers+...@googlegroups.com.

To post to this group, send email to diyr...@googlegroups.com.

Wayne Holder

unread,
Apr 15, 2013, 6:51:26 PM4/15/13
to diyr...@googlegroups.com
I'm glad to hear you got it sorted out.  So far, I'm really loving the accuracy of the LEA-6H, but programming it can be a real bear at times.

Wayne

JP B

unread,
Oct 21, 2013, 2:12:50 PM10/21/13
to diyr...@googlegroups.com
Hi Wayne,

I just wanted to thank you for posting this link which I came across today (in addition to "stumbling accross this google group from diydrones rover section).  Currently building a rover with custom firmware based on APm 2.6 and 3DR Ublox GPS and your sample test sketch helped me get started with the GPS, cheers!

Carlos Niño

unread,
Dec 16, 2013, 4:31:59 PM12/16/13
to diyr...@googlegroups.com
Hi Mr Wayne

Im trying a 3DR uBlox LEA-6H-0-002 conecting it with the SPI port of a Ardupilot Mega 2.5 (I don't have cable conection for the UART port). What im trying to do, its obtain some information like (Course Over Ground and Velocity) using only the Serial Monitor of the Arduino Software. (CONNECTION GPS-ARDUPILOT: SPI /// CONNECTION ARDUPILOT-COMPUTER: SERIAL). So I need to create a code to read and convert the information of the GPS in order to obtain the information I need.

This is the first time I use a GPS, and Im getting so many troubles to do what I want, do you have any suggestions, or an example code that works (all the example code I've tried didn't)?

sorry for writing, Im from Colombia and my English is bad.

jesse brockmann

unread,
Dec 16, 2013, 5:11:52 PM12/16/13
to diyr...@googlegroups.com
Carlos,
  You might have better luck at DIYDrones site, but I believe the 3DR UBlox GPS is not designed to work via SPI.   The SPI is provided only for the external compass.   Almost universally GPS modules use serial to communicate.   You should be able to create/purchase a cable to connect the two.  Wayne's code uses the serial port to communicate with the GPS module.

JesseJay
  


--
You received this message because you are subscribed to the Google Groups "diyrovers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diyrovers+...@googlegroups.com.
To post to this group, send email to diyr...@googlegroups.com.

Carlos Niño

unread,
Feb 17, 2014, 2:07:53 PM2/17/14
to diyr...@googlegroups.com
JesseJay

Thanks for answering. I will try it. But I have noticed that SPI and UART pins are shorted. I have tried 3DR Ublox Test code and it appears to function ok, as you can see in this Images: 



http://s2.subirimagenes.com/otros/previo/thump_878803210.jpg

http://s2.subirimagenes.com/fotos/previo/thump_8788034dsc0053.jpg

The problem I have now is that im not getting the information I need (Velocity [3D]) and COG (Course over Ground). So I need something to start working in order to obtain that information. A Guide, or a tutorial, something to understand how to build my own code, it doesnt matter how much time I need to study. I want to learn.

Wayne Holder

unread,
Feb 17, 2014, 2:22:52 PM2/17/14
to diyr...@googlegroups.com
Carlos,

take a look at the uBlox 6 proptocol specification, which you can find here:

  http://www.u-blox.com/images/downloads/Product_Docs/u-blox6_ReceiverDescriptionProtocolSpec_%28GPS.G6-SW-10018%29.pdf

In particular, see the NAV-VELNED message (page 181.)  I don't know how your module is configured, but this message can be turned on, or off and, if on, the rate at which it updates can also be defined.  If thios is what you want, I'll see if I can dig up some example code for how to define the update rate for this message.  However, as a first question, are you using binary messages, or NMEA?

Wayne



Carlos Niño

unread,
Mar 8, 2014, 5:28:31 PM3/8/14
to diyr...@googlegroups.com
Wholder

Im using NMEA, and now I'm trying (in order to simplify my task) to get COG and Velocity (3D) using TinyGPS++ (and softserial TX,RX) but im not sure about if I can figure out with a functional Code. 

My Goals: Get COG and Velocity (3D) conecting 3DR-UBlox-lea-6H pins (tx,rx,vcc,gnd) to an Ardupilot Mega.
My problems: Im not sure if it will work well when I change Arduino Mega to Ardupilot Mega 2.5 because Im reading magnetometer, accelerometer and gyro (building an IMU, GPS provides a drift-free reference vector for the yaw orientation, Im trying to get Euler Angles from DCM matrix). Magnetometer, accelerometer and gyro are inside APM 2.5 

Wayne Holder

unread,
Mar 8, 2014, 6:02:59 PM3/8/14
to diyr...@googlegroups.com
I'm not sure I understand your point and/or question, but I did notice you mention using softserial.  I strongly recommend staying away from soft serial for your GPS data, as I've had less than great results using it.  It mostly works, but can stutter and drop data in some situations.  The Mega processor has 3 available hardware serial ports (4 total, but one is used by the boot loader.) 

Wayne


Reply all
Reply to author
Forward
0 new messages