CO2 monitor with ESP8266 (NodeMCU) and Senseair S8 sensor

Last modified July 28, 2021

Let's see how to make the CO2 monitor with a sensor Senseair S8 LP.

This is going to be a very short article, only with the important differences from mounting with the MH-Z19B or MH-Z19C sensor. We will go "Straight to the point«.

If you haven't seen the article «DIY: Homemade CO2 monitor with Wifi against coronavirus«, You should see it now since this build is based on it. Most of the build is the same and here we will only deal with the differences.

Why should you use the Senseair S8 sensor?

I think the correct question would be, why should you build a CO2 monitor with another sensor?

There are several important reasons we can think of to use this sensor, instead of the MH-Z19B or MH-Z19C.

  • The Senseair S8 NDIR Sensor is a Best Quality, from a swedish company
  • Provides more accurate measurements
  • Has longer lifespan
  • At the moment no fakes
  • Gives less problems with power supplies

Similar in assembly

The making of the monitor with this sensor is practically identical. The sensor is very similar, it has almost the same physical form and the connections are the same.

For the assembly part, you can follow the tutorial «DIY: Homemade CO2 monitor with Wifi against coronavirus«. The connections are exactly the same.

Maybe you are also interested in:  Experiments with ESP Easy (ESP8266) and low consumption - v3.0
NodeMCU connection diagram to Senseair S8

As in other cases, I recommend that if your NodeMCU board has a VU pin (not all have it), connect the positive of the Senseair S8 LP (VCC) to that pin, instead of Vin.

Differences

The differences in the building of the meter are focused on the firmware, since the communication with this sensor is different, although the configuration, in general, is basically the same as with the MH-Z19B or MH-Z19C sensors.

Configure ESP Easy for the Senseair S8

The biggest difference is that we have to choose the correct device in the "Devices" menu.

Next, the ESP Easy web page will appear where we will do the sensor configuration.

We simply have to enter the information as shown below:

Where to buy the Senseair S8 sensor?

Here is the link where I bought it: Senseair S8 LP. It was delivered to me very fast (one week):

Costs about 24 Euros here: Senseair S8 LP

It is a store with many positive feedback and shipping is by AliExpress Standard Shipping, so you should have it at home in less than two weeks.

Be careful because there are other versions of the Senseair S8 sensor that are not valid for the purpose we want it (there are variations, for example, for the automotive sector).

If you don't want to wait that long, you have the option of buying these components on Amazon, with fast shipping. It is more expensive, but if you want it quickly, you will have it at home in 24 hours, in many cases.

Infrared CO2 Sensor Carbon Dioxide 400-2000PPM Serial Communication / PWM Output SenseAir S8-0053
  • Small size, low power consumption. Very responsive, it provides a good user experience.
  • Material: Aluminum Alloy; Approximate weight. 6g; Power supply: 4.5-5.25VDC; Measurement range: 400-2000ppm
  • CO2 module is widely used in high concentration environment, such as carbon dioxide incubators and carbon dioxide analyzers
  • High precision, durability and long service life. Incubator expansion type, very practical.
  • Professional manufacture, stable performance and high reliability.

Senseair S8 LP CO2 Sensor Calibration

The Senseair S8 LP has a very good Automatic Baseline Correction (ABC) system so, under normal conditions, you won't have to do manual calibration and the user can ignore it.

Maybe you are also interested in:  Are home CO₂ meters as reliable, accurate and precise as commercial ones?

The ABC algorithm permanently monitors the minimum CO2 reading for a preset period and slowly corrects any drift in the long term compared to the 400 ppm (or 0.004%vol) CO2 concentration expected in fresh air.

The maximum adjustment allowed by the ABC algorithm of the Senseair S8 is 30-50 ppm for each ABC period.

The factory set ABC period is 8 days.

To avoid problems and misadjust a sensor that is correctly calibrated at the factory, ESP Easy does not allow initial software calibration of the sensor.

If you still want to manually calibrate the sensor you must do the following:

You have to connect the bCAL_in pin to GND for a minimum of 4 seconds and a maximum of 8 seconds and you will start a manual calibration.

Before starting the manual calibration, the sensor should be at around 400 ppm for a few minutes (I suggest a minimum of 15 minutes) for the sensor to stabilize. This is: you will have to leave the sensor working outside, in fresh air, for at least 15 minutes before starting calibration.

The procedure is very easy:

  • Leave the sensor working outdoors for, at least, 15 minutes
  • Connect the bCAL_in pin to GND during more than 4 seconds and less than 8 seconds
  • Keep the sensor outside for about 5 minutes to complete its calibration and stabilize.
  • It is done. The sensor will assume the current concentration as 400 ppm

It is important that don't leave the bCAL_in pin attached to GND for more than 8 seconds, as if the 13 seconds are exceeded the sensor starts a different calibration mode, which is not the one you are interested in (it is a calibration mode with a concentration of 0 ppm of CO2, for which you would have to immerse the sensor in nitrogen, for example).

Maybe you are also interested in:  The Sensirion SCD41 CO2 sensor (and the SCD40)

In my experience, if the sensor receives air from outside from time to time, manual calibration is completely unnecessary. To this day (April 2021) I have been using my Senseair S8 reference sensor for more than four months and have not needed to calibrate it just once.

However, if the sensor is placed in a place rarely ventilated with outside airI recommend that you manually calibrate it in fresh air from time to time.

11 thoughts on “Medidor de CO2 con ESP8266 (NodeMCU) y sensor Senseair S8”

  1. Hello again.
    Yesterday I got the Sensair s8, today the screen and tomorrow I wait for the ESP to arrive, so I will start the assembly work at the weekend. Of course, I just got a bit of a scare when reading in the specifications of the S8 https://rmtplusstoragesenseair.blob.core.windows.net/docs/publicerat/PSP126.pdf that warns that NEVER TOUCH THE SENSOR WITH NAKED HANDS ( ESD gloves should be used, I think a latex one works) and I was already handling it yesterday to take a look at it…. As it seems to me that you do not indicate anything about it in this and other tutorials, do you know if it really could have been annoyed by the fact of having played it for a few minutes? With my audacity and your permission ... as soon as I get to work, if I have a problem that I cannot solve, I will stop by to consult.
    Regards.

    Reply
    • Hello Llorinte.

      The datasheet from which you put the link does not correspond to this sensor but to another model and is linked to a website that is not the official one. With your permission I have edited your message to put the correct one and that it does not confuse any user.

      The correct one, official from the manufacturer, is the one linked in this blog (which is this: https://rmtplusstoragesenseair.blob.core.windows.net/docs/publicerat/PSP126.pdf).

      That said: These types of components tend, in general, to be sensitive to electrostatic discharge so they must be handled with some care. Another thing is that they are easily damaged by that, and it is not that easy. I do not know a single case of the users of this blog who have mounted the meter (and believe me there are many) that the sensor has been damaged by having touched it with their hands.

      The possibility, being strict, is there, but it is quite small. I myself have here for years several sensors of this type from different manufacturers and not only do I touch them with my hands, but I have them piled up on the table with things on top ...

      However, I will put a notice in the tutorial just in case.

      Reply
      • Perfect. Thanks for the correction, I had taken it from a Russian YouTube without noticing that the link was from a different model than the one you put, and I was only left with that warning that I had also seen in another series of videos about calibration of the S8 that manipulated with gloves and if it is the same as the one in your tutorial (https://www.youtube.com/watch?v=n059hQpybsE),
        Regards.

        Reply
  2. Hello Mariete. Thanks for this tutorial. I already have the sensor and the plate arrives today. I have a question, how to hold the sensor correctly? I have bought the plastic box that you recommend, with the plate I suppose there will be no problems screwing it but I don't know how to place the sensor to fix it well. Thank you!
    A greeting.

    Reply
      • I think it's a good idea. Just a while ago the rest of the pieces just arrived. The box looks very good, you will have to DIY with it too.
        Thank you! A greeting.

        Reply
  3. Hi.
    Nothing ... this is making me a little desperate ... after the war that gave me soldering the cables to the Senseair, the firmware installation was impossible. It gives me an error that I do not see that you have it reported by anyone in the main tutorial. It is with the second Nodemcu Lolin V3 that I try and it gives me the same error when flashing it. Yes it loads me the firmware of the particle meter of the project https://sensor.community/fr/sensors/airrohr/ that I already have working perfectly.
    It gives me the following error and a log that I don't understand anything about (I tried with the 2 ports COM3 and COM4 that I can select. On another PC it won't let me load the CH341 drivers ... I don't know for what reason, tonight I'll try another PC, Let's see….):
    Flash didn't complete due to error [3], please read log file:
    20210209194252.txt
    (or try pressing reset on the unit)
    Start flashing on COM3 (approx 105 seconds).
    _______________________________________________________________
    The log you reference says:

    ######2021-02-09######
    #######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: \ Users \ meteo2 \ Downloads \ espyeasy CO2 Meter \ bin \ ESP_Easy_mega_20201130_normal_ESP8266_4M1M.bin"]
    [02/09/2021 19:42:53] esptool v0.4.12 - (c) 2014 Ch. Klippel
    [02/09/2021 19:42:53] setting board to nodemcu
    [02/09/2021 19:42:53] setting baudrate from 115200 to 115200
    [02/09/2021 19:42:53] setting port from to COM3
    [02/09/2021 19:42:53] setting address from 0x00000000 to 0x00000000
    [02/09/2021 19:42:53] espcomm_upload_file
    [02/09/2021 19:42:53] espcomm_upload_mem
    [02/09/2021 19:42:53] error: Failed to open COM3
    [02/09/2021 19:42:53] error: espcomm_open failed
    [02/09/2021 19:42:53] error: espcomm_upload_mem failed
    [2021-02-09 19:42:53] STOPPED due to 3 errors! (try reset on the unit, then start a new flash attempt)

    (I reset a few times with the button on the left of the nodemcu ... but nothing, it gives me an error and a new log)
    Sorry for the length of the message ... once you read it you can delete everything you see unnecessary.
    Thanks and regards.

    Reply
    • Hello Llorinte.

      Wow, sorry you are in trouble and sorry for your frustration. 😞

      What the log tells you is just that it can't open the COM3 port.

      Check these points:

      1. Don't you have some other program that is using COM3?
      2. Make sure the NodeMCU is actually connected to COM3
      3. Try to run the recording program as administrator (right click on the icon and "Run as administrator")
      4. Another option is to load the firmware file with the same recording program that you are using with the other project and it doesn't give you any problems.
      5. Uninstall the drivers and install them again.
      6. Make sure you don't have the CO2 sensor (and better yet, no other sensors) connected when you go to flash.

      Anyway, I suggest you go through the Telegram group: https://t.me/emariete_chat I'm sure that we all find a solution.

      A greeting.

      Reply
  4. I really liked this project!
    Can you also get the sensor readings with a voltmeter? If yes can you explain how and how to convert them to ppm?

    Reply

Leave a Comment