Air MacClean

Air MacClean monitors CO2 and TVOC using a Raspberry Pi and an Adafruit CCS811 gas sensor

TVOC stands for Total Volatile Organic Compounds. This sensor measures CO2 in PPM (parts per million) and TVOCs in PPB (parts per billion).

CO2-TVOC Sensor

Raspberry Pi Zero W


The Raspberry Pi Mega Kit includes a Raspberry Pi Zero W with GPIO header attached plus a 16GB MicroSD memory card with the Raspbian operating system installed. You can use your own memory card and download and install Raspbian

Interacting with Raspberry Pi Zero W

Use a miniHDMI-to-HDMI adaptor to connect Enviro to a monitor or TV. Use a microUSB-to-USB adaptor to plug-in a keyboard or mouse. I recommend a USB hub so you can connect both of them. Power Raspberry Pi with a wall plug or a USB battery capable of powering mobile phones.

You can connect remotely using Secure Shell (SSH) but you must enable SSH. Click the raspberry icon on the menu. Select Preferences, then select Raspberry Pi Configuration. Click the Interfaces tab and enable SSH.

Window for enabling SSH as described in text

Building your device

Use this tutorial to build your device

Known bugs

Verifying the version of Python

The Raspbian operating system comes with two versions of Python pre-installed. This tutorial uses Python 2 and Python 3. Verify that these versions are installed:

python --version
$ Python 2.7.16

Verify that Python3 has been pre-installed:

python3 --version
$ Python 3.7.3
pip3 --version
$  pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)

Gathering data

Watching sensor readings

Saving sensor data in a MySQL table

Investigating your data

Charting CO2 data on ThingSpeak

What happens when you plot air quality data over time?
Use this data science notebook to explore CO2-TVOC data

Experimenting

What's the CO2 level onboard an AV?