Air-Pi is a DIY project to monitor the Air Quality. It uses the Raspberry pi, a particule matter sensor, a gas/temperature/humidity/pressure sensor and a and small display. The case is 3d printed. The total cost of all components is < $100.
(The picture does not include the Gas sensor BME680, which was added later)
Raspberry pi Zero W https://www.raspberrypi.org/products/raspberry-pi-zero-w/
-
Particle Matter Sensor: Plantower PMS5003 http://www.plantower.com/en/content/?108.html
-
UART breakout: by Pimoroni https://shop.pimoroni.com/products/particulate-matter-sensor-breakout (converts between the picoblade connector cable on the PMS5003 particulate matter sensor and a standard male 2.54mm pitch header)
- UCTRONICS 0.96 Inch OLED Module 12864 128x64 Yellow Blue SSD1306 - Driver I2C Serial https://www.uctronics.com/index.php/uctronics-0-96-inch-oled-module-12864-128x64-yellow-blue-ssd1306-driver-i2c-serial-self-luminous-display-board-for-arduino-raspberry-pi.html
The case was designed using Sketchup. It is divided into 2 parts, the .stl are provided here.
Both the screen and the bme680 are using the i2c bus, one option is to create a 2nd bus so that they do not have to share the same PINs and we do not to have to worry about potiential issues with addresses overlap if using the same bus:
add the line in /boot/config.txt:
dtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24
-- tested with Python 3.7 --
pip3 install -r requirements.txt
python3.7 air-pi.py
Launch in background :
nohup python air-pi.py &
crontab -e
add to the file:
@reboot /usr/bin/python3.7 [directory]/air-pi.py
-
Code for the Sensor Controller: https://github.com/dobra-dobra/Python_PMS5003
-
Code for the Display Controller: https://circuitdigest.com/microcontroller-projects/ssd1306-oled-display-with-raspberry-pi

