Air Quality And Weather Tracker Based On Bme680.

About the project

Using an the BME680 sensor it is possible to measure variables from the environment like temperature, air pressure, humidity and some gases to obtain the surrounding air quality.

Project info

Difficulty: Difficult

Platforms: BoschNXPMQTT

Estimated time: 4 weeks

License: Apache License 2.0 (Apache-2.0)

Items used in this project

Hardware components

I.mx Rt1020 Development Kit I.mx Rt1020 Development Kit Main processor board. Based on ARM Cortex x 1
Adafruit Bme680 - T, H, P & G Sensor Adafruit Bme680 - T, H, P & G Sensor Environmental sensor x 1
Pcf85063at-ard Pcf85063at-ard RTC breakout board with Arduino pinout connection to the iMXRT1020 x 1

Software apps and online services

MCUXpresso IDE v11.3.1 MCUXpresso IDE v11.3.1 Default development environment free provided by NXP
Putty Putty Terminal command GUI. Used for IDE tool independent debug

Hand tools and fabrication machines

45W Iron solder 45W Iron solder used to solder the Arduino pin headers to attach the PCF85063AT evaluation board to the main board x 1
Multimeter with voltmeter function Multimeter with voltmeter function Used to check on board power supply voltages and pin connections x 1
Breadboard Breadboard Used to test external sensors and components x 1
Breadboard wiring Breadboard wiring Miscellanious wires to make breadboard to main board connections x 1

Story

The first step in this project is get to know the development board iMXRT1020, its development environment and get some insights the software implementation bringing live an environmental sensor the BME680 together with an RTC PCF85063.

For this purpose was followed the getting started library.

Getting started with the iMXRT1020 EVK

The IDE MCUXpresso was downloaded and installed. Also the board SDK which contain several project examples to get an insight with the HAL and SW utilities provided by the manufacturer.

Additional documents were required like the processor reference manual IMXRX1020RM which can be downloaded after logging from the NXP webpage. The board hardware guide and the MIMXRT1020-EVK-Design-Files were required.

  1. Getting hands on the I2C

Taking as a reference the board hardware guide was looked or the inertial sensor FXOS8700CQ which accord to the documentation is connected.

Which is directly connected to the LPI2C4 peripheral in the processor

And accord to the reference manual this pins are


This sensor was not included from factory in the board received


Flow change to connect and interact with the PCF85063 connected to the LPI2C1

This sensor answer to the address 0x51 and get the raw information


For purposes to create a fast project template some available drivers from the SDk were used but they were not completly implimented in the source tree of the project.

Initialization for I2C pins and GPIO pins for the leds, has to be included in the file pin_mux.c and pin_mux.h.


At the end of this report the project is trying to integrate the BME68x library API with some bugs in the I2C driver and the interaction with the library.

The datasheet of the BME680 can be found in https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf

The actual sensor use is commercially available soldered and mounted by for example Adafruit breakout board. https://learn.adafruit.com/adafruit-bme680-humidity-temperature-barometic-pressure-voc-gas/pinouts


This project keeps under CI in the project git repository. The main aims are to create a library for the RTC PCF85063 and get a clean run of the BME680. A better understanding of the API layers for the Ethernet has to be taken in the future in order to implement an MQTT client.







Code

Air quality and weather tracker based on BME680.

Here is the tracking of the code being developed for the proposed application

Credits

Photo of embeddinho

embeddinho

Embedded systems engineer with background in MCU HW/SW design and integration

   

Leave your feedback...