Decarbonization in OSSystem

Researchers from Environmental Health Perspectives made conclusions that “cognitive function scores were significantly better under Green building conditions than in the Conventional building conditions” (volume 124, number 6, June 2016, Environmental Health Perspectives). Decision-making efficiency and worker productivity are reduced when people in the office breathe in too much CO2. This statement is consistent with research on the effects of CO2 on overall brain activity and metabolism in humans.  According to the research results, elevated levels of carbon dioxide affect a decrease in metabolism and spontaneous neuronal activity of the brain, and also affect the transition to a state of reduced arousal (Journal of Cerebral Blood Flow & Metabolism (2011) 31, 58–67; doi:10.1038/jcbfm.2010.153; published online 15 September 2010).

What is actually carbon dioxide and what health risks does it bring?

About 1 kilogram of carbon dioxide the average human exhales during the day. Total quantity depends on activity — a person engaged in vigorous exercise produces up to eight times as much CO2 as his sedentary brethren. We exhale, actually, the same carbon that was “inhaled” by the plants from the atmosphere where we live in. By the way, when we eat meat, we are eating the same carbon, the only difference that it passes through livestock on its way into our mouths and out into the atmosphere. This phenomenon is called The Carbon Cycle.

More and more suggests that elevations in CO2 (<5,000 ppm) may bring direct risks to human health. Increasing atmospheric CO2 concentrations could make adverse exposures more frequent and continue through increases in indoor air concentrations and increased time spent indoors without proper ventilation.

On the outside CO2 concentrations level typically hover between 350 and 500 parts per million, depending on how much pollution is around. Indoors, co 2 level can be higher, though it varies from place to place and the number of people inside.

Any extra CO2 can have a measurable effect on how well people can accomplish cognitively high-level tasks.

Evidence indicates potential health risks at CO2 exposures as low as 1,000 ppm. This threshold is already exceeded in many indoor environments with increased room occupancy and reduced building ventilation rates (Nature, Direct human health risks of increased atmospheric carbon dioxide)

That study got the science team at OSSystem have created a CO2 sensor that can measure its concentration in ppm in the air we’re breathing at work. This sensor helps us understand when to decarbonize our office by opening windows or increasing building ventilation rates. ( Why Measure Carbon Dioxide Inside Buildings? )

In this blog post, we are going to share detailed instructions on how to create the same CO2 sensor which can be used in your office or at home for carbon dioxide monitoring. So, please, feel free to share the article with your friend and on your social networks.

Components needed to make CO2 sensor

All components can be bought on Aliexpress, eBay, or your local electronic store

1. HLK-PM03 AC-DC 220V to 3.3 V

2. Ws2812 Rgb Led Neopixel

3. Esp8266 Wifi Controller Module 

4. MH-Z19b Ir Infrared Co2 Sensor Module

5. (optional) BME280 Humidity sensor

6. USB to UART adapter

Connection Diagram

Connect all parts as shown in the connection diagram

Source codes

To get sources and compile firmware you will need:

1. git

2. VS Code 

3. Platformio plugin

4. USB to UART adapter

Download sources, check for details

3D Printed parts

Download and 3D print both parts. Use M2 bolts to join parts together.

Check the project description for print details


1. Connect the parts according to the connection diagram.

2. Clone or download source codes and open them in Platformio

3. Compile and download code on your ESP8266

4. 3D print the sensor enclosure parts

5. Put parts into the enclosure


Double-check connections before plugging the device into a 220V power socket.

If everything is assembled correctly yellow color indicator should be blinking until carbon dioxide detection sensor is ready for measurements. After it is heated the indicator will show CO2 level by its color: 

 – green – below 1000 ppm

 – yellow – between 1000 and 3000 ppm

 – red – above 3000 ppm

In addition, the sensor can be connected to MQTT broker over WIFI to publish CO2 levels. Please, scan WIFI access point SSID: “CO2-ap-<BoardID>” pass: 1234567890

Follow the web interface to configure the device to your settings.


Overall, the CO2 gas sensor is an easy-to-assemble device you should pick up to build! I hope with today’s blog, you get a deeper understanding of what it takes to build one!

Please, feel free to ask any questions, we will update the post with all details required.

4 6 votes
Article Rating
Notify of
Inline Feedbacks
View all comments

Subscribe to us