Basic V=IR question

Discussion in 'General Electronics Chat' started by Razor Concepts, Dec 19, 2008.

  1. Razor Concepts

    Thread Starter Active Member

    Oct 7, 2008
    212
    1
    I have a question about calculating voltage with ohms law. Say that a microcontroller outputs 5v at 20ma, and it goes through a 100 ohm resistor. So 0.02 times 100 = 2 volts after it passes through the resistor, correct? What do you do with the original 5v output?
     
  2. leftyretro

    Active Member

    Nov 25, 2008
    394
    2
    Your missing another 150 ohm of load resistance. Let me try and explain. First a micro output pin doesn't determine what the output current will be, it just outputs a voltage. The amount of the current drawn by a load is determined by the load's resistance and the source voltage. I =E/R

    One can say the a specific micro output pin can output UP TO 20 ma, but the specific amount of current is determined by the total load resistance. So in your example you state that the output goes through a 100 ohm resistor, where does the other end of the resistor go to? We must know the total circuit load resistance to calculate the current.

    Lefty
     
  3. Razor Concepts

    Thread Starter Active Member

    Oct 7, 2008
    212
    1
    A 47ohm resistor is connected to VCC and a 100 ohm thermistor, and one end of the thermistor is connected to an input pin on the microcontroller. (I think the 20ma limit doesnt apply to this case because the current is coming from the battery?). The input pin on the microcontroller will just read the voltage.

    So if current is voltage over resistance, 5 volts over 150 ohms is about 33ma. How would I find out the voltage read by the microcontroller?
     
  4. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    You use Ohm's Law to find the voltages.

    For 33mA going through 100Ω thermistor, it will have 33mA*100=3.3V. So the microcontroller will see around 3.3V. For the 47Ω resistor, its voltage across is 33mA*47=1.55V.

    Their sum is 3.3V+1.55V=4.85V. It is not equal to 5V because you have assume current = 33mA which in actual fact should be 5V/147Ω = 34.014mA.

    Re doing the voltages using this new current value give 3.4014V across thermistor and 1.5986V across 47Ω. This adds up to 5V which is the supply voltage.
     
  5. Razor Concepts

    Thread Starter Active Member

    Oct 7, 2008
    212
    1
    Looks like the way I intended to do the circuit is not correct, since the voltage will always be 5v no matter what the thermistor voltage is. How would I change the circuit so that the voltage going to the input pin will vary depending on the thermistors resistance?

    Better yet, here is the schematic that someone has made:
    [​IMG]

    Does R4 enable TEMP (input pin of the microcontroller) to read varying voltages from the thermistor?
     
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Think of a current limiting resistor tied to some positive voltage. The other lead connects to the thermistor, whose other lead goes to ground. The voltage at the point where the fixed resistor and the thermistor will vary directly (but not linearly) with temperature. That is the voltage you want to apply to the A to D converter.
     
Loading...