Video showcase


General specifications:


Breaking it down

The build:

I bought a cheap plastic box on Aliexpress for this project. I drilled some holes on the front for screws, LED's, the button and made some space for the screen. On the back, I've made space for a power cord and an on/off rocker switch.

Inside the unit, there's a small fan running in ten-second intervals for refreshing air inside to get better measurements.

The box ended up being a bit large for the project. When I ordered all the parts I had planned to use an Arduino MEGA as well but ended being able to use the ESP32 for everything. But with all the clutter, fan, battery, screen, etc. it's not that oversized.

What it measures:

Most data points here should explain themselves. But some people might be unfamiliar with TVOC. Total volatile organic compounds is a group of different molecules like alcohols, aldehydes, ketones, organic acids, amines, aliphatic and aromatic hydrocarbons. 

The CCS811 doesn't actually claim to measure CO2. Instead, it measures something called eCO2. It's a calculated number, not the actual amount of CO2. But because there is a very tight correlation between TVOC's and CO2 that's no problem for measuring air quality, and it works wonders for the job.

You could actually argue that it's a better way of doing it, in terms of measuring air quality because TVOC's are a better measurement for air quality.

While testing I have made some different observations that affect the measurement if the source is relatively close.

Others more obvious observations include painting, cleaning products and so on...

Web interface:

The ESP hosts a web interface providing:

The website's code is embedded in the Arduino code. When someone enters the website data for the graphs will be injected into some Javascript in the HTML code. The code for the graphs is not stored locally, as it would take up too much space. I'm using this wonderful open source library "chart.js".

Calibration and precision:

As of now, I've made four units. Running them close to each other for some time they even out up to 100 PPM CO2 difference. This is more than enough precision for this purpose. But I've tested them up against a professional CO2 monitor as well with similar accuracy. And of course, they've been tested against fresh air which is somewhere between 350 and 400 PPM CO2.


Setup:

When you first power on the device, it will try to connect to the last WiFi. If that times out after a minute, it will power on an AP called "AirMonSetup" and display an IP address. Simply connect to the AP and go to the IP and you will be guided by an intuitive WiFi connecting interface (largely thanks to the WiFiManager.h library!).

After connecting it will take some minutes for the sensor to warm up. This process usually only takes 10 minutes, despite the datasheet claiming 20 minutes. But this is no worry since it's made for 24/7 operation so it won't be restarted often.

The CCS811 will also require a burn-in first time it's used. This can take a couple of days before reliable data starts showing.

Normal operation:

During normal operation, a new data entry is saved every second logging the previously mentioned data points and a timestamp to the SD card. 

The CO2 levels and temperature are also saved every second in a buffer with a size of 120. After 120s/2 min the buffer is full. It's then averaged and the value is stored in a larger buffer with a size of 720. Now, 720*2 is 1440 minutes, which happens to be 24 hours. So now you have access to a good averaged measurements from the last 24 hours!

It's done this way because of RAM limitations on the ESP, but it's still many data points and I think it quite impressive it can handle it so well.

Button press:

There's only one button on the unit. Pressing it will cycle the 11 screen views. 

The different screen views are:

  1.  CO2 PPM and danger-level 
  2. Temperature and pressure
  3. IP
  4. WiFi SSID
  5. NTC server time
  6. Time since last reboot
  7. Used space on SD
  8. Free space on SD
  9. Current log file name
  10. "Don't touch, I'll explode!", warning for the curious 
  11. Backlight toggle