Digi Xbee3 Cellular to GNSS 5 Click sensor with MicroPython

Introduction

Off the shelf hardware is used to demonstrate integrating a GNSS receiver with Digi International’s LTE-M/NB-IoT cellular smart modem. The project utilizes the XB3-C-A2-UT-001 mounted in an XBIB-U-DEV eval board wired to a Mikroelektronika GNSS 5 Click board. MicroPython example code is provided for the XBee3 smart modem to communicate with the GNSS 5 Click receiver over UART and query position data. Mikroelektronika’s GNSS 5 Click™ board uses U-blox’s NEO-M8N GNSS receiver module.

Hardware Requirements

Accessories

Supplier Documentation

Hardware Setup

GNSS 5 Click Board

1 - 16 -
2 - 15 -
3 - 14 - RX
4 - 13 - TX
5 - 12 -
6 - 11 -
7 - 10 -
8 - 9 -

note: powered by USB

XB3 20 pin header

1 - 20 -
2 - 19 -
3 - 18 -
4 - RX 17 -
5 - 16 -
6 - 15 -
7 - 14 -
8 - 13 -
9 - 12 -
10 - 11 - TX

Wiring Diagram

Example Code

Description

MicroPython code that runs on a Xbee 3 cellular module connected to a GNSS 5 Click board over UART. The example code configures the Xbee UART for 9600 baud and the u-blox M8 module for UBX communication protocol over UART at 9600 baud. The Xbee then communicates with the M8 module to check GNSS position fix and read longitude / latitude. This is repeated in a continuous loop.

u-blox NEO-M8N Configuration Settings and Commands Background

The u-blox M8 GNSS receiver supports both NMEA and u-blox’s proprietary UBX communication protocols. In this code example UBX protocol is used because it is compact, modular and efficient to implement. The UBX protocol is fully described in the u-blox 8 / u-blox M8 Receiver Description - Manual as well as detailed specifications on each UBX command. The UBX-CFG-PRT command is configured to set UART baud rate to 9600 and output only UBX data. The UBX-NAV-STATUS command is used to check for GNSS position fix and UBX-NAV-POSLLH to read latitude / longitude.

u-blox | u-center GNSS evaluation software for Windows

u-blox’s u‑center GNSS evaluation software is a great tool for evaluation, performance analysis and configuration of u‑blox GNSS receivers. During development of the example code, “Messages View” and “Binary Console” within the u-center tool were used to determine the binary data for the UBX commands used. Below screen shot shows the UBX-CFG-PRT command and the binary data.