Searching \ for ' [EE] Thermistor temperature measurement' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/sensors.htm?key=temperature
Search entire site for: 'Thermistor temperature measurement'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [EE] Thermistor temperature measurement'
2000\12\19@094842 by Gordon Williams

picon face
Hi,

I am in the process of designing a temperature controlled heating system.
The temperature setpoint will be from -5 C to 20 C.  I am going to be
measuring temperature using a cheap thermistor that I got from a surplus
store for about 5 cents.  The room temperature resistance is about 25K and
it changes about 20% over the temperature range that I will be using.

I will be using a 16F84 with the technique in AN512.  The code in AN512 is
for the 16C54 so I have re-written some parts for the 16F84.  Measurement is
very simple and very low cost.

1. A capacitor is discharged.
2. The time is measured to charge the cap using a known resistor with the
source from one pin.
3. Capacitor is discharged again.
4. The time is measured to charge the cap using the thermistor with the
source from another pin.
5. Thermistor resistance is calculated based on ratio of times and known
resistor value.
6. Look up table is used to calculate temperature.

This appears to be straight forward and only a few cents of parts.  The
thermistor should be quite accurate.

Has anyone had experience with this technique?  Any pointers?

Thanks,

Gordon Williams

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2000\12\19@124810 by Lawrence Lile

flavicon
face
Hi Gordon,

You are describing my first oven controller to the letter.  Yes, there are
problems with thermistors, but if CHEAP is what you want, there is nothing
finer in this world.  I'd love to discuss it to death with you.

First, is this a one-off, or a production design?  It makes a difference.

How much accuracy and what range of temperatures do you want to measure?
You can achieve +/- 25F/12C with the setup you describe quite easily.  If
you want greater accuracy, you may need to shift gears.

Thermistors (see the thread from a day or two ago)  are inaccurate,
nonlinear, vary from part to part, and otherwise crude.  That's why they are
so cheap.  That's also why I love 'em, I'm a cheapskate.

AN512 is a great way to make a cheap A/D input, but it suffers again from
crudeness.  AN512 A/D introduces it's own quirky inaccuracies, quantization
issues,  and noise susceptibility.  But it's cheap, and can make a great
oven controller.  If you want a medical thermometer or a thermostat for your
million dollar science experiment, forget these methods.

You can get more accuracy out of an AN512 A/D by:  timing for longer periods
(reducing your quantization noise, if you will) Cleaning up your power
supply, keeping lead lengths to your thermistor short, using twisted pair to
your thermistor, and using software median filters to smooth out noise.
All thse would be de rigeur for a commercial product, and kind of nuts for a
one-off.

Remember, you can have something that is Accurate, Cheap, or Built quickly,
but not all three at the same time!
(some famous electronics guy said that whose name escapes me now)

-- Lawrence Lile

{Original Message removed}

2000\12\19@132813 by Paul Hutchinson

flavicon
face
> Thermistors (see the thread from a day or two ago)  are inaccurate,
> nonlinear, vary from part to part, and otherwise crude.  That's
> why they are so cheap.  That's also why I love 'em, I'm a cheapskate.

Thermistors are certainly very non-linear and the $0.50 varieties are
inaccurate but, there are some very good units available.

One I've used extensively is the YSI (http://www.ysi.com/) #44006. It is
accurate to +/-0.2degC from 0 to 70degC. Over the range of -40 to +100degC
the accuracy is +/-0.4degC. YSI prices them a bit high but over the last 20
years, I have found many exact replacements from other manufacturers that
cost less than $1.50 each in 500 piece quantities.

Paul

=========================================
Paul Hutchinson
Chief Engineer
Maximum Inc., 30 Samuel Barnet Blvd.
New Bedford, MA 02745
spam_OUTphutchinsonTakeThisOuTspamimtra.com
http://www.maximum-inc.com
=========================================

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2000\12\19@135748 by Lawrence Lile

flavicon
face
I guess I was addressing the $0.05US kind of thermistor.  It's true that if
you want to pay $1.50, you can get a much better thermistor.   I usually pay
about $0.15US OEM for the cheap, inaccurate, drifting, and otherwise
cussable thermistors I use.

--Lawrence


{Original Message removed}

2000\12\20@042007 by Michael Rigby-Jones
flavicon
face
{Quote hidden}

I spent a week trying to get this technique to work with sufficient accuracy
for my application without much success, but I have used this circuit very
successfully in less demanding circuits.  A BIG gotcha I found, was that
while the reference resistor should in theory be able to cancel out and
changes in supply voltage and capacitor drift, in practice the threshold
change of the PIC's internal Schmitt trigger, combined with integer math
caused this circuit to be quite supply dependant(see note).  If you are
running from a regulated supply then everything should be fine.  You can use
Scott Dattalo's 3 cycle timer to get better resolution, or get the same
resolution with a smaller cap (and thus reduce conversion time).

You can linearise a thermistor pretty well by paralleling the thermistor
with a fixed resistor with the same value as the thermistor at your nominal
"center" temperature.  e.g. if you wanted to measure from 0 to 50C, then
find the value of the thermistor at 25C and parallel the thermistor with
fixed resistor of this value.  This will not be totaly linear, the closer
you are in tempereture to the "center" temperature, the more linear the
circuit will be.  Phew...what a mouthfull, hope you understood that.

Hope that helps.

Mike

Note:  The circuit does compensate for voltage, but in quite coarse steps,
so as the supply voltage is increased or decreased, the output of the
converter will drift in one direction, then suddenly step up and start
drifting down again.  I plotted the schmitt trigger threshold against supply
voltage, and simulated the circuit in Excel and got the same results.  The
problem seems to be that the schmitt reference is not generated by a simple
divider network, and although it rises with voltage, it's not proportional
in the same way a divider network would be.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2000\12\21@041704 by dr. Imre Bartfai

flavicon
face
Hi,

I used the same technique, but I apply an LM393 comparator which is quite
precise. Or one can take a 16C62x part which has a built-in one.

Regards,
Imre


On Wed, 20 Dec 2000, Michael Rigby-Jones wrote:

> > {Original Message removed}

'[PICLIST] [EE] Thermistor temperature measurement-'
2000\12\21@095908 by Gordon Williams

picon face
Thanks to all that replied.

In summary, the most that I am concerned about is the repeatability of the
Schmitt trigger.  Good accuracy can be achieved but you need to be careful.

Some ideas are:

1. Regulate the power supply.  This may reduce the variability of the
Schmitt trigger and improve the voltage consistency for charging the cap.

2. Check for noise on the thermistor lines if long lines are required.
Twist/shield if required.

3. Use a counter with sufficient bits to ensure that you get good
resolution.

4. Some suggested linearizing the thermistor somewhat by using a parallel
resistor of average thermistor resistance.  In my case the thermistor does
not have that large a temperature coefficient and is already moderately
linear.

5. Use a lookup table.

6. Maybe a non-Schmitt trigger port should be used for more consistent
results.

7. Average reading results to get more stability if required.

8. Keep sources of noise to a minimum.

9. Polycarbonate and Dipped Polypropylene have pretty flat capacitance
change vs temp curves in the region you are looking at.  Polycarbonate caps
should vary less than 1/2% over the -5 to 20C range.  Polystyrene should be
similar.  Avoid ceramics with dielectrics such as x7r, y5v, z5U,  and all
electrolytics. Some of these can vary 40% over the temperature range!!!!

Regards,

Gordon Williams

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2000\12\22@094146 by J Nagy

flavicon
face
I've just read this:
>
>In summary, the most that I am concerned about is the repeatability of the
>Schmitt trigger.  Good accuracy can be achieved but you need to be careful.
>

       I saw this comment on the schmitt trigger input before and left it,
but seeing it again, I can't let it go without saying anything...
       I have seen no evidence to support this claim. In my experience,
I've been able to obtain very repeatable results and would promote these
inputs as the first choice. Perhaps there is a lack of understanding with
their operation that perpetuates this.
       The trigger thresholds certainly do change with conditions but not
appreciably between measurements if the measurements are taken under the
same conditions (read 'close together' with no change to Vdd). Certainly
the thresholds are not symmetrical about the midpoint of the supply, but by
always triggering on the rising or falling edge, who cares. I wouldn't
discount their use without trying them. I think the only reason all inputs
aren't schmitt trigger is the relatively high upper threshold with 5V (~3V)
that means they aren't strickly TTL compatible (>2.4V). I think that many
do not realize that schmitt trigger inputs inherently have hysteresis, and
forget this in their calculations.
       The other beef I have is the use of standard logic inputs for
slowly varying inputs. These were never designed for this and will result
in both transistors conducting and possibly damage to the chip. I'm a
little surprised that such a technical group doesn't jump all over that one
each time it appears.
       One last thing and then I go... I don't recall it being mentioned,
but self-heating of thermistors is always a concern. If using them for
temperature measurement, every precaution should be made to reduce power
dissipation, and thus self-heating.


       Jim Nagy
       Elm Electronics
 ICs for Experimenters
http://www.elmelectronics.com/

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu



'[PICLIST] [EE] Thermistor temperature measurement-'
2001\01\02@034233 by Michael Rigby-Jones
flavicon
face
> -----Original Message-----
> From: J Nagy [SMTP:jnagyspamspam_OUTELMELECTRONICS.COM]
> Sent: Friday, December 22, 2000 1:41 PM
> To:   @spam@PICLISTKILLspamspamMITVMA.MIT.EDU
> Subject:      Re: [EE] Thermistor temperature measurement- Summary
>
>
>         I saw this comment on the schmitt trigger input before and left
> it,
> but seeing it again, I can't let it go without saying anything...
>         I have seen no evidence to support this claim. In my experience,
> I've been able to obtain very repeatable results and would promote these
> inputs as the first choice. Perhaps there is a lack of understanding with
> their operation that perpetuates this.
>
>
I spent nearly 2 weeks trying to get acceptable performance using a single
slope software ADC.  The problem is this:
The schmitt trigger threshold changes repeatably with supply voltage which
in itself is not a problem.  However, this change has a fairly gentle slope.
Because this change is quantised by the ADC counter, quite a large change in
supply voltage is needed to get a change of one count on the reference
branch.  The overall effect of this is that while the equation:

Rtherm = (Ttherm * Rref)/Tref     (where Ttherm and Tref are the times to
charge the cap through the appropriate resistor, and Rref is the known
resistance of the reference resistor.)

will give *on average* corrected results, in practice the result periodicaly
wanders either side of the correct result as the supply voltage is changed .
This may or may not be a problem depending on the required accuracy and
repeatability required.  I was using a 3 cycle resolution counter with a PIC
running at 20 Mhz to get the resolution I needed.  I was typically getting a
count of around 900 from both the thermistor and the reference branch at
25C.  The thermistor was used as feedback in a PID loop controling a TEC.
Over a supply voltage range of 4.7 to 5.3 the temperature of  the TEC
changed by almost 0.5 degree either side of it's correct setting, an overall
error of nearly 1 degree, which was absolutely unacceptable in my case.
Ditching the software ADC method and using an external 10 bit ADC gave the
<0.1C performance required.

Acheiving a monotonic output from the above equation is also tricky if you
are using integer math, which the majority of people will be.  Monotonic
performance is acheivable over a small range by carefull choice of the
reference resistor value.

Another possible gotcha with this method is it's noise immunity, or lack
thereof.  This means that using an emulator, or the Microchip ICD will cause
big problems, the emulator because of the length of the ribbon connecting
the "pod" to the emulator picks up lots of noise from adjacent port pins
etc, and the ICD because it could have been designed as some kind of EMC
tester IMHO.

As I said, this technique would be fine for less demanding situations.

Mike

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...