The SparkFun u-blox MAX-M10S breakout is an ultra-low-power, high performance, miniaturized GNSS board that is perfect for battery operated applications that don't possess a lot of space, such as asset trackers and wearable devices. In this tutorial, we will quickly get you set up using the Qwiic ecosystem and Arduino so that you can start reading the output!
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.
Below are some other GPS antenna options.
If you aren't familiar with the Qwiic system, we recommend reading here for an overview.
Qwiic Connect System |
If you aren’t familiar with the following concepts, we also recommend checking out a few of these tutorials before continuing.
We've broken out the u-blox MAX-M10S module to a breakout. This section highlights the relevant features of the board. For more information about the IC, check out the Resources and Going Further.
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.
Top View | Bottom View |
There are two PTHs labeled SDA
and SCL
which indicates the I2C data lines. Similarly, you can just use the Qwiic connector to provide power and connect to the I2C pins. 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!
Top View | Bottom View |
For users that prefer to communicate over UART, we made sure to configure the UART pin grouping to an industry standard to ensure that it easily connects to a Serial Basic. Extra UART pins are also broken out on another edge of the board as well. The port is set to 38400 baud as the default.
Top View | Bottom View |
These pins are used for various extra control of the MAX-M10S. The control pins are highlighted below.
Top View | Bottom View |
The board is populated with an SMA connector for a secure connection to a patch antenna.
The board includes two status LEDs as indicated in the image below.
There are four jumpers on the back of the board. For more information, check out our tutorial on working with jumper pads and PCB traces should you decide to cut the traces with a hobby knife.
The MS621FE rechargeable battery maintains the battery backed RAM (BBR) on the GNSS module. This allows for much faster position locks (a.k.a. hot start). The BBR is also used for module configuration retention. The battery is automatically trickle charged when power is applied and should maintain settings and GNSS orbit data for up to two weeks without power.
The overall length and width with the antenna connector is about 1.74" x 1.20". There are four mounting holes by each corner of the board.
At a minimum, you will need to attach an external antenna to the MAX-M10S, supply 3.3V power, and connect to one of the board's peripherals.
Plug in one of our patch antennas with SMA connector to the GPS board. Secure the connection using the hex nut until it is finger-tight.
One method to communicate with the MAX-M10S is through I2C. The Qwiic connect system makes it quick and easy to connect the board to your system using a polarized cable. For embedded projects, you can use a Qwiic-enabled Arduino development board like the RedBoard Plus and its associated USB cable. Then plug a Qwiic cable between the RedBoard Plus and the SparkFun MAX-M10S.
If you're going to be soldering to the through hole pins for I2C functionality, then just attach the following lines between your chosen microcontroller's I2C and the MAX-M10S:
A second method to communicate with the MAX-M10S is through its serial UART. You can directly connect the GPS to the computer by connecting a USB-to-serial converter to the industry standard serial connection (aka the 'FTDI' pinout). In this case, we used an CH340 but you can use another USB-to-serial converter like an FTDI. Just make sure to match the silkscreen (GRN to GRN and BLK to BLK). For a secure connection, you'll need to solder male header pins or wires to the MAX-M10S.
You could also connect the pins to a microcontroller like the RedBoard Plus as long as the switch for the logic levels are flipped to the 3.3V side before powering the board up. You'll need to do a little bit more work as opposed to using Qwiic connect system. You'll need to attach the following lines between your chosen microcontroller's UART and the MAX-M10S:
The SparkFun u-blox Arduino library can be downloaded with the Arduino library manager by searching 'SparkFun u-blox GNSS v3' or you can grab the zip here from the GitHub repository to manually install.
There are several example sketches provided that utilize the I2C bus to get you up and receiving messages from space. We'll go over one of the examples in this tutorial.
We're just going to look at Basics 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_v3.h" //Click here to get the library: http://librarymanager/All#SparkFun_u-blox_GNSS_v3
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 ~24s 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.
Now that you've successfully got your MAX-M10S up and running, it's time to incorporate it into your own project! For more information, check out the resources below:
Or check out other tutorials related to GPS and GNSS:
learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado