Merge pull request #9 from CapableRobot/low_temp_fix
Fix for below 0C measurements with nominal resistance other than 100 ohms
This commit is contained in:
commit
17c638c02b
@ -246,6 +246,11 @@ class MAX31865:
|
|||||||
temp = (math.sqrt(temp) + Z1) / Z4
|
temp = (math.sqrt(temp) + Z1) / Z4
|
||||||
if temp >= 0:
|
if temp >= 0:
|
||||||
return temp
|
return temp
|
||||||
|
|
||||||
|
# For the following math to work, nominal RTD resistance must be normalized to 100 ohms
|
||||||
|
raw_reading /= self.rtd_nominal
|
||||||
|
raw_reading *= 100
|
||||||
|
|
||||||
rpoly = raw_reading
|
rpoly = raw_reading
|
||||||
temp = -242.02
|
temp = -242.02
|
||||||
temp += 2.2228 * rpoly
|
temp += 2.2228 * rpoly
|
||||||
|
Loading…
Reference in New Issue
Block a user