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??
Temperature sensor readings
-
- Posts: 34
- Joined: Sun Nov 20, 2005 6:21 am
-
- Posts: 3
- Joined: Mon Sep 11, 2006 1:30 am
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.
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.
-
- Posts: 34
- Joined: Sun Nov 20, 2005 6:21 am
-
- Posts: 3
- Joined: Mon Sep 11, 2006 1:30 am
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)
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)
Return to “Sensor-related questions”
Who is online
Users browsing this forum: No registered users and 7 guests