Purpose

I tried to make use of the sensors that I bought on AliExpress a long time ago and also learn Rust and Docker containerization. This is a simple but useful device that came as a product of it.

Hardware

All modules use I2C so the circuit is easy. While I2C is a parallel protocol and the device doesn't draw a lot of energy, in theory all pins of the Raspberry Pi can be used later on. That's why there is a socket on top of the PCB (visible on the picture of the device) that mimics the Raspberry Pi socket, so that other devices can be connected like if the board wasn’t there.

The sensor chips that I used:

  • BME280: Temperature, Humidity, and Pressure sensor
  • Si7021: Temperature and Humidity sensor
  • SGP30: TVOC (Total Volatile Organic Compounds) – basically it detects stink in the air

There is also a SSD1306: 0.91-inch 128x32 OLED display.

Software

The main application is written in Rust and is responsible for:

  • Gathering measurements via I2C
  • Showing data on the display
  • Saving data to a .csv file
  • Sending data to an MQTT server

This part, as well as the KiCad model, are available on the project's GitHub repository (PiWeatherShield).

The measurements can also be accessed via a web interface. Thanks to Docker images, almost no code needed to be written - just the configuration of containers. All instructions on how to set it up are in a separate GitHub repository (HardwareDataLogger-RemoteProcessing), because it's part of a larger home measurement project (which includes HardwareDataLogger, not presented here).

Below is an example of measurement visualization via the web interface.