Main Content

Simple LED Bar Graph CO2 Sensor

There is a special interest in CO2 sensors lately because they are also useful to help prevent the spreading of the Coronavirus. Since the virus is mainly transmitted via aerosols it is important to assure good ventilation indoors. Since CO2 is exhaled together with aerosols (VOC = volatile organic compounds) the concentration of both are correlated and a CO2 sensor can be used to indicate when you should open a window to let fresh air into the room. Apart from that of course also a too high CO2 concentration is in itself harmful and can cause fatigue or headaches.

There have been a number of DIY CO2 projects perhaps the most notable one is that of Stephan Schulz who together with his daughter made a CO2 sensor pendant for her to wear at school. Building a CO2 sensor is a great project for students as they can learn about gas sensing, electronics, programming while making a device that is really useful for their everyday life in school.

In my workplace, we also use CO2 sensors to monitor the air quality to help mitigate the spreading of the Coronavirus. TOPTICA, the company I work at, even designed their own CO2 sensor shield for the Arduino UNO and the bare PCB was given away for free to everybody interested in building their own sensor. This inspired me to build my own variation of a CO2 sensor using the SCD30 sensor that I generously received for free from my employer. The SCD30 is relatively expansive compared to some other gas sensors because it is a non-dispersive infrared (NDIR) sensor. It measures the absorption of specific wavelengths of light characteristic for the gas molecule. This has the advantage that it only measures CO2 in contrast to chemical sensors which are also sensitive to other gases.

The aim of this project was to use only a minimal amount of components while still having advanced functionality. My CO2 sensor offers the following features

- simple display of CO2 concentration by LED bar graph
- readout and data logging of CO2 concentration, relative humidity, and temperature via Sensirion smartphone app

Supplies
- SCD30 CO2 and RH/T sensor (e.g. ebay.de)
- ESP32 NodeMCU (e.g. ebay.de)
- LED 10 segment bargraph (blue,green,yellow,red) (e.g. ebay.de)
- 10x 0805 resistor between 300Ohm to 1kOhm (e.g. ebay.de)
- Custom PCB (see below)
- 3D printed enclosure (see below)
- 4x M2 x 20 mm bolts”

Link to article