Using the Ublox NEO 6 GPS and Compass board

The picture shows the Compass connected to an Arduino Uno. The compass uses a four pin socket, I cut the plug off the other end and soldered a four pin header plug instead. This board must only be powered with 3.3 volts and the data lines must also be connected to the Arduino via a 5volts to 3.3 volts logic level converter. I use one I obtained from Hobbytronics here that has a 250ma 3volt regulator that can power the GPS board.

Testing the Compass: Four connections are required, Gnd, SDA, SCL and 3.3 volts. It seems that the GPS and Compass are powered separately and two logic level converters will be required. The Compass uses SDA and SCL, analog pins 4 and 5 on the Uno. Once the hardware is connected and the wiring checked  download the two libraries from Adafuit page for the HMC 8553L here, but remember this board, unlike the Adafruit board, must be used only at 3.3 volts and the board does not have a Ready pin. Copy the two libraries to your library folder and restart the Arduino IDE, upload the sketch from the Example folder and switch to the Serial monitor. If all is well you should see something like this

The bearing will only be true if the Compass chip faces up, this will mean that the Ceramic Active Aerial will be facing downwards. If the board is turned so that the Aerial faces upwards (the correct position) the compass reading will be wrong. The Adafruit article shows how this can be corrected. Keep the compass level and rotate the board to see the heading change. On my board the direction for the bearing seemed to be the board edge with the GPS socket. This edge should face forward when mounted in a vehicle.

Testing the GPS: I disconnected the HMC8553L plug and connected the six pin GPS plug. Only four pins are connected and these are in exactly the same order as on the Ublox NEO 6 board, Gnd, Tx, Rx and Vcc (Gnd is closest to the GPS component. I used the Adafruit GPS library from here. Copy the library to your Arduino Library folder and restart the Arduino IDE. Use a 5 volt to 3.3 volt Logic Level Converter, this board cannot be used with 5 volts. Connect Gnd and 5 volts from the Arduino to the Logic Level Converter, the Adafruit sketch uses Software Serial on pins 2 and 3. The GPS Rx pin is connected to pin 2 and the GPS Tx pin is connected to the Arduino pin 3 (through the Logic Level Converter). The GPS is powered from the Gnd and 3.3 volt pins on the Logic Level Converter, this time the board’s power LED will light.

Open the Example folder and upload the Echo Sketch this simply prints the output from the GPS on the Serial Monitor and is useful because even without a signal the GPS will output data and so the board can be tested indoors. Outside the GPS acquired a first time fix in less than two minutes.

The next task is to get the board running on the Raspberry Pi and to be able to read both the GPS and Compass at the same time.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s