-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Where does this calculation come from?
oxd = (oxd * 56000) / (vref - oxd)
I'm seeing an average value of 35KOhms for the OX sensor in normal air, which is much higher than the max of 20KOhms stated in the datasheet (assuming I'm reading it correctly). I'm wondering if the calculation may be wrong.
I understand that get_raw_oxd() returns a (scaled) voltage for the OX sensor - a 12 bit number scaled to 0-1 and then scaled by _vref to 0-3.3. I thought the issue might be with _vref, but that would make the values even higher.
I found a similar calculation in the CircuitPython library as well. The formula is the same, just expressed differently and with a constant of ~2**16 instead of Vref (and the values haven't been scaled to voltages). I still don't get it.
Could you help me understand the values that come out of read_all()?