Smart Air Quality Monitor
- About
- Getting Started
- Circuit
- MQTT Topic Details
- Usage
- List Of Components
- Built Using
- DemoVideo
- Authors
This repo contains
- Firmware
- Detailed instructions
for Smart Air Quality Monitor.
These instructions will get you a copy of the project up and running on your system.
Things you need to install the FW.
- Arduino IDE
A step by step series that tell you how to get the Firmware and Backend running
You should have Arduino IDE Installed
-
Add ESP32 Board to your Arduino IDE 1. In your Arduino IDE, go to File> Preferences Installing ESP32 Add-on in Arduino IDE Windows, Mac OS X, Linux open preferences 2. Enter
https://dl.espressif.com/dl/package_esp32_index.json
https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
into the “Additional Board Manager URLs” field then, click the “OK” button: Note: if you already have the ESP32 boards URL, you can separate the URLs with a comma(each board will go to neaw line) as follows:https://dl.espressif.com/dl/package_esp32_index.json
http://arduino.esp8266.com/stable/package_esp8266com_index.json
-
Open the Boards Manager. Go to Tools > Board > Boards Manager…
-
Search for ESP32 and press install button for the ESP32 by Espressif Systems.
-
Search for M5Stack and press install
-
That’s it. It should be installed after a few seconds.
-
Close and re-open the Arduino IDE.
-
Now copy the contents of the libs folder to the libraries directory of your Arduino
- If you are using windows, the libraries directory will be Documents/Arduino/libraries
- Select ESP32 Dev Module from Tools->Board->ESP32
- Select the correct port from Tools->Port
- Then open Firmware.ino file,
- Select Tools > ESP32 Sketch Data Upload menu item. This should start uploading the files into ESP32 flash file system.
- Now Upload the Code to your ESP32 Dev Module.
- Your ESP32 is now ready to be used.
- Relay should be connected to GPIO26 of the M5Stack. This can be chnaged in Firmware.ino
- smart-air/logs
(all log messages are published to this topic) READ-ONLY
-
Upload the code to your M5Stack.
-
Power on your ESP32, it will present you with an AP named
SmartAir-abc
(whileSmartAir
can be changed in the portal andabc
is a unique id for each esp32) -
Default captive portal password
123456789AP
which can be changed in captive portal. -
Connect to the ESP32 access point and open the web-browser and navigate to the link
http://esp32.local/_ac
. This link will work on most of the operating systems but if your operating system is not allowing to open it, you may want to check the captive portal IP Address from the serial monitor and can use that IP address inplace of the above mentioned URL. -
The default access IP Address is
http://192.168.4.1/_ac
-
You will be presented with a main dashboard as shown below(based on your device)
-
Once connected to a WiFi network, you can again access the captive portal using same URL or the IP Address from the Serial monitor.
-
The data is published to the MQTT Topic
SmartAir/{hostname}
while the hostname is the one which you can define in Settings page of the captive portal. -
You can also check the realted IP address in the settings screen of M5Stack by pressing the button 'B' two times.
Following components are used to make this project
- VOC Sensor https://www.adafruit.com/product/3566
- PM2.5 Sensor https://www.adafruit.com/product/4505
- Generic 12v Relay Module https://www.amazon.com/ANMBEST-Channel-Optocoupler-Expansion-Raspberry/dp/B08PNX72ZQ/ref=sr_1_9?dchild=1&keywords=12v+relay+module&qid=1632992909&sr=8-9
- Arduino - Embedded Framework and IDE - For Sensor Node Design
SmartAir Demo Video - Demo Video Part 1 SmartAir Demo Video - Demo Video Part 2
- @Nauman3S - Development and Deployment