Connect with us

diy thermometer sensitivity

Discussion in 'Electronic Basics' started by [email protected], Jun 10, 2013.

Scroll to continue with content
  1. Guest

    I have a need to measure temperature accurately from 78.0 C to 79.0 C (eventually I'll need to turn on a solenoid valve for cooling water at 79 C and turn it off at 78 C).

    I saw this on the web:

    and I happen to have an Arduino on me. I read about how a 2N3904 can function as a temperature sensor if you tie the base and collector together, so I did that instead of placing an order and waiting for a thermistor to arrive.

    A friend said to put the 10k resistor on the +5V line, then have the transistor below that, then tie the emitter to ground. Did that. A wire goes from the B-C-resistor junction to the ADC input on the Arduino.

    It works. The serial port monitor tells me that for ice water, the 10-bit ADC value is 141. Boiling water from the microwave gives me 105. Room temperature at 23 C gave me 132.

    I made a best-fit line with my OpenOffice spreadsheet and had the Arduino calculate the temperature. But now the sensitivity seems to only be 3 degrees. Temperature will jump even on gradual heating by 3 degrees.

    I would like to expand the range from 105 to 141 somewhat (10 bits should get me 0 to 1023, right?)

    I tried substituting 500 ohms for the 10k resistor (5V/500 ohms = 10 mA, should be ok) but still didn't get much improvement in sensitivity.

    Any suggestions?


  2. Guest

    Oh ok, I'll keep that in mind. Thanks! The temperature changes within seconds; maybe I just have to take more samples... every few milliseconds or so
  3. Well you'll have to calibrate it somehow though.
    The thermistor idea is OK. You can get 0.1 degree C thermistors for
    (maybe) $10 and 0.2 C for less. You'll want to think about the error
    sources in your measurement. (How 'good' does the +5V have to be?
    What about the 10k ohm resistor?)

    I've got a table for a 10k ohm (room temp.) thermistor, it doesn't go
    up to 79 C, but at 59C the resistance is 2580 ohms and 2488 ohms at
    60C. (to give you an idea of the sensitivity.)
    You'll do a bit better if the second resistor is closer in value to
    your thermistor resistance at your desired temperature.
    To improve sensitivity put it in a bridge with an instrument amp after
    the bridge and adjust the gain and bridge resistors to fill the span
    of your ADC.

    George H.
  4. Guest

    Great! Thanks!

    I've never used an opamp before. This will be fun. =)

  5. Guest

    Ice bath (0 C), boiling water (100 C)... then again I used tap water not distilled, and I'm probably 70 ft above sea level... eh, good enough. Least-squares trendline in OpenOffice and... voila.

    Say... what *would* the resistance of a 2n3904 be at room temperature, withthe base tied to the collector? I tried to put my DMM in series to measure the current with the resistor there, hoping to calculate R=V/I, but forsome reason the Arduino refused to work this way (looked like an open circuit to the Arduino).

    Ok, I will try that.


  6. As someone said, the articles always used to tell you to use ice cubes and
    boiling water to define those points, something you can easily replcate at
    home. But then what's the linearity between those points? Some schemes
    were better than others, and it's been so long.

    But making a thermometer is actually different from a switch that turns on
    at a given temperature. You might as well get a good thermometer, and
    then adjust the trigger in the homemade sensor to switch at that point.
    Turn up the heat until the thermometer reads what you want, then adjust
    the trigger so it switches at that point. Then you don't have to fuss
    about calibrating the sensor, or worry about whether it's linear over the
    same range.

  7. Yeah What Jim said,

    Here's a link to diode forward voltage vs temperature... (Lots of
    stuff you don't need there, but you can look at the first figure.) calibration table.doc

    You'll need to drive the diode with a current source. Part of the
    problem with the diode is if you want to sense a 1 degree difference
    that's only a 2mV change in signal level.
    A bridge is nice because it also reduces the 5 volt supply stability

    George H.
  8. Umm, a silly question. Is this to 'gain-up' the transistor Vbe
    voltage with transistor as temp sensor? Or to 'gain-up' a thermistor
    stuck in as R2?

    I was first thinking the later... but then changed my mind.

    George H.
  9. Guest

    It might. I touched the transistor and wondered if it was getting warm, but maybe it was just my imagination.

    I wasn't brave enough to tie the transistor base and collector directly to +5V... I didn't want to ruin my Arduino.

    Thanks for the advice, everyone! My head is spinning. So many things to try.

  10. Guest

    On Tuesday, June 11, 2013 6:31:04 AM UTC-7, George Herold wrote:


    A follow-up silly question... is the temperature-sensing transistor R2?

    Thanks for the circuit John!

  11. Guest

    Yes, I was starting to wonder if the best approach would be to simply bite the bullet and pay the $2 for the thermistor.

    But the methods everyone suggested will probably get me to where I need to go.


  12. Guest

    On Tuesday, June 11, 2013 9:24:24 PM UTC-7, John Larkin wrote:


    It is cute! Thanks!

    If you think that is tacky, you'd laugh at what I'm using the temperature sensor for.

  13. Guest

    Pretty cool (pun intended.)

    Voltage decreases as the temperature increases. I used a 50k resistor for R2. I'm getting around 700 out of 1024 on the ADC at room temperature, andtemperature dropped as I put my fingers on it. Calibration time...

    Must R3 be 2x R1, or does R1 provide all the current protection I need? Since I choose R2/R3 = 5, would 100 ohms for R3 and 470 ohms for R2 be fine?

    Thanks again!

  14. Guest

    What kind of capacitor in parallel with R3?

    So far after calibration I'm getting:

    750 = 1 C
    709 = 25.5 C
    340 = 91 C

    ....although I do notice the numbers jump around quite a bit more. Probably need that cap.

    Very nice! Thank you!

  15. Guest

    Your guess is pretty darned close ;)

  16. Guest

    On Wednesday, June 12, 2013 12:36:25 PM UTC-7, George Herold wrote:


    Haha, I plead the Fifth. The closer I can get to the 95% EtOH-H2O azeotrope at around 78 degrees (seems like the exact number depends on which sourceyou read 78.2? 78.3? 78.5? I give up), the better. If I completely lose control and allow it to get as high as 95 degrees, my column simplifies to asingle-stage (allowing way too much water in the distillate) and that completely defeats the purpose of having a column.

    They never told us how important temperature control was when I was taking the Mass Transfer (eh, Diffusion Theory) class in college.

    I tried manually controlling temperature with my sprinkler valve... uhoh, my thermometer reads 85 degrees... FULL OPEN! Whoops, too much cold feed, now my heating element has stopped boiling and temperature plunges below 78.... waiting for the boiler to boil again... drives ya nuts after awhile.


  17. Guest

    On Wednesday, June 12, 2013 12:36:25 PM UTC-7, George Herold wrote:


    Oh, I didn't notice that question.

    Glad you asked!

    Consider a mixture of 96% alcohol and 4% water. You try to distill it. You collect the cooled-down distillate vapors. The composition is... 96% alcohol and 4% water. Distillation did nothing to separate the two.

    "A well-known example of a positive azeotrope is 95.63% ethanol and 4.37% water (by weight).[4] Ethanol boils at 78.4 °C, water boils at 100 °C, but the azeotrope boils at 78.2 °C, which is lower than either of its constituents.[5] Indeed 78.2 °C is the minimum temperature at which any ethanol/water solution can boil at atmospheric pressure."

    You can separate the water out by passing it through a dessicating agent, like ANHYDROUS magnesium sulfate.
  18. Guest

    On Wednesday, June 12, 2013 12:36:25 PM UTC-7, George Herold wrote:


    Yeah the charts are pretty. The tables from Perry's Chemical Engineering Handbook are probably more useful in this context, however.

    Go down to "Equilibrium Data", Mass Fraction (g/g), and Vapour (y).

    At 78.15 degrees you see the azeotrope (liquid and vapor have the exact same composition, 0.9558, or 95.58% ethanol). That is my target.

    As temperature rises a bit you see the vapor fraction of ethanol drops. Even just at 79.8 degrees, less than 2 degrees above 78.15, the ethanol composition has dropped to 83%. So the dessicant step later on has to work thatmuch harder to make that ethanol dry. (Trying to make a fuel here, not planning to drink it.) As temperature rises to 95.5 degrees, well, you basically just made a single-stage distiller. A beer mix will distill at around95 degrees. It's about 5% ethanol. The vapor will be 34% ethanol or so, not quite concentrated enough to catch fire with a match.
  19. Jon Kirwan

    Jon Kirwan Guest

    I note that even at 78.24C on your web link that the vapour
    fraction has dropped 5% already. I'd almost wonder if there
    is a vapour sensor system you could arrange to measure in
    situ and use this as feedback in closed loop control.

    It seems almost easier that way, because you are talking here
    about significant differences with only tens of milliKelvins
    accuracy (not precision) differences. And, as already
    suggested, even if you have a well calibrated temperature
    measurement and the sensor(s) is(are) placed optimally, you
    may also need atmospheric pressure and relative humidity
    figures in there, as well. And tables to use in controlling
    things. Or else you control those factors, too.

    Thanks for the posts, by the way. I am not a chemist and I
    had only vague notions of how difficult this distillation
    process might be. I now have a much better appreciation for

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day