This repository represents the semestrial project I did in my 3rd year of university, an Air Quality Monitor that detects how good the air you breathe is, displays current values, plots data, and logs reading in the local FileSystem.
I wanted to develop an air quality detection system because moving to Bucharest made me understand better the effect that pollution can have on every one of us, so I wanted a way in which to determine just how polluted the air around me was, after some research, I concluded that I can determine that by measuring Particulate matter (dust, and other small particles) and CO2.
- ESP32-C6-DevKit-1
- Microcontroller that will act as the brain of the device.
- PMS5003
- Sensor that can detect particles (ex PM2.5, meaning particles smaller than 2.5 microns).
- SCD-40
- Sensor that can detect the CO2 level, temperature, and humidity.
- 1.14'' 240x135 TFT Display
- Small screen on which to display various data and plots.
- a button
The device functionality is spread into 3 categories:
- Sensors:
- For the two sensors I used libraries from Adafruit for easier implementation, it worked great, with no problems with them.
- The PMS5003 communicates with the ESP32 via UART.
- The SCD-40 communicates via I2C.
- File system:
- To store all the data from the sensors I used a local file system present on the ESP32 named LittleFS, the naming convention for this project was NN.CSV, each file would contain a header that describes each column.
- A new file could be created or there exists the option of appending data to the last created file.
- Screen:
- The screen can display the current values of the reading and cycle through them by short pressing a button.
- Drawing plots of each of the measurements is also possible by long pressing the button, the display can show 75 values at a time in the plot.
Additionally, you can change the sampling rate of the sensor readings as well as the interval in which the display will update.

