Digi Xbee3 Cellular to Pressure Sensor with MicroPython

Introduction

Off the shelf hardware is used to demonstrate integrating an absolute barometric pressure sensor 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 Pressure 4 Click board over I2C. MicroPython example code is provided for the XBee3 smart modem to communicate with the Pressure 4 Click temperature sensor over I2C… Mikroelektronika’s Pressure 4 Click™ board uses Bosch Sensortec’s BMP280 barometric pressure/temperature sensor.

Hardware Requirements

Accessories

Supplier Documentation

Hardware Setup

Pressure 4 Click Board

1 - 16 -
2 - 15 -
3 - 14 -
4 - 13 -
5 - 12 - SCL
6 - 11 - SDA
7 - +3.3V 10 -
8 - GND 9 - GND

XB3 20 pin header

1 - +3.3V 20 -
2 - 19 - SCL
3 - NC 18 -
4 - NC 17 -
5 - NC 16 -
6 - NC 15 -
7 - SDA 14 -
8 - 13 -
9 - 12 -
10 - GND 11 -

Wiring Diagram

Example Code

Description

MicroPython code that runs on a Xbee 3 cellular module connected to a Pressure 4 Click board over I2C. The example code scans the I2C bus and prints active addresses, reads/prints the BMP280 chip id; writes the BMP280 data acquisition settings, reads/prints the calibration parameters and reads/prints pressure and temperature in a continuous loop.

Bosch Sensortec BMP280 Pressure and Temperature Calculation Background

Configuration settings and calculations used are based on section 3.12 of revision 1.19 of the BMP280 datasheet. Below table is from the datasheet.