CO2 meter with ESP8266 (NodeMCU) and Senseair S8 sensor

Last modified January 27, 2021

Let's see how to mount the CO2 meter 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 «A homemade CO2 meter with Wifi against the coronavirus«, You should see it now since this montage is based on him. Almost everything is the same and here we will only deal with differences.

Why use the Senseair S8 sensor?

I think the correct question would be, why mount a CO2 meter with another sensor?

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

  • The Senseair S8 sensor is a sensor for Best Quality, of a swedish company
  • Provides more accurate measurements
  • Has longer duration
  • For the moment no fakes
  • Gives less problems with food

Similar in assembly

The construction of the meter 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 all the assembly part, you can follow the tutorial «A homemade CO2 meter with Wifi against the coronavirus«. The connections are exactly the same.

NodeMCU connection diagram to Senseair S8


The differences in the meter mounting are focused on the firmware, as the communication with this sensor is different, but basically the same as with the MH-Z19B or MH-Z19C sensors.

Configure ESPEasy for the Senseair S8

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

Next, the ESPEasy web page will appear in which 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 came 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 about two weeks.

9 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 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.

    • 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:

      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.

      • 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 (,

  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.

      • 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.

  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 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:
    (or try pressing reset on the unit)
    Start flashing on COM3 (approx 105 seconds).
    The log you reference says:

    ######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.

    • 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: I'm sure that we all find a solution.

      A greeting.


Leave a Comment