Calibration / reset interplay
Calibration / reset interplay
I'm sorry for apparently breaking the forced calibration with commit fe023428. While investigating, I found an interesting behaviour of the SCD30 that I would like to share / discuss. It seems the breakage causes from the fact that the calibration value is not stored, if the sensor is reset before carrying out at least one measurement after calibration.
The interface datasheet has an interesting note:
After soft reset the sensor will reload all calibrated data. However, it is worth noting that the sensor reloads calibration data prior to every measurement by default. This includes previously set reference values from ASC or FRC as well as temperature offset values last setting
However, the exact meaning of this paragraph is ambiguous and I'm not sure if it is related to the mentioned issue.
You can reproduce the behaviour from the branch dev/debugcalib in my fork. There I added an additional command resetscd
to the serial console
and deactivated the automatic ESP reset after calibration.
Then do:
timer 10
calibrate! 1200
resetscd
-> The sensor does output a value based on the previous stored calibration.
If you try
timer 10
calibrate! 1200
(wait for a measurement)
resetscd
-> the sensor does output 1200 ppm