View Single Post
  #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