Most of us are now stuck in (private) rooms, so modules for measuring the air quality cheaply are gaining popularity. The MonkMakes Air Quality Kit measures equivalent CO2 and temperature. It is especially designed to be used with a Raspberry Pi 400, but it can also be connected to other Raspberry Pi models using the jumper wires and an included GPIO template.

MonkMakes Air Quality Kit

Thermometers have long been used to monitor room temperature, and in recent years, (e)CO2 meters have become increasingly popular for monitoring air quality. Too much carbon dioxide (CO2) has a negative effect on concentration, and at even higher levels it is bad for your health. This kit measures the quality of the air in a room (how stale the air is) as well as the temperature. It is meant as an add-on for the Raspberry Pi, but it also can be used as a stand-alone device. The board has a buzzer and a bar of six LEDs (two green, two orange, and two red) that displays the air quality. Temperature and air quality readings can be processed by a Raspberry Pi. The buzzer and LED display can be controlled by the host.

The kit comes without printed documentation, but it provides a link to the MonkMakes website where the datasheet and instructions can be downloaded. These documents contain all relevant information; they help the user to connect and use the board. Example applications in Python are available for download on Github.

MonkMakes Air Quality Kit
Figure 1: The kit contains the board, jumper wires and a template to locate the
GPIO-connector pins. (Source: MonkMakes)

Hardware

Besides the six indicator LEDs and the buzzer — the big square component in the middle of the PCB in Figure 1 — the board contains a power LED, a temperature sensor, an eCO2 sensor, a microcontroller and of course a 40-pin connector that fits directly on the expansion connector of a Raspberry Pi 400 (Figure 2).
 

MonkMakes Air Quality Kit connected to RPi 400
Figure 2: Air Quality Kit connected to a Raspberry Pi 400. (Source: MonkMakes)

Perhaps needless to say: other Raspberry Pi boards can not be connected directly, for that the jumper wires are included. The four connections needed (two for the power supply, two for the serial connection) are shown in the print on the MonkMakes board and on the supplied template to match the corresponding pins of the GPIO connector of the Raspberry Pi, as illustrated in Figure 3. The power LED lights up as soon as the 3.3 V supply voltage is switched on, and so will one of the eCO2 level LEDs.
 

MonkMakes Air Quality Kit connected to other RPi module
Figure 3: Don’t plug in directly, use the jumper wires to connect the kit to
other Raspberry Pi models! (Source: MonkMakes)

The temperature sensor is a Texas Instruments TMP235. Its output voltage is proportional to the temperature. For CO2 measurement, the MonkMakes board uses a CCS811 TVOC (Total Volatile Organic Compounds) sensor. This does not actually measure the level of CO2, but rather the level of a group of gasses called Volatile Organic Compounds (VOCs). When indoors, the level of these gasses rises at a rate comparable to that of CO2, and can therefore be used to estimate the level of CO2 (called the equivalent CO2 or eCO2).

The on-board ATtiny1614 microcontroller reads both sensors and controls the LED bar display and the buzzer. Via a serial protocol, a host system can request sensor readings or switch the LEDs and buzzer on and off. The kit’s datasheet documents this simple protocol, so it will not be too difficult to write your own software to support the Air Quality Kit. As name of this kit indicates, it is designed for Raspberry Pi, but there is no reason why you shouldn’t use it with other boards or systems with a 3.3 V UART.

The firmware of the ATtiny also offers an automatic mode (switched on by default) that shows the eCO2 level on the LED bar without any external control; all that is needed is a 3.3 V power supply. So, even without a host system, the Air Quality kit can be used as eCO2 monitor.

MonkMakes Air Quality Kit Software

As mentioned earlier, MonkMakes offers downloads of some Python example programs to control this Air Quality Kit to test and demonstrate all its features. In the Getting Started section of the documentation, the instructions clearly show how the software can be used on a Raspberry Pi board to implement an eCO2-meter, an eCO2-meter with acoustic alarm (Figure 4) and a data logger application.
 

Screen output
Figure 4: Raspberry Pi screen output for one of the examples. (Source: MonkMakes)

Looking at the examples, like in Figure 5, you’ll notice that the ATtiny and the API completely relieve you of retrieving and evaluating sensor data: one simple instruction from the host (Raspberry Pi) will trigger the Air Quality board to echo the current ambient temperature (in °C) or CO2 level (in ppm), respectively. Similar commands are used to switch the buzzer on and off, and to control the LEDs of the eCO2 bar display.

Python source
Figure 5: Python source, showing that only simple, short instructions are needed to
communicate with the Air Quality Kit.

MonkMakes Offers a Nice Design

Only some basic knowledge of the Raspberry Pi is required to get this Air Quality kit working. What is a great advantage for some, will be less attractive for others: knowledge of the sensors and control of buzzer and LEDs is not required. The (source code of the) firmware of the on-board ATtiny1614 is not released (i.e., we don’t know what exactly happens inside this microcontroller). However, the protocol to communicate with the board is simple and well documented, and development of your own applications — even for other target systems than Raspberry Pi boards — will be relatively easy. The MonkMakes Air Quality Kit for Raspberry Pi is a nicely designed, well-documented board that, together with the examples, is also suitable for beginners who want to get started with temperature and eCO2 measurements.
 


Sensor Characteristics 

    Units
eCO2 minimum reading 400 ppm
eCO2 maximum reading 4095 ppm
eCO2 resolution 1 ppm
eCO2 accuracy unspecified  
Temperature minimum reading -10 °C
Temperature max reading 100 °C
Temperature accuracy   +/- 2  °C

About CO2 Concentrations 

The level of CO2 in the air we breathe has a direct influence on our well-being. CO2 levels are of particular interest from a public health point of view. To put it simply, they are a measure of how much we are breathing other people’s air. We humans breathe out CO2, and if several people are in a poorly ventilated room, the level of CO2 will gradually increase — as well as concentration of aerosols that spread colds, flues and Coronavirus. Another important impact of CO2 levels is in cognitive function — how well you can concentrate and think. The table below shows the levels at which CO2 can become unhealthy. The CO2 readings are in ppm (parts per million).
 
Level of CO2
250-400 Normal concentration in ambient air.
400-1000 Concentrations typical of occupied indoor spaces with good air exchange
1000-2000 Complaints of drowsiness and poor air.
2000-5000              Headaches, sleepiness and stagnant, stale, stuffy air. Poor concentration, loss of attention, increased heart rate and slight nausea may also be present.
5000 Workplace exposure limit in most countries.
>40000 
 
Exposure may lead to serious oxygen deprivation resulting in permanent brain damage, coma, even death
 

Questions or Comments? 

Do you have questions or comments about his article? Email the author at luc.lemmens@elektor.com or contact Elektor at editor@elektor.com.