Page 1 of 1
Temperature sensor readings
Posted: Mon Sep 11, 2006 1:35 am
by mouldycandy
I recently purchased the Water Temp and Oil Temp sensor from Race Technology, and I have no idea how to work out the temperatures from the voltage readings. I thought the package would've come with a formula for calculating temp.
I'm currently using an Atmega32 and lcd to take readings from the sensors, but I need to know how to work out the temp from the readings so that the right values are being displayed on the lcd.
Is there a basic formula I can use??
Posted: Mon Sep 11, 2006 5:42 am
by DaveTurner
The calibrations are listed in the online help:
[quote]Water temperature sensor (0
Posted: Mon Sep 25, 2006 2:33 pm
by mouldycandy
I'm using an Atmega32 to take the reading from the water temp sensor on ADC0.
What reference voltage should I be using when doing the calculations for ADC result??
ADC result = (Vin * 1024) / Vref
where Vin = input voltage
and Vref = selected reference voltage
Since the sensor runs off voltage <= 5V, should the reference voltage be 5V??
Cheers.
Posted: Mon Sep 25, 2006 7:58 pm
by DaveTurner
As you're using something other than a DL-1 to do the logging, the Vref is the reference voltage used by the Atmega - it may well be 5v or 3.3v. The calibration figures I posted are based on pure voltage using a 5v reference to drive the sensor.
Posted: Mon Oct 16, 2006 7:30 am
by mouldycandy
I used the formula from the site.
Temperature [Celsius] = 1.5369x^4 - 18.468x^3 + 77.948x^2 - 160.27x + 196.21
Reading analog input from the AVRchip ATmega32, gives an ADC result.
Voltage input can be calculated by:
Vin = ADC_result * VREF / 1024
I used a reference voltage of 5V.
And then substituted x in the formula for Voltage_input calculated.
The sensor is sitting on the desk and at room temperature.
However the temperature calculated is 51 degrees celcius.... which can't be right.
AM I using the formula correctly??
i.e. is x = voltage input from the sensor (white lead)