Shop OBEX P1 Docs P2 Docs Learn Events
Thermistor calibration — Parallax Forums

Thermistor calibration

ArchiverArchiver Posts: 46,084
edited 2000-10-17 12:42 in General Discussion
Greetings all,

I am trying to measure a thermistor (10k @25C) with a BS2 or BS2sx.
A thermistor curve can be very closely approximated through use
of the Steinhart-Hart equation:

1/T=A+BlnR+C(lnR)^3

T= Degrees Kelvin
R= Thermistor Resistance
A,B,C = Curve-fitting constants

For the range I want to measure (-10C to +50C) the constants are:
A= 0.0010260068
B= 0.0002396354
C= 0.0000001548

I couldn't find a way to calculate this equation with those constants
and keep the accuracy at +-.05C.

If it helps:
R=47540 @ -10C
R=12260 @ 20C
R=10000 @ 25C
R=3893 @ 50C

Any idea will be appreciated.
Thanks

Aggelos Mallios
Design Engineer
National Centre for Marine Research
http://www.poseidon.ncmr.gr
mail: amallios@p...

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 14:59
    Have a look at:
    http://www.al-williams.com/awce/paktemp.htm

    That particular code uses a polynomial fit, but with a PAK-II (which works
    the same way as the PAK-I, but has more features and speed) you can even
    compute ln.

    We've done a lot of work with marine instrumentation with the PAKs (or
    customized versions of the PAK) in the past.

    Regards,

    Al Williams
    AWC
    * Floating point math for the Stamp, PIC, SX, or any microcontroller:
    http://www.al-williams.com/awce/pak1.htm


    >
    Original Message
    > From: Aggelos Mallios [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=zyxj5X37Fu6Y6kQ6n35MHKZMFdA33FqU83PTXWczeRlOxeZ-lOc8xAeKQ_edJtzB6Fo6MFWDcssi6YfzshwSW-lD]amallios@p...[/url
    > Sent: Thursday, October 12, 2000 8:39 AM
    > To: basicstamps@egroups.com
    > Subject: [noparse][[/noparse]basicstamps] Thermistor calibration
    >
    >
    > Greetings all,
    >
    > I am trying to measure a thermistor (10k @25C) with a BS2 or BS2sx.
    > A thermistor curve can be very closely approximated through use
    > of the Steinhart-Hart equation:
    >
    > 1/T=A+BlnR+C(lnR)^3
    >
    > T= Degrees Kelvin
    > R= Thermistor Resistance
    > A,B,C = Curve-fitting constants
    >
    > For the range I want to measure (-10C to +50C) the constants are:
    > A= 0.0010260068
    > B= 0.0002396354
    > C= 0.0000001548
    >
    > I couldn't find a way to calculate this equation with those constants
    > and keep the accuracy at +-.05C.
    >
    > If it helps:
    > R=47540 @ -10C
    > R=12260 @ 20C
    > R=10000 @ 25C
    > R=3893 @ 50C
    >
    > Any idea will be appreciated.
    > Thanks
    >
    > Aggelos Mallios
    > Design Engineer
    > National Centre for Marine Research
    > http://www.poseidon.ncmr.gr
    > mail: amallios@p...
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 17:47
    Aggelos

    I have a method to calculate the log function on the BS2 posted at
    http://www.emesystems.com/BS2math3.htm
    It is still a lot of work to get everything scaled right so that errors
    don't accumulate above your 0.1% level in the integer math.

    An alternative approach, especially if you have the additional memory of a
    BS2sx or BS2e, is to use a big enough lookup table and interpolation.

    Al Williams can tell you about the option using his Pak-I and Pak-II
    external math processors.

    -- Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com


    ---original message--->
    I am trying to measure a thermistor (10k @25C) with a BS2 or BS2sx.
    A thermistor curve can be very closely approximated through use
    of the Steinhart-Hart equation:

    1/T=A+BlnR+C(lnR)^3

    T= Degrees Kelvin
    R= Thermistor Resistance
    A,B,C = Curve-fitting constants

    For the range I want to measure (-10C to +50C) the constants are:
    A= 0.0010260068
    B= 0.0002396354
    C= 0.0000001548

    I couldn't find a way to calculate this equation with those constants
    and keep the accuracy at +-.05C.

    If it helps:
    R=47540 @ -10C
    R=12260 @ 20C
    R=10000 @ 25C
    R=3893 @ 50C

    Any idea will be appreciated.
    Thanks

    Aggelos Mallios
    Design Engineer
    National Centre for Marine Research
    http://www.poseidon.ncmr.gr
    mail: amallios@p...
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 19:16
    For the accuracy you are trying to get you need to pick
    a smaller temperature range where the approximation
    equation will fit the curve better - in short your
    equation will not be +/- .05 deg over 50 to -10 C deg.

    However also consider that your thermistor may not be
    this accurate or stable - see manufacturer's data.

    I calculated
    A = 1.029767 ^ -3
    B = 2.390289 ^ -4
    C = 1.570579 ^ -7

    Using -10, 25, 50 deg. [noparse][[/noparse]and you can only use 3 points in
    this curve fit...

    This may be a case of too many decimal places for the accuracy
    of the sensor - ! Each thermistor is a little different so
    you may have to do an empirical approach with the actual
    unit you are using and put those values in a table.

    A glass encapsulated thermistor can be quite time stable...
    as long as it isn't heated too high.

    <><>
    You wrote

    Date: Thu, 12 Oct 2000 16:39:13 +0300
    From: "Aggelos Mallios" <amallios@p...>
    Subject: Thermistor calibration

    I am trying to measure a thermistor (10k @25C) with a BS2 or BS2sx.
    A thermistor curve can be very closely approximated through use
    of the Steinhart-Hart equation:

    1/T=A+BlnR+C(lnR)^3

    T= Degrees Kelvin
    R= Thermistor Resistance
    A,B,C = Curve-fitting constants

    For the range I want to measure (-10C to +50C) the constants are:
    A= 0.0010260068
    B= 0.0002396354
    C= 0.0000001548

    I couldn't find a way to calculate this equation with those constants
    and keep the accuracy at +-.05C.
    <><>

    ________________________________________________________________
    YOU'RE PAYING TOO MUCH FOR THE INTERNET!
    Juno now offers FREE Internet Access!
    Try it today - there's no risk! For your FREE software, visit:
    http://dl.www.juno.com/get/tagj.
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-17 12:42
    Thank you for your replies.
    I will work on that and I will come back when I have news.

    Aggelos Mallios
    Design Engineer
    National Centre for Marine Research
    http://www.poseidon.ncmr.gr
    mail: amallios@p...
Sign In or Register to comment.