Maker.io main logo

MicroMod GNSS Function Board - NEO-M9N Hookup Guide

2022-11-25 | By SparkFun Electronics

License: See Original Project GPS Wireless

Courtesy of SparkFun

Guide by BBOYHO, ELIAS THE SPARKIEST

Introduction

The u-blox NEO-M9N is a powerful GPS unit that now comes populated on a MicroMod Function ‎Board! In this tutorial, we will quickly get you set up using it with the MicroMod ecosystem and ‎Arduino so that you can start reading the output.‎

SparkFun MicroMod GNSS Function Board - NEO-M9N

 

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.‎

MicroMod Main Board

To hold the processor board and function board, you will need one Main Board. Depending on your ‎application, you may choose to have one or two additional function boards.‎

MicroMod Processor Board

There are a variety of MicroMod Processor Boards available to choose from. We recommend ‎getting the ones that are Arduino compatible.‎

MicroMod Function Board

To add additional functionality to your Processor Board, you'll want to include one or two function ‎boards when connecting them to the Main Board. Besides the NEO-M9N, you could add an ‎additional function board for your project if you have the Main Board - Double.‎

Tools

You will need a screwdriver to secure the Processor and Function boards.‎

Suggested Reading

If you aren't familiar with the MicroMod ecosystem, we recommend reading here for an overview.‎

micro_1

MicroMod Ecosystem

If you aren’t familiar with the following concepts, we also recommend checking out a few of these ‎tutorials before continuing. Make sure to check the respective hookup guides for your processor ‎board and function board to ensure that you are installing the correct USB-to-serial converter. You ‎may also need to follow additional instructions that are not outlined in this tutorial to install the ‎appropriate software.‎

  • GPS Basics: The Global Positioning System (GPS) is an engineering marvel that we all have access to for a ‎relatively low cost and no subscription fee. With the correct hardware and minimal effort, you can ‎determine your position and time almost anywhere on the globe.‎
  • Serial Peripheral Interface (SPI): SPI is commonly used to connect microcontrollers to peripherals such as sensors, shift registers, ‎and SD cards.‎
  • I2C: An introduction to I2C, one of the main embedded communications protocols in use today.‎
  • How to Work with Jumper Pads and PCB Traces: Handling PCB jumper pads and traces is an essential skill. Learn how to cut a PCB trace, add a ‎solder jumper between pads to reroute connections, and repair a trace with the green wire method ‎if a trace is damaged.‎
  • Getting Started with U-Center for u-blox: Learn the tips and tricks to use the u-blox software tool to configure your GPS receiver.‎
  • Three Quick Tips About Using U.FL: Quick tips regarding how to connect, protect, and disconnect U.FL connectors.‎
  • Getting Started with MicroMod: Dive into the world of MicroMod - a compact interface to connect a microcontroller to various ‎peripherals via the M.2 Connector!‎
  • MicroMod Main Board Hookup Guide: The MicroMod Main Board - Single and Double are specialized carrier boards that allow you to ‎interface a Processor Board with a Function Board(s). The modular system allows you to add an ‎additional feature(s) to a Processor Board with the help of a Function Board(s). In this tutorial, we ‎will focus on the basic functionality of the Main Board - Single and Main Board - Double.‎

Hardware Overview

We've taken the u-blox NEO-M9N and broken the board out to a MicroMod Function Board! In this ‎section, we will go over the main features of the Function Board.‎

board_2

For a detailed overview of the module, these integrated systems and how to use them, refer to the ‎datasheet and integration manual linked in the Resources and Going Further.‎

Power

To power the board, you will need to apply power to a SparkFun Main Board. Power applied from ‎the M.2 connector VCC line will be regulated down with the 3.3V/600mA AP2112K voltage regulator.‎

power_3

Communication Ports

The NEO-M9N has four communication ports. You can read NMEA data over I2C while you send ‎configuration commands over the UART and vice/versa. The only limit is that the SPI pins are ‎mapped onto the I2C and UART pins so it’s either SPI or I2C+UART. You will need select the port ‎with the BUS SELECT jumper. The USB port is available at all times. There is a bilateral switch ‎between the M.2 connector and the NEO-M9N's Serial, SPI, and I2C ports. The switch connects the ‎appropriate port depending on the jumper position.‎

port_4

Note: With the MicroMod M.2 connector, the NEO-M9N's UART, SPI, I2C ports are available ‎without soldering! Other SparkFun NEO-M9N offerings have this capability, but only after you ‎solder hookup wires appropriately.‎

USB

The USB C connector is available for those that are interested in using the u-center software on a ‎computer. There is a TVS diode between the USB port and NEO-M9N's USB data pins for ‎protection.‎

usb_5

Note: Power is not connected to the rest of the board to avoid conflicting voltages from the ‎MicroMod system. Make sure to connect a separate power source to the MicroMod Main Board so ‎that the MicroMod GNSS Function Board can be powered through the M.2 connector.‎

I2C (a.k.a DDC)‎

The u-blox NEO-M9N has a “DDC” port which is really just an I2C port (without all the fuss of ‎trademark issues). These pins are shared with the SPI pins. Connecting the DSEL pin to ‎the Serial/I2C with the 2-pin jumper disables the SPI data bus while keeping the UART and I2C ‎interface available.‎

i2c_6

The only I2C address for this and all u-Blox GPS products is 0x42, though each can have their ‎address changed through software.‎

UART/Serial

The classic serial pins are available on the NEO-M9N but are shared with the SPI pins. Connecting ‎the DSEL pin to the Serial/I2C with the 2-pin jumper disables the SPI data bus while keeping the ‎UART and I2C interface available.‎

  • TXO/SDO = TX out from NEO-M9N
  • RXI/SDI = RX into NEO-M9N

uart_7

SPI

The NEO-M9N can also be configured for SPI communication. Connecting the DSEL pin to ‎the SPI with the 2-pin jumper enables the SPI data bus thus disabling the UART functions on those ‎lines. This also disables I2C interface.‎

spi_8

Backup Battery

The small metal disk 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 two 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. To charge it to full, leave your module plugged in ‎for 48 hours.‎

backup_9

u.FL Connector

The MicroMod GNSS Function Board includes a u.FL connector for a secure connection with a ‎patch antenna. Depending on the antenna, you may need a u.FL adapter to connect. The u.FL ‎connector was added as a design choice for users that decide to place the MicroMod Main Board ‎with the GNSS Function Board in an enclosure. With the u.FL adapter, the SMA connector can be ‎mounted to the enclosure. For more information on working with u.FL connectors, we ‎recommend checking out our tutorial about using u.FL connectors.‎

connector_10

EEPROM

The board includes an I2C EEPROM. Unfortunately, this is not available for the user and was meant ‎to hold board specific information.‎

eeprom_11

LEDs

The board includes two status LEDs.

  • ‎3V3: The 3V3 LED indicates when the board is powered. This LED is connected to the 3.3V ‎line
  • PPS: The PPS LED is connected to the Pulse Per Second line. 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.‎

led_12

Jumpers

The board includes a few jumpers to configure the NEO-M9N module. For more information, check ‎out our tutorial on working with jumper pads and PCB traces.‎

  • I2C Pull-up Resistors - This three-way jumper labeled I2C 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
  • WP - Adding solder to the jumper pad will disable write protect for the EEPROM
  • ‎3V3 - The jumper on the opposite side of the board with the label 3V3 is connected to ‎the 3V3 LED. Cutting this jumper will disable the LED
  • PPS - The jumper on the opposite side of the board with the label PPS is connected to ‎the PPS LED. Cutting this jumper will disable the LED
  • Bus Select
    • SPI - Connecting the DSEL pin to the SPI with the 2-pin jumper enables the SPI data ‎bus thus disabling the UART functions on those lines. This also disables I2C interface
    • DSEL - This pin is connected to the NEO-M9N's D_SEL pin to select the interface. ‎Connecting this pin to either side will select the communication protocol
    • Serial/I2C - Connecting the DSEL pin to the Serial/I2C with the 2-pin jumper disables ‎the SPI data bus while keeping the UART and I2C interface available. The UART and ‎I2C can also be enabled if the DSEL pin is open and not connected to either side. We ‎recommend keeping the 2-pin jumper connected to avoid misplacing the component‎
  • SAFEBOOT - The PTH pads labeled as SAFEBOOT is used to start up the IC in safe boot mode, ‎this could be useful if you somehow manage to corrupt the module's Flash memory. ‎Breakaway a row of 2-pins from the header, solder the pins to the board, and connect a 2-pin ‎jumper to enable the mode

jumper_13

Jumpers (Top View)‎

jumper_14

Jumpers (Bottom View)‎

GPS Capabilities

The SparkFun GNSS Function Board NEO-M9N is able to connect to up to four different GNSS ‎constellations at a time making it very accurate for its size. Below are the listed capabilities of the ‎GPS unit when connecting to multiple GNSS constellations and when connecting to ‎a single constellation.‎

table_15

When using a single GNSS constellation:‎

table_16

Hardware Pinout

Depending on your window size, you may need to use the horizontal scroll bar at the bottom of the ‎table to view the additional pin functions. Note that the M.2 connector pins on opposing sides are ‎offset from each other as indicated by the bottom pins where it says (Not Connected)*. There is no ‎connection to pins that have a "-" under the primary function.‎

MICROMOD GNSS FUNCTION BOARD - NEO-M9N PINOUT TABLE

table_17

table_17

MICROMOD GENERAL PINOUT TABLE

header17a

table_18

MICROMOD GENERAL PIN DESCRIPTIONS

header17a

table_19

Board Dimensions

The board uses the standard MicroMod Function Board size which measures about 1.50"x2.56".‎

dim_20

Hardware Assembly

If you have not already, make sure to check out the Getting Started with MicroMod: Hardware ‎Hookup for information on inserting your Processor and Function Boards to the Main Board.‎

micromod_21

Getting Started with MicroMod

‎Dive into the world of MicroMod - a compact interface to connect a microcontroller to various ‎peripherals via the M.2 Connector!‎

Insert your chosen Processor and GNSS Function board at an angle into the M.2 connector. The ‎Processor Board will stick up at an angle (at around 25°).‎

insert_22

Hold down each board, insert the screws, and to tighten.‎

hold_23

After securing the Processor and Function Board to the Main Board, your setup should look like the ‎image below.‎

secure_24

Insert the u.FL adapter to the MicroMod GNSS Function Board. Connect the patch antenna to the ‎other end of the u.FL adapter. The SMA connector just needs to be finger tight to secure the ‎antenna to the adapter.‎

insert_25

Connect a USB Type C Cable to power and program your Processor Board. In this case, we used ‎the MicroMod Main Board - Single and MicroMod Artemis Processor. This will also power the ‎MicroMod GNSS Function Board.‎

connect_26

For users that want to connect the NEO-M9N to u-blox's u-center, insert a second USB Type C ‎cable to the MicroMod GNSS Function Board's USB C connector.‎

cable_27

Software Installation

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. ‎If this is your first-time using Arduino, please review the following tutorials. ‎

Arduino Board Definitions and Driver

We'll assume that you installed the necessary board files and drivers for your Processor Board. In ‎this case, we used the MicroMod Artemis Processor Board which uses the CH340 USB-to-serial ‎converter. If you are using a Processor Board, make sure to check out its hookup guide for your ‎Processor Board.‎

install_28

Installing Board Definitions in the Arduino IDE

‎How do I install a custom Arduino board/core? It's easy! This tutorial will go over how to install an ‎Arduino board definition using the Arduino Board Manager.

We will also go over manually installing ‎third-party cores, such as the board definitions required for many of the SparkFun development ‎boards.‎

install_29

MicroMod Artemis Processor Board Hookup Guide

‎Get started with the Artemis MicroMod Processor Board in this tutorial!‎

install_30

How to Install CH340 Drivers

How to install CH340 drivers (if you need them) on Windows, Mac OS X, and Linux.‎

Arduino Library

All of our u-blox based GPS boards share the same library: this board, their predecessors and the ‎higher precision u-blox 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 to manually install:‎

SPARKFUN U-BLOX ARDUINO LIBRARY (ZIP)‎

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.‎

Note: Example 2 uses the 'MicroNMEA' library by Steve Marple. Make sure to install the library as ‎well by searching for it in the Arduino library manager. You could also grab the zip here from ‎the GitHub repository to manually install.

MICRONMEA ARDUINO LIBRARY (ZIP)‎

Main Board Example - Pin Connection Table

For NEO-M9N specific pins, here is the mapping between the function board and main board's ‎processor pins. For the following examples, we are using the Artemis Processor Board.‎

table_31

Arduino Example

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.‎

Copy Code
#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 ~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.‎

code_32

These are the coordinates for SparkFun HQ

Troubleshooting

Not working as expected and need help? ‎

If you need technical assistance and more information on a product that is not working as you ‎expected, we recommend heading on over to the SparkFun Technical Assistance page for some ‎initial troubleshooting.

SPARKFUN TECHNICAL ASSISTANCE PAGE‎

If you don't find what you need there, the SparkFun Forums are a great place to find and ask for ‎help. If this is your first visit, you'll need to create a Forum Account to search product forums and ‎post questions.

CREATE NEW FORUM ACCOUNT     LOG INTO SPARKFUN FORUMS

Resources and Going Further

gps_33

Ready to get hands-on with GPS?‎

We've got a page just for you! We'll walk you through the basics of how GPS ‎works, the hardware needed, and project tutorials to get you started.‎

TAKE ME THERE!‎

Now that you've successfully got your MicroMod GNSS Function Board - NEO-M9N up and running, ‎it's time to incorporate it into your own project! For more information, check out the resources ‎below.‎

Hardware Documentation

MicroMod Documentation

Or check out other tutorials related to GPS and GNSS:

  • Alphanumeric GPS Wall Clock: This is a GPS controlled clock - a clock you truly never have to set! Using GPS and some formulas, we figure out what day of the week and if we are in or out of daylight savings time.
  • SparkFun GPS Breakout - XA1110 (Qwiic) Hookup Guide: Figure out where in the world you are with the Qwiic SparkFun GPS Breakout - XA1110.
  • RFID Beginners Tutorial: In this tutorial we'll revisit some RFID basics and practice by making a remote work logger using an RFID reader and a GPS module. You'll scan a card and get ID, location, and time. All the perfect data to punch in and punch out from the middle of Nowhere!
  • OpenLog Artemis Hookup Guide: How to use and re-program the OpenLog Artemis, an open source datalogger. The OLA comes preprogrammed to automatically log data. The OLA can also record serial data, analog voltages, or readings from external Qwiic-enabled I2C devices. Some of these Qwiic-enabled devices include GPS/GNSS modules, pressure, altitude, humidity, temperature, air quality, environment, distance, and weight sensors.
制造商零件编号 GPS-18378
SPARKFUN MICROMOD GNSS FUNCTION
SparkFun Electronics
¥437.53
Details
制造商零件编号 CAB-15424
CBL USB2.0 A PLUG TO C PLG 6.56'
SparkFun Electronics
¥72.85
Details
制造商零件编号 DEV-18575
MICROMOD MAIN BOARD - SINGLE
SparkFun Electronics
¥121.69
Details
制造商零件编号 DEV-18576
MICROMOD MAIN BOARD - DOUBLE
SparkFun Electronics
¥146.11
Details
制造商零件编号 DEV-16402
MICROMOD TEENSY PROCESSOR
SparkFun Electronics
¥200.73
Details
制造商零件编号 DEV-16791
MICROMOD SAMD51 PROCESSOR
SparkFun Electronics
¥154.25
Details
制造商零件编号 WRL-16781
MICROMOD ESP32 PROCESSOR
SparkFun Electronics
¥142.45
Details
制造商零件编号 WRL-18573
MICROMOD LORA FUNCTION BOARD
SparkFun Electronics
¥325.20
Details
制造商零件编号 SEN-18632
MICROMOD ENVIRONMENTAL FUNCTION
SparkFun Electronics
¥1,220.60
Details
制造商零件编号 WRL-18430
MICROMOD BT WIFI FUNCTION ESP32
SparkFun Electronics
¥122.10
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum