- Notifications
You must be signed in to change notification settings - Fork0
ESP8266-based air quality sensor with ThingSpeak integration
License
grotter/ArduinoAQI
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This device continuously monitors atmospheric particulate matter. It sends sensor data to a registered ThingSpeak channel and displays realtime Air Quality Indexcalculations. It was designed to be cheap and efficient.
- ESP8266 Arduino-compatible microcontroller. I‘m using aWeMos D1 mini, pins will need to be transposed for other controllers
- Plantower PMS5003 laser particle concentration sensor
- TM1637 seven segment LED display module
- A momentary switch for resetting the wifi configuration
- A minimally hacked version (included in this repo) of tzapu’sWiFiManager
- Arduino_JSON
- fu-hsi‘slibrary for Plantower PMS x003 family sensors
- bremme‘slibrary for controlling TM1637 display modules
- mathwork‘sThingSpeak library – note: latest version is buggy, userelease v1.4.3
- madleech‘sButton library
ArduinoAQI uses ThingSpeak for both uploading sensor data and for reading configuration. You will need aThingSpeak account and least two channels: a registration channel to store configuration and a data channel to write sensor data to. The registration channel should have three fields:
- Device MAC Address
- Data Channel ID
- Data Channel Write API Key
The data channel should have four fields:
- PM 1.0 (µg/m³)
- PM 2.5 (µg/m³)
- PM 10.0 (µg/m³)
- AQI
You will need to upload or import data into the registration channel, with one data point per device containing the desired data channel ID and corresponding Write API Key.
Copyconfig.h
toprivate/config.h
and fill in at leastTHINGSPEAK_REGISTRY_CHANNEL_NUMBER
andTHINGSPEAK_REGISTRY_API_KEY
with the ID of the ThingSpeak registration channel ID and correspondingRead API Key.
You can use the shell commandaddSensor.sh
to partially automate the creation and registration processes above.
To setup wifi connectivity, the device will create anArduinoAQI Setup access point when first run. Connect to this network with a phone or computer to set your wifi credentials.
The device powers up in spinup mode for an initial ten seconds. Set wifi mode tooff by clicking the reset button during spinup. In wifi mode, the reset button will clear your network credentials and relaunch the configuration access point.
View detailedsetup instructions for a new device.
Also tested with aWeMos D1 R2 development board. Note: Pin labels on the D1 R2 fritzing component are wonky.
SeeChartAQI to view your sensor data and any optional PurpleAir sensors.