Interpreting values from SparkX STC31 CO2 sensor

Hello! I purchased a SparkX STC31 CO2 sensor and have been playing with it using the provided library, but I am having trouble interpreting the sensor readings. I have a lot of experience using the SCD30 CO2 sensor but this one is baffling me. I am using the “Example1_BasicReadings” sketch in the Sparkfun library. I’m having two issues, which may be related:

  • The sensor readings are not stable at baseline. Fresh air is typically ~0.04%, but I see values that bounce around between -0.10% and +0.20% just having it sit on my desk. You can see this in the plot below. Is this expected?
  • When I breathe on the sensor (red arrows) the reading goes negative instead of positive. Is this expected?
  • https://lh3.googleusercontent.com/pw/AM … authuser=0

    Any help would be appreciated, I love the small size and power consumption of the sensor, but it is so far not producing useful data. Thanks!

    I don’t think breathing on the sensor is a good way to test it due to increased temperature and humidity on the sensor in addition to the Co2 emission. I think that might be way you are seeing a drop, the extra features of breath might be hindering the sensors ability to sense Co2.

    As for the accuracy, I feel like this sensor might not be super accurate. I recommend that you calibrate the data as best you can via code to get more accurate readings.

    I hope this helps. Happy holidays.

    To gain confidence that the sensor is working correctly, and to learn how to interpret the readings, perform some tests with known CO2 concentrations.

    The sensor can measure up to 100 volume percent CO2, which is easy to make by putting some dry ice in a box or other container. The container must be open at the top so that as the dry ice sublimes, the air can be pushed up and out by the much heavier CO2 gas.

    The CO2 should be at room temperature before putting the sensor into it.

    Thanks for the tips! I think I am just used to the SCD30 sensor, which has been dead easy to use. The two issues I’m finding with the STC31 seems to be that it has 1) a higher noise level than the SCD30, and 2) it also may be more sensitive to environmental changes, hence why my “breath” test did not work out. (The breath test works great on the SCD30 BTW). This could be the result of better processing in the SCD30 library, as that sensor has been out far longer.

    For a quantitative test I logged data from an STC31 and SCD30 simultaneously with an SD card (using an Adafruit Adalogger) and placed the logging assembly inside a plastic box. I then injected CO2 into the box with a soda-stream and a piece of rubber tubing (this seemed easier to control than the dry ice idea). The timecourse and direction of the response from the STC31 and SCD30 are similar, but the SCD30 has a much lower noise level vs. the STC31. Perhaps the STC31 data could be filtered and calibrated post-hoc to produce a similar signal to the SCD30, or perhaps this could be done on the fly in an improved library. But as it stands the data that is returned by the SCD30 (using the Adafruit SCD30 library) is much cleaner.

    The STC31 is an impressive little chip in terms of size and power consumption, but I am going to stick with the SCD30 for now.

    For those that are interested, here is data from both sensors, showing two CO2 injections:

    https://lh3.googleusercontent.com/pw/AM … authuser=0

    And a schematic of my setup :slight_smile:

    https://lh3.googleusercontent.com/pw/AM … authuser=0

    I am seeing the same effect - the breath test on the STC31 causes a large negative reading. I also tried it with re-setting the temperature and RH conversion values after every reading, hoping that as these values changed the conversion of the CO2 reading occurs correctly. However, I still see the large negative CO2 percent.

    In my application, the temperature, RH, and pressure will be changing rapidly.

    1. How can the CO2 readings be made positive?

    2. Are we saying that this sensor can only operate if the temperature and RH stay constant? It seems likely that in a situation where the CO2 concentration is changing, temperature and/or RH will also change.