Sensirion / arduino-i2c-scd4x

Arduino library for Sensirion SCD4x sensors
BSD 3-Clause "New" or "Revised" License
47 stars 19 forks source link

Single shot measurement #3

Closed DeKasClimber closed 3 years ago

DeKasClimber commented 3 years ago

Dear,

Thanks a lot for the new sensor. I'm amazed by the size and the ease of installation. I used the example code to compare the behavior with the previous SCD30. They are running next to each other with very similar results.

When I try to lower power - I want to run it on a single 3,6V 3000mAh - battery, I had a strange behavior. I changed line 88 of the example error = scd4x.startPeriodicMeasurement();

To error = scd4x.measureSingleShot();

I measure the data the same way error = scd4x.readMeasurement(co2, temperature, humidity);

After the measurement I send the data to a server and let the ESP32 board go to sleep for 15 minutes. I wake up the ESP32 board, reinitialize the sensor, single shot measure, going back to sleep. This works for the SCD30 sensor (measurement interval of 60 seconds - and waiting for data available), but the low power option is still consuming +/- 5mA, so the battery last only a week.

the strange behavior in the measurement:

I have 2 SCD41 sensors and 2 SCD30 sensors running on the same table to verify results. I run one SCD 41 with the example code, and one with the single shot. I exchanged them to be sure it was not a sensor problem, but same behavior.

Did I miss something? Is there a warming up time or something?

Sensor is continuously powered from the battery on the breadboard. ESP32 board is going to sleep.

Thanks in advance.

MBjoern commented 3 years ago

Dear DeKasClimber

Thank you for sharing your experience with our CO2 sensor family.

Regarding your questions:

  1. CO2 is +/- 100ppm higher in measureSingleShot() modus than in startPeriodicMeasurement() modus => Changing the single shot interval can indeed result in minor offsets. This can be corrected by performing an FRC at the mode of operation in the field · Send ‘measure single shot’ command. · Wait 2 minutes · Repeat 3 times · Send forced recalibration command. · Measure single shot and compare to reference value (after waiting >1 minute)

  2. Temperature is 3 to 4 degrees lower in measureSingleShot() modus than in startPeriodicMeasurement() modus => This is because of the reduced self-heating of the sensor. To compensate, adjust the temperature offset as described in chapter 3.6.1 in the datasheet.

  3. humidity is +/- 4% higher in measureSingleShot() modus than in startPeriodicMeasurement() modus => relative humidity depends on the ambient temperature. By adjusting the temperature offset to the correct value, the humidity will be corrected as well.

I hope this helps and brings you to the next level of your project. If you have any further questions related to the source code, please don't hesitate to open another issue. If you have any questions about the sensor behaviors, datasheet or similar, please contact info@sensirion.com

Best regards and happy coding Björn