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

NTC Thermistor

ArchiverArchiver Posts: 46,084
edited 2003-11-09 11:24 in General Discussion
Hello
Has anyone done any projects which involved using a thermistor for
temperature measurements
Any pointers would do

Isaac

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-11-08 23:14
    Isaac,

    I have built a fairly accurate (+/- 0.2 degrees C absolute) NTC-thermometer
    using the command RCTIME.

    The secret for my sensor was to linearize the curved relationship between
    resistance and temperature. I did this linearization by cutting the curve
    into pieces and then fit each each piece by a short straight line.

    See code below to get an idea how this linearization works. For this
    calculation you will need the resistance of the sensor at given temperatures
    Tcal plus the slope of its curve.

    Regards.

    Klaus

    '///////////////////////////////////////////////////////////////////////////
    ' NTC == miniature sensor, used for fever-thermometers
    '
    ' Ts = Cx - RT/Cy Ts: Temperature of sensor * 10
    ' RT: output of RCTIME
    ' Cx = T_cal + R_cal/(dR/dT)_cal cal: 10,15,20,25 degree C
    ' Cy = K*(dR/dT)_cal (dR/dT): slope of curve at this point
    ' K = 29,57 K: system constant for BS2 and cap = 0.47 uF


    '{$STAMP BS2}

    OUTPUT 15

    Ts VAR WORD
    RT VAR WORD


    Main:

    OUT15 = 1 'just a flashing led to indicate the system is running

    HIGH 12
    PAUSE 10
    RCTIME 12, 1, RT 'here the resistance of the sensor is measured

    OUT15 = 0

    ' below are the four straight lines for linearization

    Ts = 479 - (RT/107)
    IF Ts>225 THEN Label1

    Ts = 420 - (RT/139)
    IF Ts>175 THEN Label1

    Ts = 367 - (RT/177)
    IF Ts>125 THEN Label1

    Ts = 306 - (RT/231)

    Label1:

    ' display output with decimal point, ie 19.7

    DEBUG CLS, DEC Ts/10, ".", DEC1 Ts

    PAUSE 440

    GOTO Main


    Oorspronkelijk bericht
    Van: isaac_aiyanyo [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=0g93u_LQinISEjdhAFUABcYS1toFqPKtQXN9aAuKUFVUN1AdUjw_PbjLX762qmmwJxQ65iKPYv6bSM1dlaQR9tU8]isaac.aiyanyo@n...[/url
    Verzonden: zaterdag 8 november 2003 23:12
    Aan: basicstamps@yahoogroups.com
    Onderwerp: [noparse][[/noparse]basicstamps] NTC Thermistor



    Hello
    Has anyone done any projects which involved using a thermistor for
    temperature measurements
    Any pointers would do

    Isaac



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-09 11:24
    Klaus

    Thanks for your reply you have given me hope as i was thinking it would be
    almost impossible to do
    the thermistor i am using have got 3k @ 25 degees C
    i want to use the range from -20 to 80 degees C using the command RCTIME
    and need at most +/- 0.5degrees C
    accuracy.


    > The secret for my sensor was to linearize the curved relationship between
    > resistance and temperature. I did this linearization by cutting the curve
    > into pieces and then fit each each piece by a short straight line.
    For my range does this mean i have to do say _20,-15,-10,-5,0
    then do say 5,10,15,20,25 etc
    > See code below to get an idea how this linearization works. For this
    > calculation you will need the resistance of the sensor at given
    temperatures
    > Tcal plus the slope of its curve.
    On my data sheet i have got the resistance of the thermistor given over the
    entire range example
    at -20 degees C resistance is 19.41 K
    at -15 degees C resistance is 19.29K
    at -10 degees C resistance is 19.01K
    at -5 degees C resistance is 18.79K
    i got a bit lost with the maths trying to figure out how this would be
    placed in the formula here could you kindly break it down for me RT is the
    result of the command RCTIME thats clear

    > ' Ts = Cx - RT/Cy Ts: Temperature of sensor * 10
    Where would i get T_cal from and also what values would i use for (dR/dT)

    Could you please expand on this using the values above

    Thanks for Your Time
    Very Much appreciated
    Isaac
Sign In or Register to comment.