{"id":236999,"date":"2020-12-27T14:15:11","date_gmt":"2020-12-27T13:15:11","guid":{"rendered":"https:\/\/emariete.com\/?p=236999"},"modified":"2023-11-25T10:22:22","modified_gmt":"2023-11-25T09:22:22","slug":"sensor-co2-mh-z19b","status":"publish","type":"post","link":"https:\/\/emariete.com\/en\/sensor-co2-mh-z19b\/","title":{"rendered":"The CO2 sensor bible MH-Z19B"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The MH-Z19B NDIR CO2 sensor is fantastic. A <strong>cheap, accurate NDIR CO2 sensor <\/strong>(for the price it has) and very easy to use. Undoubtedly, one of the most used sensors with Arduino, ESP8266, EPS32 and similar.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Discover <strong>all the secrets of the CO2 sensor MH-Z19B<\/strong> in one place.  A <strong>cheap, accurate CO2 sensor <\/strong>(for the price) and very easy to use.  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also CO2 sensor MH-Z19<strong>C<\/strong> (although a bit special) is a good sensor, as long as you know what you need to know about it and what makes it special.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It even has a low-energy version, the<a href=\"https:\/\/emariete.com\/en\/sensor-co2-low-consumption-mh-z1311a-winsen\/\"> NDIR CO2 sensor Winsen MH-Z1311A<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article you will find everything you want to know about these sensors (and if you can't find it, ask in the comments). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Maybe calling it a bible, at the moment, is a bit pretentious, but I give you my word that it will become one. Give it time...<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This article is alive <\/strong>and it never stops growing. <strong>Subscribe to the Newsletter <\/strong>and don't miss anything.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-datos-generales-del-sensor-de-co2-mh-z19b-y-mh-z19c-y-mh-z19d\">General data CO2 sensor MH-Z19B and MH-Z19C and MH-Z19D<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">CO\u2082 sensor MH-Z19B<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The carbon dioxide gas sensor MH-Z19B is an intelligent, small, general-purpose sensor, which uses the principle of <strong>non-dispersive infrared (NDIR)<\/strong> to detect the presence of CO\u2082 in the air. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It has good selectivity, long lifetime and other features, such as integrated temperature compensation. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It has simultaneous serial, analogue and PWM output and is easy to use. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a high performance sensor that combines reliable infrared absorption gas detection technology with good design and an attractive price.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">MH-Z19B sensor parameters<\/h4>\n\n\n\n<table id=\"tablepress-1\" class=\"tablepress tablepress-id-1\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Model<\/th><th class=\"column-2\">MH-Z19B<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Gas detected<\/td><td class=\"column-2\">Carbon dioxide<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">Operating voltage<\/td><td class=\"column-2\">4.5 ~ 5.5 V DC<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">Medium current<\/td><td class=\"column-2\">&lt; 60m A (@ 5V supply)<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">Maximum current<\/td><td class=\"column-2\">150 mA (supply @ 5V)<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">Interface level<\/td><td class=\"column-2\">3.3 V (5V compatible)<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">Measuring range<\/td><td class=\"column-2\">0\uff5e2000 ppm<br \/>\n0\uff5e5000 ppm<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">Output signal<\/td><td class=\"column-2\">Serial (UART) - TTL level 3.3 V - Analogue output PWM<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">Preheating time<\/td><td class=\"column-2\">3 minutes<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">Response time<\/td><td class=\"column-2\">T90&lt;120s<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-1\">Operating temperature<\/td><td class=\"column-2\">0 ~ 50 \u00b0C<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-1\">Operating humidity<\/td><td class=\"column-2\">0 to 90% RH (non-condensing)<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-1\">Dimensions<\/td><td class=\"column-2\">33 mm\u00d720 mm\u00d79 mm (Length*Width*Height)<\/td>\n<\/tr>\n<tr class=\"row-14\">\n\t<td class=\"column-1\">Weight<\/td><td class=\"column-2\">5 grams<\/td>\n<\/tr>\n<tr class=\"row-15\">\n\t<td class=\"column-1\">Life<\/td><td class=\"column-2\">&gt; 5 years<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-1 from cache -->\n\n\n\n<h4 class=\"wp-block-heading\">Features of the MH-Z19B<\/h4>\n\n\n\n<table id=\"tablepress-2\" class=\"tablepress tablepress-id-2\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Gold-plated gas chamber<\/th><th class=\"column-2\"> water and corrosion resistant<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">High sensitivity<\/td><td class=\"column-2\"> low energy consumption<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">Excellent stability<\/td><td class=\"column-2\"><\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">Temperature compensation<\/td><td class=\"column-2\"> excellent linear output<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">Long life<\/td><td class=\"column-2\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-2 from cache -->\n\n\n\n<h4 class=\"wp-block-heading\">MH-Z19B sensor applications<\/h4>\n\n\n\n<table id=\"tablepress-3\" class=\"tablepress tablepress-id-3\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">HVAC<\/th><th class=\"column-2\">from<\/th><th class=\"column-3\">equipment<\/th><th class=\"column-4\">from<\/th><th class=\"column-5\">cooling<\/th><td class=\"column-6\"><\/td><td class=\"column-7\"><\/td><td class=\"column-8\"><\/td>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Equipment<\/td><td class=\"column-2\">from<\/td><td class=\"column-3\">surveillance<\/td><td class=\"column-4\">y<\/td><td class=\"column-5\">from<\/td><td class=\"column-6\">quality<\/td><td class=\"column-7\">from<\/td><td class=\"column-8\">air<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">Systems<\/td><td class=\"column-2\">from<\/td><td class=\"column-3\">air<\/td><td class=\"column-4\">fresh<\/td><td class=\"column-5\"><\/td><td class=\"column-6\"><\/td><td class=\"column-7\"><\/td><td class=\"column-8\"><\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">Equipment<\/td><td class=\"column-2\">from<\/td><td class=\"column-3\">purification<\/td><td class=\"column-4\">from<\/td><td class=\"column-5\">air<\/td><td class=\"column-6\"><\/td><td class=\"column-7\"><\/td><td class=\"column-8\"><\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">Home<\/td><td class=\"column-2\">Smart<\/td><td class=\"column-3\"><\/td><td class=\"column-4\"><\/td><td class=\"column-5\"><\/td><td class=\"column-6\"><\/td><td class=\"column-7\"><\/td><td class=\"column-8\"><\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">Schools<\/td><td class=\"column-2\">y<\/td><td class=\"column-3\">centres<\/td><td class=\"column-4\">educational<\/td><td class=\"column-5\"><\/td><td class=\"column-6\"><\/td><td class=\"column-7\"><\/td><td class=\"column-8\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-3 from cache -->\n\n\n\n<h3 class=\"wp-block-heading\">The CO2 sensor MH-Z19C<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The MH-Z19 sensor<strong>C<\/strong> is very similar to the MH-Z19<strong>B<\/strong> although it has a few things that make it a bit special...<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Its accuracy, on paper, is a little worse than that of the MH-Z19B (50 ppm + 5% of measurement the MH-Z19B vs 50 ppm + 5% the MH-Z19C.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In practice, and according to my experiments and observations, MH-Z19C is a rather more volatile sensor. Not that it is worse than MH-Z19B, but I like it less.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"484\" height=\"379\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/01\/MH-Z19C.png\" alt=\"\" class=\"wp-image-237251\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/01\/MH-Z19C.png 484w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/01\/MH-Z19C-300x235.png 300w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><figcaption class=\"wp-element-caption\">Winsen MH-Z19C<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">The CO2 sensor MH-Z19D<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The MH-Z19 sensor<strong>D<\/strong> is virtually the same as the MH-Z19<strong>C<\/strong>. It is very new (June 2021) so there is not much information about it yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This sensor is so new on the market that it does not even appear on the manufacturer's website in English, you have to look for it in the Chinese version to find some information (not too much).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/07\/MH-Z19D-e1625776969405-1024x577.jpg\" alt=\"\" class=\"wp-image-238745\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/07\/MH-Z19D-e1625776969405-1024x577.jpg 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/07\/MH-Z19D-e1625776969405-300x169.jpg 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/07\/MH-Z19D-e1625776969405-768x432.jpg 768w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/07\/MH-Z19D-e1625776969405.jpg 1515w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Winsen MH-Z19D<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I haven't found the official datasheet in English yet, here you can find the official one. <a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/MH-Z19D (Datasheet del MH-Z19D en ingl\u00e9s del 11-10-2021).pdf\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Datasheet of the MH-Z19D dated 11-10-2021<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CO2 sensor MH-Z1311A<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<p class=\"wp-block-paragraph\">Although I am not including it here, because it is not strictly speaking an MH-Z19x, I could not fail to mention the <strong>energy-saving sensor MH-Z1311A<\/strong> of Winsen.  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First cousin <strong>99% compatible <\/strong>with the MH-Z19 with a <strong>99% energy saving<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A very new sensor to consider. We will have to wait for the tests.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/12\/MH-Z1311A.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/12\/MH-Z1311A.png\" alt=\"\" class=\"wp-image-239935\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/12\/MH-Z1311A.png 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/12\/MH-Z1311A-300x169.png 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/12\/MH-Z1311A-768x432.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Winsen CO2 Sensor MH-Z1311A<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to get to know him better, <strong>visit the following blog post<\/strong>:<\/p>\n\n\n<div class=\"gb-container gb-container-d55b3ec4\">\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-emariete wp-block-embed-emariete\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"nu07uM3ERB\"><a href=\"https:\/\/emariete.com\/en\/sensor-co2-low-consumption-mh-z1311a-winsen\/\">Winsen Low Power NDIR CO2 Sensor MH-Z1311A<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&quot;Winsen NDIR MH-Z1311A Low Power CO2 Sensor&quot; - eMariete\" src=\"https:\/\/emariete.com\/sensor-co2-bajo-consumo-mh-z1311a-winsen\/embed\/#?secret=ctO5nLHDDR#?secret=nu07uM3ERB\" data-secret=\"nu07uM3ERB\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-que-versiones-del-sensor-mh-z19-existen\">Which versions of the MH-Z19 sensor are available?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is difficult to know exactly, as Chinese manufacturers are quite used to making changes to their products without communicating them, and there is sometimes a parallel market for units rebranded with other names or references.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To be sure, the following versions are available:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The original 400~2000 ppm range model MH-Z19, with an accuracy of 50 ppm + 5% accuracy of measurement.<\/li>\n\n\n\n<li>The original 400~5000 ppm range model MH-Z19, with an accuracy of 50 ppm + 5% accuracy of measurement.<\/li>\n\n\n\n<li>Model MH-Z19B 400~2000 ppm range, which is a more modern and improved version. This version has an accuracy of 50 ppm + 3% of measurement.<\/li>\n\n\n\n<li>Model MH-Z19B 400~5000 ppm range, which is a more modern and improved version. This version has an accuracy of 50 ppm + 3% of measurement.<\/li>\n\n\n\n<li>Model MH-Z19B 400~10000 ppm range, which is a more modern and improved version. This version has an accuracy of 50 ppm + 3% of measurement.<\/li>\n\n\n\n<li>Model MH-Z19C 400~2000 ppm range. This version has an accuracy of 50 ppm + 5% of measurement.<\/li>\n\n\n\n<li>Model MH-Z19C 400~5000 ppm range. This version has an accuracy of 50 ppm + 5% of measurement.<\/li>\n\n\n\n<li>Model MH-Z19C 400~10000 ppm range. This version has an accuracy of 50 ppm + 5% of measurement.<\/li>\n\n\n\n<li>Model MH-Z19D 400~2000 ppm range. This version has an accuracy of 50 ppm + 5% of measurement.<\/li>\n\n\n\n<li>Model MH-Z19D 400~5000 ppm range. This version has an accuracy of 50 ppm + 5% of measurement.<\/li>\n\n\n\n<li>Model MH-Z19D 400~10000 ppm range. This version has an accuracy of 50 ppm + 5% of measurement.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">IMPORTANT: The MH-Z19B sensors <strong>with black printed circuit board<\/strong>all indications are that&nbsp;<strong>these versions are false<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to know more about the <strong>dummy sensors<\/strong>You can find all the information here: <a href=\"https:\/\/emariete.com\/en\/sensors-co2-mh-z19b-false\/\">CO2 Sensors MH-Z19B FALSE<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-calibracion-del-punto-cero-zero-point-calibration\">Zero Point Calibration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The sensors MH-Z19B and MH-Z19C <strong>are factory calibrated<\/strong> and, under normal conditions, manual calibration should not be necessary,<strong> I recommend that you calibrate it<\/strong> when you receive it and <strong>periodically<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Changes in environmental conditions, such as temperature and humidity, atmospheric pressure, storage conditions, transport conditions and the ageing of the sensor itself, cause the sensor to age over time, <strong>their measurements vary<\/strong> (as with all sensors of this type).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This zero point calibration, refers to the method by which the sensor <em>\"learn\".<\/em> to which CO2 concentration corresponds to a concentration of 400 ppm, or zero point.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This sensor has two methods for performing zero point calibration: manual calibration and self-calibration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-calibracion-manual-del-punto-cero-de-los-sensores-mh-z19-mh-z19b-y-mh-z19c\">Manual zero point calibration of the sensors MH-Z19, MH-Z19B and MH-Z19C<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>VERY IMPORTANT:<\/strong> It is essential that, during the manual calibration process, the sensor is previously operating during, <strong>at least 20 minutes<\/strong>in a stable CO2 environment with a CO2 concentration of fresh air, 400ppm (outdoors or by a window, for example).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-calibracion-por-hardware\">Hardware calibration<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If we have physical access to the sensor connections, we can easily start the zero point calibration procedure by jumpering terminals 5 (HD) and 7 (GND) for 7 seconds.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-calibracion-por-software\">Software calibration<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The sensor has a command, which will command the sensor to perform the zero point calibration at that moment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We just have to send the command 0xFF,0x01,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-calibracion-mediante-esp-easy\">Calibration via ESP Easy<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If we are using ESP Easy, among the available commands, we have the command mhzcalibratezero.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can send the command, for example, by loading the page http:\/\/x.x.x.x\/tools?cmd=mhzcalibratezero (we will replace the x.x.x.x.x with the IP address of ESP Easy).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: The command should be mhzCMDCalibrateZero, but for some reason it doesn't work (at least in the current version of ESP Easy, at the time of writing).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If ESP Easy does not recognise the command <em>mhzcalibratezero<\/em>try with <em>mhzCMDCalibrateZero <\/em>(you'll know this because ESPEasy responds with \"<em>Command unknown: mhzCMDCalibrateZero<\/em>\" o \"<em>Command unknown: mhzcalibratezero<\/em>\").<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-auto-calibracion-del-punto-cero-de-los-sensores-mh-z19-mh-z19b-y-mh-z19c\">Auto-calibration of the zero point of the MH-Z19, MH-Z19B and MH-Z19C sensors<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid the user having to perform a manual calibration periodically, the sensor incorporates in its firmware a self-calibration routine, called <strong>ABC<\/strong>which works as follows:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since the natural CO2 concentration in the atmosphere is approximately 400 ppm, when ABC is enabled, <strong>the sensor assumes that, over a 24-hour period, the minimum measurement it takes will be equivalent to 400 ppm<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This means that, in a well-ventilated room, which at some time of the day has clean air, the lowest measurement will be around 400 ppm and the sensor will assume that concentration (whatever it is) as zero point, or 400 ppm.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In other words, the sensor will assume that the lowest measurement in each 24-hour period will be 400 ppm.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is a very convenient way to keep the sensor calibrated, using clean air as a reference value and automating the process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, we can easily activate and deactivate the ABC routine, so that we can adapt the way the sensor works to our particular needs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-debo-tener-el-abc-activo-o-inactivo\">Should I have the ABC active or inactive?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It depends on where you have it running.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ABC works quite well, but for this the sensor has to be at <strong>a place that is aired at least once a day<\/strong> (up to about 400 ppm).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My advice is to activate ABC if the sensor is installed in places such as classrooms, offices, etc., which are not used during the weekend and allow time for the CO2 to drop to ambient level.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the sensor is installed <strong>in places that are not usually ventilated<\/strong> (indoor rooms which are often very busy, or greenhouses, for example) better <strong>deactivates the ABC<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a house, it depends... in my office it doesn't have time to reach 400 ppm daily because I keep it almost always closed (door and window) and I spend many hours a day in it. In the living room it is enough time because we usually ventilate it every day and, although there are more people, it is bigger and the door is usually open.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-calibracion-del-punto-alto-span-point\">Span Point Calibration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Just as we have a calibration of the lowest point that the sensor will measure (the approximately 400 ppm CO2 found in \"clean\" outdoor air), we have the possibility of <strong>calibrate the high point of the measurement<\/strong> (e.g. at 2000 ppm).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In my opinion this calibration <strong>is not affordable for amateurs<\/strong>You have to achieve a stable and calibrated atmosphere with exactly 2000 ppm CO2 and that is tremendously difficult without adequate laboratory resources.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My recommendation is that <strong>don't even think of trying to calibrate the Span Point on your own.<\/strong>. Logically, if you have access to the necessary laboratory, you probably have the necessary knowledge to do it, in which case, go ahead....<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If, despite the warnings, you decide to do so, the method is very similar to the zero point calibration.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>First do the zero point calibration, as explained above.<\/li>\n\n\n\n<li>Place the sensor in a stable environment at 2000 ppm.<\/li>\n\n\n\n<li>Allow the sensor to stabilise for a minimum of 20 minutes.<\/li>\n\n\n\n<li>Send the Span Point Calibration command to the sensor.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The command to send is 0x88 and you can find it in the datasheet I left before with its parameters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will not be able to send this command <em>directly <\/em>from ESP Easy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-son-fiables-los-sensores-de-temperatura-del-mh-z19-mh-z19b-y-mh-z19c\">Are the temperature sensors of the MH-Z19, MH-Z19B and MH-Z19C reliable?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>No, they are not at all.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please note that the temperature sensor <strong>is only for&nbsp;<em>internal use of the sensor<\/em><\/strong>The temperature compensation can be done in order to compensate the temperature. In fact, its use is <strong>undocumented <\/strong>from the manufacturer and we are using it on the basis of&nbsp;<em>reverse engineering&nbsp;<\/em>of the possible commands and responses (it's a hack).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-hay-diferentes-modelos-del-mh-z19-mh-z19b-y-mh-z19c-segun-el-rango-de-deteccion\">Are there different models of the MH-Z19, MH-Z19B and MH-Z19C depending on the detection range?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The sensor seems to <strong>is exactly the same<\/strong>regardless of the detection range. In fact, it is possible to change the detection range by software, <strong>sending a command to the sensor<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find information about the command to send in the datasheet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The accuracy of the MH-Z19, MH-Z19B and MH-Z19C sensors up to 2000 ppm is surprisingly good. Above 2000 ppm the accuracy becomes progressively worse.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-donde-puedo-encontrar-mas-informacion-sobre-los-sensores-mh-z19-mh-z19b-y-mh-z19c\">Where can I find more information about the MH-Z19, MH-Z19B and MH-Z19C sensors?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are a number of sources of information, <strong>official and unofficial<\/strong>very interesting, if you want to get more information about the sensor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-fuentes-oficiales\">Official sources<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The quintessential official source for any electronic component is its datasheet, or data sheet. This is the document in which the manufacturer includes all the information about its product.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-hojas-de-datos-del-fabricante\">Manufacturer's data sheets:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/MH-Z19 CO2 Ver1.0 (Datasheet del MH-Z19 (una versi\u00f3n anterior al MH-Z19B) en ingl\u00e9s del 03-03-2015).pdf\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Datasheet of the MH-Z19 (an earlier version of the MH-Z19<strong>B<\/strong>) in English from 03-03-2015<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" href=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/MH-Z19B (Datasheet del MH-Z19B en ingl\u00e9s del 23-09-2019).pdf\" target=\"_blank\">MH-Z19 Datasheet<strong>B<\/strong> in English from 23-09-2019<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/MH-Z19B (Datasheet del MH-Z19B en chino del 15-10-2020).pdf\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">MH-Z19 Datasheet<strong>B<\/strong> in Chinese from 15-10-2020<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener nofollow\" href=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/MH-Z19B (Datasheet del MH-Z19C en ingl\u00e9s del 04-02-2020).pdf\" target=\"_blank\">MH-Z19 Datasheet<strong>C<\/strong> in English from 04-02-2020<\/a>. This version is problematic with power supply (more info <a href=\"https:\/\/emariete.com\/en\/power-from-nodemcu-wemos-mini-d1-and-arduino\/#Alimentando_el_MH-Z19C_mediante_el_pin_Vin\">here<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/MH-Z19D (Datasheet del MH-Z19D en ingl\u00e9s del 11-10-2021).pdf\" target=\"_blank\" rel=\"noreferrer noopener\">Datasheet of the MH-Z19D dated 11-10-2021<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-fuentes-no-oficiales\">Unofficial sources<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-blogs\">Blogs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the blog of <strong>RevSpace <\/strong>you have two pages with a lot of information, technical especially, very useful and interesting about the <a href=\"https:\/\/revspace.nl\/MHZ19\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">MH-Z19<\/a> and on the <a href=\"https:\/\/revspace.nl\/MH-Z19B\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">MH-Z19B<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-foros\">Forums<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can find quite a lot of information, albeit scattered, in the <a href=\"https:\/\/www.letscontrolit.com\/forum\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">official ESP Easy forum<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-codigo-fuente\">Source code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Although it is not easy to locate, as it is very scattered, I have learned a lot by studying the source code I have been able to find to use the MH-Z19B. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GitHub is a great source of information in this regard.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conexion-de-los-sensores-mh-z19-mh-z19b-y-mh-z19c-mh-z19d\">Connection of the sensors MH-Z19, MH-Z19B and MH-Z19C MH-Z19D<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The basic connection of the MH-Z19, MH-Z19B and MH-Z19C sensors is very easy, requiring only four connections. Two for power supply and two for data transmission.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-alimentacion\">Power input<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I recommend that you look carefully at the power requirements of your specific sensor. Depending on the version, the acceptable operating voltage may vary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">According to the manufacturer's data sheets, the following operating voltages are acceptable:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MH-Z19: 3.6 to 5.5 Volts DC<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MH-Z19B: 4.5 to 5.5 Volts DC<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MH-Z19C: 4.9 to 5.1 Volts DC<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MH-Z19D: 4.9 to 5.1 Volts DC<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ten <strong>beware of the MH-Z19C<\/strong> (and MZ-Z19D). Getting a power supply of between 4.9 volts and 5.1 volts (a very narrow range) from a USB port can be <em>\"delicate\"<\/em> and if you don't have a multimeter to measure that the voltage reaching the MH-Z19C is within these margins, I recommend you to avoid it. In addition, it is important that this voltage is <strong>well stabilised<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You have more information <a href=\"https:\/\/emariete.com\/en\/power-from-nodemcu-wemos-mini-d1-and-arduino\/\">here<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-pines\">Pins<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It is important that <strong>check <\/strong>the pins of your specific sensor, as some users have reported variations. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Anyway, don't worry, you'll be able to see in the <strong>screen printing <\/strong>of the sensor which pin corresponds to which pin:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-pines-del-mh-z19\">MH-Z19 pins<\/h4>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"600\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2017\/01\/MH-Z19-3.jpg\" alt=\"\" class=\"wp-image-97 size-full\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2017\/01\/MH-Z19-3.jpg 600w, https:\/\/emariete.com\/wp-content\/uploads\/2017\/01\/MH-Z19-3-300x300.jpg 300w, https:\/\/emariete.com\/wp-content\/uploads\/2017\/01\/MH-Z19-3-150x150.jpg 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-normal-font-size wp-block-paragraph\">Pins from the old MH-Z19 (no longer on the market).<\/p>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/Pines-MH-Z19B.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">MH-Z19<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-pines-del-mh-z19b\">MH-Z19B pins<\/h4>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-PCB.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"960\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-PCB.jpg\" alt=\"\" class=\"wp-image-237624 size-full\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-PCB.jpg 960w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-PCB-300x300.jpg 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-PCB-150x150.jpg 150w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-PCB-768x768.jpg 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-normal-font-size wp-block-paragraph\">MH-Z19B pins. This sensor is still sold, but has been replaced by the MH-Z19C.<\/p>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"612\" height=\"474\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/Pines-MH-Z19B-1.png\" alt=\"\" class=\"wp-image-237016\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/Pines-MH-Z19B-1.png 612w, https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/Pines-MH-Z19B-1-300x232.png 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><figcaption class=\"wp-element-caption\">MH-Z19B<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-pines-del-mh-z19c\">MH-Z19C pins<\/h4>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pcb.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"307\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pcb.jpg\" alt=\"\" class=\"wp-image-237625 size-full\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pcb.jpg 486w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pcb-300x190.jpg 300w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/a><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-normal-font-size wp-block-paragraph\">MH-Z19C pins. Latest sensor version. Currently sold.<\/p>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"345\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pinout-1024x345.png\" alt=\"\" class=\"wp-image-237626\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pinout-1024x345.png 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pinout-300x101.png 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pinout-768x259.png 768w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19C-pinout.png 1164w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">MH-Z19C<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-version-con-conector\">Connector version<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Versions of this sensor are available with a connector instead of pins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Below, you can see the connection of the main pins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will see that I have only marked four wires, and that is because in the tests I have done with different versions of the MH-Z19 sensor (including dummy ones). <strong>only these four connections have coincided <\/strong>in all. The rest may vary.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Conexiones-Conector-MH-Z19B-1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"608\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Conexiones-Conector-MH-Z19B-1.jpg\" alt=\"\" class=\"wp-image-238310\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Conexiones-Conector-MH-Z19B-1.jpg 1080w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Conexiones-Conector-MH-Z19B-1-300x169.jpg 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Conexiones-Conector-MH-Z19B-1-1024x576.jpg 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Conexiones-Conector-MH-Z19B-1-768x432.jpg 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/><\/a><figcaption class=\"wp-element-caption\">Connections MH-Z19B Connector<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I recommend that, if you have any doubts, and <strong>before connecting, make sure you are sure how your specific sensor is wired.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you discover a sensor with different wiring, please, <strong>let me know<\/strong> to include the information<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-precauciones\">Precautions<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The sensor is <strong>a delicate measuring instrument<\/strong>. You should take the following <strong>precautions when mounting<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The sensor is sensitive to static electricity - avoid touching the pins with your fingers as much as possible.<\/li>\n\n\n\n<li>Before touching the sensor, touch something with your hand, which is grounded, to discharge static electricity (e.g. a water or heating pipe).<\/li>\n\n\n\n<li>The housing is not just a box. It is an active part of the sensor - be careful not to force it.<\/li>\n\n\n\n<li>The sensor is sensitive to high temperatures - solder it with a low-power electronic soldering iron (about 30w should be fine) and don't apply heat to the pins for too long. Let it cool down between soldering one pin and the next.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-datos-proporcionados-por-el-sensor\">Data provided by the sensor<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The sensor provides three data with each measurement:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>PPM:<\/strong> It is the CO2 concentration at that time. It is <strong>the only data <\/strong>to be used by the user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>T:<\/strong> It is the <strong>sensor internal temperature<\/strong>. This is a <strong>internal data<\/strong> which the sensor uses to adjust the CO2 measurements, as they are temperature dependent, and <strong>must not be used by the user<\/strong>. There is <strong>huge differences<\/strong> in the reported temperature from one sensor to another.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>U:<\/strong> Nobody knows what the U-value is for sure. What is known is that it is a <strong>internal parameter <\/strong>that has to do with the <strong>ABC <\/strong>(self-calibration of the zero point) and with the <strong>CO\u2082 concentrations<\/strong> that the sensor has detected <strong>in the last cycle<\/strong> of ABC, but nothing else. Some versions of the sensor provide this value always at 0.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-es-cierto-que-hay-mh-z19b-falsos\">Is it true that there are fake MH-Z19Bs?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Yes there are, unfortunately, so you have to be careful where you shop.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I have written a whole article on this because it is affecting so many people. If you are going to buy one of these sensors, or already have one, be sure to read it.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-emariete wp-block-embed-emariete\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"OHeScaCWHl\"><a href=\"https:\/\/emariete.com\/en\/sensors-co2-mh-z19b-false\/\">CO2 Sensors MH-Z19B FALSE<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&quot;MH-Z19B FALSE CO2 sensors&quot; - eMariete\" src=\"https:\/\/emariete.com\/sensores-co2-mh-z19b-falsos\/embed\/#?secret=6R7qqjuBYA#?secret=OHeScaCWHl\" data-secret=\"OHeScaCWHl\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-la-etiqueta-del-mh-z19b\">The MH-Z19B label<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The label on the paper MH-Z19B, attached to the side, shows the sensor model, the measuring range with which it was shipped from the factory (this can be changed at a later date by command) and what the sensor is capable of measuring. <strong>it looks like <\/strong>be a date (possibly manufacturing, calibration or quality control), and a QR code.<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-Falso.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-Falso-1024x576.jpg\" alt=\"\" class=\"wp-image-237565 size-full\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-Falso-1024x576.jpg 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-Falso-300x169.jpg 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-Falso-768x432.jpg 768w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-Falso-1536x864.jpg 1536w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/02\/MH-Z19B-Falso.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\">It is curious because in the fake sensors is dated <strong>does not seem to make sense<\/strong>. On the sensor of the photograph, what we assume to be the <em>\"date\"<\/em> indicates 25 December 2020 (Christmas Day) and the seller sent it to me on 25 December 2020.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-precauciones-y-cosas-a-tener-en-cuenta\">Precautions and things to keep in mind<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are some basic things to watch out for, and while most of them are obvious, it doesn't hurt to bring them all together under the same heading here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Avoid any pressure<\/strong>The plastic casing shall be welded to the plastic casing in any direction during welding, installation and use.<\/li>\n\n\n\n<li>When installed in a small space, the space <strong>must be well ventilated<\/strong>especially its broadcasting windows.<\/li>\n\n\n\n<li>The module must be <strong>away from heat sources<\/strong> and direct exposure to direct sunlight or other heat sources should be avoided.<\/li>\n\n\n\n<li>The module must be <strong>regularly calibrated<\/strong>. The manufacturer suggests that this should be done every six months. This will of course depend on the use of the device and the environment in which it is used.<\/li>\n\n\n\n<li>Do not use the sensor in an environment <strong>dusty <\/strong>for too long.<\/li>\n\n\n\n<li>Check very carefully the requirements of <strong>feeding <\/strong>of your specific model (see your specific version in the \"Connecting the MH-Z19B\" section of this article).  The source current must not be less than 150mA. Outside this range, it will cause the sensor to malfunction (it may indicate a lower than actual CO2 concentration, or the sensor may not function properly).<\/li>\n\n\n\n<li>Prior to the manual zero point calibration procedure, the sensor must be operated in a stable gas environment (400ppm) during <strong>more than 20 minutes<\/strong>. Turn the HD pin low (0V) for more than 7 seconds.<\/li>\n\n\n\n<li>Do not use <strong>wave or dip welding<\/strong> for the sensor.<\/li>\n\n\n\n<li>When soldering with a soldering iron, the temperature must be set at (350 \u00b1 5) \u00b0C, and the soldering time must be 3 seconds maximum (<strong>weld it fast<\/strong>don't dawdle).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-analisis-del-sensor-mh-z19c\">Analysis of the MH-Z19C sensor<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-variacion-con-el-voltaje-de-alimentacion\">Variation with supply voltage<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As I have been saying for some time,<strong> I do not recommend the MH-Z19C sensor at all.<\/strong>In general, and here I will document some of the conclusions I have reached through some of the tests I will describe.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This sensor has a <strong>major problem with food<\/strong>The operating voltage range is <strong>very narrow<\/strong> (from <strong>4.9V to 5.1V depending on manufacturer<\/strong>(although, as we shall see, it is even narrower).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This very narrow supply voltage is very difficult to keep stable and many of the USB power supplies we use provide values above and below this voltage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, there is another problem that, although it can be minimised with a good design, is not easy for the average hobbyist: These types of sensors have a relatively high power consumption, which causes drops in the power supply produced in the wires of the circuit (it is normal that these drops can be 0.2V~0.4V and even higher), which makes it extremely difficult to have a stabilised power supply voltage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this first test I have kept the sensor running for about 10 hours powered by a <strong>programmable laboratory power supply <\/strong>which modified the supply voltage <strong>every 60 seconds<\/strong> between 4.5V and 5.15V <strong>in 0.5V steps<\/strong>. That is: I powered the sensor at 4.5V for 60 seconds, switched to 4.55V for another sixty seconds, 4.6V for another sixty seconds and so on (at 5.15V I switched to 4.95V for 5 minutes, to stabilise it, and started the cycle again at 4.5V).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In order to be able to see the deviation in the CO2 concentration measurements provided, as the supply voltage was changing, I have <strong>compared to my reference sensor, a Senseair S8.<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the graph you can see how the CO2 measurement reported by the MH-Z19C (in green) varied with the supply voltage (in blue) and its deviation from the Senseair S8 reference sensor (in orange).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"339\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-1-1024x339.png\" alt=\"\" class=\"wp-image-238317\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-1-1024x339.png 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-1-300x99.png 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-1-768x254.png 768w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-1.png 1341w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The differences may not seem to be very important, but if we zoom in on a shorter time span:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"344\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-1024x344.png\" alt=\"\" class=\"wp-image-238316\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-1024x344.png 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-300x101.png 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-768x258.png 768w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8.png 1352w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And if we go even more into detail we can clearly see the oscillations of the MH-Z19C sensor:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"338\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-2-1024x338.png\" alt=\"\" class=\"wp-image-238318\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-2-1024x338.png 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-2-300x99.png 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-2-768x253.png 768w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/04\/Variacion-MH-Z19C-con-voltaje-vs-Senseair-S8-2.png 1341w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Notice how in the power supply period with 4.95V for 5 minutes the MH-Z19C slowly stabilises.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-calibracion-de-fabrica\">Factory calibration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You may have noticed in the graphs above the large differences in CO2 concentration reported by the two sensors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The MH-Z19C was brand new, with its factory calibration and with the ABC disabled (disabled in its first minute of operation after being switched on for the first time to maintain its factory calibration).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Senseair S8, even though it has not been calibrated for a few weeks, is my reference sensor and does not usually show (doing 5 minute moving averages) more than 80 ppm deviation from my other sensors. <em>reliable<\/em> I have running simultaneously in the same room (Winsen MH-Z19A, Cubic CM1106 and Senseair Sunrise).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see the calibration of the MH-Z19C sensor is quite far from the right point. The most surprising thing is that this sensor came with a calibration certificate from Winsen. This kind of certificate doesn't seem to be very reliable and it seems to be more a marketing element from this Chinese manufacturer than anything else.<\/p>\n\n\n\n<div class=\"wp-block-group has-pale-cyan-blue-background-color has-background\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h3 class=\"wp-block-heading\" id=\"h-imprescindible-estabilizar-la-alimentacion-del-mh-z19c\">Essential: Stabilising the power supply of the MH-Z19C<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Granted, the differences observed in the above test measures are very subtle, but we will now see that <strong>is a lot worse than it looked<\/strong>I am not surprised that some people didn't see a problem with those measurements. It is not very difficult for me to know that something is wrong because I have done many, many, many tests with CO2 sensors and I have spent many, many, many hours analysing them. So I have done another test \"in the real world\" to make it clearer what is going on:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/05\/Grafica-alimentacion-del-MH-Z19C.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"338\" src=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/05\/Grafica-alimentacion-del-MH-Z19C-1024x338.png\" alt=\"\" class=\"wp-image-238420\" srcset=\"https:\/\/emariete.com\/wp-content\/uploads\/2021\/05\/Grafica-alimentacion-del-MH-Z19C-1024x338.png 1024w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/05\/Grafica-alimentacion-del-MH-Z19C-300x99.png 300w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/05\/Grafica-alimentacion-del-MH-Z19C-768x254.png 768w, https:\/\/emariete.com\/wp-content\/uploads\/2021\/05\/Grafica-alimentacion-del-MH-Z19C.png 1344w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In this graph you can see the measurements of the MH-Z19C (in green) tested together with my reference Senseair S8 LP sensor (yellow line) and the supply voltage of the MH-Z19C (blue line). <strong>for a period of ten days<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the <strong>part one<\/strong> the sensor is powered through a <strong>USB charger<\/strong> with a capacity of 2.5A per port. <strong>In the second<\/strong>I have included in the feed a <a href=\"https:\/\/s.click.aliexpress.com\/e\/_A6VUHZ\" target=\"_blank\" rel=\"noreferrer noopener sponsored nofollow\">voltage stabiliser<\/a> (a step up down), but form that the <strong>MH-Z19C power supply is stabilised at 5.0V.<\/strong> (although you see it's above the 5.2V line, that's because I didn't go to much trouble to calibrate the voltage divider and the small power \"spikes\" are due to the ESP8266's ADC noise, which isn't very good).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>In the first part you can see how the blue line fluctuates.<\/strong> (remember, the supply voltage of the MH-Z19C) and with it the CO2 measurement, by entering <strong>noise, jumps and non-existent peaks<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I recommend that you click on the image to see it bigger and even zoom in on it. You will see that it has all sorts of problems: <strong>large non-existent peaks, slow measurements, sawtooths, etc.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>In the second part<\/strong>with the <strong>MH-Z19C power supply is stabilised at 5.0V.<\/strong>the measure of CO2 <strong>remains at all times close to the measurement of the Reference Sensor<\/strong>.<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-conclusiones-con-el-mh-z19c\">Conclusions with the MH-Z19C<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Based on my tests, it seems clear that the MH-Z19C sensor is a good sensor and <strong>can be used without problems, as long as the supply voltage is stabilised at 5.0V at all times.<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>If you power it with a USB power supply\/charger you have to put the stabiliser on. <span style=\"text-decoration: underline;\">YA<\/span>. These devices do not provide the quality of voltage stabilisation that the MH-Z19C needs,<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I leave here, in case it is useful for you, the <strong>link to the <a href=\"https:\/\/s.click.aliexpress.com\/e\/_A6VUHZ\" target=\"_blank\" rel=\"noreferrer noopener sponsored nofollow\">voltage stabiliser on AliExpress<\/a><\/strong>. It's the same place where I bought it. For what it costs, <strong>is very worthwhile<\/strong>.<\/p>\n<div class=\"essb_break_scroll\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Discover all the secrets of the MH-Z19B CO2 sensor in one place.  An inexpensive, accurate (for the price) and very easy to use CO2 sensor.<\/p>","protected":false},"author":1,"featured_media":237001,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","_lmt_disableupdate":"no","_lmt_disable":"no","footnotes":""},"categories":[12,13,16,18],"tags":[20,37,50],"class_list":["post-236999","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-co2-easy","category-co2-gadget","category-medidor-co2","category-sensores-de-co2","tag-arduino","tag-mh-z19b","tag-sensores"],"modified_by":"Mariete","uagb_featured_image_src":{"full":["https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/La-biblia-del-sensor-de-CO2-MH-Z19B.png",1080,608,false],"thumbnail":["https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/La-biblia-del-sensor-de-CO2-MH-Z19B-150x150.png",150,150,true],"medium":["https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/La-biblia-del-sensor-de-CO2-MH-Z19B-300x169.png",300,169,true],"medium_large":["https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/La-biblia-del-sensor-de-CO2-MH-Z19B-768x432.png",768,432,true],"large":["https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/La-biblia-del-sensor-de-CO2-MH-Z19B-1024x576.png",1024,576,true],"1536x1536":["https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/La-biblia-del-sensor-de-CO2-MH-Z19B.png",1080,608,false],"2048x2048":["https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/La-biblia-del-sensor-de-CO2-MH-Z19B.png",1080,608,false],"trp-custom-language-flag":["https:\/\/emariete.com\/wp-content\/uploads\/2020\/12\/La-biblia-del-sensor-de-CO2-MH-Z19B.png",18,10,false]},"uagb_author_info":{"display_name":"Mariete","author_link":"https:\/\/emariete.com\/en\/author\/admin_xlyz052h\/"},"uagb_comment_info":57,"uagb_excerpt":"Descubre todos los secretos del sensor de CO2 MH-Z19B en un solo sitio. Un sensor de CO2 barato, preciso (para el precio que tiene) y muy f\u00e1cil de usar.","_links":{"self":[{"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/posts\/236999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/comments?post=236999"}],"version-history":[{"count":10,"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/posts\/236999\/revisions"}],"predecessor-version":[{"id":241532,"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/posts\/236999\/revisions\/241532"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/media\/237001"}],"wp:attachment":[{"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/media?parent=236999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/categories?post=236999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emariete.com\/en\/wp-json\/wp\/v2\/tags?post=236999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}