Monitor Air Pollution with a Raspberry Pi, a Particulate Matter sensor and IoT Central
Background
Born of necessity, this project tracked the air quality over Sydney during the height of the Australian bushfires. I wanted to gauge when it was safe to go outside, or when it was better to close up the apartment and stay in for the day.
#JulyOT
This is part of the #JulyOT IoT Tech Community series, a collection of blog posts, hands-on-labs, and videos designed to demonstrate and teach developers how to build projects with Azure Internet of Things (IoT) services. Please also follow #JulyOT on Twitter.
Introduction
In this hands-on lab, you will learn how to create and debug a Python application on a Raspberry Pi with Visual Studio Code and the Remote SSH extension. The app requires the Pimoroni Enviro+ pHAT, and reads data from the PMS5003 particulate matter (PM) and BME280 sensors and streams the data to Azure IoT Central.
Parts required
- Raspberry Pi 2 or better, SD Card, and Raspberry Pi power supply
- Pimoroni Enviro+ pHAT
- PMS5003 Particulate Matter Sensor with Cable available from Pimoroni and eBay.
This lab depends on Visual Studio Code and Remote SSH development. Remote SSH development is supported on Raspberry Pis built on ARMv7 chips or better. The Raspberry Pi Zero is built on ARMv6 architecture. The Raspberry Pi Zero is capable of running the solution, but it does not support Remote SSH development.
Solution Architecture
Let's get started
Head to Raspberry Pi Air Pollution Monitor
There are five modules covering the following topics:
- Module 1: Create an Azure IoT Central application
- Module 2: Set up your Raspberry Pi
- Module 3: Set up your development environment
- Module 4: Run the solution
- Module 5: Dockerize the Air Quality Monitor solution
Source code
All source code available for the Raspberry Pi Air Pollution monitor
Acknowledgements
This tutorial builds on the Azure IoT Python SDK 2 samples.
Have fun and stay safe and be sure to follow us on #JulyOT.
Updated Jul 24, 2020
Version 6.0glovebox
Microsoft
Joined January 24, 2019
Internet of Things Blog
Follow this blog board to get notified when there's new activity