Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] Epoxy Air Temperature Sensor interfacing with microcontroller

Status
Not open for further replies.

Ow@i$

Advanced Member level 1
Joined
Sep 18, 2012
Messages
413
Helped
78
Reputation
156
Reaction score
75
Trophy points
1,308
Location
Pakistan
Activity points
3,430
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)

Regards
Owais
 

Attachments

  • Circuit.png
    Circuit.png
    24.9 KB · Views: 147

What is the maximum temperature the sensor can measure. The page mentiones that it is a NTC type thermistor. Are the output of the sensor linear ?
 

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
 

Linear Fit: y=a+bx
Coefficient Data:
a = 1.03051064681E+002
b = -2.95414214869E+001

Real Temp = a + b * ADC_Value
 

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.
 
  • Like
Reactions: Ow@i$

    Ow@i$

    Points: 2
    Helpful Answer Positive Rating
@Easyrider83

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
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top