Introduction: Arduino Ublox GPS

About: Lazy Old Geek

So this Lazy Old Geek (L.O.G.) was looking for a GPS for an Arduino project. Well, I found this UBLOX-NEO-6M GPS on ebay:

http://www.ebay.com/itm/Ublox-NEO-6M-GPS-Module-with-EEPROM-and-Built-in-Active-Atenna-APM2-5-APM2-0-Com-/251548034492?pt=LH_DefaultDomain_0&hash=item3a916e65bc

WARNING: I think I actually ordered this one but the one I got was slightly different. The connectors were not as shown but centered on the PCB.

The antenna is attached to the PCB with a little snap on coax connector. It can be carefully lifted off to disconnect.

The metal shield on the antenna should be pointed down. You can buy cases for the antenna. You can also use double sticky tape to stick the antenna to the bottom of the GPS pcb.

Step 1: Arduino

The Ublox NEO-6M GPS is fairly easy to use with Arduino.

There are a few options for Arduino GPS libraries. I chose TinyGPSPlus:

http://arduiniana.org/libraries/tinygpsplus/

There is also a TinyGPS, I believe written by the same person.

You also need to include SoftwareSerial.h to use this library.

Hardware: Some of the UBLOX NEO-6M modules come with a loose 4pin header. These can be soldered in with pins going in either direction. Unfortunately, I put some on the wrong side for another project and had to unsolder them and put some new ones on the other side.

TIP: I saw a picture of someone using these types of clips (see picture) so that you don’t have to decide ahead of time.

Connect the four pins from UBLOX to an Arduino as follows:

Ublox - Arduino

GND - GND

TX - Digital pin (D4 in the DeviceExample)

RX - Digital pin (D3 in the DeviceExample)

Vcc - 5Vdc or 3.3Vdc

Now you can start up your Arduino environment and run the TinyGPSPlus example called DeviceExample.

In the sketch, change GPSBaud = 9600

Should work fine.

TIP: Here is one thing you need to remember, the TX pin from the UBLOX goes to the RX pin of the Arduino and vice versa.

TECHNOBABBLE: The explanation for this is not so bad. TX stands for Transmit where data is sent out. RX stands for Receive where data comes in.

So the UBLOX-TX sends data to the Arduino-RX

And the UBLOX-RX receives data from the Arduino-TX

HINT: While the standard is to label pins from the perspective of the device, this is not always the case.

Step 2: U-center

So this works pretty good.

But I’m a Geek and the UBLOX-NEO-6M supports something called WAAS, Wide Area Augmentation System.

So standard commercial GPS are not really precise. A particular reading may be several meters off. Using WAAS is supposed to improve the precision.

Ublox is a Swiss company. Here’s their website:

http://www.u-blox.com

Documentation for this product is a little hard to find:

http://www.u-blox.com/en/download/documents-a-resources/u-blox-6-gps-modules-resources.html

but everything under NEO-6 series should be applicable.

Okay, now I’m a Geek, but most of this stuff is over my head. So I did a lot of Internet searching and guessing.

Most GPSs are basically serial devices. Most are set for a baud rate of 4800 (these Ubloxs are set for 9600). They use a standard called NMEA 0183:

http://en.wikipedia.org/wiki/NMEA_0183

I think most GPSs when powered up will automatically start sending out data typically every two second.

Okay, according to the U-blox6_ReceiverDescriptionProtocolSpec, the Ublox supports both NMEA 0183 (that’s why it works with TinyGPS) and their own UBX protocol.

NOTE: I think WAAS is only used in the U.S. I think Europe has or will have something similar.

I haven’t found any standard way of activating WAAS or even determining if it is activated. But Ublox has some PC software called: u-center

http://www.u-blox.com/en/evaluation-tools-a-software/u-center/u-center.html

This is really nice free software and even has a manual but for this Lazy Old Geek it’s still very confusing.

Well, the first thing I had to figure out was how to hook it up to the Ublox-Neo-6M GPS.

So PCs and laptops no longer have serial ports (besides the Ublox is not RS-232 compatible) but they have USB ports and I have several PL2303 USB modules that convert serial to USB. I hooked mine up as follows:

PL2303 - Ublox

Gnd - Gnd

Rxd - Tx

Txd - Rx

3.3V - Vcc

NOTE: Notice that RXD connects to TX and Txd connects to RX as previously discussed.

HINT: You can alternately connect the Ublox Vcc to 5V.

Step 3: Using U Center

PROBLEM: So I connected my Ublox-neo-6m to my PL2303, plugged the PL2303 into a USB port on my laptop and powered it up. Well, Windows started up fine, but my mouse movement was erratic and I couldn’t control it. Well, (I’m pretty sure), the laptop thinks I have a serial mouse connected.

SOLUTION: Well, first, I tried disconnecting the PL2303 until after the laptop loaded up Windows. Still did the same thing.

So what I have to do is leave the PL2303 connected but disconnect power to the Ublox. Then power up laptop to Windows, then connect power to the Ublox.

Hopefully, you won’t have this problem.

Okay, so once the Ublox has power it takes a minute or two for it to get started. (I guess this is called a cold start). The green LED on the Ublox will start flashing.

Click on the Ucenter icon.

Click on ReceiverPort Select the COM # that your PL2303 comes up as. Mine is COM 5.

Click on Receiver Baudrate Select 9600.

You should see some activity on the right side of the screen(see picture)

Note: on the bottom, it shows Com5 9600 ublox 6 and NMEA

The screens in the middle show satellite information.

The screen on the right shows latitude, longitude and altitude.

Note: FixMode is 3D/DGPS.

Differential Global Positioning System (DGPS) means WAAS is working.

HINT: Especially indoors, this may just say 3D. Also the DGPS may take several minutes before it displays.

Configuring the Ublox Neo-6M. The way I did it is:

view -configuration view(see next picture)

NAV5

Nav Mode

Dynamic Model: Pedestrian

Fix Mode: Auto 2D/3D

UTC Standard: USNO(GPS) {Doesn’t save??}

Click on send lower left corner

NOTE: Pedestrian mode probably won’t make much difference but for my application it is more accurate. See ProductSpec

view-configuration view (see next picture)

Subsystem: Enabled

Services: Ranging

Apply SBAS Correction data

Number: 3

PRN Codes: WAAS

Click on send lower left corner

NOTE: This forces WAAS. The more general term is SBAS(Space Based Augmentation Systems)

NOTE: There are other configurations you can change like Baud rate and sampling rate.

Okay, the two sends above send it to the Ublox GPS but it doesn’t save it. To save, do the following.

(see next picture)

Main menu

Receiver

Action

Save config

This saves it to (I believe) the EEPROM on the Ublox-neo-6m pcb.

WARNING: Close ‘u-center’ before disconnecting GPS. Otherwise u-center will lock up and you will get a Blue screen.

The next picture shows the Deviation Map. Each GPS sampling shows in yellow, which changes to green when the next sampling occurs. This shows the readings have drifted about two meters.

U-center has a lot of other features, one I like it Google Earth. It will show the GPS location on Google Earth.

So that’s what I’ve learned about the Ublox-neo-6m so far.

Sensors Contest

Participated in the
Sensors Contest

Epilog Challenge VI

Participated in the
Epilog Challenge VI