SparkFun GPS Breakout (ZOE-M8Q and SAM-M8Q) Hookup Guide
Introduction
The SparkFun ZOE-M8Q and SAM-M8Q are two similarly powerful GPS units but with different project applications. They both have a 2.5m horizontal accuracy!
Required Materials
To follow along with this tutorial, you will need the following materials. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary.
Additional GPS Antenna Options
Below are some other GPS Antenna options. Some of the options below have an SMA connector, so make sure to get the u.FL to SMA cable if you decide to use those. Link for that is below in the GPS accessories. If you want to try different chip antennas, then try the GNSS Antenna Evalutation Board listed below and make sure to get the u.FL to u.FL connector in the accessories.
GPS Antenna Accessories
Other Qwiic Cable Accessories
Suggested Reading
If you aren't familiar with the Qwiic system, we recommend reading here for an overview.
Qwiic Connect System |
We would also recommend taking a look at the following tutorials if you aren't familiar with them.
GPS Basics
Serial Peripheral Interface (SPI)
How to Work with Jumper Pads and PCB Traces
Getting Started with U-Center for u-blox
Three Quick Tips About Using U.FL
SparkFun ZOE-M8Q Hardware Overview
Power
Power for this board should be 3.3V. There is a 3.3V pin on the PTH header along the side of the board, but you can also provide power through the Qwiic connector.
Battery
The small metal disk opposite of the Qwiic connector is a small lithium battery. This battery does not provide power to the IC like the 3.3V system does, but to relevant systems inside the IC that allow for a quick reconnection to satellites. The time to first fix will about ~29 seconds, but after the product has a lock, that battery will allow for a one second time to first fix. This is known as a hot start and lasts for four hours after the board is powered down. The battery provides over a years worth of power to the backup system and charges slowly when the board is powered.
LEDs
There's a single red power LED just above the Qwiic connector to indicate that the board is powered.
Jumpers
There are three jumpers on the underside of the product, each labeled with its function. The first in the top left of the picture is a three way jumper labeled I²C
that connects two pull-up resistors to the I2C data lines. If you have many devices on your I2C data lines, then you may consider cutting these. To the right of that jumper at the very edge of the board is the LED
jumper. If you cut this trace it will disconnect the Power LED on the topside of the board. Finally, at the lower left is the SPI
jumper that when closed enables SPI communication. The board defaults to I2C and Serial so close that if you'd rather get your NMEA data over SPI.
U.FL Connector
The U.FL connector on the board is where you will plug in your antenna. This is a compact connector for RF antennas, that has the same function as the traditional SMA connector. You may be more familiar and even own some antennas that use SMA connectors; never fear, we carry a U.FL to SMA cable adapter. Check out our tutorial on using U.FL connectors, if this be your first.
FTDI Header
At the bottom of the board we have the traditional pinout for an FTDI header. Make sure that the FTDI that you use is 3.3V and not 5V!
Qwiic and I2C
Next to the FTDI header at the bottom of the board, there are two pins labeled SDA
and SCL
which indicates the I2C data lines. Similarly you can just use the Qwiic connector on the left side of the picture. The Qwiic ecosystem is made for fast prototyping by removing the need for soldering. All you need to do is plug a Qwiic cable into the Qwiic connector and voila!
SPI Header
This sets the ZOE-M8Q apart from the SAM-M8Q. On the underside of the product as mentioned above, is a jumper that can be closed to allow for SPI communication. The header is labeled for the pinout for SPI.
Broken Out Pins
There are four other pins broken out: Pulse per second PPS
, Reset RST
, Safeboot SAFE
, and finally the interrupt pin INT
. The first pin PPS
outputs pulse trains synchronized with the GPS or UTC time grid. The signal defaults to once per second but is configurable over a wide range. Read the u-blox Receiver Protocol Specification in the Resources tab for more information. The reset pin resets the chip. The next pin, SAFE
is used to start up the IC in safe boot mode. The final pin INT
can be used to wake the chip from power save mode.
GPS Capabilities
The ZOE-M8 is able to connect to up to three different GNSS constellations at a time making it very accurate for its size. Below are the listed capabilities of the GPS unit.
GNSS | GPS and GLONASS | GPS | GLONASS | BeiDou | Galileo | ||
---|---|---|---|---|---|---|---|
Horizontal Position Accuracy | 2.5m | 2.5m | 4m | 3m | --- | ||
Max Navigation Update Rate | ROM | 10Hz | 18Hz | 18Hz | 18Hz | 18Hz | |
Flash | 5Hz | 10Hz | 10Hz | 10Hz | 10Hz | ||
Time-To-First-Fix | Cold Start | 26s | 29s | 30s | 34s | 45s | |
Hot Start | 1s | 1s | 1s | 1s | 1s | ||
Sensitivity | Tracking and Navigation | -167dBm | -166dBm | -166dBm | -160dBm | -159dBm | |
Reacquisition | -160dBm | -160dBm | -156dBm | -157dBm | -153dBm | ||
Cold Start | -148dBm | -148dBm | -145dBm | -143dBm | -138dBm | ||
Hot Start | -157dBm | -157dBm | -156dBm | -155dBm | -151dBm | ||
Velocity Accuracy | 0.05m/s | ||||||
Heading Accuracy | 0.3 degrees |
Board Dimensions
The board uses the typical Qwiic board dimension of 1.0"x1.0" . Due to the size of the board and components, there are two mounting holes on the board.
SparkFun SAM-M8Q Hardware Overview
Power
Power for this board is 3.3V. There is a 3.3V pin on the PTH header along the side of the board, but you can also provide power through the Qwiic connector.
Battery
The small metal disk in the upper left corner is a small lithium battery. This battery does not provide power to the IC like the 3.3V system does, but to relevant systems inside the IC that allow for a quick reconnection to satellites. The time to first fix will about ~29 seconds, but after it has a lock, that battery will allow for a one second time to first fix. This is known as a hot start and lasts for four hours after the board is powered down. The battery provides over a years worth of power to the backup system and charges slowly when the board is powered.
LEDs
There's a single red power LED just above the Qwiic connector to indicate that the board is powered. There is another LED labeled PPS
that is connected to the Pulse Per Second line on the GPS chip. When connected to a satellite, this line generates a pulse that is synchronized with a GPS or UTC time grid. By default, you'll see one pulse a second.
Jumpers
There are three jumpers on the topside of the product, each labeled with its function. At the bottom right of the picture is a three way jumper labeled I²C
that connects two pull-up resistors to the I2C data lines. If you have many devices on your I2C data lines, then you may consider cutting these. Just above that jumper is the JP2
jumper. If you cut this trace it will disconnect the Power LED just above the Qwiic connector. Finally, on the left side of the product is the JP1
jumper that when cut disconnects the PPS LED.
Chip Antenna
This GPS unit at the center of the PCB may look a bit funky to you. In fact you may be thinking, "Wow, that looks suspiciously like a GNSS Antenna....". That's very astute dear hookup guide peruser. This GPS IC is actually built into the antenna giving you an all-in-one GPS solution.
FTDI Header
At the top of the board, we have the traditional pinout for an FTDI header. Make sure that the FTDI that you use is 3.3V and not 5V!
Qwiic and I2C
At the opposite side of the board. There are two pins labeled SDA
and SCL
which indicates the I2C data lines. Similarly, you can use either of the Qwiic connectors to provide power and utilize I2C. The Qwiic ecosystem is made for fast prototyping by removing the need for soldering. All you need to do is plug a Qwiic cable into the Qwiic connector and voila!
Broken Out Pins
There are four other pins broken out: Pulse per second PPS
, Reset RST
, Safeboot SAFE
, and finally the interrupt pin INT
. The first pin PPS
outputs pulse trains synchronized with the GPS or UTC time grid. The signal defaults to once per second but is configurable over a wide range. Read the u-blox Receiver Protocol Specification in the Resources tab for more information. The reset pin resets the chip. The next pin, SAFE
is used to start up the IC in safe boot mode. The final pin INT
can be used to wake the chip from power save mode.
GPS Capabilities
The SAM-M8 is able to connect to up to three different GNSS constellations at a time making it very accurate for its size. Below are the listed capabilities of the GPS unit.
GNSS | GPS and GLONASS | GPS | GLONASS | Galileo | ||
---|---|---|---|---|---|---|
Horizontal Position Accuracy | 2.5m | 2.5m | 8m | --- | ||
Max Navigation Update Rate | ROM | 10Hz | 18Hz | 18Hz | 18Hz | |
Time-To-First-Fix | Cold Start | 26s | 29s | 30s | --- | |
Hot Start | 1s | 1s | 1s | --- | ||
Sensitivity | Tracking and Navigation | -165dBm | -164dBm | -164dBm | -157dBm | |
Reacquisition | -158dBm | -158dBm | -154dBm | -151dBm | ||
Cold Start | -146dBm | -146dBm | -143dBm | -136dBm | ||
Hot Start | -155dBm | -155dBm | -154dBm | -149dBm | ||
Velocity Accuracy | 0.05m/s | |||||
Heading Accuracy | 0.3 degrees |
Board Dimensions
The board is 1.6"x1.6", which is slightly bigger than a typical Qwiic board. The board includes four mounting holes on each corner of the board.
Which GPS Unit Do I Pick?!
Size and GNSS Antenna
In each of the Hardware Overview sections we laid out the characteristics of the two GPS boards. Let's begin with the more obvious differences between the boards. The SAM-M8Q is a larger board with dimensions of 1.6 x 1.6 inches. The relative larger size of the board helps to enhance the product's GNSS antenna that houses the GPS unit inside. The ZOE-M8Q is 1 x 1 inch board that does not have an onboard GNSS antenna, and instead has a U.FL connector to connect to an external one. This gives you the option to use something that can be attached outside while the GPS unit is inside connected to your microcontroller. If you want to try out a number of different antenna shapes and sizes, we have a GNSS Evaluation Board for the purpose of finding the best antenna that works for your project.
GPS Capability Comparison
These two GPS units are so similar in their capabilities that the difference is negligible. The one difference between the two is that the SAM-M8Q does not connect to the Chinese GNSS constellation BeiDou.
NMEA Data
Both have I2C and serial capabilities to receive your NMEA data, but only the ZOE-M8Q has SPI capabilities. Enable SPI by closing the jumper on the underside of the product labeled SPI
.
Hardware Assembly
For this example, I used a Qwiic capable RedBoard and associated USB cable. With that and a Qwiic cable, the assembly is very simple. Plug a Qwiic cable between the RedBoard and the GPS unit, and attach the antenna to the U.FL connector. If you need tips on plugging in the U.FL connector, then check out our U.FL tutorial. If you're going to be soldering to the through hole pins, then just attach lines to power, ground, and the I2C data lines to the microcontroller of your choice. Of course, if you're using the SAM-M8Q then you don't need an antenna since it already has one.
SparkFun u-blox Arduino Library
Both the SAM-M8Q and ZOE-M8Q share the same library. These two also share a library with their other u-BLOX higher precision cousins. The SparkFun U-blox Arduino library can be downloaded with the Arduino library manager by searching 'SparkFun u-blox GNSS' or you can grab the zip here from the GitHub repository:
There are 13 example sketches provided to get you up and receiving messages from space.
Example Code
We're just going to look at example two (i.e. "Example2_NMEAParsing.ino") which in my opinion, makes it clear the awesomeness of these GPS receivers. That is to say, talking to satellites and finding out where in the world you are.
language:c
#include <Wire.h> //Needed for I2C to GPS
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //Click here to get the library: http://librarymanager/All#SparkFun_u-blox_GNSS
SFE_UBLOX_GNSS myGNSS;
void setup()
{
Serial.begin(115200);
Serial.println("SparkFun u-blox Example");
Wire.begin();
if (myGNSS.begin() == false)
{
Serial.println(F("u-blox GNSS module not detected at default I2C address. Please check wiring. Freezing."));
while (1);
}
//This will pipe all NMEA sentences to the serial port so we can see them
myGNSS.setNMEAOutputPort(Serial);
}
void loop()
{
myGNSS.checkUblox(); //See if new data is available. Process bytes as they come in.
delay(250); //Don't pound too hard on the I2C bus
}
When you upload this code you'll have to wait ~29s to get a lock onto any satellites. After that first lock, the backup battery on the board will provide power to some internal systems that will allow for a hot start the next time you turn on the board. The hot start only lasts four hours, but allows you to get a lock within one second. After you get a lock the serial terminal will start listing longitude and latitude coordinates, as seen below. Make sure to set the serial monitor to 115200 baud.
Resources and Going Further
Now that you've successfully got your ZOE-M8Q/SAM-M8Q GPS receiver up and running, it's time to incorporate it into your own project!
For more information, check out the resources below:
- SparkFun u-Blox ZOE-M8Q
- SparkFun u-Blox SAM-M8Q
Are you looking for a GPS receiver with an insane 10mm 3D accuracy? Then check out these other u-Blox based GPS boards by SparkFun below.
Need some inspiration for your next project? Check out some of these related tutorials:
Alphanumeric GPS Wall Clock
GPS Differential Vector Pointer
GPS Mouse - GP-808G Hookup Guide
Or check out this blog post for more ideas: