CCS811 giving continously increasing tvoc and co2 levels

I have recently purchased a CCS811 sensor form sparkfun and interfaced using I2C with bkue gecko board. The sensor is gving readings of tvoc and co2 levels but theses readings seem to continously increase even if there is no change in environment.

Did I receive a faulty sensor?

Those sensors have a note in their datasheets that they take up to 24 hours to level out and stop increasing (the chips themselves will be slightly higher than ambient temp).

The current method is to wait for the readings to settle and compensate for the slight (1-2 degrees, usually) increase in code.

I recently got a CCS811 as well. For the most part the values seemed reasonable (not that I know what the true values should be). I have been running it for several days (1 query per minute). Most of the time the CO2 is in the 400s and the TVOC is typically 1-2 digits.

However sometime over night, both values jumped up a huge amount. I killed and restarted the program and the values dropped to their typical values. I also have a DHT20 to get temp and humidity and they are all connected to a raspberry pi 3B+.

temp: 22.6C (73F),  humidity: 38.4%  CO2: 457 ppm, TVOC: 8 ppb
temp: 22.5C (73F),  humidity: 38.6%  CO2: 452 ppm, TVOC: 7 ppb
temp: 22.4C (72F),  humidity: 38.6%  CO2: 457 ppm, TVOC: 8 ppb
temp: 22.3C (72F),  humidity: 38.6%  CO2: 496 ppm, TVOC: 14 ppb
temp: 22.5C (73F),  humidity: 38.8%  CO2: 3729 ppm, TVOC: 4413 ppb
temp: 22.7C (73F),  humidity: 38.5%  CO2: 4084 ppm, TVOC: 5181 ppb
temp: 22.8C (73F),  humidity: 38.2%  CO2: 4404 ppm, TVOC: 5857 ppb
...
temp: 23.1C (74F),  humidity: 38.2%  CO2: 3174 ppm, TVOC: 3103 ppb
temp: 23.0C (73F),  humidity: 38.2%  CO2: 3165 ppm, TVOC: 3193 ppb
<restart>
temp: 23.0C (73F),  humidity: 38.3%  CO2: 400 ppm, TVOC: 0 ppb
temp: 22.9C (73F),  humidity: 38.4%  CO2: 416 ppm, TVOC: 2 ppb
temp: 22.9C (73F),  humidity: 38.5%  CO2: 413 ppm, TVOC: 0 ppb

I also noticed other weird things, like this probably sometime yesterday (each data point 1 minute apart)

temp: 22.9C (73F),  humidity: 37.5%  CO2: 435 ppm, TVOC: 5 ppb
temp: 22.9C (73F),  humidity: 37.5%  CO2: 447 ppm, TVOC: 7 ppb
temp: 22.9C (73F),  humidity: 37.4%  CO2: 33215 ppm, TVOC: 3 ppb
temp: 22.9C (73F),  humidity: 37.4%  CO2: 448 ppm, TVOC: 7 ppb
temp: 22.9C (73F),  humidity: 37.5%  CO2: 425 ppm, TVOC: 3 ppb

Dear all,

I’ve got a similar problem:

I am using Sparkfun Product SEN-14348. It has got a CCS811 and a BME280 on the circuit board. I am using two of the circuit boards and an Arduino Uno. I am using the Sparkfun library “SparkFunCCS811.h”.

One CCS811 hat got the address 0x5B, the other one has got the address 0x5A.

If I readout a single sensor using the example provided by Sparkfun (Example1_BasicReadings.ino), everything seems fine. I now extended the Sparkfun-Example to readout both sensors. But now the CCS811 values are jumping up and down. The values of the BME280 are o.k.

I then reloaded the Sparkfun Example “Example1_BasicReadings.ino” into the Arduino. But the values of the single sensor are still jumping up and down. I have to power down and restart the Arduino to get consistent values with a single sensor again.

Output:

11:12:00.188 -> CCS811 Basic Example two sensors
11:12:00.188 -> CCS811 Basic Example two sensors
11:12:05.389 -> CO2[400] tVOC[0] millis[5207]
11:12:05.389 -> CO2 B[400] tVOC B[0] millis B[5219]
11:12:06.889 -> CO2[400] tVOC[0] millis[6731]
11:12:06.889 -> CO2 B[417] tVOC B[2] millis B[6744]
11:12:08.436 -> CO2[439] tVOC[5] millis[8256]
11:12:08.436 -> CO2 B[768] tVOC B[56] millis B[8268]
11:12:09.935 -> CO2[1110] tVOC[108] millis[9780]
11:12:09.935 -> CO2 B[1235] tVOC B[127] millis B[9792]
11:12:11.488 -> CO2[668] tVOC[40] millis[11304]
11:12:11.488 -> CO2 B[1191] tVOC B[120] millis B[11317]
11:12:12.988 -> CO2[572] tVOC[26] millis[12829]
11:12:12.988 -> CO2 B[972] tVOC B[87] millis B[12841]
11:12:14.535 -> CO2[589] tVOC[28] millis[14354]
11:12:14.535 -> CO2 B[560] tVOC B[24] millis B[14366]
11:12:16.035 -> CO2[1140] tVOC[112] millis[15879]
11:12:16.035 -> CO2 B[1235] tVOC B[127] millis B[15891]
11:12:17.589 -> CO2[530] tVOC[19] millis[17403]
11:12:17.589 -> CO2 B[694] tVOC B[44] millis B[17416]
11:12:19.089 -> CO2[1056] tVOC[99] millis[18927]
11:12:19.089 -> CO2 B[706] tVOC B[46] millis B[18939]
11:12:20.590 -> CO2[1099] tVOC[106] millis[20452]
11:12:20.637 -> CO2 B[927] tVOC B[80] millis B[20464]

Code:

#include <Wire.h>

#include "SparkFunCCS811.h" //Click here to get the library: http://librarymanager/All#SparkFun_CCS811

#define CCS811_ADDR 0x5B //Default I2C Address
//#define CCS811_ADDR 0x5A //Alternate I2C Address

CCS811 mySensor(CCS811_ADDR);
CCS811 mySensorB(0x5A);

void setup()
{
  Serial.begin(115200);
  Serial.println("CCS811 Basic Example two sensors");

  Wire.begin(); //Inialize I2C Hardware

  if (mySensor.begin() == false)
  {
    Serial.print("CCS811 error. Please check wiring. Freezing...");
    while (1)
      ;
  }
  if (mySensorB.begin() == false)
  {
    Serial.print("CCS811 B error. Please check wiring. Freezing...");
    while (1)
      ;
  }


}

void loop()
{
  //Check to see if data is ready with .dataAvailable()
  if (mySensor.dataAvailable())
  {
    //If so, have the sensor read and calculate the results.
    //Get them later
    mySensor.readAlgorithmResults();

    Serial.print("CO2[");
    //Returns calculated CO2 reading
    Serial.print(mySensor.getCO2());
    Serial.print("] tVOC[");
    //Returns calculated TVOC reading
    Serial.print(mySensor.getTVOC());
    Serial.print("] millis[");
    //Display the time since program start
    Serial.print(millis());
    Serial.print("]");
    Serial.println();
  }
  delay(10);
  
  if (mySensorB.dataAvailable())
  {
    //If so, have the sensor read and calculate the results.
    //Get them later
    mySensorB.readAlgorithmResults();

    Serial.print("CO2 B[");
    //Returns calculated CO2 reading
    Serial.print(mySensorB.getCO2());
    Serial.print("] tVOC B[");
    //Returns calculated TVOC reading
    Serial.print(mySensorB.getTVOC());
    Serial.print("] millis B[");
    //Display the time since program start
    Serial.print(millis());
    Serial.print("]");
    Serial.println();
  }
 
  delay(10); //Don't spam the I2C bus
  delay(1500);
}

Best regards

Oli

Dear jfbauer,

I noticed one more thing: Not only the CO2- and tVOC-values are jumping The baselines of the sensors keep jumping, too. So everything coming from the two sensors ist jumping.