Hello,
I have a temperature monitor circuit that I want to reverse (code)
it uses Atmega64 and this sensor.
The circuit is attached, by changing the temperature manually I have noted down corresponding voltage at ADC, what I need is a GENERIC FORMULA based on the readings, is this something you guys can help?
(I couldn't find datasheet of the sensor that can help in someway)
The sensor page mentions that it can measure max of 105-deg-celsius,
I have recorded the voltage values at ADC pin it is linear w.r.t temperature i.e voltage increasing when temp decreasing.
some values that I measured
-40degree---- 4.86V (ADC pin)
-39degree---- 4.84V
-38degree---- 4.82V
.............................
16degree------3V
34degree------2V
.............................
99.5degree------ 0.31V
Try to use 'curve expert'
Very simple tool.
Better use 'code to temperature' conversion. Not 'voltage to temperature' because anyway you will have to transform code to voltage first.
Well thanks there mate, I plugged in the data and went for a 3rd degree non-linear equation to get all values covered, result was good! curve expert is a handy tool indeed!
I think for you purpose linear dependace will be enough. 3rd degree equation require a lot of calculations with floating point. For 8-bit mcu it can take something about few ms and a lot of RAM.
well the linear equation was giving a error of about ~5 degree in temperature (for some values), I didn't went for the 4th order because of the mcu limitations, 3rd was a tradeoff!
It is working fine for now but if it didn't I will move to the second order. Thanks