Basic V=IR question

Thread Starter

Razor Concepts

Joined Oct 7, 2008
214
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?
 

leftyretro

Joined Nov 25, 2008
395
I have a question about calculating voltage with ohms law. Say that a micro-controller 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?
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
 

Thread Starter

Razor Concepts

Joined Oct 7, 2008
214
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?
 

eblc1388

Joined Nov 28, 2008
1,542
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.
 

Thread Starter

Razor Concepts

Joined Oct 7, 2008
214
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:


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

beenthere

Joined Apr 20, 2004
15,819
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.
 
Top