Understanding pull up resistors

Guest
I am working through an electronics course and hoping that someone can
explain this to me. Ok here goes

VCC
|
|
\
/ R1
\
/
|
|
|-------------------------------------- Device Pin
| |
| |
/ V
/ _ LED1
| SW1 |
| \
| / R2
| \
| /
| |
| |
GND GND

(hope this drawing comes out okay)
For this assume R1 and R2 = 470 Ohms and LED1 is just a plain old LED
with a voltage drop of 2V. Vcc=+5V

Okay, here is my dilemma. With S1 open and the LED lit, I get a
voltage of about 3.5 V at the device pin. With the Switch closed, my
device pin is at 0. This is what this circuit is supposed to do but I
don't understand it. I dont understand the function of R1 at all.
Why when I measure the voltage at the device pin doesn't the voltage
drop across R1 count when the switch is open (or closed for that
matter). What brings the voltage to zero at my device pin when the
switch is closed. What path is it taking (or not taking since it is
at zero).

This is the explanation from my book. Since I know I am applying 5V
to the two resistors and the LED, I can use Kirchhoff's law to divvy
up the voltages across these three devices..

Vcc=Vr1+Vr2+VLED

I know Vcc = 5.0V and VLED=2.0V

Because R1 and R2 are the same value, the same voltage drop will be
across each one of them:
2Vr=Vr1+Vr2
2Vr=3V
Vr(x) = 1.5V

So in this circuit, the voltage drop across R1 and R2 is 1.5V.

(Okay this is where the book looses me).

It says when the switch is open, the voltage applied to the device pin
is the voltage across R2 and LED1. Since we know these, we can
express the switch open voltage as:
Vopen=Vled1+Vr2
=2.0V+1.5V
=3.5V

and it works just like that!!! which is dandy.

WHY OH WHY doesn't R1 come into the picture with the switch open. It
is hooked to Vcc. Is the voltage flowing from the device pin through
LED1 and R2 to ground..why doesn't it flow from Vcc to ground anymore.
This is where the whole concept of a "Pull up resistor" on a input pin
just totally looses me. I know it works, I just don't get how it
works. Can someone here express it in different words or something.

It takes the path of least resistance because the switch is like a
zero ohm resistor...I just dont understand why it goes to zero at my
device pin. There is something very basic here that I am just not
getting. Sorry for the dumb question but this has been bothering me
for quite some time now. My poor confused brain.

Thanks for any help!
 
On Sun, 19 Oct 2003 03:43:32 GMT,
brokepokerplayerREMOVEDIS@yahooANDDIS.com wrote:

I am working through an electronics course and hoping that someone can
explain this to me. Ok here goes

VCC
|
|
\
/ R1
\
/
|
|
|-------------------------------------- Device Pin
| |
| |
/ V
/ _ LED1
| SW1 |
| \
| / R2
| \
| /
| |
| |
GND GND

(hope this drawing comes out okay)
For this assume R1 and R2 = 470 Ohms and LED1 is just a plain old LED
with a voltage drop of 2V. Vcc=+5V

Okay, here is my dilemma. With S1 open and the LED lit, I get a
voltage of about 3.5 V at the device pin. With the Switch closed, my
device pin is at 0. This is what this circuit is supposed to do but I
don't understand it. I dont understand the function of R1 at all.
Why when I measure the voltage at the device pin doesn't the voltage
drop across R1 count when the switch is open (or closed for that
matter). What brings the voltage to zero at my device pin when the
switch is closed. What path is it taking (or not taking since it is
at zero).

This is the explanation from my book. Since I know I am applying 5V
to the two resistors and the LED, I can use Kirchhoff's law to divvy
up the voltages across these three devices..

Vcc=Vr1+Vr2+VLED

I know Vcc = 5.0V and VLED=2.0V

Because R1 and R2 are the same value, the same voltage drop will be
across each one of them:
2Vr=Vr1+Vr2
2Vr=3V
Vr(x) = 1.5V

So in this circuit, the voltage drop across R1 and R2 is 1.5V.

(Okay this is where the book looses me).

It says when the switch is open, the voltage applied to the device pin
is the voltage across R2 and LED1. Since we know these, we can
express the switch open voltage as:
Vopen=Vled1+Vr2
=2.0V+1.5V
=3.5V

and it works just like that!!! which is dandy.

WHY OH WHY doesn't R1 come into the picture with the switch open. It
is hooked to Vcc. Is the voltage flowing from the device pin through
LED1 and R2 to ground..why doesn't it flow from Vcc to ground anymore.
This is where the whole concept of a "Pull up resistor" on a input pin
just totally looses me. I know it works, I just don't get how it
works. Can someone here express it in different words or something.

It takes the path of least resistance because the switch is like a
zero ohm resistor...I just dont understand why it goes to zero at my
device pin. There is something very basic here that I am just not
getting. Sorry for the dumb question but this has been bothering me
for quite some time now. My poor confused brain.

Thanks for any help!

Switch closes, switch "pulls" down the pullup resistor voltage to
ground voltage at device pin voltage is now equal to ground. Switch
bypasses the LED circuit (shorting out) therefore LED goes out YET the
current is still flowing across R1 from power to ground. Remember: two
different potientials make current flow even between 5V and -5V still
flows even there is no ground. The "ground" expression is just that
and still is useful if understood properly.

Think about it.

Ground can be an 5V referred from any different voltages even seperate
grounds. There's is no "true" ground, it's just a name but it does
have a specific meaning and keep in mind where you're using which
ground as reference to what.


When switch is open that pull up resistor pulls up the device pin
voltage to the voltage between total drop of both LED & LED resistor.
Becomes a voltage divider so to speak and LED lights because of
voltage potiential doing work making electrons flowing from one to
another.

There is small voltage difference between two points of grounds even
miles apart bec of overall resistance in any device, even silver has
best lowest resistance but 10 mile long of that wire do have some
resistance. This is why sometimes you hear about a ground loop that
plagues sensitive electronics.

Cheers,

Wizard
 
<brokepokerplayerREMOVEDIS@yahooANDDIS.com> wrote in message
news:3f91fc6f.209781337@news-server.kc.rr.com...
I am working through an electronics course and hoping that someone can
explain this to me. Ok here goes

VCC
|
|
\
/ R1
\
/
|
|
|-------------------------------------- Device Pin
| |
| |
/ V
/ _ LED1
| SW1 |
| \
| / R2
| \
| /
| |
| |
GND GND

(hope this drawing comes out okay)
For this assume R1 and R2 = 470 Ohms and LED1 is just a plain old LED
with a voltage drop of 2V. Vcc=+5V

Okay, here is my dilemma. With S1 open and the LED lit, I get a
voltage of about 3.5 V at the device pin. With the Switch closed, my
device pin is at 0. This is what this circuit is supposed to do but I
don't understand it. I dont understand the function of R1 at all.
Why when I measure the voltage at the device pin doesn't the voltage
drop across R1 count when the switch is open (or closed for that
matter). What brings the voltage to zero at my device pin when the
switch is closed. What path is it taking (or not taking since it is
at zero).

This is the explanation from my book. Since I know I am applying 5V
to the two resistors and the LED, I can use Kirchhoff's law to divvy
up the voltages across these three devices..

Vcc=Vr1+Vr2+VLED

I know Vcc = 5.0V and VLED=2.0V

Because R1 and R2 are the same value, the same voltage drop will be
across each one of them:
2Vr=Vr1+Vr2
2Vr=3V
Vr(x) = 1.5V

So in this circuit, the voltage drop across R1 and R2 is 1.5V.

(Okay this is where the book looses me).

It says when the switch is open, the voltage applied to the device pin
is the voltage across R2 and LED1. Since we know these, we can
express the switch open voltage as:
Vopen=Vled1+Vr2
=2.0V+1.5V
=3.5V

and it works just like that!!! which is dandy.

WHY OH WHY doesn't R1 come into the picture with the switch open. It
is hooked to Vcc. Is the voltage flowing from the device pin through
LED1 and R2 to ground..why doesn't it flow from Vcc to ground anymore.
This is where the whole concept of a "Pull up resistor" on a input pin
just totally looses me. I know it works, I just don't get how it
works. Can someone here express it in different words or something.

It takes the path of least resistance because the switch is like a
zero ohm resistor...I just dont understand why it goes to zero at my
device pin. There is something very basic here that I am just not
getting. Sorry for the dumb question but this has been bothering me
for quite some time now. My poor confused brain.

Thanks for any help!

I'm not sure I understand where the confusion is coming from, the pullup
resistor holds the device pin high by pulling it up towards Vcc, the switch
shorts it to ground bringing the device pin low to ground, the LED is just
there to indicate the state. A circuit doesn't get much simpler than that.
 
Just a few comments below:


brokepokerplayerREMOVEDIS@yahooANDDIS.com wrote:
<<stuff deleted>>
WHY OH WHY doesn't R1 come into the picture with the switch open. It

That's the whole issue! If it wasn't there, the potential at the device pin would remain close to 0volts all the time even with the switch open. With the R1 there, it "pulls" the voltage up to 3.5volts when the switch is open (see below)


is hooked to Vcc. Is the voltage flowing from the device pin through
LED1 and R2 to ground.

In this case, the internal resistance of the device will be very large with respect to the R1&R2 values therefore any effect of the device itself on the circuit in question is negligible. For all intents and purposes of this discussion, there is no current going into or out of the device.


why doesn't it flow from Vcc to ground anymore.

This is incorrect. It *IS* flowing from Vcc through R1, then the LED, Then R2 to ground. The fact that there IS current flowing through these devices is what forces the potential at the device pin to 3.5volts relative to gnd (or -1.5volts relative to Vcc--we typically measure w.r.t. gnd though). resistances in series is refered to as a "voltage divider" for this very reason.


This is where the whole concept of a "Pull up resistor" on a input pin
just totally looses me. I know it works, I just don't get how it
works. Can someone here express it in different words or something.

Point (A): Again, assume that the internal resistances of the device are very large. With this being the case, for this discussion you can view your circuit as existing without the device. I.e., your device pin is only a test point now.


It takes the path of least resistance because the switch is like a
zero ohm resistor.

Point (B): Right, in other words when your switch is CLOSED it is as though the LED and R2 have been "removed" since their resistance is many times higher than that of the closed switch, ie. nearly all of the current bypasses them. Remember this when reading my next comment below:


I just dont understand why it goes to zero at my device pin.

Considering points (A) and (B) above, simply redraw your circuit with the switch closed and the things that can't affect the circuit removed and see what you get. It will now look like this:

VCC
|
|
\
/ R1
\
/
|
|
|--------------------------------------Test point
|
|
+
|
| SW1
+
|
|
|
|
|
GND

With SW1 closed bypassing the LED and R2, it is as though they aren't there. Since the device's internal resistance is extrememly high, it is as though IT isn't there. In fact, with the switch closed, the test point will be a 0volts regardless of whether or not R1 even exists (i.e., SW1 looks like a piece of wire connecting the device pin directly to ground). As you can see, in the above circuit R1 has no effect at all. It could be removed and the test point still sits at 0 volts w.r.t. gnd because it is locked there by the closed switch.

If you open the switch, it then appears as though R2 and the LED are returned to the circuit and the switch now has no effect and is removed thusly:

VCC
|
|
\
/ R1
\
/
|
|
|-------------------------------------- Test Point
|
|
V
_ LED1
|
\
/ R2
\
/
|
|
GND


As you can see now, if R1 were not present the voltage at the test point would still be at 0volts since the LED and R2 would be acting like a very poor switch (remember the internal resistance of the device is very high relative to the LED/R2 components). R1 is necessary to provide a path for current to flow to the LED/R2 and then to gnd. The more you lower the value of R1, the greater the current through it and R2/LED, the greater the voltage drop across R2/LED and thus the higher the voltage at the test point. Thus, the presence of R1 in the circuit when the switch is OPEN (and only then), has the effect of "pulling" the voltage at the test point "up", otherwise it would just remain at 0.

Now if the device's internal resistances were much lower, then it would get much more complicated but that is a totally different issue :)

Hope this procides another perspective on it for you. Keep at it, it'll all come naturally soon enough.

- Jeff
 
You can't have a voltage drop across that resistor until current flows.
Current cannot flow until the switch is closed. Until the switch is closed,
you'll see source voltage on both ends of the resistor.

Mark Z.



<brokepokerplayerREMOVEDIS@yahooANDDIS.com> wrote in message
news:3f91fc6f.209781337@news-server.kc.rr.com...
I am working through an electronics course and hoping that someone can
explain this to me. Ok here goes

VCC
|
|
\
/ R1
\
/
|
|
|-------------------------------------- Device Pin
| |
| |
/ V
/ _ LED1
| SW1 |
| \
| / R2
| \
| /
| |
| |
GND GND

(hope this drawing comes out okay)
For this assume R1 and R2 = 470 Ohms and LED1 is just a plain old LED
with a voltage drop of 2V. Vcc=+5V

Okay, here is my dilemma. With S1 open and the LED lit, I get a
voltage of about 3.5 V at the device pin. With the Switch closed, my
device pin is at 0. This is what this circuit is supposed to do but I
don't understand it. I dont understand the function of R1 at all.
Why when I measure the voltage at the device pin doesn't the voltage
drop across R1 count when the switch is open (or closed for that
matter). What brings the voltage to zero at my device pin when the
switch is closed. What path is it taking (or not taking since it is
at zero).

This is the explanation from my book. Since I know I am applying 5V
to the two resistors and the LED, I can use Kirchhoff's law to divvy
up the voltages across these three devices..

Vcc=Vr1+Vr2+VLED

I know Vcc = 5.0V and VLED=2.0V

Because R1 and R2 are the same value, the same voltage drop will be
across each one of them:
2Vr=Vr1+Vr2
2Vr=3V
Vr(x) = 1.5V

So in this circuit, the voltage drop across R1 and R2 is 1.5V.

(Okay this is where the book looses me).

It says when the switch is open, the voltage applied to the device pin
is the voltage across R2 and LED1. Since we know these, we can
express the switch open voltage as:
Vopen=Vled1+Vr2
=2.0V+1.5V
=3.5V

and it works just like that!!! which is dandy.

WHY OH WHY doesn't R1 come into the picture with the switch open. It
is hooked to Vcc. Is the voltage flowing from the device pin through
LED1 and R2 to ground..why doesn't it flow from Vcc to ground anymore.
This is where the whole concept of a "Pull up resistor" on a input pin
just totally looses me. I know it works, I just don't get how it
works. Can someone here express it in different words or something.

It takes the path of least resistance because the switch is like a
zero ohm resistor...I just dont understand why it goes to zero at my
device pin. There is something very basic here that I am just not
getting. Sorry for the dumb question but this has been bothering me
for quite some time now. My poor confused brain.

Thanks for any help!
 
I want to thank everyone for the excellent explanations. I even
printed some of them out and added them to my notebook. I had not
thought of building and testing the circuit with parts left out and
that really helped me 'get' it.

The key thing was thinking of the other voltages as relative to or as
one poster put it (W.ith R.espectT.o) ground. I also tried the
circuit out using a TTL gate chip and I get it now. It seems like I
have to see things work in this fasion to understand them. Thank
you, Thank you, Thank you! This has really been bugging me along with
the old radio mentioned in another thread.


On Sun, 19 Oct 2003 09:47:46 GMT, Jeff Wiseman
<wisemanja@earthlink.net> wrote:

Just a few comments below:


brokepokerplayerREMOVEDIS@yahooANDDIS.com wrote:
stuff deleted
WHY OH WHY doesn't R1 come into the picture with the switch open. It


That's the whole issue! If it wasn't there, the potential at the device pin would remain close to 0volts all the time even with the switch open. With the R1 there, it "pulls" the voltage up to 3.5volts when the switch is open (see below)


is hooked to Vcc. Is the voltage flowing from the device pin through
LED1 and R2 to ground.


In this case, the internal resistance of the device will be very large with respect to the R1&R2 values therefore any effect of the device itself on the circuit in question is negligible. For all intents and purposes of this discussion, there is no current going into or out of the device.


why doesn't it flow from Vcc to ground anymore.


This is incorrect. It *IS* flowing from Vcc through R1, then the LED, Then R2 to ground. The fact that there IS current flowing through these devices is what forces the potential at the device pin to 3.5volts relative to gnd (or -1.5volts relative to Vcc--we typically measure w.r.t. gnd though). resistances in series is refered to as a "voltage divider" for this very reason.


This is where the whole concept of a "Pull up resistor" on a input pin
just totally looses me. I know it works, I just don't get how it
works. Can someone here express it in different words or something.


Point (A): Again, assume that the internal resistances of the device are very large. With this being the case, for this discussion you can view your circuit as existing without the device. I.e., your device pin is only a test point now.


It takes the path of least resistance because the switch is like a
zero ohm resistor.


Point (B): Right, in other words when your switch is CLOSED it is as though the LED and R2 have been "removed" since their resistance is many times higher than that of the closed switch, ie. nearly all of the current bypasses them. Remember this when reading my next comment below:


I just dont understand why it goes to zero at my device pin.


Considering points (A) and (B) above, simply redraw your circuit with the switch closed and the things that can't affect the circuit removed and see what you get. It will now look like this:

VCC
|
|
\
/ R1
\
/
|
|
|--------------------------------------Test point
|
|
+
|
| SW1
+
|
|
|
|
|
GND

With SW1 closed bypassing the LED and R2, it is as though they aren't there. Since the device's internal resistance is extrememly high, it is as though IT isn't there. In fact, with the switch closed, the test point will be a 0volts regardless of whether or not R1 even exists (i.e., SW1 looks like a piece of wire connecting the device pin directly to ground). As you can see, in the above circuit R1 has no effect at all. It could be removed and the test point still sits at 0 volts w.r.t. gnd because it is locked there by the closed switch.

If you open the switch, it then appears as though R2 and the LED are returned to the circuit and the switch now has no effect and is removed thusly:

VCC
|
|
\
/ R1
\
/
|
|
|-------------------------------------- Test Point
|
|
V
_ LED1
|
\
/ R2
\
/
|
|
GND


As you can see now, if R1 were not present the voltage at the test point would still be at 0volts since the LED and R2 would be acting like a very poor switch (remember the internal resistance of the device is very high relative to the LED/R2 components). R1 is necessary to provide a path for current to flow to the LED/R2 and then to gnd. The more you lower the value of R1, the greater the current through it and R2/LED, the greater the voltage drop across R2/LED and thus the higher the voltage at the test point. Thus, the presence of R1 in the circuit when the switch is OPEN (and only then), has the effect of "pulling" the voltage at the test point "up", otherwise it would just remain at 0.

Now if the device's internal resistances were much lower, then it would get much more complicated but that is a totally different issue :)

Hope this procides another perspective on it for you. Keep at it, it'll all come naturally soon enough.

- Jeff
 
On Sun, 19 Oct 2003 03:43:32 GMT
brokepokerplayerREMOVEDIS@yahooANDDIS.com wrote:

I am working through an electronics course and hoping that someone can
explain this to me. Ok here goes

VCC
|
|
\
/ R1
\
/
|
|
|-------------------------------------- Device Pin
| |
| |
/ V
/ _ LED1
| SW1 |
| \
| / R2
| \
| /
| |
| |
GND GND
I think part of your problem is a confusion between voltage and
current. Think of an analogy with a water plumbing system: voltage
corresponds to pressure and current corresponds to water flow.

Vcc gives you a voltage (pressure) of 5V, the voltage (pressure) at
ground is zero.

When the switch (valve) is closed (open to the flow of electrons or
water) all the pressure drop occurs across R1, so the output voltage
is zero, since we agreed at the start that GND was zero volts. Under
this condition there is still a flow of electrons (current.) In fact,
the current here is larger than it is when the switch is open.

I suspect that the quandry for you is the fact that the min. voltage
occurs when the current is at a max.

When you open the switch, the current reduces, because the total
resistance from Vcc to ground has increased. Now there is some
resistance (and voltage drop) between the output and ground, so you
get the output voltage you calculated with Kirchoff's voltage law:
3.5V.

In the first case ALL the voltage drop occurred across R1, but in the
second case you have R2, R2, and the LED. Note that the power
disippated in R1 will be much greater with the switch closed, which is
what you'd expect, since it is carrying much more current then.

-
-----------------------------------------------
Jim Adney jadney@vwtype3.org
Madison, WI 53711 USA
-----------------------------------------------
 

Welcome to EDABoard.com

Sponsor

Back
Top