Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 100
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
All today's birthdays', congrats!
Download (31)
ScottH (37)


Next birthdays
11/02 Download (31)
11/02 ScottH (37)
11/03 Electroguy (94)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: General Science and Electronics
« Previous topic | Next topic »   

Thermistor Equation and Temperature Sensing

1 2 
Move Thread LAN_403
thedatastream
Mon Jul 20 2009, 08:32PM Print
thedatastream Registered Member #505 Joined: Sun Nov 19 2006, 06:42PM
Location: Yorkshire!
Posts: 329
Hi folks,

Maths has never been my strong point, and I'm not sure how to interpret this equation, specifically the ln^2 and ln^3



Does ln^2 (x) mean:

  • ln ( ln (x) )
  • ln (x^2)
  • ( ln (x) ) ^2


Or something else?

Thanks in advance
James

edit: changed thread topic to better suit contents
Back to top
magnetomotive
Mon Jul 20 2009, 08:43PM
magnetomotive Registered Member #267 Joined: Mon Feb 27 2006, 09:44PM
Location:
Posts: 46
The squared ln should be interpreted as: ( ln (x) ) ^2

Back to top
GeordieBoy
Mon Jul 20 2009, 08:44PM
GeordieBoy Registered Member #1232 Joined: Wed Jan 16 2008, 10:53PM
Location: Doon tha Toon!
Posts: 881
Hi James,

I think ln²(R/Rref) means take the natural logarithm of (R/Rref) and then square the result, but I could be wrong.

There is some info about thermistor equations on wikipedia and also here:

Link2

I have only ever used the simpler equation with the exponential and beta in it before myself. (The one shown underneath the graph on that web page.)

-Richie,

EDIT: Actually, thinking about this some more, it looks like the equation i've used is a simple linear approximation to the true thermistor response. The equation you have probably attempts to fit the true curve of the thermistor more accurately by modelling it as a polynomial in increasing powers of ln(R/Ref) The A1 B1 C1 D1 are the coefficients just like how you might have coefficients of the terms x¹, x², x³ etc
Back to top
Sulaiman
Mon Jul 20 2009, 09:58PM
Sulaiman Registered Member #162 Joined: Mon Feb 13 2006, 10:25AM
Location: United Kingdom
Posts: 3140
Just in case you're cosidering using a thermistor for temperature measurement;
Industrially I see a lot of thermistors used as limit detectors
but for temperature measurement, thermocouple or PT100 resistor is standard
because you will have difficulty re-calibrating when the sensor (thermistor) needs replacing, ....
Back to top
Dennis Rogers
Mon Jul 20 2009, 10:20PM
Dennis Rogers Registered Member #1837 Joined: Tue Dec 02 2008, 02:20PM
Location: NYC
Posts: 65
ln is the logarithm as richie stated. It would be the proper equation but in the real world you don't need it to be that precise. This equation goes a few orders of magnitude deeper than any thermistor would be rated anyway.
Back to top
thedatastream
Tue Jul 21 2009, 08:07AM
thedatastream Registered Member #505 Joined: Sun Nov 19 2006, 06:42PM
Location: Yorkshire!
Posts: 329
Thanks for all the responses chaps.

I tried some of the suggestions (and all three of mine) but none of them seemed to work so in the end I cheated. I used the below equation to create a chart in Excel of resistance vs temperature.



I then added a trendline to the chart (4th order polynomial fitted the curve best) and then extracted the trendline curve from the chart.

1248162336 505 FT73212 Thermistor Chart

This then allowed me to work backwards from my ADC count, through the thermistor potential divider chain to achieve a correlation between ADC count and associated temperature. This then goes into a lookup table in my micro (Arduino) to give me a quick lookup without having to do natural logs in an 8-bit micro (I don't have all day you know!)

I'm using a 2% thermistor Link2 to sense temperature over the range 10ºC to 50ºC to regulate the temperature of a heater immersed in liquid. I'd be happy with temperature control of ±5%, probably achieavable given the innacuracies in the system.

For interest, I tried the equation from the page Richie highlighted



And compared it with the trendline generated polynomial line. See chart

1248163497 505 FT73212 Thermistor Chart Eqn Check

It's a pretty good match between the two. I'll probably stick to the beta equation in future!

Thanks again
James
Back to top
Steve Conner
Tue Jul 21 2009, 09:47AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
In all the laser/TEC drivers I've designed, I've only ever used what you called the single term beta equation.

I also showed that if you put a 10k @ 25'C NTC thermistor into a Wheatstone bridge with three more 10k resistors, then the transfer function from temperature to output voltage is a S-shaped curve, that you can approximate as a straight line with only a degree or two of error over the range 10 to 40'C. This was how the temperature readout on my standalone TEC controller worked. The PC-hosted ones used a more math-heavy approach, with the beta equation substituted into the potential divider equation and rearranged for T.

The "10k @ 25'C" NTC thermistor is a de facto industry standard, they all have roughly the same A and B coefficients.
Back to top
GeordieBoy
Tue Jul 21 2009, 11:38AM
GeordieBoy Registered Member #1232 Joined: Wed Jan 16 2008, 10:53PM
Location: Doon tha Toon!
Posts: 881
> ...a S-shaped curve, that you can approximate as a straight line with only a degree or two of error over the range 10 to 40'C

That is exactly what I have done in the past too for things like battery chargers where the float voltage needs to be temperature compensated. The shallow S-shape complies well with the required characteristic over a given range of temperatures and then curves away dramatically outside of this range!

Back in the days of analogue synthesisers people were connecting thermistors with fixed resistors in weird series/parallel arrangements in attempts to "linearise" their behaviour over the range of typical room temperatures.

As a side note, regarding software and lookup tables: It is sometimes easier to turn the lookup table around and have an entry for every 1'C telling you what ADC result corresponds to this actual temperature. This is often more efficient than having a LUT entry for every possible ADC result, especially if you only need to know the final temperature to something like 1 degree accuracy. All you do is compare the ADC result with the LUT entries until you find which one it is closest too.

-Richie,
Back to top
mikeselectricstuff
Tue Jul 21 2009, 10:53PM
mikeselectricstuff Registered Member #311 Joined: Sun Mar 12 2006, 08:28PM
Location:
Posts: 253
GeordieBoy wrote ...

As a side note, regarding software and lookup tables: It is sometimes easier to turn the lookup table around and have an entry for every 1'C telling you what ADC result corresponds to this actual temperature. This is often more efficient than having a LUT entry for every possible ADC result, especially if you only need to know the final temperature to something like 1 degree accuracy. All you do is compare the ADC result with the LUT entries until you find which one it is closest too.

-Richie,
This is a useful way to save space, as you generally only care about a subset of the ADC range, anything else being 'too hot' or 'too cold'.

Another handy trick where you need a wide temp range from a thermistor is to have 2 pullups, switched on IO pins, so you switch in a lower value pullup & re-measure if the first reading gives a low resistance value.

Also bear in mind that table size can often be reduced significantly by a simple linear interpolation between table steps. This is especially so for PT100 linearisation - ISTR that 4 degree steps gives something like 0.01 C max error over most of the range, but then PT100s are rather closer to linear than thermistors.
Back to top
tobias
Wed Jul 22 2009, 02:40AM
tobias Registered Member #1956 Joined: Wed Feb 04 2009, 01:22PM
Location: Jersey City
Posts: 172
Why not to use a LM35?
0 C = 0 V
100 C = 1 V, linear. Easy to code.
Link2
Back to top
1 2 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.