Skip to content

An air quality sensor and display that uses the BME280 and CCS811 sensors to read temperature, relative humidity, equivalent CO2 (eCO2) and Total Volatile Organic Compound (TVOC) and displays the values on a 2.9in Waveshare e-Paper display.

License

Notifications You must be signed in to change notification settings

chrisb2/air-quality

Repository files navigation

air-quality

An air quality sensor and display. Uses the BME280 and CCS811 sensors to read temperature, relative humidity, equivalent CO2 (eCO2) and Total Volatile Organic Compound (TVOC) and displays the values on a 2.9in Waveshare e-Paper display.

Schematic

If the schematic appears to be missing details, download it and view it locally, or zoom the web page.

Circuit Schematic

Installation

The program has been written and tested with the standard esp32 Micropython firmware installed on a Lolin D32 development board, although with some adjustments I would expect it to work on other esp32 boards and on the esp8266.

To install; flash the standard esp32 Micropython firmware, then copy all the Python files to the esp32 and reset the esp32.

Usage

The CCS811 sensor must be 'burned-in' (see data sheet) for at least 1 hour (newer CCS811 firmware), or 48 hours (older CCS811 firmware). To do this simply leave powered on for the appropriate time.

In addition the CCS811 sensor must be 'conditioned' for 20 minutes after being powered on before accurate readings are generated (see data sheet). During this period the display will show a long dash for the eCO2 and TVOC values.

The display is refreshed once per minute with the esp32, ccs811 MCU and display sleeping in the interval between refreshes.

Example Display

The battery voltage is displayed in the top right hand corner of the display.

ccs811 Baseline

The ccs811 sensor has the ability to use a predetermined baseline against which new readings are calculated, this allows a baseline obtained in clean air to be used to measure values in a more polluted environment.

Place the device in clean air and wait for it to be 'conditioned' (readings for eCO2 are TVOC displayed). Operate switch 1 to the on position (connects pin 14 to GND) and wait for next display update (LED on Lolin D32 flashes), turn switch 1 off. The baseline is now stored and will be utilized every time the device is switch on. A new baseline can be set by repeating this process as required.

A letter 'B' is displayed in the bottom right hand corner of the screen if a stored baseline is being used by the ccs811 sensor.

CCS811 Firmware Upgrade

WARNING - DO THIS AT YOUR OWN RISK, IT MAY BRICK THE SENSOR

The Python program ccs811_firmware_upgrade.py can be used to upgrade the CCS811 firmware, it is based on the ams application note AN000371: Downloading new Application Firmware (v2).

Check the current application firmware version in the sensor as described in the datasheet.

Download the new firmware binary from the ams website, copy to the esp32 and run the program.

Acknowledgements

CCS811 module based on Notthemarsian/CCS811

BME280 module based on catdog2/mpy_bme280_esp8266

e-Paper module based on mcauser/micropython-waveshare-epaper

Hershey vector font from Experimenting with E-Paper Displays: Building a Clock!

About

An air quality sensor and display that uses the BME280 and CCS811 sensors to read temperature, relative humidity, equivalent CO2 (eCO2) and Total Volatile Organic Compound (TVOC) and displays the values on a 2.9in Waveshare e-Paper display.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages