Contents
- 1 Is it possible to reduce the chance of contracting Covid with a CO₂ meter under 30 euros?
- 2 👁️🗨️ Structure of the CO2 Easy CO₂ home-made CO₂ meter
- 3 ✔️ Building the CO₂ meter "CO2 Easy".
- 4 📺 CO2 Meter full tutorial video
- 5 🔵 Use of the CO₂ Meter
- 6 Benefits of CO2 Easy
- 7 🌀 Options and extensions of the CO₂ meter CO2 Easy
- 8 What if I want to buy a ready-made CO2 meter?
- 9 📢 Having problems? CO2 Meter Frequently Asked Questions
- 10 📜 History of eMariete CO2 meter
- 10.1 What is ESPEasy? The easiest way to get started with ESP8266 and ESP32
- 10.2 Adding battery charger to ESP8266 and ESP32 (well done)
- 10.3 Colour touch screen for CO₂ meter Wow!
- 10.4 Are home CO₂ meters as reliable, accurate and precise as commercial ones?
- 10.5 Gallery: Users' CO2 Easy meters
- 10.6 Connecting a BME280 sensor to ESPEasy
- 10.7 CO2 on a giant screen for bars, restaurants, classrooms and the like.
- 10.8 CO2 Sensors MH-Z19B FALSE
- 10.9 3D printed box for CO2 Easy
- 10.10 Connecting and controlling WS2812B LEDs to ESP8266 with ESPEasy
- 10.11 Using a buzzer with ESPEasy
- 10.12 The CO2 sensor bible MH-Z19B
- 10.13 Easily connect an SSD1306 OLED display (or two) to ESPEasy
- 10.14 A home CO2 meter with Wifi against the coronavirus: The CO2 Easy
In this article I will explain how you can build your own homemade CO₂ meter (carbon dioxide meter) easily and cheaply.
What I propose is a CO₂ (carbon dioxide) meter with wifi, home-madewhich you can build for less than 30 Euro, y I can guarantee you that the result you will get will be an instrument that is equally or more accurate and has much more functionality than many commercial CO₂ meters costing several hundred euros.
The meter CO2 Easy uses a CO2 sensor with NDIR technology y it has nothing to do with the 60 or 80€ meters sold on the internet. in terms of reliability, accuracy and functionalities.
Don't let the length of this article scare you. Yes, it is long, but that has nothing to do with the difficulty. This article is long because I have decided to explain everything step by step, in great detail and with screenshots, photographs and even videos of each step. Really I could have written a much shorter article explaining how to build such a CO2 meter, but would not have been as complete.
The idea is that anyone can build this CO2 meter, no prior knowledge or special equipment needed (except for the soldering iron, although you could even do without it).
Moreover, it is a montage completely modularYou can easily expand it with all kinds of accessories, visual and audible alarms and even touch screen.
However, if you don't want to build your own CO₂ meter.because you don't have time, you don't like to tinker, or any other reason, you can access a buying guide with the best deals on commercial CO₂ meters by clicking here.. You can buy it at a good price and have it at home within 24 hours.
Be sure to visit my new project: CO2 Gadget.
CO2 Gadget is an advanced CO2 meter with many options and supported sensors, open hardware and opensource, of which you can find all its source code on GitHub.
Is it possible to reduce the chance of contracting Covid with a CO₂ meter under 30 euros?
Virtually all scientists have been in agreement in recent months: The virus is transmitted and spread through the air.and one of the most effective ways to reduce the likelihood of contracting Covid is by adequately ventilating spaces.
The best way to ensure that a space is properly ventilated is to measure the CO2 present in the air.
If you are still not convinced of this, and want to know more, I suggest you read the following article:
👁️🗨️ Structure of the CO2 Easy CO₂ home-made CO₂ meter
This CO₂ Meter is a CO₂ it has nothing to envy to commercial units costing several hundred euros.The majority of these are superior in terms of both accuracy and functionality.
You will see how to make the homemade Easy CO2 meter with these main features:
- Economic. Less than €30
- High precision (50 ppm +/-3% of the reading)
- Connection Wifi
- Laptop
- Smart (can perform many tasks based on the data)
- Web server internal
- Integration with domotic system
- Publication of data on the internet
- Support for MQTT and HTTP
- LCD display y touch screen optional
The Easy CO2 meter consists of only two componentslow-cost:
- Plate NodeMCUWemos D1 Mini or similar, with microcontroller ESP8266 with integrated Wifi
- Sensor CO₂ MH-Z19B or Senseair S8 (there are other sensors available and supported by this project such as the MH-Z14A or the Cubic CM1106, among others).
I have chosen low-cost components to build the carbon dioxide meter, in order to keep the price very low.
Buying the components in the links I propose from AliExpress:
MH-Z19B
About 20 Euro CO₂ sensor MH-Z19B on AliExpress.
See below for my recommendation to use the sensor Senseair S8 LP.
Little more than 2 Euro badge NodeMCU with the ESP8266 microcontroller at this AliExpress link.
It also has many positive reviews and, if you choose AliExpress Standard Shipping, which costs less than €2, you should receive it within a couple of weeks.
IMPORTANT RECOMMENDATION
Use the CO2 sensor Senseair S8 LP.
Due to the high demand of CO2 sensors produced in the last few months, there is a real avalanche of fake MH-Z19B sensorson both AliExpress and Amazon. These sensors give a fluctuating measures that are far removed from realityat best.
I spend a lot of time checking the purchase links I try to make sure, as far as possible, that they are original, but sometimes there are surprises.
If you want to play it safe, and you can afford to spend a little bit moreI recommend that you use the sensor Senseair S8 LP. In addition to being less likely to receive a fake, it is a sensor, of a European companyof better quality and more accurate than the MH-Z19B.
Here is the link to where I bought it: Senseair S8 LP. It is original and arrived very quickly (one week):
It costs about 28 Euros here: Senseair S8 LP.
It is a shop with many positive reviews and shipping is by AliExpress Standard ShippingYou should have it at home in about two weeks.
You can find more information on false sensors by clicking here: CO2 Sensors MH-Z19B FALSE
If you don't want to wait that long, you have the option of buying these components on Amazon, with fast shipping. It's more expensive, but if you want it quickly, you will have it at home in 24 Hoursin many cases.
An important advantage, now that there are so many fake MH-Z19B sensors, on Amazon you know that it is easy to returnif you are not satisfied.
- This gas sensor MH - Z19 C02 has high sensitivity, high resolution.
- It provides a variety of form output modes, such as UART and PWM wave.
- Anti-water vapour interference, no poisoning.
- Temperature compensated, excellent linear output.
- Powerful microcontroller: The AZ-Delivery Module is a powerful ESP8266 (ESP-12F) microcontroller with 802.11 b/g/n WLAN and integrated antenna.
- Rapid Prototyping: It is simple to use, allowing easy prototyping through simple programming via Lua code. Also, with a backplane compatible design (27.5 mm pin spacing).
- Dimensions (L x W x H): 58 mm x 31 mm x 13 mm.
- Large storage and processing space: AZ-Delivery ESP8266 with wifi has large on-board storage and processing space allowing it to integrate with application-specific sensors and devices and support minimal load during runtime. Power your development in the fastest way by combining with NodeMcu Firmware!
- This product includes an E-Book that provides useful information on how to start your project, helps with quick setup and saves time in the configuration process. We provide a number of application examples, comprehensive installation guides and libraries.
Depending on the material you use, you will probably need to a few wires.
You can use some wires that you have lying around. I recommend that they are made of different coloursto avoid confusion.
Many people use "Dupont" connectors, which you can connect directly to the pins without soldering:
- Shipped with 120 jumper cables: 40 male-male, 40 male-female, 40 female-female.
- Length approx. 20 cm
- 0.127mm cable, 36 AWG
In case you prefer, I leave you the link where I usually buy the Dupont cables on AliExpresswhich are cheaper.
The only thing missing is a box.
As a box for the CO2 Easy I propose four options:
- Leave it "in the air". If it is going to be hidden in an inaccessible place there should be no major problem.
- Put it in some ornamental elementany ornaments or accessories in the room that allow it to be hidden and protected.
- Buy a plastic box. I use one that I buy 10 at a time in various similar set-ups. Simple and cheap. You can find the one I use here on AliExpressalthough there are many similar ones. You can also use one of the grey boxes that are usually used in outdoor electrical installations, by drilling a suitable hole in it.
- A 3D printed box. This is the solution I used. You can find the design and tutorial in this blog, as well as others boxes designed by users and have made them selflessly available to readers.
You have to take into account two important things: We must try to the CO₂ sensor is heated as little as possible because their measurements are temperature-sensitive and need to be install it in such a way that it receives the room air without any problemsSo do not put it in a hermetically sealed box (although it should not be directly exposed to draughts either).
CO₂ sensor MH-Z19B
The carbon dioxide sensor MH-Z19B is a small, general-purpose intelligent sensor that uses the principle of non-dispersive infrared (NDIR) to detect the presence of CO₂ in the air. It has good selectivity, long lifetime and other features such as built-in temperature compensation.
It has simultaneous serial, analogue and PWM output and is easy to use. It is a high performance sensor that combines reliable infrared absorption gas detection technology with good design and an attractive price.
MH-Z19B sensor parameters
Model | MH-Z19B |
---|---|
Gas detected | Carbon dioxide |
Operating voltage | 4.5 ~ 5.5 V DC |
Medium current | < 60m A (@ 5V supply) |
Maximum current | 150 mA (supply @ 5V) |
Interface level | 3.3 V (5V compatible) |
Measuring range | 0~2000 ppm 0~5000 ppm |
Output signal | Serial (UART) - TTL level 3.3 V - Analogue output PWM |
Preheating time | 3 minutes |
Response time | T90<120s |
Operating temperature | 0 ~ 50 °C |
Operating humidity | 0 to 90% RH (non-condensing) |
Dimensions | 33 mm×20 mm×9 mm (Length*Width*Height) |
Weight | 5 grams |
Life | > 5 years |
Features of the MH-Z19B
Gold-plated gas chamber | water and corrosion resistant |
---|---|
High sensitivity | low energy consumption |
Excellent stability | |
Temperature compensation | excellent linear output |
Long life |
MH-Z19B sensor applications
HVAC | from | equipment | from | cooling | |||
---|---|---|---|---|---|---|---|
Equipment | from | surveillance | y | from | quality | from | air |
Systems | from | air | fresh | ||||
Equipment | from | purification | from | air | |||
Home | Smart | ||||||
Schools | y | centres | educational |
You can see here his Datasheet of the MH-Z19 (an earlier version of the MH-Z19B) in English from 03-03-2015.
The module with ESP8266
The ESP8266 is a complete microcontroller on a small chip which includes Wifi and is also very cheap.
For this assembly I have chosen the NodeMCU module because:
In addition, you can power it with a mobile phone charger normal and ordinary. |
Although the video tutorial below is made with the NodeMCU Module, you can also use the small Wemos D1 Mini. Below you will find their connection diagramin case you decide to go for it. |
✔️ Building the CO₂ Meter "CO2 Easy
Enough of introductions, explanations, facts and figures and let's get down to business! To construction!
Below is a video with the whole process in detail, to make it even easier for you.
The The construction of the CO₂ meter, the commissioning and use of the CO₂ meter is very simple, I estimate that you can do this project in an hour or two.. Just follow these steps to build the home CO₂ meter with Wifi:
- Writing firmware to the ESP8266 microcontroller with the programme I provide you with
- Connecting the CO₂ sensor using only four wires
It is a super useful and quick project for the experienced hobbyist and a excellent first project for the newcomer to electronic tinkering. (Only four cables! Who would give more for less?)
Download CO₂ Meter Firmware
Important Update
Saving the firmware is now even easier. From now on you will not have to download anything to your computer (you can skip the whole procedure described in the video below).
Simply click the "Install ESP Easy" button, select the port where your board is connected and click "Connect".
The first thing you need to do is download the programme to your computer that then load into the NodeMCU or Wemos D1 Mini and which shall control the operation of the CO₂ meter.
This programme is based on the fantastic project ESP Easy, which I have been using for several years with very good results.
To simplify the task as much as possible, and so that you don't have to search and download the different programmes and files needed (and look for the right ones to use, because there are so many), you can download it from here with a single click y in a single package which I have prepared and which contains just what is needed.
Below you can find the video with detailed instructions for the recording of ESP Easy.
It is very important that when you are going to write the firmware on the board, you do not have the CO2 sensor connected to the RX and TX pins (temporarily disconnect them if you have already connected them). This is because the board shares these pins with the USB port and conflicts may occur.
Connecting the CO₂ sensor MH-Z19B
The connection of the MH-Z19B or Senseair S8 sensors (they connect exactly the same) to the NodeMCU is very easy, it only requires four connections.
There are two types of NodeMCU boards. One has a pin marked VU and the other does not.
If your board has a pin marked VU connect the positive of the sensor to this pin.
If your badge It does NOT have a VU pinconnect it like this (positive from the sensor to pin Vin):
If you are going to use the plate Wemos D1 MiniFollow the diagram below to connect the sensor:
You will need a soldering iron, solder and a bit of attention, but it shouldn't take more than 15 minutes, even if you have no previous experience.
For connection of the MH-Z19B or Senseair S8 LP sensor to the NodeMCU or Wemos D1 Mini, you can use the cable that comes with the MH-Z19B.If your sensor does not come with a connector, that's OK, you will need some wires to connect it. If your sensor is not the version that comes with a connector, no problem, you will need some wires to connect it.
Just make the following connections (note that this pin numbering does not match the manufacturer's numbering):
Pin MH-Z19B | Colour | Function | NodeMCU connection |
---|---|---|---|
1 | Brown | Analogue output | Offline |
2 | White | None | Offline |
3 | Black | Negative power supply (GND) | Pin GND |
4 | Red | Positive power supply (Vin) | Pin Vin |
5 | Blue | Data input (RXD) | Pin TX |
6 | Green | Data output (TXD) | Pin RX |
7 | Yellow | None | Offline |
In the following pictures you can see the assembly process, including connections, in detail:
Cut off the CO2 sensor connector
In my case, I ordered the MH-Z19B sensor version with connector.
The first thing I do is, as the cable has a connector on both sides, cut the connector on one side.
Optional: Remove unnecessary cables
The connector comes with all seven wires connected.
As we only have to connect four wires (Black, Red, Blue and Green), I remove the other three wires to keep them out of the way and to make the assembly cleaner.
Stripping the cables
We strip the end of the four wires.
It is sufficient to peel one or two millimetres. The shorter it is, the more "clean" will remain when welded.
Welding the power supply
Carefully solder the sensor power supply to the NodeMCU.
- Red (positive) wire to terminal marked Vin
- Black (negative) wire to terminal marked GND
Soldering the data cables
We solder the data input and output cables from the sensor to the NodeMCU.
- Blue Wire (RXD, data input) to terminal marked TX (data output)
- Green wire (TXD, data output) to terminal marked RX (data input)
The complete wiring
This is what the wiring will look like once the four wires have been soldered.
The finished Easy CO2 meter
All that remains is to connect the sensor to the NodeMCU, once you have written the firmware on the board, taking care not to turn the connector upside down.
This is what our CO2 meter will look like, once the four wires are soldered together and the sensor is connected.
📺 CO2 Meter full tutorial video
In this video you can see everything you need to build the CO₂ meterincluding electronics, ESPEasy recording and configuration.
RememberIt is important that when you are going to write the firmware on the board, you do not have the CO2 sensor connected to the RX and TX pins (temporarily disconnect them if you have already connected them).
The video was recorded using an MH-Z19B sensor and a NodeMCU board. Remember that, if you use the Senseair S8 sensor (recommended) its connection is exactly the same. (in this case see also this article I have written about the differences when using the Senseair S8).
Making these videos takes a lot of work. If you like the video, please, Don't forget to like and subscribe to the channel. That will motivate me to keep making more videos like this one.
🔵 Use of the CO₂ Meter
Your CO₂ meter with Wifi is now finished.. All you have to do is set it up, place it in the room you want to monitor and read the CO₂ concentration values from time to time.
I recommend that you watch in detail the part corresponding to the configuration in the video, where it is explained in detail. However, here is some additional information.
CO₂ Meter Configuration with Wifi
The meter needs a minimum configuration to work, which basically consists of configuring the wifi to connect it to the network of your home, office, school, etc. and telling ESPEasy which sensors you have connected (in this case only the CO2 sensor) and what it has to do with them.
ESP8266 wifi configuration
As soon as you record the ESP8266, and to facilitate the Wifi configuration, you will see that it creates an access point called ESP-Easy.
All you have to do is connect from your computer, tablet or phone to that access point and configure the meter, in a very simple way, through a web page, thanks to the fact that the program we have recorded in the ESP8266 includes a web server with the necessary pages for an easy configuration.
Normally your phone or tablet will open the configuration web page automatically as soon as it connects to the ESP-Easy hotspot, as you have seen in the video. If it doesn't, open a browser on your phone or tablet (Chrome, for example), type in the address 192.168.4.1 and press enter.
The password to connect to this access point is configesp.
ESP8266 input and output configuration
Through the same web page that you used to configure the Wifi connection, you can now configure the ESP8266 inputs and outputs for tell you what you have connected.
In our case, the only thing connected to our ESP8266 is the CO2 sensor and you are going to configure it so that it will know how to read the values and what to do with them.
As you will discover, It is very easy to extend the project to include other sensors and actuators. as sensors for temperature and humidity, LCD displays, coloured LEDs, etc. (you have links to the detailed tutorials below).
Reading CO₂ data from our meter
Your CO₂ meter with Wifi is now up and runningreading the CO₂ concentration in the room where you have placed it and processing that data.
To read and process this data you have many possibilities that allow you to read the value of CO₂ directly and do many other things, such as: store them, create graphs, create alarms of various types when certain values are reached, send them to the internet, integrate them with your home automation system and much more..
The most basic use is see the CO₂ present in the room in real time. To do so, you only have to connect to the meter's website, using the web browser of your computer. computer, tablet or mobile phone and go to the "Devices" tab, where you will see the current value. It is best to bookmark this pagefor easily, directly, whenever you want to access it..
Calibration of the CO2 meter
Both the MH-Z19B sensors and the Senseair S8 LP are factory calibrated. That does not mean that you can disregard them forever (as with any CO2 meter, commercial or otherwise).
Over time it is often necessary to calibrate the sensorBut don't worry, it's very easy.
You can find instructions on how to calibrate the sensor here: Zero Point Calibration.
Where to place the CO2 meter?
Ideally, the meter should be placed at the point in the room with the worst ventilation, away from the wall, at head height (1.5 metres high may be a good indication depending on whether people are usually seated or standing), and away from draughts.
Keep in mind that if you place the meter close to a window you will be measuring a CO2 concentration that does not correspond to the actual concentration in the room because you are measuring with that "window".additional ventilation".
Benefits of CO2 Easy
There are several projects similar to this one on the internet. From small basic prototypes with the minimum functionalities to obtain local CO2 measurements to complete systems that include all kinds of functionalities, their own software platform for capture and visualisation, etc.
I am going to introduce you here to what I think are the most important main advantages and benefits of this project CO2 meter.
Reliability of measurements
What a CO₂ meter has to do, as obvious as it may seem, is to measure and CO₂, and to do so with a certain degree of accuracy. accuracy (that you know how much CO₂, there is with sufficient precision), reliability (that the meter operates correctly at all times) and repeatability (that always measures the same under the same conditions).
There are many projects that promise to measure CO2 but actually use general-purpose electrochemical sensors for the detection of organic volatiles that do not measure only CO2, but all these gases togetherso you don't really know what you are measuring.
There are, for example, many "CO2 meters" using sensors such as the MQ-135 or the CCS811but these sensors they are not suitable for measuring CO2. These sensors measure all organic gases together (Ammonia, Nitrogen Dioxide, Alcohol, Benzene, Carbon Dioxide and Monoxide, Smoke, etc.), so if there is someone who is taking a leak, they will be able to measure it. hydroalcoholic gel or someone smoking or there is a source of combustion, such as a chimney, the measurements will be triggered. no way of knowing what is making them go off.
In case I have not made it clear: DO NOT MOUNT A METER BASED ON MQ-135 or CCS811 SENSORS IF YOU WANT TO MEASURE CO₂!
The project presented here uses an NDIR type sensor that only measures CO₂, - an NDIR type sensor that only measures CO₂, and. The same sensor used in commercial meters costing hundreds of euros. When you get a measurement you will know that measurement. is made of CO₂ and not of other gaseswhich are probably of no interest to you.
Many commercial meters that call themselves "CO₂ meters".sensors, priced up to €200, use the MQ-135 and CCS811 sensors. Run away from them if you want to measure CO₂!
In case it is not clear, the only parameter you could obtain with sensors like the MQ-135 or CCS811 would be: "The only parameter you could obtain with sensors like the MQ-135 or CCS811 would be: "Value in unknown units of something unknown in the air, which we do not know what it is or how much of it there is.". As you can see, very unhelpful.
Ease of construction
In many projects found on the Internet, we see that they are relatively complex to buildwith many components and welds. Sometimes it is necessary to have measuring instruments to make adjustments.
This project has been designed and documented so that it is extraordinarily simple to build and is within reach of anyone with no knowledge of electronics. Only four connections have to be made and no measuring instruments or adjustments of any kind are required.
There are teachers who are building this meter with childrenSee how simple it is!
Programming simplicity
Many of the projects that we find on the internet, are complicated to programme. It is even necessary to have programming toolssuch as compilers, IDEs, or specific editors.
Also in many projects we have to edit configuration files by handThis makes it complicated for the non-expert user.
In this project, no programming is required. It's all pre-programmed and all you have to do is record the supplied software, which you can download from this page.in the ESP8266 with a very simple processfollowing the video I have prepared.
Easy to configure
Many projects have very complicated configuration processes for non-experts, where it is necessary to modify many parameters, sometimes modifying parameter files by hand or even the source code of the program before compiling and loading it into the meter.
In this project, all the configuration is done very easily, through a website. There is no need to edit files by hand or modify code.
Easy to calibrate
Many projects, particularly those based on sensors such as the MQ-135 and the like, need to tedious and very complicated calibration processesThe sensor is often repeated daily or every time it is to be measured. Even worse, some do not even have the possibility to calibrate the sensor.
This project no calibration required. The sensor comes already factory calibrated and then it auto calibrate on his own, periodically.
Expandable modular design
Most of the CO2 meter designs available on the internet have certain functionalities and these include are those that are. It is not possible to reduce or extend the design without making changes to the electronics and, above all, the programming.
This project is completely modular and can be extended without programming changes. or in the basic circuit. You can start with a basic CO₂ meter and later expand it, in a very simple way, with different types of displays, LEDs, additional temperature and humidity sensors, etc.
Communications and integration
The fact that the CO2 meter can communicate with the outside world and send (and even receive) its data is very useful in many cases. In most of the projects available on the internet, either the meter can communicate with the outside world and send (and even receive) its data. has no or only very limited communication possibilities.
This project, on the other hand, has enormous communication possibilities that allows you to send data to virtually any device or system, without making any changes to its programmingsupporting most of the possibilities as MQTT, HTTP, Telnet, UDP, P2P, etc.
You don't have to know anything about it, they are just options that are there for those who want to use them.
Data visualisation
In most projects the possibilities to consult the data are very limited. It is necessary to make major changes in their design or programming to be able to add new display options.
In this project, you can visualise the data, both real-time and historical, very easily in multiple ways: integrated website, various types of displays, multi-colour LEDs, mobile App, historical graphics on cloud platforms such as Thinkspeak, etc..
Mobile App
In many cases it is interesting to be able to know the CO2 concentration or the historical remotely.
With most of the devices we find on the internet this would be impossible or would require important changes in its programming.
With this project, this is very easy, and you can consult it from your mobile phone, at any time and from anywhere in the world, the current and historical measures.
Data persistence
Most projects offer real-time measurements, but do not have any data persistence system, in order to be able to storing measurements for further analysis or integration into other systems.
This project allows, in addition to the user-friendly use of cloud services (as Thingspeak, IFTTT and the like), databases such as InfluxDB (both local and remote), etc.
Portability and mobility
Sometimes it is interesting to be able to use the CO2 meter on the go or on the move. Most existing internet projects do not provide for this possibility.
This project envisages the configuration, on a permanent basis, of two wifi networks, so that if the first one is not available, the meter connects to the second one. automatically.
Not only that, but if we turn on the meter in a place where there is no wifi network that it has configured, will automatically enable a web page that we can connect to from our mobile phone to connect to any other wifi network in a few seconds..
We can also configure the second wifi network so that it will use the internet connection provided by our mobile automatically.
In addition, as it is powered by a standard micro USB portIf we use a normal powerbank, we can use the meter on battery power (according to my tests, we can expect to get a autonomy of up to 48 hoursdepending on the powerbank used).
You also have a complete tutorial with a extension to equip our meter with rechargeable battery with built-in charger.
🌀 Options and extensions of the CO₂ meter CO2 Easy
The ESP8266 controller and the firmware on which it is based are very powerful and give you the ability to allows you to add endless possibilities.
Below, you will see some of the simplest possibilities that this carbon dioxide meter allows you to.
These enlargements are explained in detail in this blog and in my YouTube videos.but you can easily make many more extensions yourself.
Adding an OLED display
In the following article you can see the step-by-step tutorial to add an OLED display to the meter, in case you prefer to see the values easily, without using your mobile phone or computer. It is also interesting to be able to use the meter without a Wifi connection.
Add a customised box
A custom case is the perfect complement to your meter. It will give it a more professional finish and protect the assembly from knocks and snags.
In the following article you will find custom-made boxes for 3D printingboth the one designed by me and others, shared selflessly by users who have built this CO₂ meter.
Adding temperature, humidity and atmospheric pressure data
Add easily and for just a few euros thermometer, hygrometer and barometer to the CO₂ meter.
Add warnings and audible alarms
You can easily add a buzzer and set alarms and alerts when certain CO2 levels are reached.
In this article you have a complete explanation with everything you have to do ready to copy and paste.
Creation of a CO₂ evolution graph
You can create, in a very easy way, a CO₂ evolution graph like this, using the free cloud service from ThingSpeak.
The ThingSpeak service allows you to store your sensor data in the cloud for free and view it from your mobile phone, tablet or computer.
Thanks to user ManeKoFor quick instructions in the comments below on how to automatically send CO2 meter data to ThingSpeak (press here if you want to go directly to the commentary where it is explained).
Use of the meter as portable/portable
Sometimes it may be convenient to use the meter portable (in a different place than where you normally keep it).
This convenient use is very simple and there are several possibilities:
Setting up a second wifi network
You can set up a second wifi network with its SSID and password, to which the CO2 meter will connect. automatically if it cannot find the main wifi network.
To this end you only have to include the second wifi data (SSID and password) under the configuration tab ("Config") and you won't have to do anything else.
A very interesting use of this possibility is to use, when you are away from homethe access point you can create your mobile. In this way it easily becomes a portable meter connected. Perfect for IoT solutions.
Connection to any wifi network, when neither of the two configured networks are available.
When neither the primary wifi network nor the secondary network is available, the CO₂ meter will automatically create a wifi network to which you can connect from any mobile phone, tablet or computer. Just search for the "ESPEasy" network and connect to it to set up a new wifi network.
Equip the meter with a battery (portable CO2 meter).
In the following article I will explain, step by step and with video, how you can equip the meter with a rechargeable battery and thus convert it into a portable CO₂ meter with sufficient autonomy for all-day use.
What if I want to buy a ready-made CO2 meter?
If, for whatever reason, you do not want to build your own home CO2 meter, you have the option of buying a commercial one. Plug and play.
There are many models on the market, but, I must warn you that many of them are absolutely worthlessThe reason for this is that they have a type of sensor that is affected by all kinds of gases and the meter is not able to distinguish CO2 from any other gas (and there are many gases in the air that come and go, so you will never know whether it is measuring CO2 or something else).
Whichever meter you buy, I recommend that you buy one with an NDIR sensor. (and bear in mind that, if it doesn't say so, it probably doesn't carry it).
If you want to see more models available at a good priceYou have the option to visit this site to find the best offers, best sellers, best deals, etc. CO2 meter buying guide.
I, in addition to several homemade meters, have this one down here in the living room that has some additional things that make it a weather station:
- Real-time measurement of indoor and outdoor ambient temperature: temperature, humidity, indoor and outdoor air quality, indoor noise level, atmospheric pressure
- Real-time alerts With our weather station, you can set up indoor and outdoor alerts, which you will then receive on your smartphone.
- Analysis of measured values: You have access to measured values and can therefore better understand climate changes by analysing graphs.
- Forecast for the future Check out the forecast for the next 7 days and adapt your clothing and activities to the weather ahead.
- Troubleshooting tip Disconnect and reconnect the indoor module. Check that the LED flashes three times. If it does not flash, try another micro USB cable and another power adapter on the indoor module. Force it out and start the Netatmo New Weather app on your smartphone. It can take up to 10 minutes for the station to reconnect.
📢 Having problems? CO2 Meter Frequently Asked Questions
Although the project is really straightforward, there is always the possibility that you may have a question or a problem.
In the list below, you'll find answers to solutions to a lot of things you may be wondering about.
IMPORTANT: If you have any problems building your CO2 Easy, please read this section.
The vast majority of doubts and problems that users have had are resolved in the following lines.
It's not that there are a lot of things that give a lot of problems (most of them are simple doubts and the problems are almost always the same, and most of the time they have to do with the charger or the USB cable), but rather because hundreds of people have built it and any little doubts that have arisen I have documented. so that if it happens to someone else it can be easily solved.
Here are the frequently asked questions that have been made by users who have been encouraged to build the CO2 meter, CO2 Easy.
Share this article
Thank you very much for collaborating with the most difficult part of this project: SHARING IT AND MAKING IT KNOWN. It is useless how hard I can work on these tutorials and projects if people don't get to know about them. THANK YOU TO EVERYONE WHO SHARES! Just below you have buttons that make it easy to share it on Facebook, Twitter, WhatsApp and Telegram.Be sure to visit my new project: CO2 Gadget.
CO2 Gadget is an advanced CO2 meter with many options and supported sensors, open hardware and opensource, of which you can find all its source code on GitHub.
📜 History of eMariete CO2 meter
Here you can consult the articles related to the CO₂ meter that I have published over the years (since the year 2017 when I published the first version of the meter).
In these articles you can find a lot of information to extend the meter with new functionalities, learn more, etc.
Hi, very good article. I wanted to tell you that I am also working on a personal project of a CO2 meter with an MH-Z19B sensor.
My project is even more rustic than yours. I have connected the MH-Z19B directly to a personal computer using a USB-UART adapter. This adapter costs about 60 cents on aliexpress. https://es.aliexpress.com/item/4001223872783.html?spm=a2g0s.9042311.0.0.74b063c0ua5Kx
This makes assembly very simple, as no breadboard or external power supply is used, although the advantage of mobility is lost.
I have also managed to validate that the sensor is measuring correctly. I put the sensor in a sealed container of known volume, and injected two cubic centimetres of c02 gas with a syringe. After doing the calculations I have found that the sensor error is approximately 4%.
This is a very good piece of information, taking into account that the whole set-up is very rustic, the Co2 was taken from a soda bottle and the watertight container is a chickpea jar sealed with film.
Greetings
Thank you very much for your comment.
Very original method to get the CO2 out of a soda bottle!
Would it be possible to get all the material in physical shops or, at least, in online shops in Spain?
Hello Mª José.
To buy it in physical shops, it will depend on your locality, although, to be honest, it is becoming increasingly difficult to get these things in physical shops.
If you look at the article you have links to buy the components both on Amazon and AliExpress.
Hello, which connector exactly. There are three of them. Understand that many people don't have a clue. And then what software?
Is it easy?
Thank you
Hello Jesus.
I have taken it with connectors on both sides, but you can choose whichever you prefer.
As it says in the article, there will be more instructions, pictures, video and link to the firmware soon. I'm finishing it.
You will see that it is very easy.
Best regards.
Thank you very much for the updates!
I'm impatiently awaiting the one about the chip charge, which is the only thing I'm missing.
Hello Carlos.
You may have already seen it, but I wanted to let you know that the article is now finished (although I still update it almost every day).
Is it just me, or can't I see any links to anything in the article text.....
Hello Master.
As I told Pepe, I'm finishing the details of the assembly and in a few days it will be finished and I will upload the files and update all the links. If you want you can subscribe and you will receive an email when the article is finished.
Hello Master.
You already have the article finished, with all the links working (although I keep updating it almost every day).
Good morning, Mariete. Thank you very much for the article, it is very interesting. I'm going to get on with it. But when you say in some parts of the article "you can download it from here", there is no link. For example, when downloading the software you say "you can download it from here with one click and all in one package that I have prepared and that contains everything you need"... I don't see a link. Is it just me or is it really missing?
Thank you again.
Hello Pepe.
As I mentioned in the article, although I already had the meter made some time ago (there are other posts in this blog talking about it), I have ordered a new CO2 sensor (it just arrived yesterday!) to be able to complete the article with photos and videos of the whole process. In a few days it will be finished and I will upload the exact files I will use to take the photos and record the video. I suggest you to subscribe so you will receive an email when the article is finished.
Hello, the same thing is happening to me. I can't find the download links. By the way very good job, I have already ordered the components.
Thank you very much, Luis, I'm glad you like it.
All the missing parts will be ready soon, I'm putting together the video. Although I built the prototype quite a few years ago (if you search the blog, there's an article about it), I didn't want to upload anything until it's all finished and tested to match exactly with pictures and videos.
It's not long now!
Best regards.
Hello Pepe.
You may have already seen it, but I wanted to let you know that the article is now finished (although I still update it almost every day).
Thank you very much for your article, I look forward to the next updates.
Thank you John.
There is very little left. As soon as I finish editing the video, I'll post everything that's missing.
Best regards.
Thank you very much for the article, very interesting and detailed. I would only recommend you to change a small detail, and they are the links to aliexpress, since the sensor is no longer available, and the ESP8266 that you link takes for the usb interface the CH340 chip, which from what I have read is quite unstable, and it is more advisable to buy the one that brings the CP2102 chip although it costs a little more (https://arduino.stackexchange.com/questions/54640/difference-between-these-two-nodemcu-boards/54641#:~:text=The%20biggest%20difference%20is%20the,die%20at%20a%20moments%20notice.)
For the rest, thank you very much, we need more articles like this one in Spanish to bring people closer to such a fascinating world as microcontrollers and their home applications.
Hello Joaquín.
Thank you very much for your input.
I put the MH-Z19B link that I ordered a couple of weeks ago so that the photos would be the same, but it seems that, as you say, it is no longer available. I have updated the link to the detector with another one, just like it, which is available at the moment.
As for the ESP8266 with CH340 chip, the truth is that I haven't had any problem and it is usually cheaper (and I have at least 10 at home, most of them with CH340, if you look at the rest of the blog entries, where there are several projects). Anyway, if you prefer the NodeMCU with the CP1202 chip you have, for example, this one: https://s.click.aliexpress.com/e/_AsKr3s
Regardless of this, I have decided to recommend the LoLin brand because it works well (at least for me) and is very well documented on the internet.
Hi! Thanks for the article and for the update to come.
I have a Wemos D1 Mini Lite at home. Would I be able to use it with the sensor you propose? Could I follow your tutorial or would the recording/charging and connections be totally different?
Hello Carlos!
You can use a Wemos D1 Mini Lite without any problem. I have one at home, I will try to build a meter with it so I can post some pictures and instructions for those who prefer to do it with this one.
In case anyone else has the Wemos D1 Mini, please note that it has given me some problems because mine was the LITE version, with only 1M of flash and the ESP8285 instead of the ESP8266 in the article.
After a lot of tinkering, the solution has been:
1) download ESPEasy_ESP82xx_mega-20201130.zip from:
https://github.com/letscontrolit/ESPEasy/releases/tag/mega-20201130
(it comes with the binaries for many different ESP82xx)
2) Run the ESP.Easy.Flasher.exe (the one I downloaded, not the one in the co2 meter folder of this post) and select the binary corresponding to my chip and flash size: ESP_Easy_mega_20201130_normal_ESP8285_1M.bin
3) if it doesn't generate the WIFI correctly to configure it, you can try to load this other one:
ESP_Easy_mega_20201130_hard_other_POW_ESP8285_1M.bin
(this one has worked for me and I have been able to configure the wifi and the Advanced part, BUT IT DOES NOT BRING THE CO2 SENSOR in the list of devices...
4) put back ESP_Easy_mega_20201130_normal_ESP8285_1M.bin
Hopefully the AP will already be configured and connected to your home wifi and you will be able to access the ESP_EASY IP directly (check your router to find out which one).
5) now if you have the sensor in devices: add it, configure it as in the video and it's working!
I'm trying to subscribe and it won't let me, it tells me a token is missing.
Hello Enrique.
The truth is that I don't know why it could be. Just today several people have subscribed without any problem and I have just tried with a test email and I have had no problem.
It occurs to me that it may be a problem with your browser's cookie settings or that you have not accepted them.
Hello, thank you very much for the tutorial!!!!
I am very interested and want to set one up, but I would like to integrate it into HA.
Would it be possible?
Hello Sergio.
I assume that by HA you mean Home Automation system.
There are many options for integration, but it will depend on your particular system.
I have it fully integrated in my home automation system through MQTT. In this blog there are several articles in which I talk about the integrations of my system.
What integration options does your home automation system allow?
Yes, I mean HOME ASSISTANT, it would also be good for mqtt, I have the brocker mosquitto and several sensors that use it, so it would be perfect for me!
I have already ordered the material, when it arrives I will follow the tutorial, and if there is anything I will ask.
Thank you very much for your work. EXCELLENT!!!
Home Assistant is directly supported via MQTT.
It will be very easy for you to integrate it.
Hi, I follow your updates...
In the article, you comment that with the box you have designed we won't even have to solder, I'm a bit worried about soldering, besides I don't have the material to do it, I have ordered all the material, but like you it is taking me a while to arrive, is it possible that you update with the data of the box? so I could ask a colleague to print it for me, and as long as it is viable not to solder, if not I will have to look to buy material or see how I organize myself to solder?
THANK YOU!
Hello Sergio.
Until everything is finished I would prefer not to upload anything so that everything matches exactly with photos and videos.
I have to give the solderless box a try because the one I designed for 3D printing (which is the one I have used in the prototypes that you can see in other articles in this blog) is for a NodeMCU that they used to sell with the pins (the strips of pins that go on the sides) already soldered. With that box you only had to tighten the cable by pressure, and that's it. The problem is that now I can't find any supplier of the NodeMCU with the pins already soldered. I'll keep looking.
At worst, think of the basic version as just four very easy welds.
Best regards.
hello, the meter is from 0 to 5000 or from 0 to 10000? i would like to mount it, but i need measurements above 5000 ppm.
Thank you for the article.
The same sensor I use in this article is available in a version with a range from 0 to 10000dpi.
For example, here https://s.click.aliexpress.com/e/_ABNQgW you can choose from 0 to 2000, from 0 to 5000 and from 0 to 10000.
But, beware, I have the feeling, from the information I have so far, that all or most 10000ppm sensors are false.
The first doubt I have had is just this, as I know a little about these sensors and I know that the greater the sampling range, the greater the accuracy error.
In the datasheet I found the error is calculated like this: ~50ppm + 5% , the 5% of 2k: 100ppm, 5k: 250ppm, 10k: 500ppm.
In other words, the higher the range, the more inaccurate the reading. I have looked up the toxicity limits for ambient co2 and it is 30k, so with this type of sensor it makes no sense to take this into account. It is up to you to decide whether you want to precisely monitor the concentration using a 2k (eg. portable meter) or whether you want to monitor values without reaching the limits with a 5k (eg. fixed meter for a room)... the 10k because of its high error I would not recommend it for this purpose.
Greetings
Hi, I am going to build the device you show. I think the guide is excellent. Could you tell me how to add a LCD display and show the reading in real time. Do you have a paypal account so I can thank you for this great article? Thanks and best regards!
Hello Jordi.
Thank you very much for your words. I'm really glad you liked it and found it useful.
Yes, it can be done without any problem. If you look at the photo that illustrates this article, the meter has an LCD screen (it has two) and displays the CO2 reading in real time.
As soon as I have time, I'll put it as an optional modification...
Thank you for the Paypal. Better, when you have the meter working, send me some pictures 🙂
Very interesting your contribution. I could do the same with the Arduino one that I just forgot at the bottom of the drawer. Although I know it doesn't have wifi , but I could modify the code to connect the ldc to see the data in real time and a small buzzer to warn to ventilate the room.
My question is do I need to know the volume of the room where the sensor is placed?
Hello Rocio.
Sorry, but the firmware is not suitable for Arduino boards.
The volume of the room is not necessary. The measurement is relative (parts per million), not absolute, so it does not matter what size the room is.
Best regards.
Hi, thank you very much for your work and the effort to explain it. Subscription requires javaS enabled
Hello Ignacio.
JavaScript is required to subscribe to the newsletter.
Hi, very interesting article but I don't see any of the download links :_(
Very interesting project, I have already ordered the articles and I am looking forward to learning from them.
Are you a PET teacher?
Best regards
I answer myself: wait until the article is finished and the files are uploaded (be less impatient and read the previous comments :-|).
Hi, interesting project and scalable to make it bigger or with more functions! While you update the links... Could you tell us the name of the firmware you upload to the microcontroller?
Very interesting article and very well explained. I hope you add the links you are preparing to get my hands on the wires.
Best regards.
Very interesting. Thank you for sharing the source code.
If you allow me to make a suggestion, it might be useful if somehow the name of the wifi included the current value of the CO2 measurement of the device. This way, just by looking at the name of the network, we would already have the value of the measurement.
I don't know if it would be possible to generate 2 hotspots from the same device. One to be able to connect and configure the device, and another encrypted that does not support connections indicating the name of the device and the CO2 measurement. For example METER_xxxxppm
Thanks Mario (my son is Mario tb), I have bought the sensor and I have several nodeMCU so I subscribe and wait for updates. Thank you very much. I only have the question of how to power the system, battery, mains with transformer ...
Hello Fernando.
It needs to be connected to the power supply because it consumes quite a lot of power (relatively speaking). 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 you can't "turn it on and off" by software for an instant to read the sensor every, say, minute, and have it off for the rest of the time.
Having said that, I sometimes leave it outside for a night, so that it self-calibrates, connected to a "power bank", one of those used to charge mobile phones, and it works perfectly.
Mario, do you know if the sensor calibration is "lost" when it is disconnected from the power supply? In other words, does the sensor have to be calibrated every time it is plugged in? My idea was to have it properly calibrated and then take it to various locations to take measurements.
It's not a problem to wait 3min to get reliable measurements, but if I have to recalibrate it every time I plug it in... ufff....
By the way, I have also read that the 420ppm of CO2 in the air are at sea level, and that for every 300 meters of altitude this value would have to be reduced by 4% (I can't find the source of this information now). In that case I guess you would have to correct the sensor value in the "formula" part of ESP Easy to make it show:
PPMValue * (1 - (0.04 * Elevation/300) -- "Elevation" being the MSNM of our city.
Thank you very much again for the post, the videos and all the responses to our comments.
Hello Carlos.
About calibration, I can't tell you... at the time I was looking for information, but I couldn't find anything definitive. What I can tell you is that I haven't noticed any abrupt changes when removing the power supply. I have an MH-Z19 sensor (not the MH-Z19B, but an older one) working permanently for four years (you can say that it is the prototype of this project) and I have never noticed anything strange because the power has gone out or I have temporarily disconnected it.
I hadn't heard about the height. In any case, I don't think that the height affects much because Senseair, which is a quite serious Swedish manufacturer, has a sensor very similar to this one and in their documentation (which is quite complete) they don't say anything about it. I have it quite recently because I am writing an article about it for the blog.
Best regards.
Hi Mariete, I guess you know that there are ESP8266 and ESP32 modules with integrated oled display.
Best regards
Hello José Miguel. These modules are a bit more expensive, maybe the project wouldn't cost less than 20 euros, besides complicating/extending the basic project.
Taking into account that you can see all the info via wifi in a browser or even send it to services like Thingspeak, in my opinion I think that not including a display makes the project much easier without taking away from its functionality.
As an addition / possibility I think it's great (in fact I will buy one with an integrated Oled display or a loose display to put on the Wemos D1 mini lite to which I have connected the sensor).
By the way, if someone in Thingspeak doesn't get the data correctly, try increasing the Client Timeout value in the Controller configuration in EspEasy to 1000ms (default is 100ms and it's too little).
I was referring to the possibility of, instead of putting an ESP8266 NodeMCU plus a separate display, putting it all together, an ESP8266 with integrated OLED display, which is even cheaper than separately and you don't have to do any additional wiring.
However, as far as I can see, the problem is that this display module is not supported natively in ESPEasy, or at least I can't find it.
Good, I think it's just me, but I can't find the links to download the firmware. I've seen that the post is updated but I'm unable to find them... 🙁
For what it's worth, I can't find them either...
I can't find them either
There is very little left. As soon as I finish editing the video, I'll post everything that's missing.
Best regards.
Very interesting article, so much so that I have already bought the sensor and am waiting for it to arrive. Looking forward to following that practical part.
Looking forward to the completed project.
Thank you. Regards.
Please can you provide the download links.
Thank you
Very good project. I have already ordered the components to do it myself.
Hello, could this project be done with the arduino mkr 1010?
Good,
Thanks for the post. It's very cool and I've got the bug. So I have ordered the parts. However, apart from the lack of links as some other people have already told you, I also miss an explanation for beginners on how to do the ESP8266 WiFi Configuration. Would an Arduino board or some other component be missing? Come on, I don't know how you do it. I would appreciate if you could explain it in more detail.
Thank you very much.
Hello Aitor.
As I said, the article was unfinished. Now you have the video with the step by step tutorial, where this part is explained. I hope you don't have any problems.
Hello Mariete
Thank you very much for your article. You have me (and I think many others) on tenterhooks. I'm also on tenterhooks with the chip and the CO2 meter already in my hands, trying to put your advice into practice.
Looking forward to you putting the link to the firmware and if you reveal how to connect to the wifi and the web and the repanocha web.
Hey by the way, a question... Wouldn't this system need a power supply?
Thank you again.
I look forward... with great anticipation !!!! 🙂
Hello Fernando.
The system is powered through its USB port. Any mobile phone charger (over 500 mA, which is pretty much all of them) will do.
Good afternoon
The video is very good, that should be the line, you see all the steps very clear and it is easy to follow you this tells you someone who has no idea of any of this, it is grateful that you have not done neither the web nor the video for ready you have made a project available to anyone and that is very grateful. A greeting and congratulations for your work and attitude.
Thank you very much. I'm really glad you like the line of the videos.
I'm still assembling them, which is quite a lot of work... I hope, if all goes well, to have them ready during the week.
Best regards.
I am not able to download the source code. Can you tell me where the link is?
Thank you very much. Great work, which I will put into action shortly.
There is very little left. As soon as I finish editing the video, I'll post everything that's missing.
Best regards.
Very good video.
Just maybe bring forward the photo curtain of the park sensor so that it doesn't cover when you take it out.
But it is all very clear.
By the way, you can tell I'm an idiot: you put tin before but not during soldering? And what is that stuff that seems to diffuse when soldering? Resin?
Thank you Jesus.
Indeed, for some reason, that wipe came out wrong in the rendering. In the final version I will check that it comes out right.
In this case, as the wires are freshly pre-tinned and the pins have a little bit of flux on them (which is the resin you are referring to, although it is not necessary at all, but it makes soldering a little bit easier), there is no need to add more tin.
Best regards.
I just received the H-Z19B sensor but the colour of the wires is different (and I ordered it using the same Aliexpress link...), could you please indicate the method you followed to know which wire corresponds to which pin?
Hello Joaquin.
It's odd that the colours don't match, on all the MH-Z19 sensors I've seen the wire colours were the same.
Check each wire to which pin on the MH-Z19B board it goes. You have them in the datasheet I left in the article, but I leave here this image, which I have taken from the datasheet, with the important part:
If you have any doubts, let me know and I'll take some pictures so you can see it in detail.
Is the printed circuit board of the sensor you received black instead of green? Recently it has come to my attention that there are fake MH-Z19B sensors with a black PCB.
Best regards.
The printed circuit board of the sensor is black, so I hope it's not a fake. In the end I did what you said, check with the multimeter which pin corresponded to each pin, and as expected the pins were in the same order as in yours, only with a different wire colour. Maybe in case someone else has this problem, you can include a picture in the connection table where you can see how to start counting from 1 to 7 (from left to right or from right to left, depending on how you are looking at the sensor).
I have to confess that I couldn't wait for you to upload all the instructions, and I have investigated around and I have it working and sending the data to Home Assistant by MQTT, but even so, thank you very much for the idea and the level of detail of the instructions, I will stay tuned to see the solution that you upload, and see if I like it better than the one I have found.
Hello, I have also received it with a black plate, with visible excess glue, is it falsol? It also has the colours of the wires changed although the pinset is the same. Is there any way to check if it is fake or not?
Hello Germán.
It is almost certainly a fake.
I'm finishing writing an article talking in depth about this with an explanatory video with tests and comparisons. I hope to have it ready later this week.
Hello crack,
I've been following the project since you first published it and I'm hooked. I've already got the components and I'm waiting for you to publish the firmware so I can continue.
To save soldering, I'm going to use the connectors from the front panel wiring of an old computer. As the ESP8266 has pins and your soldering is correlative, I'm going to use these connectors and save it (if I'm talking nonsense, let me know).
I've seen the video and it's great, I just had the feeling that it was stuck at some points (the clock kept ticking but the image remained static).
Thank you very much for all the hard work you are doing.
Take care of yourself!
David beware that the soldering on the ESP8266 is not correlative, three of them are (GND, TX and RX), but you have to connect the sensor to 5v instead of 3.3v, and the 5v pin is "Vin" which is on the other side of the board.
Hello David.
As Joaquín answered, that cable won't work, at least not directly. Note that the four connections are not in a row in the NodeMCU.
I can only congratulate you on the clarity of the video.
If, from my ignorance, you make me able to set this up and make it work, then anyone can do it.
I don't have all the ingredients yet, but when I do, you'll be the first to know.
It seems to me that you are disclosing information of public utility.
Thank you very much.
Thank you very much, Nacho, for your very positive comment.
I hope you have no problem building it.
Best regards.
Now the problem is that AliExpress doesn't send the sensor... They must have run out of them because of your project!!!!
Let's see...
.
Good morning emariete,
In the video you don't explain that the ESP-Easy SSID has a password: configesp
Nothing that Google can't help solve, but just so you know in case you want to add it.
Thank you!
Hello David.
Right, I missed it! Thanks so much for the heads up, have modified the video to add it....
Best regards.
I think you forgot to mention in the video that the wifi key of the esp when starting the first time is configesp, I googled it....
The video is very well explained, it's a bit slow, but you set the speed to X2 and that's it.
I want to integrate the sensor with home assist, by mqtt, I don't think it's complicated, but I have no idea. as I haven't got the sensor yet, I have time to look for info. After integrating it, I will be able to control the ventilation with a 4€ sonoff to activate the extractor fan.
Thank you very much, Hector.
Affectively, I forgot to say it. The video is already modified with this information added, I started as soon as David commented it.
Integration with Home Assistant via MQTT is very simple. Later on, I will write a new article explaining how it is done. My idea is to write several additional articles with interesting extensions and improvements.
Best regards.
Hi, I already have the sensor and the arduino, I would just like to know which display model is easiest to adapt. Also looking forward to the software to start experimenting. Thank you very much for the project which is most interesting and educational, I bet it will help to make more than one aware of the importance of ventilating rooms especially now. I'm going to make one to leave at my parents' house so they can see the level, so I think it's easier for them to see it on the screen. Best regards and thanks for this project.
Hello Jordi.
The software is available here: Download CO
About the screen, I have already started writing the article and recording the video tutorial to install it. I hope it will be available this weekend at the latest.
I guess I won't have any luck and it won't fit my DotMatrix screen (4 modules)... but I'm sure I can get it to work 😉.
Thanks for the entry!
Confirmed: after searching quite a few forums I see that for the Dot Matrix MAX7219 (which is the one I have) nobody has managed to make it work with ESP Easy.
I will have to buy a 7-segment or Oled for this project.
Great project!!! what a crack!!!
I have just ordered the components, my idea is also to add a display, could you please provide me with a purchase link?
When I have everything assembled, including the display, I will design a box for 3d printing, as I have a printer.
THANK YOU VERY MUCH !!!!
Hello Daniel.
Thank you very much for your message.
I'm preparing the tutorial to add the screen. I hope to have it ready this weekend at the latest. I will put a link to buy the screen.
Best regards.
Thank you very much Mariete! I am looking forward to receiving all the components, I have just ordered the screen.
Great, Daniel.
Let's see if you get it right the first time! 😀
Good evening
I haven't seen the video yet but before I do I would like to thank you for the work you have done and the level of it and as a megatorpe that I am thanks to your work I will be able to make some more meters. THANK YOU
Working! Thank you very much for the tutorial. I have a couple of questions:
1) the "U" value is what exactly? I currently have it at 2304.00 and it keeps going up.
2) power supply: the USB on the laptop (3.1 gen) goes to 5V and 500 to 900 mA. If I connect it to a 5v 2000 mA mobile charger, could I damage the Chip or the Sensor? Better if I take a charger of 1000mA maximum? It is possible to connect "without risk" to external batteries (5v 1000mA also)
(if you also know the answer for my WEMOS D1 MINI LITE great... I can't find it online!)
3) I understand that the ABC calibration (Automatic Baseline Correction) uses the minimum value taken every 24h to recalibrate itself. Bearing in mind that the minimum should be 420 ppm (CO2 concentration in the air), if it measures less than that it "increases" that baseline, and if it always measures 600 for example, after X days it will recalibrate itself so that the previous 600 becomes 420. Is that half correct?
Hello Carlos.
1. The "U" value is not documented and no one is clear exactly what it is. Some say it is an indicator of the "stability/quality of the reading" and some say it has to do with atmospheric pressure. The truth is that, as far as I know, it is not clear.
2. Any mobile phone charger from 500mA will do. As long as it has more than 500mA, realyou won't have any problems. You can have anything you want above 500mA, nothing will go wrong. You can use it with battery power banks without any problem (I use them to leave them outside for a night to self-calibrate).
3. Nobody knows 100% how ABC works but it is more or less as you say, although it is not "straightforward" because the sensor can be above 400 ppm for quite a few days without dropping (and indoors this is completely normal) and if ABC were so "straightforward" it would drop to 400 ppm every day, which suggests that it is more complex.
Thank you very much for your reply.
1) Ok to the U-value. If it is not documented anywhere it is probably an internal value (I have also read that maybe it is used for calibration). In any case, I rule it out
Regarding the Temperature value, it seems that this value does not reflect the ambient temperature but that of the sensor itself, as it gives me a constant 19-21 degrees when other thermometers I have around the house reflect totally different values. I guess the sensor uses it to provide a correct PPM value.
2) Thanks for the confirmation. I tried with an old 1000mA charger and the PPM stayed at 5000 (the maximum of my model). Searching online I found a user with the same problem and simply by changing to a 2000mA charger it worked again. In my case, it worked like a charm too.
3) According to what I have read, it is recommended not to use ABC for indoor use (because it will hardly go below 400ppm). Unless you calibrate outdoors with ABC (minimum 25 hours) and then go indoors. I'll keep testing...
What a rage. The guy you had linked before for the sensor must have run out of it and cancelled the shipment (he hasn't returned the money, we'll have to dispute and cross our fingers).... The new one you put seems to have no connector or cables... The thing with it would be a bit more complicated, wouldn't it?
Well, that's unlucky.
The one that is on right now is the best option I have found at the moment. I have checked a lot and I put the one that seems to me the most reliable and at the best price at any given moment, even if sometimes it is not exactly the one that comes with the connector.
Anyway, the difference in complication is not much, it's just soldering four little wires.
With the dispute I'm sure you'll get your money back in no time. I've always had a good experience with them.
For the soldering issue, I have avoided it by putting the bare wires through the holes and then inserting the pins that came with the ESP module (they look like these https://prnt.sc/w5lkqj ). They fit VERY securely and I can remove them if necessary.
I MADE IT!!!
I mean...
YOU HAVE SUCCEEDED
Surprisingly, it works!!!
(obviously I say this because of my inexperience in the subject).
Thank you, I think I'm going to take up this hobby of tinkering.
Congratulations, Nacho!
I assure you that tinkering gets you hooked... ?
Thank you very much for the project. I have set it up and it works very well. I found it a very interesting platform, I had heard about it but never decided to try anything.
On Monday I will compare it with a calibrated CO2 meter and see if the readings are good.
Could you tell me what tutorials there are to start getting started? I have no idea, I've looked at how to do the graphics but I can't find anything. I suppose that the code should be rewritten with the data of the writing key of the thingspeak api but seeing that what is flashed to the board is a binary I'm totally lost.
I look forward to receiving more information on the project.
Hello Jaime.
I'm so glad you've got it up and running!
Sending to Thingspeak is very simple. I have to do a detailed tutorial, but, in the meantime, you only have to create a rule with the Thingspeak call like here, which is the one I use:
On CO2#PPM do
SendToHTTP api.thingspeak.com,80,/update?api_key=aqui_tu_api_key&field1=[CO2#PPM]
endon
Hello Mariete,
Where are these rules added?
Jaime, I got it through the ESP Easy controllers menu.
1) register with ThingSpeak (free). Verify your email and log in to the website.
2) click on new channel and set only 1 value.
You could also set the temperature and the "U" value, but they are of little use...
3) copy the write API KEY
4) In the browser go to Drivers and add a new one (at number 1!!!):
(the IP address is the one of your ESP Easy)
5) in the configuration of this new driver you select from the THINGSPEAK list and enter the following information
(web, interval, client response time, write API KEY) and hit Submit.
6) In the browser go to Devices and edit the CO2 device:
7) You set up the data sending to the Controller as you see here:
the IDX is the same number in which you have added paragraph 4), which I have mentioned the value of 1
And that's it. On the ThinkSpeak website the first data should arrive in 1 minute (if you have set 60sec / 60000ms).
EXTRA: if you want to get the info directly on your mobile phone, you can install the IoT widget for ThingSpeak on Google Play. The configuration is super simple:
Once configured, you add the widget to any screen on your mobile phone:
a) tap on the value to get the last data (it's automatic, but you can force it)
b) tap on the name of the channel to configure it
c) tap on the time in the widget base to open the graphics.
Hello ManeKo.
Thank you very much for these instructions. Although I'm preparing a detailed tutorial on this, with video, I'm sure many people will find them very useful. I've taken the liberty of hosting the images on my server so as not to depend on external sites that, in time, may disappear, and because images and external links give me a lot of problems with server protections, anti SPAM system and so on...
You asked me where these rules are added:
First you have to activate the ESP Easy rules system in the menu Tools -> Advanced -> Rules (I have also activated the option "Old Engine" for compatibility, because I have rules created years ago, with very old versions of ESP Easy).
A new tab called "Rules" will appear. This is where you write the rules:
By the way, very interesting IoT widget for ThingSpeak, I didn't know it! ?
Thank you very much, I'm going to try it right now.
Hi Mariete, how often is this rule executed? shouldn't the frequency of sending data to ThingSpeak (and maybe other parameters) be added? is this rule method compatible with the creation of a controller for ThingSpeak?
I've used both together, but I don't get anything in ThingSpeak.
I also see that neither the controler nor the rules use the Thingspeak ChannelID, whereas, for example, the library for the Arduino IDE does.
Hello Jesus.
The truth is that I don't use the ThingSpeak Controller because it has given me problems in the past (and I know that other users have had problems too). I send everything directly from the rules:
On CO2#PPM do
SendToHTTP api.thingspeak.com,80,/update?api_key=tu_api_key&field1=[CO2#PPM]
Endon
This rule is automatically executed every time CO2#PPM has a new value (and you can change this by changing the "Interval" in the sensor configuration).
If you want to send the data with another interval you can do it, also with rules, by means of a timer (in the blog you have several examples of use of timers in rules).
The ChannelID is not necessary because we are using the api_key of that ChannelID, so it is implicit (each ChannelID has its own api_key).
However, if you prefer to use the Controller, ManeKo's example explains where and how to set the interval.
If you need help, the best thing to do is to join the Telegram group, where there are several users who send to Thingspeak, both with and without Controller.
Thank you Mariete, I have accepted your telegram invitation and I am still asking through this channel.
By the way, which do you prefer, Mario or Mariete?
Best regards.
Great to have you in the group!
Mario or Mariete, I don't care. To the taste of the consumer. 😀
Congratulations for your work Mariete, I have done everything, but the sensor (black board) does not read me anything temperature values, ppm and U to 0 and do not move. I have connected: (sensor/ESP8266 => V+/Vin; V-/GND; Rxd/Tx; Txd/Rx) I don't know what can happen. And the ESP8266 board connected to the USB of the computer.
Hose Jose.
The connections you mention are correct.
Have you looked at the log in http://192.168.1.77/log (changing 192.168.1.77 to the IP of your device)? Maybe there is a message that might be revealing.
This is what the log on mine looks like when it starts up:
I would also try using a mobile phone charger with 5v / 2A Output. Two things have happened to me: with a 1A charger my value was always 5000, and with an old external battery I had at home I got 0.0.0.
Jose, when connected, does your sensor light up a little red light every 5 seconds?
It wouldn't turn on when I got 0,0,0.....
EXTRA: in devices it appears as "DETECTED" and the name of the sensor automatically?
I was testing and for 30 minutes I was getting values of 0/0/0, and although the sensor LED was on, the ESP Easy did not show it as detected. I restarted it a couple of times and it picked it up again without any problem.
Well, it seems to me that the problem is that they have sold me one of the fake ones. Because the little circle that appears to me is barely marked and the colour of the PCB is black. Right now the LED lights up every 5 seconds as you said. I have it powered via USB from the computer. It started at 550 but after a few minutes it has gone up to 5000 ppm and has remained fixed.
I would try connecting it to a mobile phone charger that outputs 5v at 2 amps.
A couple of days ago using a charger with only 1 amp I had the same problem as you: value of 5000 all the time.
I got it !!!!
Thank you Mario !!!
Super fan of yours 🙂
Great, Fernando, I'm so glad it worked for you! ?
Hello.
Thank you very much for sharing the project. I am trying to disable the autocalibration (ABC). But when I send the 0x79 command:
FF 01 79 00 00 00 00 00 00 00 00 77
I get it back:
FF 7E 01 00 00 00 00 00 00 00 86
Which is strange because according to the manufacturer's manual there should be no response. And 01 seems to indicate that the ABC has not been deactivated.
I wonder if my sensor is a dummy, have you tried calibrating it manually or turning off the autocalibration?
Another thing I have tried is to decrease the sensor frequency. The default value is 5 sec. But I don't see the point in making such frequent measurements. Doing measurements every 30sec would extend the life of the sensor much more. Apparently the 0x&E command allows this, but I haven't been able to get it to work either. The response is always 05 sec and the sensor keeps on lighting the internal led with that period.
From what you say you are not using the ESP Easy menus. In my case using ESP Easy I don't have any problem to deactivate the ABC calibration.
As for the sensor led, The LED lights up every 5 seconds even if the measurements are set to every minute, for example. I don't know if there is any other part of the configuration where to "turn off" or change the frequency of the power LED.
I have compared the datasheet versions. In the latest version, the commands to deactivate ABC do not appear. Whereas in version 1.o they did. It is possible that the manufacturer has changed the firmware substantially.
Be careful that you are not looking at the datasheet of the MH-Z19 (the old one).
In the latest datasheet of the MH-Z19B (the modern one) that I could find (dated 16-1-2020), it does appear.
There is a datasheet of the MH-Z19C (which I have not yet seen for sale) in which the ABC still appears (although it is now called something else, perhaps because ABC is registered by Senseair and they have had to stop using it).
Anyway, I think the MH-Z19 (the old one) also had ABC, although it was not listed on the datasheet.
Hello.
The truth is that I have never communicated with the sensor directly, it has always been using ESP Easy, so I couldn't tell you.
What I can tell you is that, from what I have heard so far, the way to identify fake MH-Z19Bs is:
1. Has a black printed circuit board
2. No silkscreen printing of the pins on the printed circuit board; 3.
3. The casing is not completely black (without that kind of 3D frame on the ventilation openings or that "bulging circle").
If any of these three conditions are met, it is probably false.
I have not found the command to change the measurement frequency of the sensor, does it appear in the datasheet?
Hello as my sensor came without connector (black plate) I have done the soldering as indicated, the problem is that it gives the following error when trying to flash the unit:
[20/12/2020 0:37:41] flush start
[20/12/2020 0:37:41] setting serial port timeouts to 1 ms
[20/12/2020 0:37:41] setting serial port timeouts to 1000 ms
[20/12/2020 0:37:41] flush complete
[20/12/2020 0:37:41] espcomm_send_command: sending command header
[20/12/2020 0:37:41] espcomm_send_command: sending command payload
[20/12/2020 0:37:41] read 0, requested 1
[20/12/2020 0:37:41] warning: espcomm_sync failed
[20/12/2020 0:37:41] error: espcomm_open failed
[20/12/2020 0:37:41] error: espcomm_upload_mem failed
[2020-12-20 00:37:41] STOPPED due to 2 errors! (try reset on the unit, then start a new flash attempt)
Could it be because I am trying to flash the Node NCU unit with the sensor already soldered on?
THANK YOU for all the work!
Hello Jorge.
Most probably that is what it is.
Unfortunately, you're going to have to desolder the sensor and try it.
You do not need to desolder Vin and GND, only RX and TX.
Let us know if it works for you. If not, we will try to find the problem elsewhere.
It seems that this is not the problem, basically I get the same error when using another Node NCU without soldering, has anyone had the same thing happen to them?
Occasionally some of them have given me a bit of trouble, but I have always managed to program them.
Some things you can try:
1. Restart the computer
2. Use another port (especially switching between USB 2.0 and 3.0 ports).
3. Disconnect other USB-connected devices
4. Try a different USB cable
Another thing that can happen is that the ESP Easy is corrupted or has a bad configuration. In this case you would have to reset it:
1. Disconnect the NodeMCU (switch it off).
2. Bridge RX and TX (solder a small wire, for example).
3. Switch on the NodeMCU (switch it on) for about 10 to 15 seconds.
4. Disconnect the NodeMCU (switch it off).
5. Remove the jumper between RX and TX
With this the ESP Easy should be rebooted, so you can flash it again.
Thanks for the options Mariete, finally it was just a problem of changing the UBS cable :-O !!!! Node Mcu flashed!
Great!
I add it to the "chops" in case it happens to anyone else.
Good afternoon Mariete,
Yesterday I set up the device, configured ESP easy and got readings, but only 410 and then it would go to 5000 all the time. I turned it off all night. This morning when I plugged it in and looked it up with the IP address, I couldn't connect. I have flashed it several times, even made the bridge between RX and TX and nothing, the ESP easy access point does not appear in the wifi networks. I am missing something and I don't know what it is. Any ideas are welcome.
Thank you.
I can't really think what else might be going on. Disconnect everything from the NodeMCU when flashing, just in case.
Have you checked all the tips in the section "Having problems? CO2 Meter Frequently Asked Questions"?
In my case it was because I tried to flash with the sensor soldered. I comment it in case it happens to someone else.
Hello, unfortunately the Mcu drivers are not installed when plugged into the USB port.
I have tried to install the CH340G driver manually by following some instructions on other pages, but without success.
I've tried with two different Mcu modules on two different computers and they won't install.
What can I do ?
Thank you.
Greetings.
The same thing happened to me and I solved it by trying another usb cable.
I will try another cable, but I just saw that I bought the Mcu Ch340 instead of the one you recommended.
Well, after a lot of tinkering and trial and error I have managed to flase it and from there everything works.
Thank you very much.
I updated w10 and put in another USB cable, but I'm not sure if that's what it was.
Hi, thanks for sharing your project, I bought the parts and when I tried to program it the first problem appeared, as I managed to press the boot button for a few seconds until it went into programming mode, so I think I have another board although I bought it in your Aliexpress link. It ends with an error and then does not appear the WIFI that you mention but the esp_c6b5b9 and no longer continue. I think it is the ESP32.
If you could give me a hand, I would appreciate it.
Hello Luis.
It sounds to me that the access point esp_c6b5b9 corresponds to the one it creates when it is new from the factory, before recording the ESPEasy.
It is not very clear to me if you have two boards and you have been able to record ESPEasy on one and not on the other.
If you give us more information about the exact steps you take, what happens, error messages, log content, etc. we will probably be able to help you better.
Generally speaking, I can suggest you to follow the following guidelines:
Some things you can try:
1. Restart the computer
2. Use another port (especially switching between USB 2.0 and 3.0 ports).
3. Disconnect other USB-connected devices
4. Try a different USB cable
Another thing that can happen is that the ESP Easy is corrupted or has a bad configuration. In this case you would have to reset it:
1. Disconnect the NodeMCU (switch it off).
2. Bridge RX and TX (solder a small wire, for example).
3. Switch on the NodeMCU (switch it on) for about 10 to 15 seconds.
4. Disconnect the NodeMCU (switch it off).
5. Remove the jumper between RX and TX
With this the ESP Easy should be rebooted, so you can flash it again.
Hello Mariete, thank you for your reply.
I have done all the steps without success, I have also tried on another computer with usb 2.0.
I leave you the log. I only have one unit that I bought from Aliexpress.
I have also tried deleting it and programming it with these instructions and they don't give an error:, but it doesn't work like yours either, it doesn't even broadcast the WIFI SSID anymore.
esptool.py --port COM7 erase_flash
esptool.py -port com7 -baud 19200 write_flash -flash_size=detect -fm dio 0 "c:\python391\ESP_Easy_mega_20201130_normal_ESP8266_4M1M.bin".
The log is this:
######2020-12-23######
#######0.04.007#######
######FLASH INFO######
BIN file: ESP_Easy_mega_20201130_normal_ESP8266_4M1M.bin
COM port: (COM3) Silicon Labs CP210x USB to UART Bridge (Port_#0001.Hub_#0001)
Baud rate: 115200
######POST FLASH######
No post flash information entered...
######FLASH LOG######
[esptool.exe -vv -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf "C:\Applications__Projects_Meter CO2 "Easy_mega_20201130_normal_ESP8266_4M1M.bin"]]
[23/12/2020 21:12:19] esptool v0.4.12 - (c) 2014 Ch. Klippel
[23/12/2020 21:12:19] setting board to nodemcu
[23/12/2020 21:12:19] setting baudrate from 115200 to 115200
[23/12/2020 21:12:19] setting port from to COM3
[23/12/2020 21:12:19] setting address from 0x0000000000 to 0x0000000000
[23/12/2020 21:12:19] espcomm_upload_file
[23/12/2020 21:12:19] espcomm_upload_mem
[23/12/2020 21:12:19] setting serial port timeouts to 1000 ms
[23/12/2020 21:12:19] opening bootloader
[23/12/2020 21:12:19] resetting board
[23/12/2020 21:12:19] trying to connect
[23/12/2020 21:12:19] flush start
[23/12/2020 21:12:19] setting serial port timeouts to 1 ms
[23/12/2020 21:12:19] setting serial port timeouts to 1000 ms
[23/12/2020 21:12:19] flush complete
[23/12/2020 21:12:19] espcomm_send_command: sending command header
[23/12/2020 21:12:19] espcomm_send_command: sending command payload
[23/12/2020 21:12:19] read 0, requested 1
[23/12/2020 21:12:19] trying to connect
[23/12/2020 21:12:19] flush start
[23/12/2020 21:12:19] setting serial port timeouts to 1 ms
[23/12/2020 21:12:19] setting serial port timeouts to 1000 ms
[23/12/2020 21:12:19] flush complete
[23/12/2020 21:12:19] espcomm_send_command: sending command header
[23/12/2020 21:12:19] espcomm_send_command: sending command payload
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] trying to connect
[23/12/2020 21:12:19] flush start
[23/12/2020 21:12:19] setting serial port timeouts to 1 ms
[23/12/2020 21:12:19] setting serial port timeouts to 1000 ms
[23/12/2020 21:12:19] flush complete
[23/12/2020 21:12:19] espcomm_send_command: sending command header
[23/12/2020 21:12:19] espcomm_send_command: sending command payload
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] espcomm_send_command: receiving 4 bytes of data
[23/12/2020 21:12:19] Uploading 910944 bytes from C:\Applications_Proyects_Meter CO2 CO2\binESP_Easy_mega_20201130_normal_ESP8266_4M1M.bin to flash at 0x0000000000
[23/12/2020 21:12:19] erasing flash
[23/12/2020 21:12:19] size: 0de660 address: 000000
[23/12/2020 21:12:19] first_sector_index: 0
[23/12/2020 21:12:19] total_sector_count: 223
[23/12/2020 21:12:19] head_sector_count: 16
[23/12/2020 21:12:19] adjusted_sector_count: 207
[23/12/2020 21:12:19] erase_size: 0cf000
[23/12/2020 21:12:19] espcomm_send_command: sending command header
[23/12/2020 21:12:19] espcomm_send_command: sending command payload
[23/12/2020 21:12:19] setting serial port timeouts to 15000 ms
[23/12/2020 21:12:19] read 0, requested 1
[23/12/2020 21:12:19] setting serial port timeouts to 1000 ms
[23/12/2020 21:12:19] warning: espcomm_send_command: didn't receive command response
[23/12/2020 21:12:19] warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
[23/12/2020 21:12:19] closing bootloader
[23/12/2020 21:12:19] flush start
[23/12/2020 21:12:19] setting serial port timeouts to 1 ms
[23/12/2020 21:12:19] setting serial port timeouts to 1000 ms
[23/12/2020 21:12:19] flush complete
[23/12/2020 21:12:19] error: espcomm_upload_mem failed
[2020-12-23 21:12:19] DONE! BUT WITH (1) ERRORS!
############################
[2020-12-23 21:12:19] The COM port was already in use... the post-flash did not complete.
[2020-12-23 21:12:19] JOB COMPLETED, over and out!
Thank you,
Could it be that this board is an ESP32, as you said in your previous message?
The truth is that some boards have given me a tremendous war, but it hasn't been the NodeMCUs, which have always been relatively easy for me to etch.
In the end you end up following all the tutorials you find on the internet, with different software until one of them works.
I have also seen that, for some reason, after retrying many times, the flashing sometimes ends.
Good morning. Thank you very much for the tutorial. I have done everything and when configuring the MH-Z19 it doesn't give me any value...I have checked all the wiring and I don't see anything strange...what could it be?
Hi Santi.
Do you see the internal sensor light come on every 5 seconds (you can see very little, you will have to look at it almost in the dark)?
Does ESPEasy detect the sensor?
Hi, thank you very much for responding so quickly! I don't see any light, and it doesn't appear as detected either...I'm going to check continuity in the cables to rule out bad contacts but apparently there's nothing unusual...
If, in near darkness, you do not see the light inside the MH-Z19B come on every five seconds, suspect the power supply.
Ideally, you should have some means (a multimeter or voltmeter) to check that there are 5 volts between the GND and Vin pins of the MH-Z19B.
However, the circuit is so simple that a careful visual inspection should be sufficient.
Hello ,
Is there a 3d design to print and be able to house the whole invention?
Thank you again.
Greetings.
I have left in the FAQ (at the end of the article) the box I designed, and a link to Thingiverse with some boxes, although there are many there.
Thank you very much
Great tutorial Mariete,
Congratulations!
I'm struggling because after having no readings and checking connections, now I can't connect to the ESP-easy access point ("check password. and try again..." configesp... and there's no way) . Any suggestions ?
Best regards
Hello Nando.
You may need to restart ESPEasy. See the FAQ at the end of the article for instructions on how to restart it.
If that doesn't work, you'll have to flash it again.
Good morning
How can I share some photos with you?
I have designed a box for the sensor and I would like to share it with you.
Hello Nacho.
I will reply directly to your email.
Good morning!
I'm very excited about this project, it's been a long time since I've been tinkering and I'm getting hooked hehe.
I already have the screen on the way to add it when it works.
I have the problem that it marks zero in all parameters.
The red LED does light up, but the sensor does not appear in "detected".
I have done it with the MHZ of the Amazon link, which must be the fake, because it is the black plate and I had to follow the wires with the multimeter because they did not match. can I claim to Amazon? I have two from Aliexpress on the way, I hope they are the green ones:)
Besides, the esp easy is the ch340, I have the "good one" on its way...
The log that appears to me is this one, if you could tell me what you think is strange, I have no idea...
526537: MHZ19: Unknown response: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
541538: MHZ19: Unknown response: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
541539: MHZ19: Init OK
544332: WD : Uptime 9 ConnectFailures 0 FreeMem 19752 WiFiStatus WL_CONNECTED ESPeasy internal wifi status: Conn. IP Init
556843: MHZ19: Unknown response: ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Do I try to flash again or do I wait until I get the green sensor ?
Thank you!
Hello José.
When it gives all zeros, it is usually because it does not detect absolutely nothing sensor, it is as if it were not connected.
First of all, check the connections to the RX and TX pins of the NodeMCU (and power it with a mobile charger, not from the PC, to rule out conflicts with the computer's USB) and make sure that the configuration of the ESPEasy serial port is exactly the same as the one shown in the video.
If all that doesn't work, there is one other option: Make the NodeMCU use a serial port "software emulated"instead of the hardware port. You have the instructions in the section "Having problems? CO2 Meter Frequently Asked Questions"at the end of the article, before the comments.
If it doesn't work either, flash it again and see if you have any luck.
I know that quite a few people are building the meter using the NodeMCU with CH340 chip and MH-Z19B sensor with black board and they are working.
Come on, I'm sure we'll sort it out! Unless something's really broken, of course...
I have tried everything, and in the end, I have managed to get it to work with the option to emulate the serial port by software.
EUREKA!
Thank you Mario!
Now I'll get on to the screen when it arrives, and if you're up for it, the Swedish sensor 🙂
Hello José.
Great, that you managed to make it work, I was sure!
I have already decided that I am going to release a version of the CO2 meter with the Senseair S8 LP sensor, and in fact I have already started working on it. News will follow shortly 😉.
I've written two emails in the last few days to the people at Senseair, but I haven't heard back from them yet. In any case, I will move forward with the project, with or without them... 🤞
Hello.
Interesting project that I have been looking at for a few days because I am currently working on another one for a PM 2.5 and PM 10 particulate pollutant meter, as well as temperature, pressure and humidity from the Sensor Comunity association: https://sensor.community/fr/sensors/airrohr/ .
In this particle meter the ESP8266 NodeMCU is also used in the V3, but it has the pins already soldered to connect the wires directly without soldering...and reading the previous comments, I think someone tried to use this model, but it is not clear to me if it helped them to get the meter to work properly or you have to use the solderless NodeMCU indicated in the tutorial.
As I have read that in some cases it is difficult to install the firmware in the nodeMCU, I would like to take this opportunity to comment that in the project of the particle meter they indicate that for this operation a USB cable of less than 1 meter in length should be used.
Thanks for the reply and greetings from a newcomer to these gadgets.
Hello Llorinte.
Very interesting project. I have it on the to-do list to extend the CO2 meter and turn it into a air quality monitoring station. I'll get to it as soon as I can.
I haven't seen the NodeMCU for sale with the pins already soldered for a long time. In any case, and to answer your question, you can use the NodeMCU with or without soldering without any problems and in both cases it will work properly. Soldering the pins is very simple and takes about five minutes.
Indeed, the quality of the USB cable is important. In my experience, not so much the length of the cable, but its quality in general. Unfortunately, there are some very poor quality cables out there...
Would it be possible to add a buzzer to the project to warn us when a certain level of CO2 is exceeded?
I'm currently using the widget that ManeKo indicated, which allows me to set warnings if a high or low level is exceeded, so it warns me to open the window and then to close it. It is very good, but it requires that the sensor is connected via wifi, if you could put a buzzer would be totally autonomous more suitable for some situations and for people who are not used to handle this kind of things.
I'm getting hooked on home automation and all this IoT stuff.
Thank you very much.
Greetings.
Hello Zulu.
Of course it can be added, and the good thing is that it's super easy!
I am writing the article and recording the video for the coloured LED control, to have visual warnings, but, as soon as I have it finished, I will start with the buzzer to have audible warnings.
I'm glad you like the world of home automation and IoT, I'm really hooked! 😀
Hello Zulu.
I couldn't stop myself and wrote an article about the use of the buzzer with ESPEasy and how to integrate it with the CO2 meter using rulers.
You can find it at https://emariete.com/utilizar-un-zumbador-buzzer-con-espeasy/
Thank you very much, I've already seen it and I'm working on it, but unfortunately the buzzer I have doesn't work, I had it at the bottom of the drawer for a reason. :-))
But as I found a BM280 pressure and temperature sensor I have managed to put it in the I2C port together with the Oled screen. Now I just need to send that data to Thingspeak to be able to add it to the Widget of the mobile, at the moment I am fighting and I have not achieved it, as soon as I put another field more the whole channel gets disconfigured, I have to study it in depth.
As for the buzzer, I'm waiting for a colleague to pass me one he has unused while the ones I just ordered from Aliexpress arrive.
Greetings.
Hello Zulu.
There are several types of buzzer and for it to work properly it has to be a passive buzzer module.
I am glad that you have included the BM280 sensor without any problems.
Adding it to Thingspeak should not be a problem. You only have to change in the ESPEasy rule, where it says Field1 for Field2 and Field3.
If the line to send the CO2 is: SendToHTTP api.thingspeak.com,80,/update?api_key=tu_api_key&field1=[DeviceNameMHZ19B#PPM]]
You have to put, for the temperature: SendToHTTP api.thingspeak.com,80,/update?api_key=your_api_key&.field2=[DeviceNameBM280#ValueTemperature] =[DeviceNameBM280#ValueTemperature].
And for the humidity: SendToHTTP api.thingspeak.com,80,/update?api_key=tu_api_key&field3=[DeviceNameBM280#ValorHumidity] =[DeviceNameBM280#ValorHumidity].
Hello,
I have already managed to send the three sensors through the rules, from the Thingspeak menu there was no way.
As only 2 sensors can be placed in each widget of the phone, I have created another widget so I can receive as many sensors as I want.
Thank you very much for your guidance.
Greetings.
You are very welcome. I'm glad it's working properly now. 😀
One question, is it normal that the temperature is always 38-39°C?
Does this decompensate the measure?
Hello José.
It seems a bit high to me but nothing should happen. Do you have the sensor sufficiently. aired?
Please note that the temperature sensor is only for internal use of the sensorThe use of this device is actually undocumented by the manufacturer and we are using it on the basis of the manufacturer's specifications. Actually, its use is undocumented by the manufacturer and we are using it on the basis of reverse engineering of the possible commands and responses (it's a hack).
If you turn the sensor off for a while, to give it time to cool down, and then turn it on again, will the first measurements give you a lower value? Yesterday I left a sensor outside for a self-calibration test (the minimum outside my house tonight was 1ºC) and the measurement the sensor gave was 8ºC. That same sensor is now in a room at 23ºC and it is measuring 27ºC.
I wouldn't worry about it if the CO2 measurements it gives you are "reasonable".
In principle, it always ranges from 38-41, even if it switches off.
It is aerated, in several rooms, oscillates 480-600 ppm, in the absence of calibration, that anyone goes out now with the stormy weather hahaha.
I'll keep an eye on it and let you know if anything happens.
Thank you!
They seem to me to be too small for normal rooms in a normal house.
The truth is that, however much the CSIC, the WHO and anyone else you want, advise maximum values of 800-1000 ppm, that is incredibly difficult to achieveYou don't realise it until you have something to measure it with.
In companies, with more or less modern offices, the situation is different, but in normal houses where we are careful to maintain the temperature, so that the heating bill does not soar, and where we do not usually have active ventilation systems, things change.
Look, for your reference, these are the readings for the last 24 hours in my living room:
If the 480-600 ppm measurements you mention are from normal rooms, with people, and without forced or permanent ventilation (windows permanently open), I would say that there is something wrong.
Good evening emariete and company
I'm stuck, very stuck I've been fighting for a week and I can not get out of the loop in which I'm stuck, I explain I have a nodemcu esp-12E ch340 and following your instructions I have not had any problem in the absence of putting it in its box, now another nodemcu esp-12F ch340 (one 12E another 12F) and I get nothing, but nothing is NOTHING, I do not recognize any sensor mh-z19B or C, the log always says MHZ19: Unknown response: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 there is no difference if I connect it or not, I have tried exchanging the TX and RX cables, with the same result, the meter light never turns on, more things, I connect the oled and it doesn't turn on or do anything but I look for it i2c scan and it recognizes it, More things there is no way to flase it I make the bridge RX and TX as you indicate but without soldering with dupont cable and I can not flase it there is no way, I comment all this in case there is solution or directly I give it with the hammer, I imagine that this week will arrive 2 nodemcu CP2102. Thanks
Best regards
n00s1mp0rt4
If the meter light never comes on, there is most likely an error with the 5V power supply.
The light on the meter should come on every 5 seconds.
Check all connections.
Hi, I couldn't get it to work with the VIM port, it didn't have 5v, I switched to the VU and it works correctly.
Hi Pepe. I had the same problem, the software didn't detect it and the red light didn't come on either. I thought it was a connection issue (I haven't done any soldering yet). I connected it to VU and now the red light has come on and it is giving values (yes, 550 and 50, so I'm going to wait and see if it stabilises).
My sensor seems to be one of the fake ones, because it has a black plate, but let's see how it goes. I would like to attach it to one of my SDS011 particle sensors.
Thank you!
Thanks for the contribution, Pepe and Silvia.
The problem is that not all NodeMCUs have the VU pin (none of the ones I have). Anyway, I'm going to post a note so that whoever has it can take advantage of it.
Good morning, I have managed to complete the project without any problem, but now I would like to take the detector to another place with a different wifi. How do I have to do it? Do I have to do the whole process again from the beginning?
I tried to change the wifi network and the password in Esp Easy and it didn't work. That is, I went into config and changed the name of the Wifi network, the WPA Key and the WPA AP Mode Key (which I put the same as the previous one), but it didn't work.
And this has given me a second problem because when I tried to go back to the previous configuration I flashed the board again, but when I enter the ESP Easy password: configesp it doesn't let me configure a Wifi network either, as the computer says "it is not possible to connect to this network" and with the mobile phone it doesn't appear to touch to log on. I have entered the password correctly, what am I doing wrong?
In the configuration you can set a second wifi network (Fallback SSID and Fallback WPA Key) to which it will try to connect.
However, if it does not find the configured wifi access point when it boots up, it will go into access point mode so that you can configure it again.
Regarding what is happening to you now: Towards the end of the article, in the section "Having problems? Frequently asked questions about the CO2 meter" you have some possible solutions. One of the points is "I connect to the ESP-Easy hotspot, but I enter the configesp password and it won't connect", which is exactly what is happening to you:
Sometimes you have to enter the password more than once (two or three times) until it connects.
If you have already tried several times, you may need to reset ESPEasy. To do this:
1. With the NodeMCU powered off, bridge TX and RX with a jumper wire.
2. Turn on the NodeMCU (connect it to the USB) and wait fifteen seconds.
3. Turn off the NodeMCU and remove the little cable you put between RX and TX.
The above procedure should have returned ESPEasy to its initial configuration.
Note: Re-reading, I think it doesn't accept the configesp key because you have set another one in "WPA AP Mode Key". Try that one.
Good morning Mario, I reset it but to no avail. I have entered the password "configesp" a lot of times, not only from the mobile but also from the pc and there is no way to get the screen to select the Wifi to which I want the ESP to connect. I've flashed it again and I haven't done it either. I really don't know what's going on.
Hello José.
Check everything. It is rare that even flashing without resetting does not solve the problem. If, once everything has been checked, the same thing still happens, I'm inclined to think that the module is wrong.
It's strange that the module is wrong, since I've been using it before without any problem. Even the Arduino IDE recognises it fine. I can't really think of anything else.
I confirm, the connections are fine, everything you connect on that board does not turn on, I don't have to test but everything points to that. Thanks
Mario, could you tell me how to connect an LED diode so that it lights up when it exceeds a certain level?
Thank you.
I have a video/article in the pipeline about just that. I hope to have it out in a few days.
Anyway, I'm finishing another one about a 3D printed box where I also talk about how to add LEDs, and I'll upload this one sooner because it's almost finished (maybe tomorrow or the day after).
Hello!
I keep getting sensors from the black ones, I found this article in which they talk about their inaccuracy
https://revspace.nl/MH-Z19B
Do you know of any AliExpress links that are arriving green?
I think this may be the reason for my low measurements.
Greetings
Hello José.
The link you indicate is in the entry "The CO2 sensor bible MH-Z19B".
I am writing an article about fake sensors. Fortunately or unfortunately (I say "good luck"because it is allowing me to write this article), I received one of these fake sensors a few days ago and, as I have several CO2 sensors, trustworthyhas allowed me to make some comparisons that I will share with you in this article. I am writing about things like how do I avoid buying a fake sensor? how do I identify a fake sensor if I already have one? how do I return a fake sensor that has been sold to me?
The link right now is supposed to be good.
Every time I change the link I spend a lot of time comparing and checking beforehand. The problem I'm seeing is that, apparently, the same sellers who send original sensors, send fake sensors from time to time (the one I received with the black plate is from a seller I've had on this page who sent original sensors).
The good thing is that you open a dispute and, at least in my case, AliExpress rules in your favour and refunds your money (it took me less than 24 hours). In the article I will also give you some guidelines to open the dispute and claim the refund.
Thanks Mario, in my case I have opened two disputes and they have returned my money, let's see if I'm lucky and I get a green one.
Best regards
I want to thank you for all your hard work, the amount of information, and the detailed process, even with the faq, I have done the project in a very simple way thanks to all your instructions.
Thank you!
Thank you very much, Zirpin.
Your words are much appreciated. 😀
I am very glad that you found it easy to build and that it works correctly the first time.
Good morning Mariete,
First of all, thank you very much for the work (discovered through Menéame) behind this project: I managed to get the meter working!
And I have achieved it from absolute zero, with no idea of electronics or any of this. Although I studied it in my degree, I'm a blackleg.
It has not been easy and I would like to point out a couple of problems I have had in case any other followers of yours might find them useful.
First of all, the computer didn't detect the ESP when I plugged it in. Not even waiting half an hour. Solution: manually download the drivers. Google is your friend, this problem was easy to solve but maybe you should point it out in your tutorial.
Secondly, the ESPEasy recording program didn't work: it thawed, it ran, it detected the ESP, everything was fine, but when I hit "record", don't ask me why, because I still don't know, but the thing is that it hung without doing anything with the 105 seconds message (waiting much longer than the famous 105 seconds). I solved it directly by putting the complete recording command I got from the log in a cmd window "bare-bones" in the executable directory. This was a bit more problematic.
The third thing is more relevant and is related to the sensor: it may even screw up the project for many people. The thing is that although I bought the MH-Z19B, after a lot of fussing with the aliexpress seller, he sent me the MH-Z19C. It's physically different... but also electronically, as you'll see. I tried to assemble the circuit with the tutorial, but instead of soldering I did it with a breadboard that I had also bought for tinkering (I'm very new at this). The thing is that after I connected everything... it didn't work properly. The red light was blinking. Values were coming out, I even connected them to Thingspeak with the partner's tuto. But the values were very unstable: 50 or more PPM jumped up and down, and the temperature didn't match either. It was 2 or 3 degrees lower than the real value.
So, I thought they had given me a fake and I was really annoyed... until I saw the 19C's sheet. It turns out that there is a substantial difference between the 19B and the 19C in the electronics: while the 19B works with 5V+-0.5 (from 4.5 to 5.5V), the 19C needs 5V+-0.1 (from 4.9 to 5.1V). Also at the end of the sheet he insists that if the voltage is not in that range... the measurements become UNSTABLE. I looked at what the ESP was giving on the Vin/GND... et voila, 4.57V. Insufficient.
I have been doing some research and it turns out that the ESP is incapable of supplying 5V. The Vin/GND is there to supply it with "unregulated" voltage between 5V and 12V. But not to get 5V from there. In fact, the fact that it gives voltage when connected to micro USB is a by-product, not a specification. In fact, in any project that needs 5V (motors), you need a specific power supply, you can't pull from Vin (from what I've been reading). With the MH-Z19B you're lucky because its input range is wider (although it's so close to the limit that it's almost certainly not working for some people and they're getting jumpy values), but with the MH-Z19C it's not.
When I bought the breadboard, a power supply came with it. I connected the MH-Z19C to the 5V (by the way, it gives 4.92V, a bit low) and... BINGO, everything was perfect:
https://thingspeak.com/channels/1279169/charts/1?bgcolor=%23ffffff&color=%23d62020&dynamic=true&results=60&type=line&update=15
THANK YOU VERY MUCH FOR EVERYTHING
By the way, which are the boxes you buy 10 by 10? I can't 3D print anything, but you mention those boxes a couple of times but don't say which ones. can you tell me?
(Note: I'm going to copy the MH-Z19C voltage into the sensor "bible" in case anyone needs it)
Hello Jesus.
Thank you very much for your words and for the commentary you have written, full of really interesting information.
I have updated the section with your contributions and suggestions. "Having problems? CO2 Meter Frequently Asked Questions". with the following:
Computer does not recognise the NodeMCU when plugged in (possible driver problem).
I have problems with my MH-Z19C sensor (possible problem with sensor supply voltage).
I've also added a clearer warning, although I've said it before in some comments, so that people don't buy the MH-Z19C without realising it (at least for the moment). This project is made for the MH-Z19B (and now that I've tried it first hand, also for the Senseair S8 LP, which is the one I would recommend to anyone right now).
As for the voltage provided by Vin:
I have spent a lot of time trying to respond to the message, but the more I wrote, the more I missed because it is a complex subject.
In the end I have decided to write a full article on the subject which will be ready, I hope, in a few days (I am already well advanced in text, although I want to include photographs, diagrams, graphs and some practical evidence).
In short (I will elaborate on this in the article): YES peripherals can be connected to the Vin pin without any problem in most cases (the MH-Z19C may be one of those exceptions, I'm still working on it).
Regarding what you ask me about the boxes, I have included in the article the link to the type of box I buy (not from the seller himself, because I can't find him), although there are many to choose from.
Best regards and thank you very much for everything. I hope you will continue to contribute, it is very interesting..
Thank you. I look at the boxes!
And, hey, of course you can connect things to the Vin, but taking into account the requirements of what you connect... And the 19c is unfortunately not one of the things you can put in there.
I'll try to get my hands on a senseair, especially considering that the AliExpress dispute went well and the 19C came out free. Things happen. I don't know about the 19C... Since you surely have one, can you compare it with the 19B in terms of measurement reliability?
Hello Jesus.
The first moderately stable version is ready "presentable". of the article on "feeding things from the Vin". (it was difficult to give it a title). It's called "Powering from NodeMCU, Wemos Mini D1 and Arduino". I want to complete it with some more things and change the structure a bit, but it's late and I'm tired (and I have to get up early tomorrow), so I've decided to publish it like this and I'll improve it later.
I don't have any MH-Z19C to be able to make measurements and buy it with the MH-Z19C and the Senseair S8, unfortunately. I hope that, as it is new, there will be no counterfeit copies for the time being, as is happening with the other one.
Hello again,
I have two NodeMCU v3 lolin, yesterday I got something working, but now I don't see the ESP-EASY access point in the WIFI networks, I flash them both but nothing. Attached is the log.
######2021-01-11######
#######0.04.007#######
######FLASH INFO######
BIN file: ESP_Easy_mega_20201130_normal_ESP8266_4M1M.bin
COM port: (COM3) USB-SERIAL CH340 (Port_#0001.Hub_#0001)
Baud rate: 115200
######POST FLASH######
No post flash information entered...
######FLASH LOG######
[esptool.exe -vv -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf "C:\UsersFRAN\Desktop Meter CO2 CO2 "Easy_mega_20201130_normal_ESP8266_4M1M.bin"]
[11/01/2021 18:34:30] esptool v0.4.12 - (c) 2014 Ch. Klippel
[11/01/2021 18:34:30] setting board to nodemcu
[11/01/2021 18:34:30] setting baudrate from 115200 to 115200
[11/01/2021 18:34:30] setting port from to COM3
[11/01/2021 18:34:30] setting address from 0x0000000000 to 0x0000000000
[11/01/2021 18:34:30] espcomm_upload_file
[11/01/2021 18:34:30] espcomm_upload_mem
[11/01/2021 18:34:30] setting serial port timeouts to 1000 ms
[11/01/2021 18:34:30] opening bootloader
[11/01/2021 18:34:30] resetting board
[11/01/2021 18:34:30] trying to connect
[11/01/2021 18:34:30] flush start
[11/01/2021 18:34:30] setting serial port timeouts to 1 ms
[11/01/2021 18:34:30] setting serial port timeouts to 1000 ms
[11/01/2021 18:34:30] flush complete
[11/01/2021 18:34:30] espcomm_send_command: sending command header
[11/01/2021 18:34:30] espcomm_send_command: sending command payload
[11/01/2021 18:34:30] read 0, requested 1
[11/01/2021 18:34:30] trying to connect
[11/01/2021 18:34:30] flush start
[11/01/2021 18:34:30] setting serial port timeouts to 1 ms
[11/01/2021 18:34:30] setting serial port timeouts to 1000 ms
[11/01/2021 18:34:30] flush complete
[11/01/2021 18:34:30] espcomm_send_command: sending command header
[11/01/2021 18:34:30] espcomm_send_command: sending command payload
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] Uploading 910944 bytes from C:\UsersersRAN\Desktop Meter CO2 "Easy_mega_20201130_normal_ESP8266_4M1M.bin to flash at 0x0000000000
[11/01/2021 18:34:30] erasing flash
[11/01/2021 18:34:30] size: 0de660 address: 000000
[11/01/2021 18:34:30] first_sector_index: 0
[11/01/2021 18:34:30] total_sector_count: 223
[11/01/2021 18:34:30] head_sector_count: 16
[11/01/2021 18:34:30] adjusted_sector_count: 207
[11/01/2021 18:34:30] erase_size: 0cf000
[11/01/2021 18:34:30] espcomm_send_command: sending command header
[11/01/2021 18:34:30] espcomm_send_command: sending command payload
[11/01/2021 18:34:30] setting serial port timeouts to 15000 ms
[11/01/2021 18:34:30] setting serial port timeouts to 1000 ms
[11/01/2021 18:34:30] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:34:30] writing flash
[11/01/2021 18:34:38] …………………………………………………………………….. [ 8% ]
[11/01/2021 18:34:47] …………………………………………………………………….. [ 17% ]
[11/01/2021 18:34:55] …………………………………………………………………….. [ 26% ]
[11/01/2021 18:35:03] …………………………………………………………………….. [ 35% ]
[11/01/2021 18:35:12] …………………………………………………………………….. [ 44% ]
[11/01/2021 18:35:20] …………………………………………………………………….. [ 53% ]
[11/01/2021 18:35:28] …………………………………………………………………….. [ 62% ]
[11/01/2021 18:35:37] …………………………………………………………………….. [ 71% ]
[11/01/2021 18:35:45] …………………………………………………………………….. [ 80% ]
[11/01/2021 18:35:53] …………………………………………………………………….. [ 89% ]
[11/01/2021 18:36:02] …………………………………………………………………….. [ 98% ]
[11/01/2021 18:36:03] ………. [ 100% ]
[11/01/2021 18:36:03] starting app without reboot
[11/01/2021 18:36:03] espcomm_send_command: sending command header
[11/01/2021 18:36:03] espcomm_send_command: sending command payload
[11/01/2021 18:36:03] espcomm_send_command: receiving 2 bytes of data
[11/01/2021 18:36:03] closing bootloader
[11/01/2021 18:36:03] flush start
[11/01/2021 18:36:03] setting serial port timeouts to 1 ms
[11/01/2021 18:36:03] setting serial port timeouts to 1000 ms
[11/01/2021 18:36:03] flush complete
[2021-01-11 18:36:03] DONE!
############################
[2021-01-11 18:36:03] The COM port was already in use... the post-flash did not complete.
[2021-01-11 18:36:03] JOB COMPLETED, over and out!
I have reset both with the physical method of the TX RX cable and also in the Arduino IDE and nothing. If anyone has had this happen and has the solution I would appreciate your help.
Fran
Fran, something similar has happened to me. But I have not found any solution. I also reset it with the TX-Rx cable attached. It worked fine for me, but I wanted to change the network and it has been impossible, it detects the ESP Easy access point but when I enter the password it is impossible, it tells me that the password is incorrect. So I can not access to connect to any Wifi network.
I have two NodeMCU lolin V3 with CH340, I have configured them as an access point with arduino and the other by arduinoblocks for a humidity sensor, no problem the access point appears immediately in the list of wifi networks, but with esp easy there is no way, I have downloaded the full esp and not even with those. The boards work fine but something is wrong with esp easy. If anyone has the solution I would be very grateful.
Good morning Francisco Javier, I have the same problem, the ESP 8266 works well with the Arduino IDE but not with ESP Easy, the first time I connected it I did it without any problem but when I wanted to change the network it was impossible.
Let's see if we can make some more progress with this and find a solution...
What comes out of the ESPEasy serial port when it boots up? This may be the key to the problem.
You can use any serial port terminal such as the Arduino IDE itself for this.
On the arduino serial monitor I get the following data:
INIT : Booting version: mega-20191130 (ESP82xx Core 2_6_1, NONOS SDK 2.2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
72 : Info : INIT : Free RAM:32656
73 : Info : INIT : Warm boot #2 Last Task: Background Task - Restart Reason: External System
75 : Info : FS : Mounting...
100 : Info : FS : Mount successful, used 75802 bytes of 957314
488 : Info : CRC : program checksum ...OK
498 : Info : CRC : SecuritySettings CRC ...OK
604 : Info : INIT : Free RAM:29496
606 : Info : INIT : I2C
606 : Info : INIT : SPI not enabled
696 : Info : INFO : Plugins: 46 [Normal] (ESP82xx Core 2_6_1, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
800 : Info : WIFI : Set WiFi to STA
833 : Info : WIFI : Connecting ONO6C1E attempt #0
2458 : Info : WD : Uptime 0 ConnectFailures 0 FreeMem 25384 WiFiStatus 6
4788 : Info : WIFI : Connected! AP: ONO6C1E (DC:53:7C:20:46:0E) Ch: 1 Duration: 3752 ms
6670 : Info : WIFI : DHCP IP: 192.168.1.49 (ESP-Easy-0) GW: 192.168.1.1 SN: 255.255.255.0 duration: 2062 ms
6675 : Info : Webserver: start
6676 : Info : firstLoopConnectionsEstablished
32169 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 21440 WiFiStatus 3
62169 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 21440 WiFiStatus 3
92169 : Info : WD : Uptime 2 ConnectFailures 0 FreeMem 21440 WiFiStatus 3
122169 : Info : WD : Uptime 2 ConnectFailures 0 FreeMem 21440 WiFiStatus 3
152169 : Info : WD : Uptime 3 ConnectFailures 0 FreeMem 21440 WiFiStatus 3
182169 : Info : WD : Uptime 3 ConnectFailures 0 FreeMem 21440 WiFiStatus 3
I'm already lost here, I'd appreciate your help.
Best regards and thanks
Hello Fran.
I think your ESPEasy is connected.
Have you tried connecting with your browser to the address 192.168.1.49 ?
It is true, the access point does not appear in the list of wifi networks but with the ip address the esp easy appears, thank you very much...
The access point that ESPEasy creates is temporary, it appears only so that you can connect to it to configure the Wifi network (enter SSID and password). Once you connect to the wifi network the access point disappears.
Hi, thank you very much for the article, but I have a problem. I still don't have the co2 detector but I have done everything you say in the video but when I try to connect I should get a web page but it appears. http://www.msftconnecttest.com/setup not found
Hello Ernesto.
As far as I know, http://www.msftconnecttest.com is an address that the Windows 10 troubleshooter uses for something, but I can't give you more details.
I suggest you try restarting the NodeMCU, reflashing it, trying another browser, computer or phone.
Hello, thank you very much for answering so quickly, I have solved the issue by entering the IP that appears by pressing the button on the left, the problem is that I have not received the sensor. Would it be possible to connect the MQ 135 detector that I have in the meantime?
Hello Ernesto.
I am glad you made it.
As far as I know, ESPEasy does not support the MQ-135 sensor. You would have to write your own plugin if you wanted to use it.
Anyway, keep in mind that the MQ-135 detects a lot of things, and all at the same time. You don't really know what you're detecting, so it's not really a CO2 meter. It can be used to warn you that there is "something" in the air (like someone has lit a cigarette) but nothing else. In other words, it gives you an idea of the air quality, but as you don't know what it is detecting, you don't know if it is something important or not, or in what proportion...
That said, there are many projects with MQ-135 on the internet. I think the easiest thing to do is to follow one of those projects, which are designed for that sensor.
Thank you very much, you have cleared up a lot of doubts
Sorry Mario, the sensor link you posted is for an MH-Z19C, I asked the seller (Shenzhen) and he confirmed it. I can't find a link to the MH-Z19B either on this page or on the "Bible" page, do you have a reliable one that sends the green one and not the black one? Is the version with pins instead of wires supposed to be good too?
Hello José.
Thanks for the warning. I think the seller has changed the item from MH-Z19B to MH-Z19C (if you look at the product images he still has the MH-Z19B but then, in the description, there are photos of the MH-Z19C).
I have removed the link, for the moment, and I am waiting to do a good analysis of the providers that exist right now because some of them, which were reliable, are no longer so. Let's see if I can do it between today and tomorrow.
At this point, I would recommend anyone to use the Senseair S8 LP (recommended to have multimeter, as I say in the article, to measure the supply voltage, which is less than 5.25 volts)...
Ah the Senseair could be connected to our meter by simply checking not to exceed the voltage?
Indeed, it is practically the same. The connections are the same and you only have to select in ESPEasy that the device is a Senseair instead of an MH-Z19.
I will make an addendum to the article with the details, showing how to use the Senseair instead of the MH-Z19B, but it is almost the same.
Thank you so much! An impeccable post!
Thank you very much, Sergi! 😀
Hello.
Thank you very much for this tutorial. It is the first time I do an electronics project and it has been very easy thanks to your explanations. It works perfectly and sending the data to ThingSpeak, it is very interesting to download it and draw your own graphs. I was thinking of adding a humidity and temperature sensor to have a more complete monitoring of the living conditions and to be able to better manage the ventilation of the rooms. I have seen sensors of this type, specifically the BME280 and DHT22, but I have no idea which sensor is more suitable and I suppose there will be other options. I would like one that is accurate, what humidity sensor would you recommend? On the other hand I will also put an oled screen following your tutorial about it. Thank you very much again for the work you do, you get us to take away the fear of tinkering with these gadgets and think about making our own projects.
Hello Raul.
Thank you very much, I'm glad it worked perfectly for you and that you found it easy! 😀
On temperature and humidity sensors, I have yet to write a series of good, in-depth articles on the main sensors. I don't think it will take long to do so.
I can tell you that the BME280 has a problem and that is that the sensor gets a bit hot and tends to give slightly high values (1 or 2° above the real temperature). It can be compensated by software, to a certain extent, but it would not be the one I would recommend when you don't want to complicate your life.
For temperature measurement, I almost exclusively use the ds18b20. It is small, cheap, easy to use with ESP Easy, sufficiently accurate (±0.5°C), provides measurements to one or two decimal places. The temperature range is from -10 to 85°C so it should be taken into account if and where you want to use it outdoors (if it is in a place where the temperature can drop below -10°C it is not recommended).
Thank you very much. I'll keep an eye out and read the article when you publish it.
good afternoon, to unify module and screen this device found on amazon would be valid:
https://amzn.to/2XP3KZK
Is it the same process to install drives and esp easy driver?
thank you very much for your magnificent work
Hello.
This device does not have an ESP8266 but an ESP32, so it would not be valid directly.
There is a version experimental ESPEasy for ESP32 but it would have to be tested because as it is experimental there is no certainty that it will work with all the boards or with all the sensors and other peripherals.
If you want to experiment, that's fine (leave us a message afterwards, telling us how it went), otherwise I recommend that you play it safe and use a board with ESP8266 (there are those with integrated display, like this one https://s.click.aliexpress.com/e/_9fYNJZ or this https://amzn.to/3bQsRDs but I have not tested them for this project).
thank you very much, I will follow your original project and I will comment the results, I will mount it on a protoboard, and I will make connections without tinning. I don't have a printer 3 d
good, a doubt .... in your article you expose that via telegram you could send the measurements of the meter ? how would this be possible ?
Hello José.
I have pending to make a tutorial on this topic. I haven't released it yet because to send messages via Telegram you have to connect to its API using SSL (https) and ESPEasy doesn't support this type of connection. I used to use a proxy service on the internet that allowed me to solve this limitation, but either it no longer exists or I have not been able to find it again.
Maybe someone knows of a proxy service that allows this and can share it with us.
I currently do it with Node-red, which I have running on a Raspberry Pi, but, of course, it is a solution that requires more than just ESPEasy.
Hello again, Everything was fine but now I can't run ESP Easy, because in "COM port Plese wait while scanning", it stops there and doesn't detect any port, I keep turning it around and nothing, I've even reinstalled windows. But there is no way, before it was working but now no port is shown.
Does that happen when you try to flash the NodeMCU with the ESP.Easy.Flasher program?
If when you run ESP.Easy.Flasher.exe a screen appears at the top that says COM port Plase wait while scanning... and it should appear the port to which you have to connect the device, but it stays there, there is also like a cross to start the search but it is grayed out and does not work.
Hello, the problem has been solved, it took me a while but in the end I solved it. It was because the USB port drivers had disappeared from the computer, I have reloaded the drivers and it has been solved, thanks.
Hello Ernesto.
I'm glad it's been resolved. I've included it in the FAQ in case it happens to anyone else.
I've had this happen to me, but install the drives that mariete puts in the direct link and that's how I recognised the COM 3.
Hi, I would like to try this option but I don't know how to locate them.
You can find them in the section "Having problems? CO2 Meter Frequently Asked Questions"
Hi, thanks I have updated all the windows drivers, with the USB connected and the free Driver Booster 8 program.
Great! 👍
a question ...how can you put the results of the CO2 measurement on several lines of the pantal oled so that the ppm value can be seen bigger ?
thank you very much
You can do this by changing the configuration under the Devices tab and replacing the device "Display - OLED SSD1306" by the "Display - OLED SSD1306/SH1106 Framed"..
I have added some brief instructions at the end of the article I wrote on how to connect and configure the oled display (https://emariete.com/conectar-una-pantalla-oled-ssd1306-a-espeasy/). I hope they are enough.
Best regards.
thousand thanks.... one more question, to complete the meter, would it be possible to implement in the assembly a dht 11/12 sensor, to be able to measure the temperature of the room?
Greetings
Hello José.
Yes you can, and it is very easy.
I am waiting for a DHT22 that I have ordered to do it and document it (the DHT11/12 are almost the same as the DHT22, I will comment the differences to do it with any of them).
Hi, I want to order a MH-Z19B, but I have a lot of doubts or what you say about the counterfeit ones. I've seen some sites on Aliexpres that are reliable and not too expensive, I've seen some "About 15€" but I don't know if they are trustworthy.
Hello Ernesto.
I am putting links to the providers that I think are trustworthy, based on my own experience or the information provided by users.
I think all MH-Z19Bs in the €15 range are fakes. The original MH-Z19Bs are more in the 18-22€ range, they have gone up quite a bit in the last few weeks due to increased demand.
The MH-Z19Cs are a bit cheaper, but they are a bit tricky with the 5V power supply (it has to be very accurate and is not that easy to obtain without adding extra components) so I don't recommend them to "general" people at the moment.
At the moment my recommendation would be to buy the Senseair S8 sensor, which for three or four euros more has several advantages, or to buy the original MH-Z19B from the official Winsen shop (you have to buy two units, they don't sell them one at a time at the moment). Both links to buy them are on this page.
Hi Mariete, I have the components at home!!!, but the sensor has arrived with a black plate and the colours of the wires do not match.
I have configured it but it doesn't give me a reading (0,0,0), maybe the sensor is false and doesn't work, could you tell me how to identify the sensor pins? I mean, the diagram below (5+5 pins) does match my sensor but when I check with wire colours they do not match (e.g. Rxd: Yellow, Txd: Brown...).
Thank you very much for your hard work and effort
Greetings
Hello Luis.
Thank you very much for your words. 😀
I guess you haven't read the article I wrote on the blog about fake sensors (it's called "FAKE MH-Z19B CO2 Sensors") and the accompanying video. In it I explain it in great detail.
In the video I talk about the cables, precisely. In the one I received, the colour of the cables did not match either.
Watch the video because it will be very enlightening.
I put it everywhere, but I'm going to put it here in bold for everyone: At this time I do not recommend that you buy the MH-Z19B unless it is the one in the link I put, from the manufacturer's shop, but which comes in pairs. Better play it safe and buy the Senseair S8 LPalthough it is somewhat more expensive (it is also more accurate and of better quality). These are the problems that have caused the demand for CO2 sensors to skyrocket.
Thank you very much for your quick response.
I have read the post about false sensors, it is clear to me that mine is, black plate and smooth top.
What I find strange is that it doesn't make any measurements, it gives me a red voltage light, but in esp it tells me that it doesn't detect it, I suppose you can't think of any other test, can you?
If so, I will start the dispute and order the senseair that you recommend, see if this time I have luck..hehehehehehe. I really want to start seeing values 😉, I also have the screen, the buzzer...waiting, to mount it, I want to do everything hahahahaha .
Thank you again for your time and congratulations on your blog.
Hello Luis.
I was trying to answer the two questions you asked in your original message:
"maybe the sensor is a fake and doesn't work?"
In this case I referred you to the article on fake sensors because that is where you could see that your sensor was indeed fake and that is where I am putting all the information I am learning about fake sensors.
The other question was: "could you tell me how to identify the sensor pins?" and you were referring to the colours of the wires.
I was telling you to watch the video because that is where it is explained in detail and where you can see the correspondence.
I just took this image from the video:
Here you can see the colour correspondence between the correct cable and the wrong one (the one that comes with the dummy sensor). This way you can make sure that it is connected correctly. Of course, the ideal would be to check it with a multimeter (maybe not all false sensors come with the same cable, and there are other colour combinations), but if you don't have a multimeter, you can make sure with the images and explanations in the video (even if the cable of your sensor is different from the one I used to make the video).
As far as we know so far, these sensors measure poorly, but give data, yes they do. So it is not that your assembly does not detect the sensor because it is false, but rather that there are any additional problems and it is most likely a connection error (or the sensor is just plain faulty, of course).
It may be more practical for these consultations the Telegram group (https://t.me/emariete_chat), because there I can easily ask you to send me pictures of your cable, the connections or any other questions or information that might help me to help you.
Thank you, already on Telegram channel. We'll be in touch over there. I got my values finally. On the street 550 bpm and in the living room 700-850 bpm. Maybe they are good? I'll check it out, although the temperature is very high about 33° thanks
I'm glad that you are already getting values, but I'm afraid that, being a sensor with a black plate, the values are far from reality.
The temperature is the least important (it is an undocumented internal value).
Hi, I think I left this comment but it is not showing up.
The question is where can I buy a detector in Aliexpres that is not too expensive and is not a fake?
Hello Ernesto.
I answered you yesterday. You have both your question and my answer above 😉.
Excellent and very useful article, I have already recommended it in several forums.
A small correction regarding NDIRs is that the IR measures CO2 and H2O, and therefore some industrial/scientific models incorporate a humidity sensor to remove the part of the signal due to H20, but which is small and irrelevant for this use.
A question from ignorance, why do you recommend the z19b instead of the z14a? The latter seems to have the optical path in line and that in theory is much better.
Hello Anton.
Thank you very much for your words and for sharing the article.
In my opinion, in the margins in which we move and taking into account the purpose of these meters, the effect of humidity on the measurements is not really something to worry about.
At the time I made this meter with the MH-Z19B because it was the one I got. Keep in mind that when I built the first one (about four or five years ago, there is an article in the blog from that date) it was not so easy to get this kind of sensors and they were not so affordable.
I have never heard about the in-line optical path of the MH-Z14A. I don't know what it might refer to. If you have a link to an article with reliable information about this I would appreciate if you share it. In any case, the project is perfectly compatible with the MH-Z14A if someone wants to do it with it.
Best regards and thank you very much.
I can't get the alliExpress coupon you put up. It is impossible to register like this.
Hello José.
Please try again to see if it works for you.
I'm not sure if the link is only valid for the first user who uses it. I just posted a new one.
Mariete, I have managed to integrate it into the Z-wave home automation controller, Eedomus via HTTP.
With your permission, I post how to do it in the Domotica Doméstica forum.
http://www.domoticadomestica.com/foro/index.php?topic=4862.msg39267#msg39267
Hello José Miguel.
Great, there's no problem with you posting it here. I think it's very interesting and I'm sure someone could use it.
Hello Mariete!
Excellent tutorial! I have followed Maneko's steps and integrated the data in Thingspeak, everything works "almost" fine 🙂 I send the data from a MHZ-19B and a BME280 the problem is that every 60 seconds, the problem is that I don't know why there are data that shows them wrong, i.e. I see in the serial port of the wemos a value of 500ppm and in thingspeak it appears 28 ppm, then in other measurements it shows them well, but then it returns to mark strange values such as temperatures of 50 degrees etc.
I don't know if I should specify anything else in thingspeak, has anything similar happened to you?
I leave you a link to the channel where you can see it clearly.
https://thingspeak.com/channels/1291611
Thank you in advance
Best regards
Hello.
It looks like there is some kind of "mixing" of data when sending it to Thingspeak.
Please send me screenshots of the rules (delete the APIs for security) and the sensor configuration to see if I can see anything.
Better in the Telegram group if you can, it's much easier and quicker than in the comments: https://t.me/emariete_chat
hello, I am a teacher in a IES and I think we are going to do this project with my students, my problem is that everything I buy must come on the invoice in the name of the IES, my question may be silly, but I have found many sellers of amazon that do not give invoices... the links you put facilitate official invoices, if you know one that does, could you pass it to me?
Thank you very much
Hello Francisco.
The truth is that I have been asked this question several times, so I have included the question and the answer in the "..." section.Having problems? CO2 Meter Frequently Asked Questions"above
Best regards.
Good afternoon and thank you very much Mariete for this contribution. One question, in the SenseAir S8 LP that you recommend, do you know if the cables are included? In any photo it appears and I see that they are necessary for the connection with the NodeMCU.
Thanks again!
Hello Fernando.
The cables are not supplied. You can use Dupont cables like these, which are the ones I use: https://amzn.to/3jjOpdt
Best regards.
Thank you very much Mariete! for your quick reply, for the project and for keeping us entertained in this time of confinement!
Thank you!
You are very welcome. My pleasure. 😀
Well, I really don't know where to start but to say THANK YOU!!! for a million times would be an understatement.
I had been looking for a couple of months for a project like this and when I found it, it was like a revelation. EASY, SIMPLE AND FOR THE WHOLE FAMILY!!! even an amoeba could do it thanks mainly to the enormous didactic work of the author with the blog complemented to perfection with the videos and with the contributions of Maneko for the configuration of the thingspeak and Danimod for his design of the box that I will talk more about later.
To begin with, I bought the sensors from the official distributor recommended by Mariete and they were received without any problem and perfectly packaged, only without the connector cable, it is a pin version but as I will comment later it was not an impediment for me.
Once I received the parts from aliexpress (sensor and NodeMCU module) the first thing I thought was to change the connection system in order to be able to modify it in the future or to recycle both the sensor and the NodeMCU in other projects. Besides, my soldering skills are null and I didn't want to ruin anything by soldering it wrong. That's why I decided to use Dupont connectors that simplify the connection and allow not to use the soldering iron.
Once connected and always following the instructions, I had some problems when installing the drivers as they did not download automatically (Windows 10).
Next step the printed box, in my opinion the emariete box is very well designed but due to circumstances I have a long time fight with the retractions and the design of the box made that after 4 long hours of printing it was unusable (I insist it is because of my printer). Even so at 0.20 layer and 60mm/s it seemed to me an excessive printing time. Evidently the ventilation of that box is excellent and is a premium in the design.
However, the box designed by Danimod seemed perfect to me. I only retouched it to cover the hole of the screen and I made it a bit higher so that the Dupont connectors would fit properly (I would attach pictures or videos but I don't know if I can and I don't know how to do it here).
Once the components are housed in the modified Danimod box, I feed it via usb and logically the next step is to accumulate the data to be able to draw conclusions.
To do so, and following Maneko's excellent explanations, I configure thingspeak to be able to start creating graphics.
Thank you very much, I found the project very interesting and enjoyable. Above all, many thanks to Mariete for the time invested in creating a place in which to synthesise all the knowledge about this challenge of the economic and reliable CO2 sensor.
Thank you for sharing!
Thank you very much, CONTRACOVID, for your words and for your fantastic analysis of the project!
These are certainly very useful opinions, especially for those who have not yet taken the plunge because they are afraid of the project.
I'm glad you've got it up and running.
And now, don't stop tinkering...
Best regards.
Hello, I want to congratulate you on this project!
I have a question, my nodeMCU does not give me the 5v at the VIN connector, after several attempts I measured the voltage and I get 0.2. I had to connect it to the VU. Do you know why?
Thank you!
Hello David.
This is rare. Maybe the Schottky diode is broken. Anyway, if your board has a VU pin, it's best to use that one, as it says in the article.
Best regards.
Hello,
I ordered the MH-Z19B from AliExpress and they sent me the MH-z19C. I set it up following your instructions and apparently it works perfectly.
Thank you very much for your instructions, everything is wonderfully well explained!
Jorge
Great, Jorge!
I'm glad it worked out well for you. 😀
Good morning, I've decided to make the meter but the first one on the forehead!
I plug it in via USB and windows does not recognise any device, the only thing I see is a flashing blue LED on the board every 10 seconds approx.
Some clue
Hello Josep.
Check in the section "📢 Having problems? CO2 Meter Frequently Asked Questions". the point which is called "Computer does not recognise the NodeMCU when plugged in."It is most likely a driver problem.
If that doesn't solve it, drop by the Telegram group so we can help you.
Best regards.
Hello,
I connected a Wemos D1 Mini V3 - ESP8266 - CH340 and a MH-Z19C sensor as described in your article and flashed the file "ESP_Easy_mega_20201227_normal_ESP8266_4M1M.bin".
After a few minutes, the D1 mini gives a wifi SSID ESP-DODAA8 without any security. When i connect, i get ip-address 192.168.4.2, but when i browse to 192.168.4.1, the connection is refused.
The serial monitor shows
————
B0 or B1 unknown
Checksum incorrect; discarding data...
————
Any suggestion on what could be wrong or what i can do next?
Best regards
Jan
Hi Jan.
The SSID ESP-DODAA8 is not from ESP Easy. You should see a "ESP-Easy SSID. You have some other firmware loaded in your ESP8266.
Best regards.
Hello,
I used the ESP.Easy.Flasher to load the file mentioned above, downloaded from your site. When i start flashing, the program displays 'Start flashing on COM3 (approx 104 seconds)
but no further messages
The serial monitor continues to display
B0 or B1 unknown
Checksum incorrect; discarding data ...
Contents of the logfile :
######2021-03-01######
#######0.04.007#######
######FLASH INFO######
BIN file: ESP_Easy_mega_20201227_normal_ESP8266_4M1M.bin
COM port: (COM3) USB-SERIAL CH340 (Port_#0002.Hub_#0005) [online].
Baud rate: 115200
######POST FLASH######
No post flash information entered...
######FLASH LOG######
[esptool.exe -vv -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf "\diskstation_PublicRuudud\Verluchting - CO2\bin\ESP_Easy_mega_20201227_normal_ESP8266_4M1M.bin"]]
Which exact board are you using?
Maybe the old firmware you had flashed disabled the serial port or something like that? I never heard of a problem like this (or at least I don't remember).
Hello,
This is the exact board i am using:
https://www.wemos.cc/en/latest/d1/d1_mini.html
and this is the sensor i have:
https://www.reichelt.com/be/nl/infrarode-co2-sensor-mh-z19c-jst-zh-6-pin-co2-mh-z19c-pc-p297318.html?PROVID=2812&gclid=Cj0KCQiAvvKBBhCXARIsACTePW_hCFZybizQlPzvp8Ag6BDHH4lR2JZJEDyNIITqcHBwUkngvazhSkUaAuWxEALw_wcB
I will try to flash tomorrow from another pc.
Jan
Hi.
Let's see if it works with the other PC.
There are many people using exactly that combination without further issues (other than the need to make sure you provide a voltage between 4.9 and 5.1 volts to the sensor).
Best regards.
One of the best articles I have found about home CO2 meters, but with a certain rigour. The explanations can be followed by anyone with some basic notions, and although as you say at the beginning it is long, but not difficult. Seeing the recommendations of the already manufactured ones that you recommend from amazon I came across one of the same in our friend Aliexpress that claims to have NDIR sensor -> https://s.click.aliexpress.com/e/_9jitPGAny opinions?
Thank you
Hello Paco.
Thank you very much for your words.
I don't know that meter first hand, so I can't tell you. What I do know is that there are different versions.
However, if you are going to buy it, I recommend that you do it on the manufacturer's homepage, it costs 25 cents more and is much more reliable (with the explosion in demand for CO2 meters there are a huge number of fake sensors). I have taken the liberty of changing the link to the manufacturer's official AliExpress page so as not to confuse readers.
Of course, if it works well, it can be an excellent option.
Best regards.
Thank you, well seen. Better to buy from the Winsen shop. What I'll do is buy it and then disassemble it to see what's inside 🙂
Best regards
Great, I'd appreciate it if you could update us. I'd appreciate it if you could update us, maybe with some pictures of the interior?
I'm sure many people will find it interesting.
Thank you very much.
Of course, I've already bought it. When it arrives I'll come back to the blog and I'll take detailed pictures to analyse them as my knowledge of electronics is somewhat limited 🙂
How can we know what you last updated on the blog, e.g. what did you modify on 9/3/21?
Hello Josep.
Unfortunately, there is no detailed record of the changes.
The most effective way is through the eMariete Telegram group because there I usually comment on the changes and/or additions that I make. In many cases, these changes are also the result of a conversation that has taken place in the group or the contribution of one of the participants.
Best regards.
I really appreciate the information posted here on how to build the detector. I am going to try to build it where I live, in Chile. I have been lucky enough to find a shop that has both the sensor and the board. I am waiting for them to arrive at home. I would like to know if anyone has been able to program the board using a Linux computer. I did some research and saw that there is a python script esptool.py that allows it, but for the espeasy firmware:
https://www.creasol.it/en/support/domotics-home-automation-and-diy/131-installing-espeasy-firmware-on-nodemcu-v3-board-and-configuring-it-to-be-used-with-domoticz
Greetings!
José
Hi Jose, I use linux "Ubuntu 20.04.2 LTS" and I flashed espeasy following the instructions of this site I quote below with esptool, taking into account that this version of ubuntu uses python3.
http://www.whatimade.today/flashing-the-nodemcu-firmware-on-the-esp8266-linux-guide/
mkdir esptool
cd esptool/
git clone https://github.com/themadinventor/esptool.git
sudo python3 esptool.py -port /dev/ttyUSB0 write_flash 0x00000 ./ESP_Easy_mega_20201227_normal_ESP8266_4M1M.bin
Before use, check that the port is the same as the one the nodemcu is plugged into.
greetings
Hello Carlos.
Thank you very much for your contribution. I'm sure there are Linux (and MacOS) users who could use these quick instructions to flash the ESP8266 with Phyton.
Best regards.
The information posted here is very useful and has allowed me to build the detector for my high school work (a NodeMCU and a SenseAir S8 LP), but however I am having problems with the output values of the sensor, it gives me too high values, from 2000 upwards in the open air and despite having calibrated it manually with bCal.
What could it be that makes it give these values?
Hi Jan.
I don't know what the "bCal" you refer to is, but the problem is probably due to incorrect calibration.
These sensors are very well calibrated from the factory and it is best to use the automatic calibration (ABC) of the sensor itself. If you do a manual calibration, you have to make sure that you do it very well, following all the correct steps.
I recommend that you calibrate again in the open air, with care.
Best regards.
First of all thank you for this great work!
I have a question about accessing data away from home.
I set up my mobile hotspot as a second wifi, and the connection is working as I can see on my mobile that it appears as a connected device on my mobile hotspot.
The problem is that now I don't know how to access the meter data. I set the same local IP as when I was at home (with my "fixed" wifi network) and it doesn't work. Does the IP change when connecting to a different wifi network?
Thank you
Hello Jorge.
Indeed the IP can change every time you connect to a different wifi network, depending on the particular configuration of that network.
The easiest thing to do, in a meter for this use, is to have an OLED display so that you can see the IP on the display itself.
If you cannot use applications such as Fing.
I think, depending on the version of Android, some versions tell you directly the IP of the connected devices.
As a last resort, if you use Android, you can use an app such as Hotspot Manager https://play.google.com/store/apps/details?id=com.codedstar.hotspotmanager
Hello. I am happy that I discovered and realized your project. Works perfect, but I need help for another step for full automation. I want to control a relay module with wi-fi ESP-01S to turn on a fan at 1500 ppm to inject air. How should such a system be set up?
Hi Mario (nice name, btw).
Thats quite easy. You just have to connect a relay module to one of the GPIO pins and then you can control it from rules with:
http:///control?cmd=GPIO,,0/control?cmd=GPIO,,1
http://
However, the relay is WiFi. It will be at the other end of the room. There is no way with cables.
Hi Mario.
There are many ways to do it.
May be one of the easiest is to use two ESPEasy nodes. One for the CO2 meter and another for the relay.
ESPEasy has a P2P (peer to peer) protocol, easy to use, that permits two or more nodes to communicate and exchange information and actions.
You can find more information about this here: https://espeasy.readthedocs.io/en/latest/Controller/C013.html#c013-page
Good, I'm very new to this subject. I would like to make a meter for the office (I'm a covid tracker and they haven't even given us a meter...) and after watching the videos and ordering the components I have a big doubt. What kind of cables do I have to use? The Sense8 came without cables and the truth is that I have no idea what I have to buy.
Thank you.
Hello Hector.
You can use any thin cable you have lying around. I recommend different colours to reduce the possibility of errors.
Many people use Dupont cables like these: https://s.click.aliexpress.com/e/_9fCy3W
Best regards.
Dupont cables, got it. So I understand that with these male-male dupont cables I would only have to solder to the NodeMCU board because I connect the pins to the Senseair8, right?
Thank you very much for the help and sorry for the newbie questions.
Hello Hector.
Indeed, with Dupont cables you can make any combination. They are very practical.
Congratulations on your work. For those of us who are struggling with MHZ19b sensors it is great to have so much information about this sensor.
Best regards.
Thank you very much for your words, Jorge.
I am glad you find it useful.
Best regards.
Hello,
Thanks a lot for providing all those tutorials to newbies like me 🙂
I just ordered a Senseair S8-0053 and a NodeMCU CP2101 + OLED kit from AliExpress.
The FAQ says that using an MH-Z19B sensor, "the meter consumes about 2400mA in 24 hours".
How much would a Senseair S8 + NodeMCU use?
For occasional use eg. leaving it on for a couple of hours at the movies or in a restaurant, would a 1,000mAh USB powerbank do? I'd like to avoid getting a uselessly big and heavy battery.
Thank you.
Hi Gilles.
In the following chart you can see the voltage discharge curve of a CO2 Easy with NodeMCU + Senseair S8 + OLED Display working on battery:
As you can see it was working for approx. 16 hours on a 2700 mAh battery.
With a 1000mAh USB powerbank you should get at least 4 or 5 hours, so plenty of time to go to cinema or to a restaurant (or maybe both 😀).
Just take care as most powerbank doesn't meet the battery capacity the seller says (and state the battery capacity inside at 3.7V and not the powerbank's capacity at 5V, accounting for the voltage conversion and losses).
Best regards.
Good morning,
I am writing to inform you that after a donation to CEIP Lepanto in Madrid of 11 homemade meters, assembled and assembled according to your guidelines, I have received the following information https://emariete.com/medidor-casero-co2/ The school has returned them to us and does not want to use them any more.
It was made personally by a parent and myself after funding from the AMPA. It has finally been allowed to donate these to another group or people who want to use them, preferably in schools.
I would like to ask you if you accept or know of any group to donate them to.
Yours sincerely,
Ignacio
Hello Ignacio.
I am sorry that the school has rejected the meters. There are many CO2 meters like the one described here in operation in schools, but indeed some schools have refused to use them for reasons that are incomprehensible to me (I could understand replacing them with other meters, but simply refusing them and being left without any kind of meter at all is beyond me).
I recommend that you comment on the Telegram group (https://t.me/emariete_chat) where I am sure there are people interested. If there are none, I will be happy to help you organise their donation to other schools through this blog.
Hello. I want the CO2 meter via P2P to turn on and off the Wi-Fi relay at CO2> or <from 1000. I read a lot and struggled, but I could not set it. Can I send you pictures of my settings to tell me where I'm wrong. Thanks in advance.
Good afternoon,
I have followed all the steps and I have to say that I am surprised as my sensors work perfectly and collect the data.
For that part, thank you very much, but I have a question about Esp-easy.
Everything is fine while I have the Mi Wemos connected to the laptop via USB but once disconnected I can't reconnect to the Access Point to change settings or connect it again and I don't know how to do it without having to re-run the firmware installation.
I don't know if I have explained myself well, if something is not clear to you, don't hesitate to let me know.
Best regards and thanks in advance.
Hello,
The Reply button doesn't seem to work to reply to a reply, so here's a new question.
I successfully built a NodeMCU + OLED + Senseair 🙂
To save even more power when using that combo off a power bank, would it be possible to provide a new firwmare that doesn't use wifi at all, or maybe use the Flash button to enable/disable wifi once the unit has been configured?
Thank you.
How to use the CM1106 sensor? - The article indicates this possibility, but it is not in the device selection menu.
Hello.
CM1106 support is not included in the normal version of ESP Easy. It is a special version that we created here some time ago and was relegated to the eMariete Telegram group. If you need it, drop by the group and do a search for "CM1106", it won't be hard to find it.
Best regards.
Thank you very much!