Electronics Repair (sci.electronics.repair) Discussion of repairing electronic equipment. Topics include requests for assistance, where to obtain servicing information and parts, techniques for diagnosis and repair, and annecdotes about success, failures and problems.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Understanding pull up resistors

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!



  #2   Report Post  
Jason D.
 
Posts: n/a
Default Understanding pull up resistors

On Sun, 19 Oct 2003 03:43:32 GMT,
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
  #3   Report Post  
James Sweet
 
Posts: n/a
Default Understanding pull up resistors


wrote in message
...
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.


  #4   Report Post  
Jeff Wiseman
 
Posts: n/a
Default Understanding pull up resistors

Just a few comments below:


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
  #5   Report Post  
Mark D. Zacharias
 
Posts: n/a
Default Understanding pull up resistors

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.



wrote in message
...
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!







  #6   Report Post  
 
Posts: n/a
Default Understanding pull up resistors

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
wrote:

Just a few comments below:


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


  #7   Report Post  
Jim Adney
 
Posts: n/a
Default Understanding pull up resistors

On Sun, 19 Oct 2003 03:43:32 GMT
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

Madison, WI 53711 USA
-----------------------------------------------
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing pull dowel pins KD Metalworking 3 March 13th 04 03:47 AM
how to rewire bathroom pull switch to regular light switch Nick UK diy 20 January 20th 04 07:57 PM
Precision Resistors HELP! Dennis Electronics Repair 0 September 25th 03 05:14 PM


All times are GMT +1. The time now is 07:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"