Back to

Trying to improve CCS811 CO2 reads


I tried to improve the readings of the CCS811 sensor, namely CO2, by some conditions I read from the datasheet:

  1. Do not set baseline before 20min since start
  2. Save baseline regularly every week
  3. Update the arduino driver from Sparkfun
  4. Update the ccs811 FW APP version

I’m not happy with the CO2 reads yet, but I’m trying.

The fw changes I have are in these branches:

ccs811_update: new arduino driver (irrelevant I think), more control on ccs811 in serial line, baseline respecting times. It shows the fwapp version and more in “control eCO status”.
ccs811_flash: add control command to flash fwapp 2.0.1 to ccs811. Due to a problem in my tests I flashed this without knowing what did I get from factory. Maybe it was 2.0.1 already.
esp_reads: adds /read URL in setup mode to read the sensors in json.

I’m very new to this world of platformio devices but I’m trying to make small things work and learn in the process.
I might update the /read to work in other modes.

I don’t know if anyone else has tried these things and how far they got. So far I have seen that everyone complains about the CO2 measurements and I have not seen anyone succeed (as for google results). But the datasheet describes as it should work.
I will try more but I might eventually give up.

I don’t know if any of what I’ve done can be integrated. If so, I’d be glad to submit PRs.

UPDATE after 24h: I polished the changes and run many tests. eCO2 readings look too bad still (way too high for a regularly ventilated room). I compare to a sensing device I have and one says 1000ppm while this CCS811 says 1700ppm. The sensor seems to me completely unreliable for CO2. As for the TVOC, I didn’t try to make any sense of it.

1 Like

I’ve lost hope one this value also.
In general way, it is hard to get reliable CO2 measurement with small and “cheap” sensors.
I presume the problem is mainly from the fact it misses a true calibration phase in a controlled environment…

Thank you for your work and returns !

Right, I lost all hope. It is a sensor that is sensible to CO2 but to many other air elements as well.

Nothing I did (being a lot more compliant to the spec) improved the readings in any meaningful way.

The sensor applied on the smart citizen kit is not specific to any one gas. It measures 'e’CO2 ( stress equivalent) as well as VOC gases, so its not a direct reading of actual CO2 concentration.
What its telling you is that there is some gas out there hitting the sensor equivalent to x value of CO2. What the heck does that mean really ?
Who knows how the eCO2 reading is calculated and what other real world gases are exciting the sensor. If you actually want useful CO2 readings then you’ll need to look at using a specific sensor for it. Have a look at the Smart Citizen Station kit (not yet released) to see its approach. There is a reason they say it will cost more than the basic kit.

I agree. I’m sorry that I learnt all that only after buying the device. I learnt how there are sensors in the board that are pretty useless, but not advertised as that. Even massive data collection happens from those.

Hey all,

I have had a look at your code and probably a way to go would be to have a look at raw values from the resistance in the CCS811 and check how they correlate with T/H. More info here:

Either way, let’s keep things simple and accept that some of the metal oxide sensors might not be there yet, and probably they won’t fulfill expectations in such a small package or cost. However, I believe that it’s important to understand how these sensors work and keep trying to improve them up to a point or move on. We are not trying to market them as the solution, but more as a solution that can be tested, contrasted and improved, and we are happy to see how you guys are so involved in being skeptical about the readings. On our side we try to do our best and direct our efforts towards making this better altogether. Myself (and I believe the rest of our small team) can help in the implementation, test or analysis of some other sensor proposals. That’s one of the reasons why the hardware and software stacks are fully open and there is an auxiliary connector in it. In fact, in the docs we say that the urban board:

The Smart Citizen Kit is designed with a modular approach in mind. This means that the Urban Board is only a selection of low cost sensors for air quality, but the hardware itself can be expanded for other use cases such as a more advanced air quality monitoring setup, soil monitoring, or water quality.

Hope you have a nice weekend!

NB: more on the microphone on Monday!