Shop OBEX P1 Docs P2 Docs Learn Events
BS1 and Thermistor scaling — Parallax Forums

BS1 and Thermistor scaling

ArchiverArchiver Posts: 46,084
edited 2001-02-06 20:01 in General Discussion
Hi.

Please bear with me here...I'm not a professional EE, just a hobbyist
[noparse]:)[/noparse]

I've been trying to figure out how to determine the scale to be used
with a 0-50k ohm thermistor (from Radio Shack).

This is the thermistor suggested in the BS1 Application Notes, Section
7.

To build the table for future calculations, the application notes say
to use a 50k pot and 0.01uF cap. I think this is a typo since
everywhere else a 0.1uF cap is suggested.

Now, when I connect the 50k pot and 0.1uF cap correctly and press
Alt-P to start the calibration, the scale fluctuates quite a bit
without me ever touching the pot. Is this normal? If so, how can I
tell what scale to use?

Another thing...In the BS Command Reference 2.0c (the pdf from the
website), on page 240 (Pot calibration and scaling), step 5 claims to
be assuming that a pot is used...what if you're not using a pot to
determine the scaling?

Is it possible to determine the scale without using the pot (seems to
be very quirky, as I mentioned about, plus it's quite difficult to set
to the exact values listed on the back of the thermistor package to
build the table)?

Also, how important is it to obtain the corresponding reading for each
and every value?

Thanks for your time!

-Rich

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-02-06 17:05
    Hi Rich,

    I use this same thermistor in a project at
    http://www.al-williams.com/awce/paktemp.htm

    You might find that interesting. The capacitor you use isn't so critical as
    long as it is stable. You'll just get different numbers with different caps.

    Regards,

    Al Williams
    AWC
    * Expand your Stamp I/O for 1/3 off!
    http://www.al-williams.com/awce/pak3.htm
  • ArchiverArchiver Posts: 46,084
    edited 2001-02-06 18:04
    Hi Al!

    That page certainly looks like it would help...but alas, I only have a
    BS1, so I don't have an RCTIME function. I'm locked in to the POT
    function.

    I wish the person who had written the Ref page on RCTIME would have
    written the POT page also [noparse]:)[/noparse] The RCTIME page has lots of useful info
    and I can see, using this info, how you arrived at your equations.

    Do you know of any way to convert the result of the POT function into
    ohms with a particular scale.

    I guess my problem is that there are so many variables that I'm
    getting lost...

    Thanks for your input!

    -Rich
  • ArchiverArchiver Posts: 46,084
    edited 2001-02-06 19:20
    The Pot command works a lot like the RCTime command, but it doesn't allow
    you to set the desired state. The time is multiplied by scale/256 (so a
    scale of 255 is almost like no scale at all).

    I'm reminded of the 3 students in thermodynamics class. They were asked to
    find out how long it takes the center of a frozen 6 pound roast to reach 300
    degress in an oven set to 450 degrees.

    Student 1 didn't give an answer, but outlined experiments that would give
    the answer to great precision.

    Student 2 wrote his report while eating a roast beef sandwich.

    Student 3 called her mother and asked.


    I'd be tempted to use #2. Take resistors at each end of your range and find
    a scale value that gives you close to $FFFF for the high one and close to 0
    for the low one. Of course, you won't hit these values, but the wider the
    better. Then I'd hook up my thermistor and match pot readings with a known
    thermometer. Then I'd curve fit as I did in the article I pointed out to
    you.

    Good luck!

    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: Rich [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=qRWe8L5wpBaWTHcIrGFtpBXVittl-6STGamvIWHyVsin6CPIOUcqG-851--egy3yUqa99gy_4efQ4tA]ralloway@h...[/url
    > Sent: Tuesday, February 06, 2001 12:05 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: BS1 and Thermistor scaling
    >
    >
    > Hi Al!
    >
    > That page certainly looks like it would help...but alas, I only have a
    > BS1, so I don't have an RCTIME function. I'm locked in to the POT
    > function.
    >
    > I wish the person who had written the Ref page on RCTIME would have
    > written the POT page also [noparse]:)[/noparse] The RCTIME page has lots of useful info
    > and I can see, using this info, how you arrived at your equations.
    >
    > Do you know of any way to convert the result of the POT function into
    > ohms with a particular scale.
    >
    > I guess my problem is that there are so many variables that I'm
    > getting lost...
    >
    > Thanks for your input!
    >
    > -Rich
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-02-06 20:01
    Things are staring to make sense now, I think [noparse]:)[/noparse]

    How does this sound?

    I take a 5k fixed resistor and connect it to pin0.
    I take a 50k fixed resistor and connect it to pin1.
    Then use the following program:


    Symbol scale = B0
    Symbol lo_ohm = B2
    Symbol hi_owm = B3


    for scale = 0 to 255
    pot 0, scale, lo_ohm
    pot 1, scale, hi_ohm
    debug "Scale = ", scale, CR
    debug "5k = ", HEX ? lo_ohm, CR
    debug "50k = ", HEX ? hi_ohm, CR
    pause 2000
    next

    If I'm correct, this should loop the "scale" variable from 0 to 255,
    uses that scale to sample my resistors, outputs the raw data from the
    pot command in hex (0-ffff), and sleeps for 2 sec before running the
    loop with the next higher scale value.

    Please excuse any errors...I'm typing this in from memory of PBASIC
    since I'm at work and not at home where I can work on the stamp
    directly.

    Is this the type of test you were suggesting?

    If so, this would probably work for all components with a variable
    resistance, right? So I could use this for finding the scale for a
    photocell as well (since accurately changing the amount light would be
    very tricky) if I know the range of the component.

    Thanks again for your help!

    -Rich

    --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > The Pot command works a lot like the RCTime command, but it doesn't
    allow
    > you to set the desired state. The time is multiplied by scale/256
    (so a
    > scale of 255 is almost like no scale at all).
    >
    > I'm reminded of the 3 students in thermodynamics class. They were
    asked to
    > find out how long it takes the center of a frozen 6 pound roast to
    reach 300
    > degress in an oven set to 450 degrees.
    >
    > Student 1 didn't give an answer, but outlined experiments that would
    give
    > the answer to great precision.
    >
    > Student 2 wrote his report while eating a roast beef sandwich.
    >
    > Student 3 called her mother and asked.
    >
    >
    > I'd be tempted to use #2. Take resistors at each end of your range
    and find
    > a scale value that gives you close to $FFFF for the high one and
    close to 0
    > for the low one. Of course, you won't hit these values, but the
    wider the
    > better. Then I'd hook up my thermistor and match pot readings with a
    known
    > thermometer. Then I'd curve fit as I did in the article I pointed
    out to
    > you.
    >
    > Good luck!
    >
    > 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: Rich [noparse][[/noparse]mailto:ralloway@h...]
    > > Sent: Tuesday, February 06, 2001 12:05 PM
    > > To: basicstamps@y...
    > > Subject: [noparse][[/noparse]basicstamps] Re: BS1 and Thermistor scaling
    > >
    > >
    > > Hi Al!
    > >
    > > That page certainly looks like it would help...but alas, I only
    have a
    > > BS1, so I don't have an RCTIME function. I'm locked in to the POT
    > > function.
    > >
    > > I wish the person who had written the Ref page on RCTIME would
    have
    > > written the POT page also [noparse]:)[/noparse] The RCTIME page has lots of useful
    info
    > > and I can see, using this info, how you arrived at your equations.
    > >
    > > Do you know of any way to convert the result of the POT function
    into
    > > ohms with a particular scale.
    > >
    > > I guess my problem is that there are so many variables that I'm
    > > getting lost...
    > >
    > > Thanks for your input!
    > >
    > > -Rich
    > >
    > >
    > >
Sign In or Register to comment.