08-02-2023 09:28 PM - edited 08-02-2023 09:33 PM
Greetings,
I'm currently using the BME680 sensor with the BSEC library (version 1.5.1474) and I'm encountering some issues with the calibration process. Specifically, I'm utilizing a light sleep mode with 45 seconds of sleep and 15 seconds of wake time in cycles to poll the sensor and accumulate calibration data.
This setup equates to the sensor going into the update state function approximately 5 times per minute. However, after running this setup for 2 days, the IAQ, VOC, StaticIAQ, and other metrics remain at baseline levels (IAQ Accuracy: 0, IAQ: 500, Static IAQ: 25, etc.), which indicates that the calibration process isn't progressing as expected.
I have the BSEC library configured with the generic_33v_3s_4d settings, as shown below:
/* Configure the BSEC library with information about the sensor
18v/33v = Voltage at Vdd. 1.8V or 3.3V
3s/300s = BSEC operating mode, BSEC_SAMPLE_RATE_LP or BSEC_SAMPLE_RATE_ULP
4d/28d = Operating age of the sensor in days
generic_18v_3s_4d
generic_18v_3s_28d
generic_18v_300s_4d
generic_18v_300s_28d
generic_33v_3s_4d
generic_33v_3s_28d
generic_33v_300s_4d
generic_33v_300s_28d
*/
const uint8_t bsec_config_iaq[] =
{
#include "config/generic_33v_3s_4d/bsec_iaq.txt"
};
And I have set the state save period to UINT32_C(360 * 60 * 1000), which equates to saving the state 4 times a day.
#define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // 360 minutes - 4 times a day
I'm polling the following virtual sensors:
bsec_virtual_sensor_t sensorList[10] =
{
BSEC_OUTPUT_RAW_TEMPERATURE,
BSEC_OUTPUT_RAW_PRESSURE,
BSEC_OUTPUT_RAW_HUMIDITY,
BSEC_OUTPUT_RAW_GAS,
BSEC_OUTPUT_IAQ,
BSEC_OUTPUT_STATIC_IAQ,
BSEC_OUTPUT_CO2_EQUIVALENT,
BSEC_OUTPUT_BREATH_VOC_EQUIVALENT,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
};
iaqSensor.updateSubscription(sensorList, 10, BSEC_SAMPLE_RATE_LP);
My question is: Would altering the defined bsec_config_iaq or the state save period, or adjusting the frequency of calling the update state function, improve the calibration speed? If yes, which settings would you recommend for a faster calibration with the light sleep setup I'm using?
And finally, does light sleep affect this process somehow? (without light sleep the sensor reached iaq accuracy 3 in about 20 hrs).
Thanks in advance,
Chris
08-09-2023 05:07 AM
Hi Chr1spie,
As you used generic_33v_3s_4d configuration, BSEC algorithm should be called every 3 seconds. In your code, BSEC was not called during 45 seconds sleep time, BSEC output values will not change.