+ Reply to Thread
Results 1 to 3 of 3

Thread: Steinhart-Hart Linearization Worksheet

  1. #1
    Licensed User Citius's Avatar
    Join Date
    Jul 2006
    Location
    Michigan, USA
    Posts
    304

    Default Steinhart-Hart Linearization Worksheet

    All - I've just posted this on the WIKI, but thought I'd let you know it was out there...

    I needed to better understand and to be able to better visualize how an standard 10k NTC (Negative Temperature Coefficient) thermistor would respond to changes in temperature. I knew the basic details, but wanted more visualization. I have made this Excel worksheet a bit flexible, so that you can change the details somewhat to better understand your particular Thermistor. The sheet is locked, to prevent you from accidentally deleting formulas, and allowing you to only change the YELLOW text boxes, etc, but can be unlocked with the password: "proton".

    I have found Thermistors to be very helpful, inexpensive and surprisingly accurate (+/- ~ 0.5°F) though in the future, I will add a method I've come across that increases the accuracy down to 0.2°F.

    Les and others have provided ample code samples, and I have several variants of my own for both 16F Pics (where you cannot use the Log command and the 18F PICs where you can) should anyone need assistance. Once you get your head around the concept, the code is very simple. You are simply using Stienhart & Hart's (two oceanographer's from the late 60's) algorithm to make the relationship between temperature and resistance a linear relationship. With this simple formula, you get temperature based on 4 inputs: Resistance & 3 coefficients from the thermistor data sheet. We'll call these coefficients a, b & c. That's it.

    Hi, its great to see you visiting our forum. Why not try Proton Compiler for FREE?

    Download the FREE version of Proton Compiler, Its called Amicus18 and its available from HERE

    Already using proton Compiler??? Get rid of these pesky messages... get LICENSED USER STATUS




    The linearization formula is this:
    Temperature (in Kelvin) = 1 / [ a + (b * lnR) + (c * (lnR³)) ]

    where ln R = the natural log of the Resistance
    The natural logarithm is the logarithm to the base "e", where e is an irrational constant approximately equal to 2.718
    Think of this as e^x = R, or, in other words, e raised to what power = Resistance

    Finally to get from Kelvin to Celsius, you simple add 273.15. (°C = K + 273.15). Should you also want to go to Fahrenheit, you simply take these results and do the following: (°F = 9/5 °C + 32)


    The colder it is, the more resistive the NTC Thermistor will be...

    The standard circuit is a simple resistor divider circuit with the balance resistor on top and the NTC Thermistor on bottom. When choosing the balance resistor, keep in mind that you want the resistor to be large enough to limit the current through the thermistor to prevent "self-heating"

    For a 10-k NTC thermistor, I typically use 16.9kΩ. If my reference voltage is 5.0v, that limits the current to the thermistor to a max of 500µA.

    The Thermistor data sheet should have the linearization constants (a, b & c...and sometimes d, etc...but mine had just a, b & c) Enter those values (if known). Next enter your Reference voltage (typically Vdd which is 5.0v or 3.3, unless you're using some other reference source on purpose such as 4.095, etc).

    Here is an example notes on the constants, etc based on my particular thermistor's data sheet:

    Code:
    'Carl's Notes from Thermistor Data Sheet
    'Therm-O-Disc: ECONOMY APPLIANCE PROBE SERIES
    'NTC Thermistor Probes (10JH/11JH)
    'R-T Formula: 1/T = a + b(ln R) + c(ln R)^3
    'Values for 10K at 25°C:
    'a = 1.125498166 x 10-3
    'b = 2.346771694 x 10-4
    'c = 8.579674698 x 10-8

    'Operating Temperature Range
    '-40° to 80°C
    '(-20° to 105°C with optional UL1015 lead wires)
    'Thermal Time Constant
    '10 seconds typical (liquid)
    '25°C/50°C
    'Dissipation Constant
    '4mW/°C
    The Excel file can be found here: http://click-server.com/forumfiles/misc/48946-Steinhart-Hart Worksheet.xls

    This is simply a short Article intended to pass on to fellow Proton/Amicus users, a handy worksheet I created for my own purposes. Feel free to use & modify as you wish, though I don't claim it is perfect, it was for my own needs and purposes.

    You will see that it creates a table for Adval, Input voltage, Thermistor resistance and the resulting temperatures in 3 different units, all based on 5 simple inputs (the 3 constants mentioned above, plus the Balance Resistor value, along with the Max Reference Voltage)

    For those of you who have seen this before, it has been updated and slightly improved.

    Best Regards,
    Carl
    "What one fool can do, so can another" -


  2. If you're a Licensed user of PROTON DEVELOPMENT SUITE, apply for Licensed User Status to remove these pesky messages
     and get access to additional forum areas, Beta test downloads and more!

  3. #2
    Licensed User ADLIN SYSTEMS's Avatar
    Join Date
    Jul 2004
    Location
    Pretoria Blue Bulls Country
    Posts
    764


    Default Re: Steinhart-Hart Linearization Worksheet

    Thanks Carl much appreciated.
    Anton
    Proton User and insanely enjoying it.

  4. #3
    Licensed User captainslarty's Avatar
    Join Date
    Sep 2006
    Location
    A Marina in Portugal
    Posts
    3,064


    Default Re: Steinhart-Hart Linearization Worksheet

    Hiya Carl my friend

    VERY nice work.. much appreciated. !

    I would be very greatful for the 16F and 18F versions with and without Ln (Natural Log)

    You can either post them here, or sent to me at my username at yahoo dotty co dotty uk..

    Great stuff.!
    Joe.
    Joe
    Civilisation is the limitless mutiplication of unecessary necessities ... (Mark Twain)

+ Reply to Thread

Members who have read this thread : 69

Actions :  (Set Date)

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts