Quantcast
Channel: SparkFun Tutorials
Viewing all articles
Browse latest Browse all 1123

MicroMod GNSS Function Board - NEO-M9N Hookup Guide

$
0
0

MicroMod GNSS Function Board - NEO-M9N Hookup Guide a learn.sparkfun.com tutorial

Available online at: http://sfe.io/t1999

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

SparkFun MicroMod GNSS Function Board - NEO-M9N

GPS-18378
$49.95

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.

Reversible USB A to C Cable - 2m

Reversible USB A to C Cable - 2m

CAB-15424
$8.95
1
SparkFun MicroMod Main Board - Single

SparkFun MicroMod Main Board - Single

DEV-18575
$14.95
SparkFun Mini Screwdriver

SparkFun Mini Screwdriver

TOL-09146
$1.05
3
SparkFun MicroMod Artemis Processor

SparkFun MicroMod Artemis Processor

DEV-16401
$14.95
SparkFun MicroMod GNSS Function Board - NEO-M9N

SparkFun MicroMod GNSS Function Board - NEO-M9N

GPS-18378
$49.95

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.

SparkFun MicroMod Main Board - Single

SparkFun MicroMod Main Board - Single

DEV-18575
$14.95
SparkFun MicroMod Main Board - Double

SparkFun MicroMod Main Board - Double

DEV-18576
$17.95

MicroMod Processor Board

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

SparkFun MicroMod Teensy Processor

SparkFun MicroMod Teensy Processor

DEV-16402
$21.50
4
SparkFun MicroMod SAMD51 Processor

SparkFun MicroMod SAMD51 Processor

DEV-16791
$18.95
1
SparkFun MicroMod ESP32 Processor

SparkFun MicroMod ESP32 Processor

WRL-16781
$16.95
1
SparkFun MicroMod Artemis Processor

SparkFun MicroMod Artemis Processor

DEV-16401
$14.95

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.

SparkFun MicroMod LoRa Function Board

SparkFun MicroMod LoRa Function Board

WRL-18573
$39.95
SparkFun MicroMod Environmental Function Board

SparkFun MicroMod Environmental Function Board

SEN-18632
$149.95
SparkFun MicroMod WiFi Function Board - ESP32

SparkFun MicroMod WiFi Function Board - ESP32

WRL-18430
$14.95
SparkFun MicroMod GNSS Function Board - NEO-M9N

SparkFun MicroMod GNSS Function Board - NEO-M9N

GPS-18378
$49.95

Tools

You will need a screw driver to secure the Processor and Function boards.

SparkFun Mini Screwdriver

SparkFun Mini Screwdriver

TOL-09146
$1.05
3
Pocket Screwdriver Set

Pocket Screwdriver Set

TOL-12891
$4.50
5
MicroMod Screwdriver

MicroMod Screwdriver

TOL-19012
$0.50

Suggested Reading

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

MicroMod Logo
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.

u-blox NEO-M9N

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.

3.3V/600mA AP2112K Voltage regulator regulating voltage from the M.2 Edge pins

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 on the jumper position.

USB, Serial, SPI, I2C Ports

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 Connector and TVS Diode IC

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

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

Serial

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

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 battery

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.

u.FL connector

EEPROM

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

EEPROM

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.

3.3V Power and PPS LEDs

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.
Jumpers (Top View)Jumpers (Bottom View)
Jumpers (Top View)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.

ConstellationsGPS+GLO+GAL+BDSGPS+GLONASS+GALGPS+GLOGPS+BDSGPS+GAL
Horizontal Position Accuracy2m2m2m2m2m
Max Navigation Update RatePVT25Hz25Hz25Hz25Hz25Hz
Time-To-First-FixCold Start24s25s26s28s29s
Hot Start2s2s2s2s2s
SensitivityTracking and Navigation-167dBm-167dBm-167dBm-1667dBm-166dBm
Reacquisition-160dBm-160dBm-160dBm-160dBm-160dBm
Cold Start-148dBm-148dBm-148dBm-148dBm-148dBm
Hot Start-159dBm-159dBm-159dBm-159dBm-159dBm
Velocity Accuracy0.05m/s0.05m/s0.05m/s0.05m/s0.05m/s
Heading Accuracy0.3deg0.3deg0.3deg0.3deg0.3deg


When using a single GNSS constellation:

ConstellationGPSGLONASSBEIDOUGalileo
Horizontal Position Accuracy2m4m3m3m
Max Navigation Update RatePVT25Hz25Hz25Hz25Hz
Time-To-First-FixCold Start29s27s32s42s
Hot Start2s2s2s2s
SensitivityTracking and Navigation-166dBm-164dBm-160dBm-159dBm
Reacquisition-160dBm-155dBm-157dBm-154dBm
Cold Start-148dBm-145dBm-145dBm-140dBm
Hot Start-159dBm-156dBm-159dBm-154dBm
Velocity Accuracy0.05m/s0.05m/s0.05m/s0.05m/s
Heading Accuracy0.3deg0.3deg0.3deg0.3deg

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.

AUDIOUARTGPIO/BUSI2CSDIOSPI0Dedicated
FunctionBottom
Pin
   Top   
Pin
Function
(Not Connected)75GND
3.3V7473G5 / BUS5
RTC_3V_BATT7271G6 / BUS6
SPI_CS1#SDIO_DATA3 (I/O)7069G7 / BUS7
SDIO_DATA2 (I/O)6867G8
SDIO_DATA1 (I/O)6665G9ADC_D- CAM_HSYNC
SPI_CIPO1SDIO_DATA0 (I/O)6463G10ADC_D+CAM_VSYNC
SPI COPI1SDIO_CMD (I/O)6261SPI_CIPO (I)
SPI SCK1SDIO_SCK (O)6059SPI_COPI (O)LED_DAT
AUD_MCLK (O)5857SPI_SCK (O)LED_CLK
CAM_MCLKPCM_OUTI2S_OUTAUD_OUT5655SPI_CS#
CAM_PCLKPCM_INI2S_INAUD_IN5453I2C_SCL1 (I/O)
PDM_DATAPCM_SYNCI2S_WSAUD_LRCLK5251I2C_SDA1 (I/O)
PDM_CLKPCM_CLKI2S_SCKAUD_BCLK5049BATT_VIN / 3 (I - ADC) (0 to 3.3V)
G4 / BUS44847PWM1
G3 / BUS34645GND
G2 / BUS24443CAN_TX
G1 / BUS14241CAN_RX
G0 / BUS04039GND
A13837USBHOST_D-
GND3635USBHOST_D+
A03433GND
PWM03231Module Key
Module Key3029Module Key
Module Key2827Module Key
Module Key2625Module Key
Module Key2423SWDIO
UART_TX2 (O)2221SWDCK
UART_RX2 (I)2019UART_RX1 (I)
CAM_TRIGD11817UART_TX1 (0)
I2C_INT#1615UART_CTS1 (I)
I2C_SCL (I/0)1413UART_RTS1 (O)
I2C_SDA (I/0)1211BOOT (I - Open Drain)
D0109USB_VIN
SWOG1187GND
RESET# (I - Open Drain)65USB_D-
3.3V_EN43USB_D+
3.3V21GND
FunctionBottom
Pin
   Top   
Pin
Function
(Not Connected)75GND
VIN74733.3V
VIN7271Power EN
-7069-
-6665-
-6463-
-6261-
-6059-
-5857-
-5655-
-5453INT
-5251RESET
-5049SPI_CS0
-4847PPS
-4645GND
-4443-
-4241-
EEPROM_WP4039GND
-3837-
EEEPROM_A03635-
EEEPROM_A13433GND
EEEPROM_A23231Module Key
Module Key3029Module Key
Module Key2827Module Key
Module Key2625Module Key
Module Key2423-
-2221I2C_SCL
-2019I2C_SDA
-1817-
-1615UART_RX
-1413UART_TX
-1211-
-109-
-87SPI_SDO
-65SPI_SDI
-43SPI_SCK
-21GND
Signal GroupSignalI/ODescriptionVoltage
Power3.3VI3.3V Source3.3V
GNDReturn current path0V
USB_VINIUSB VIN compliant to USB 2.0 specification. Connect to pins on processor board that require 5V for USB functionality4.8-5.2V
RTC_3V_BATTI3V provided by external coin cell or mini battery. Max draw=100μA. Connect to pins maintaining an RTC during power loss. Can be left NC.3V
3.3V_ENOControls the carrier board's main voltage regulator. Voltage above 1V will enable 3.3V power path.3.3V
BATT_VIN/3ICarrier board raw voltage over 3. 1/3 resistor divider is implemented on carrier board. Amplify the analog signal as needed for full 0-3.3V range3.3V
ResetResetIInput to processor. Open drain with pullup on processor board. Pulling low resets processor.3.3V
BootIInput to processor. Open drain with pullup on processor board. Pulling low puts processor into special boot mode. Can be left NC.3.3V
USBUSB_D±I/OUSB Data ±. Differential serial data interface compliant to USB 2.0 specification. If UART is required for programming, USB± must be routed to a USB-to-serial conversion IC on the processor board.
USB HostUSBHOST_D±I/OFor processors that support USB Host Mode. USB Data±. Differential serial data interface compliant to USB 2.0 specification. Can be left NC.
CANCAN_RXICAN Bus receive data.3.3V
CAN_TXO CAN Bus transmit data.3.3V
UARTUART_RX1IUART receive data.3.3V
UART_TX1OUART transmit data.3.3V
UART_RTS1OUART ready to send.3.3V
UART_CTS1IUART clear to send.3.3V
UART_RX2I2nd UART receive data.3.3V
UART_TX2O2nd UART transmit data.3.3V
I2CI2C_SCLI/OI2C clock. Open drain with pullup on carrier board.3.3V
I2C_SDAI/OI2C data. Open drain with pullup on carrier board3.3V
I2C_INT#IInterrupt notification from carrier board to processor. Open drain with pullup on carrier board. Active LOW3.3V
I2C_SCL1I/O2nd I2C clock. Open drain with pullup on carrier board.3.3V
I2C_SDA1I/O2nd I2C data. Open drain with pullup on carrier board.3.3V
SPISPI_COPIOSPI Controller Output/Peripheral Input.3.3V
SPI_CIPOISPI Controller Input/Peripheral Output.3.3V
SPI_SCKOSPI Clock.3.3V
SPI_CS#OSPI Chip Select. Active LOW. Can be routed to GPIO if hardware CS is unused.3.3V
SPI/SDIOSPI_SCK1/SDIO_CLKO2nd SPI Clock. Secondary use is SDIO Clock.3.3V
SPI_COPI1/SDIO_CMDI/O2nd SPI Controller Output/Peripheral Input. Secondary use is SDIO command interface.3.3V
SPI_CIPO1/SDIO_DATA0I/O2nd SPI Peripheral Input/Controller Output. Secondary use is SDIO data exchange bit 0.3.3V
SDIO_DATA1I/OSDIO data exchange bit 1.3.3V
SDIO_DATA2I/OSDIO data exchange bit 2.3.3V
SPI_CS1/SDIO_DATA3I/O2nd SPI Chip Select. Secondary use is SDIO data exchange bit 3.3.3V
AudioAUD_MCLKOAudio master clock.3.3V
AUD_OUT/PCM_OUT/I2S_OUT/CAM_MCLKOAudio data output. PCM synchronous data output. I2S serial data out. Camera master clock.3.3V
AUD_IN/PCM_IN/I2S_IN/CAM_PCLKIAudio data input. PCM syncrhonous data input. I2S serial data in. Camera periphperal clock.3.3V
AUD_LRCLK/PCM_SYNC/I2S_WS/PDM_DATAI/OAudio left/right clock. PCM syncrhonous data SYNC. I2S word select. PDM data.3.3V
AUD_BCLK/PCM_CLK/I2S_CLK/PDM_CLKOAudio bit clock. PCM clock. I2S continuous serial clock. PDM clock.3.3V
SWDSWDIOI/OSerial Wire Debug I/O. Connect if processor board supports SWD. Can be left NC.3.3V
SWDCKISerial Wire Debug clock. Connect if processor board supports SWD. Can be left NC.3.3V
ADCA0IAnalog to digital converter 0. Amplify the analog signal as needed to enable full 0-3.3V range.3.3V
A1IAnalog to digital converter 1. Amplify the analog signal as needed to enable full 0-3.3V range.3.3V
PWMPWM0OPulse width modulated output 0.3.3V
PWM1OPulse width modulated output 1.3.3V
DigitalD0I/O General digital input/output pin.3.3V
D1/CAM_TRIGI/OGeneral digital input/output pin. Camera trigger.3.3V
General/BusG0/BUS0I/OGeneral purpose pins. Any unused processor pins should be assigned to Gx with ADC + PWM capable pins given priority (0, 1, 2, etc.) positions. The intent is to guarantee PWM, ADC and Digital Pin functionality on respective ADC/PWM/Digital pins. Gx pins do not guarantee ADC/PWM function. Alternative use is pins can support a fast read/write 8-bit or 4-bit wide bus.3.3V
G1/BUS1I/O3.3V
G2/BUS2I/O3.3V
G3/BUS3I/O3.3V
G4/BUS4I/O3.3V
G5/BUS5I/O3.3V
G6/BUS6I/O3.3V
G7/BUS7I/O3.3V
G8I/OGeneral purpose pin3.3V
G9/ADC_D-/CAM_HSYNCI/ODifferential ADC input if available. Camera horizontal sync.3.3V
G10/ADC_D+/CAM_VSYNCI/ODifferential ADC input if available. Camera vertical sync.3.3V
G11/SWOI/OGeneral purpose pin. Serial Wire Output3.3V

Board Dimensions

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

Board Dimensions

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.

Getting Started with MicroMod

October 21, 2020

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°).

alt text

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

alt text

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

alt text

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

alt text

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.

alt text

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.

alt text

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.

Installing Board Definitions in the Arduino IDE

September 9, 2020

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.

MicroMod Artemis Processor Board Hookup Guide

October 21, 2020

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

How to Install CH340 Drivers

August 6, 2019

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 predeccesors and the higher precisionu-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:

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.

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.

AUDIOUARTGPIO/BUSI2CSDIOSPIDedicated
NEO-M9N Function Board
Pin Name
I/O
Direction
Main Board's
Processor Pin
Slot 0Slot 1
VCCIVCCVCC
ENOPWR_EN0PWR_EN1
GND-GNDGND
SPI_SCKOSPI_SCKSPI_SCK
SPI_POCIISPI_POCISPI_POCI
SPI_PICOOSPI_PICOSPI_PICO
I2C_SCLI/OI2C_SCLI2C_SCL
I2C_SDAI/OI2C_SDAI2C_SDA
RXOTX1TX2
TXIRX1RX2
PPSI/OD0D1
SPI_CSI/OCS0CS1
RESETI/OPWM0PWM1
INTI/OG0G5
EEPROM_A0I/O--
EEPROM_A1I/O--
EEPROM_A2I/O--
EEPROM_WPI/O--

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.

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

This image shows a screenshot of the Arduino Serial terminal spitting out latitude and longitude data.

These are the coordinates for SparkFun HQ

Troubleshooting

Resources and Going Further

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:

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.

GPS Logger Shield Hookup Guide

How to assemble and hookup the SparkFun GPS Logger Shield. Never lose track of your Arduino again!

ESP32 Thing Motion Shield Hookup Guide

Getting started with the ESP32 Thing Motion Shield to detect movements using the on-board LSM9DS1 IMU and adding a GPS receiver. Data can be easily logged by adding an microSD card to the slot.

SparkFun GPS-RTK Dead Reckoning ZED-F9R Hookup Guide

The u-blox ZED-F9R is a powerful GPS-RTK unit that uses a fusion of IMU, wheel ticks, a vehicle dynamics model, correction data, and GNSS measurements to provide highly accurate and continuous position for navigation in the difficult conditions. We will quickly get you set up using the Qwiic ecosystem through Arduino and Python so that you can start reading the output!

learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado


Viewing all articles
Browse latest Browse all 1123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>