Skip to content

Cheap DIY Air quality monitor written in embedded Rust

Notifications You must be signed in to change notification settings

paologaleotti/airquality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust

airquality

Fully open source (hardware and firmware) cheap and fairly accurate air quality monitor.

image

It can measure:

  • Temperature
  • Humidity
  • Pressure
  • CO2 (eCO2)
  • TVOC

It displays data to a small OLED display via a simple UI.

Hardware:

  • STM32 board (STM32f103c8 ARM based)
  • ENS160 sensor (air quality, CO2)
  • AHT21 sensor (temperature, humidity, pressure)
  • ssd1306 (OLED display)

It costs around 10 euros to buy all the required hardware (it may require soldering the headers onto the STM32)

Hardware

The circuit uses a single shared I2C Bus with OLED and the two sensors connected (SCL, SDA).

circuit schematic

Note: in my case the ENS160 and AHT2x sensors were together on the same PCB. All the electronics in my case can work with 5V, be sure to check the datasheet of your own sensors before connecting to VCC!

Firmware

The firmware is written in Rust (embbedded, no_std) using all the embedded Rust tooling and ecocsystem.

Requirements:

  • Rust
  • Make
  • probe-rs
  • Rust target thumbv7m-none-eabi
  • STLink (or any other supported probe)

To build and flash the firmware:

make flash