adafruit / Adafruit_SCD30

Other
14 stars 22 forks source link

Error in value desription: forceRecalibrationWithReference is NOT stored in non-volatile memory #21

Open g6094199 opened 9 months ago

g6094199 commented 9 months ago

This is an error al least in the sensor-tuning.ino

/*** Force the sensor to recalibrate with the given reference value

this is not true. after reboot this value gets restored to its default (400ppm). what DOES happen is a permanent update of the co2 calibration curve, whatever this means. this seems a bit voodo inside this blck box.

from the datasheet: "The FRC method imposes a permanent update of the CO2 calibration curve which persists after repowering the sensor. The most recently used reference value is retained in volatile memory and can be read out with the command sequence given below. After repowering the sensor, the command will return the standard reference value of 400 ppm."

moeburn commented 8 months ago

It's just misleading - the calibration data is what gets stored on the non-volatile memory, but not the ppm you have told it to use when it runs the calibration routine, which defaults to 400ppm.

caternuson commented 8 months ago

It is confusing. Since the most recent value is stored in volatile memory, it won't persist with power cycle. That's why 400 gets returns after cycling power.

Maybe the docstring:

 * **Note:** This value is saved to the SCD30's internal storage and is reloaded
 * on sensor power up.

should be updated to just copy paste the datasheet verbiage:

 * **Note:** The FRC method imposes a permanent update of the CO 2 calibration curve which
 * persists after repowering the sensor. The most recently used reference value is retained in
 * volatile memory and can be read out with the command sequence given below.
 * After repowering the sensor, the command will return the standard reference value of 400 ppm.
g6094199 commented 8 months ago

After repowering the sensor, the command will return the standard reference value of 400 ppm which has no impact on the curve

or similar.

only active writing this value will change the curve.