Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

displaying tempture

Status
Not open for further replies.

TucsonDon

Member
I am using the ADC on a PIC18F46K22 with a 10kΩ thermistor. How do I take the result from the ADC and convert to °F to display on a LCD?
 
10K thermister doesn't mean a whole lot. You need to know the type and you know that the resistance at 25C is 10K.

You can do:
1. Lookup
2. use the Steinhart-Hart eqn
3. Use a dedicated thermister IC which may linearize for you. (See linear technology)
4. Piecewise linearization

A lot of times the thermister range that you need is intentionally small so a simple voltage divider works.
Application notes on https://www.analog.com

Open and shorted is another problem entirely.
 
You can take ADC readings with the thermistor at several different temperatures to calibrate the system, scale the readings to degrees F for display, then use interpolation to determine/display other temperatures.
 
You can take ADC readings with the thermistor at several different temperatures to calibrate the system, scale the readings to degrees F for display, then use interpolation to determine/display other temperatures.

alec_t I am unsure how to do that in code. If I have a resistance scale can't I figure the result?
 

Attachments

  • A02.gif
    A02.gif
    33.2 KB · Views: 191
I am unsure how to do that in code. If I have a resistance scale can't I figure the result?

So, you have the R vs T scale.

Figure out just what T range your concerned about. The entire range will be a lot tougher.

The simplest is a voltage reference, a fixed resistor and the thermister to ground selected so your A/D has a good range and meets resolution requirements.min and max temperature. It may not meet one and you;ll have to change your method.
 
The simplest is a voltage reference, a fixed resistor and the thermister to ground selected so your A/D has a good range and meets resolution requirements.min and max temperature. It may not meet one and you;ll have to change your method.

If I am understanding what you are saying, the ADC on the PIC18F46K22 uses an internal reference that is software selected correct?

This is all good information but, what I am trying to figure out is how to convert the ADC result to a string that can be displayed on the LCD
 
Why would anyone want to use a thermistor for anything but crude min/max limits? There are other easier, inexpensive, and WAY more accurate (repeatable, reliable, and precise) ways to measure temperature!
 
Microwave oven temperature probes and ovens use thermisters.

The OP/TS really has to state what his problem is.

1. Is it the conversion of a number read from the A/D to temperature
2. Is it the electrical interface? The simplest is the voltage divider
3. Is it the display of any number on an LCD display.

I think we have answered the perceived question in general terms based on the information provided.
 
Okay... Are you doing C or ASM?

If C then you can just look through my articles... Most of which will be applicable to your application... Anything that isn't there. Just ask??

I did look through and found some algorithms that will convert the ADC result to temp reading using the Steinhart-Hart Thermistor Equation
 
Why would anyone want to use a thermistor for anything but crude min/max limits? There are other easier, inexpensive, and WAY more accurate (repeatable, reliable, and precise) ways to measure temperature!
To really help the TS/OP you could give a specific link or just name those WAY more accurate.
 
To really help the TS/OP you could give a specific link or just name those WAY more accurate.

I would, but the OP never mentioned what the application is, so it would be a waste of time. Google is easy enough to use...
However, RTDs, and monolithics such as LM34 come to mind. Just about anything is more accurate and easier (and more linear) than a simple thermistor!
For mass production -- like the microwave ovens previously mentioned -- then it might be worth figuring out how to implement a super-cheap thermistor.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top