resistor values in a voltage divider - Is this observation correct?

Discussion in 'The Projects Forum' started by jerseyguy1996, May 16, 2011.

  1. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    I am trying to understand the appropriate way to use a voltage divider to present a voltage to the ADC pin on an AVR microprocessor. The circuit is such that I have 5V coming through an ntc thermistor to a resistor and then to ground and the ADC pin is common to the point between the thermistor and the resistor. I believe the ADC is measuring the voltage across the resistor. I notice that with the thermistor that I am using, the value that I choose for the resistor will really affect my resolution at the low end and the high end. A low value resistor gives me much higher resolution at the high end whereas a high value resistor gives me much higher resolution at the low end. Is this a typical observation when doing something like this? Is it impossible to get high resolution at both ends?
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    Which thermistor are you using?
     
  3. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    No need to apologies;)

    Wow, nice spreadsheet. I love using excel for things like this, especially when you can play with the chart wizard and make a quick plot of the data, like so:

    [​IMG]

    (Plot of Temperature vs Thermistor Resistance)

    Now that I know what range you want to look at I can see the problem: The RTC is just out of wiggle room above say 150°C as they do not have a linear change with temperature.

    So nothing is wrong with your concept, except you should choose either a different sensor, or use two (or more) of them to expand the change for different temperature ranges.

    Another trick is to use unused output as analog grounds to switch in different R1's. (Each output is either floating or outputting a zero.)

    I would suggest an alternate sensor but I don't know of any that work up to 300°C.

    Anyone else?
     
    jerseyguy1996 likes this.
  5. russpatterson

    Member

    Feb 1, 2010
    351
    16
    I've used this one before, good way to go if you've got the extra i/o pins
     
  6. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    I will have unused port pins as I think I will just need a PWM pin and an ADC pin and the attiny85 has 6 portpins but one will be used for reset and a few will have to pull double duty for the serial connection for programming it. The more I look at it though the more I think I will be okay. Typical temperature for smoking is 220 degrees fahrenheit which is about 105 degrees celsius. Even if I decide I want to roast a chicken I probably wouldn't need more than 400 degrees f probably more like 350 so about 176 to 200 degrees celsius. With a 10K resistor according to my calculations I would get anywhere from 31 to 50 steps per 10 degrees celsius which is far more accuracy then I need. The only problem I think would be trying to work out the PID routine when the temperature is really low because the steps would be so far apart. Am I thinking this through correctly?
     
Loading...