@ChrisGammell - I already have the hardware implemented, and am working on the software. FYI, this is for pool water temperature monitoring. I did take a look at the datasheet, and it looks like I am doing the right thing, but I am trying to verify my numbers.
@1.21Gigawatts - Correct on the single-ended mode. I should’ve specified that - thank you! Also, it would help if I could do math. The difference betweeen -40 to 140 is 180F … ahem not 100F.
So, @1.21Gigawatts has the solution, but I caught an error in my original math that carried through.
There are not 1638.4 counts per mA, rather 2048, as there are 16mA available in the total range, so the total number of counts available (32768) should also be divided by 16.
So - 32768/16 = 2048. 180F / 16mA / 2048 = 0.00549F per ADC count.
Currently, the sensor is showing 24566 counts. Multiplying that by our factor above (24566 * 0.00549) gives:
134.94F
Uh, that makes no sense though, right? I know people are in the pool right now, and they are happy, not screaming, so what gives?
The calculation is showing us absolute temperature - a direct mapping of ADC counts to F - without regard to the range of the sensor. The sensor range starts at -40F, so to get the actual pool temperature, I have to subtract 40F from the value. So, the actual temperature is (drum roll):
94.95F
Not a bad pool temp, if you ask me.
This does raise an interesting question of data interpretation though. The pool is a heated pool, and the heater is set to 87F. There is a traditional alcohol thermometer suspended in the pool approximately 18 inches that currently reads 87F, verifying the heater’s internal temperature sensor.
The temperature sensor that we have been discussing on this forum is in a skimmer basket, which is skimming the top 3" of pool water returning it to the pump. The water travels into the skimmer, through underground return lines, through the filter, the pump, the heater, and then returns back to the pool.
My new question is this:
Does it make sense that the sun could heat the top layer of water to be 7F or greater than the measured pool temp (which is taken from water cooled by underground return lines, lower temperature and high thermal mass of the filter, etc?
New data brings new questions!!!
Thanks for all of the help!