Wifi Home CO2 Meter (Knowing We Breathe)

Last modified December 3, 2020

CO2 (Carbon Dioxide)

Sensor MH-Z19B

CO2 (Carbon Dioxide) is a gas dangerous for human. In high concentrations it can produce vertigo, headache, high blood pressure, fast heartbeat, choking, and loss of consciousness.

It is advisable to be careful with it, especially in places where there are many people and little ventilation, since we expel it in its breathing process.

Plants produce the reverse effect. Through the photosynthesis process, they absorb CO2 and release Oxygen.

Homemade CO2 Meter with WiFi

I have spent years with the intention of having Wifi CO2 sensors in the house, which allow trigger alarms when levels get too high or perform other actions.

About a year ago, I installed a Netatmo weather station (which I didn't need, since I have a Davis Vantage PRO2) and one of the good things about it is an indoor CO2 sensor.

The interior module of the Netatmo station is installed in the living room (providing data for temperature, humidity, luminosity, sound pressure and CO2) but I feel like being able to measure CO2 in more places and, especially, make specific measurements to know if we are "in danger", for example, measure CO2 levels in different bedrooms while we sleep.

Netatmo Wireless Indoor Outdoor Weather Station With Wifi, Compatible with Amazon Alexa and Apple HomeKit, NWS01-EC
  • Control your indoor and outdoor environment in real time: indoor and outdoor temperature, humidity and air quality, indoor noise level, barometric pressure
  • Receive alerts in real time: with our weather station, configure indoor and outdoor alerts and receive notifications on your smartphone; you will know when to ventilate with the ventilation alert
  • Access your data remotely and with your voice: access your weather measurements with ease and at any time from your smartphone, tablet or computer, or by using your voice to interact with alexa on amazon echo or with siri thanks to the compatibility with apple homekit
  • Analyze the past: access the history of your data to observe what happens when you are not there or analyze the graphs to understand the weather trends
  • Foresee the future: check the 7-day weather forecast to adapt your clothing and your outdoor activities

Until relatively recently, CO2 sensors were very expensive and they needed a calibration that was not normally available to fans. This has changed quite a bit in recent months with the appearance of some inexpensive sensors easy to use and pre-calibrated at the factory.

Recently I started looking for information about the «state of the art»Of these things, to see if it was finally time to tackle the subject of sensors, and I came across several quite interesting sensors. Among those I met there was one that called my attention to the others, the MH-Z19.

Features and design of the CO2 detector

He had already decided that he was going to build a CO2 meter, now he had to decide what functionalities it would have and carry out the design.

As features, the most important thing was that it had a Wi-Fi connection and that I could connect it to my home automation system, the rest did not matter much to me.

Of course, I wanted it to be a cheap design, since I had planned to put several detectors in the house and did not want the budget to skyrocket.

Construction of the WiFi CO2 detector

The detector consists of an ESP8266 microcontroller module with built-in WiFi and a CO2 sensor.

Its implementation has been very simple, thanks to the work done in Espeasy. Simply upload the right plugin, connect two pins plus power and work.

You can find more information about mounting the prototype of the detector in this blog post and all the details in this other article:

If you liked this page, share it.

2 thoughts on “Medidor de CO2 casero Wifi (Sabiendo que respiramos)”

    • Hello Nacho.

      It needs to be connected to power because it consumes a lot (relatively). The problem is that the sensor has a warm-up time of three minutes (it has to be on for three minutes before giving valid readings) so it cannot be "turned on and off" by software for an instant to read the sensor every, say, minute, and the rest of the time is off.

      That said, I sometimes leave it outside overnight, to self-calibrate, connected to a "power bank", the kind used to charge mobile phones, and it works perfectly.

      Reply

Leave a Comment