# Pull up vs pull down resistor....

Discussion in 'Homework Help' started by RyanKim, Sep 18, 2011.

1. ### RyanKim Thread Starter Member

Sep 18, 2011
37
1
Hi my names Ryan just registered into the forums. Im currently in an electrical engineering program and was hoping to get some help with understanding various concepts that im honestly new to. (so excuse what may seem like very very elementary questions).

Im having a bit of trouble understanding pull up and pull down resistors. Specifically, why are they needed within the context of switches..so far I understand that from a switch we can output 1s and 0s for instance a switch in its normal down position is a 0 (or 1 if we invert right?) and has some associated voltage (i believe in our class the 2 assoc. volts are 0 or +5V). So basically what exactly does a PU and PD resistor do? Is it simply to give definition to a floating wire to our wanted designation of either being 1 or a 0?

Also when a switch is open and not touching the contact that means we have a floating wire yes? and then we MUST use a PD or PU resistor if we want to define a 1 or 0?

I've said a lot so I'll stop there and hopefully someone can field in some of my questions. Like I said im in the first year of this program and these questions are probably really dumb but unfortunately the prof of this specific course has confusing notes and goes at an unbelievable pace.....

Feb 17, 2009
3,990
1,115

3. ### DerStrom8 Well-Known Member

Feb 20, 2011
2,428
1,329
Welcome to AAC, Ryan

As Jony130 said, you have pretty much answered your own question, but I can see how it can still be confusing. When you have a floating pin, electromagnetic fields, static electricity, etc. can cause a chip to read it as an input, which would give you false results. You use a pull-down resistor if you want the pin to normally read 0v, because the resistor pulls it down to 0v. Then, if the switch is pressed, the pin reads the +v. You would use a pull-up resistor if you want the pin to normally read a +v, and the switch would connect the pin to 0v. It would depend on your application which configuration you would need.
I hope this helps.
Best regards,
Der Strom

4. ### RyanKim Thread Starter Member

Sep 18, 2011
37
1
Ahh I see. Yeah I kind of had an inkling so to speak that I was on the right track but the concepts being new and all I had a tough time illustrating the idea in my mind with the switch associations. Thanks to the both of you for fielding my questions!

Dec 26, 2010
2,147
300
The simplest type of mechanical switch has only an on-off action, otherwise known as single-pole single throw (SPST). Such a switch by itself can only provide a connection to one potential, when the switch is closed. A pull-up (or down) resistor can provide a different level when the switch is open. N.B. for a switch, closed = "on", open = "off".

An open-collector output, found in some electronic devices such as level comparators, also only provides a SPST switching. Typically the switch goes to ground, and an external pull-up resistor is used to get a high level.

Of course, more complex mechanical or electronic switches can provide a change-over or "double throw" action, which can define two levels without adding extra resistors, but not all switches are made this way.

6. ### RyanKim Thread Starter Member

Sep 18, 2011
37
1
^Oh so a PD or PU resistor would typically only be used in a SPST type switch?

7. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,436
1,626
Not by a long shot. There are many many reasons to use a pulling resistor.