Pull up vs pull down resistor....

Thread Starter

RyanKim

Joined Sep 18, 2011
37
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.....

Thanks in advance!
 

DerStrom8

Joined Feb 20, 2011
2,390
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
 

Thread Starter

RyanKim

Joined Sep 18, 2011
37
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!
 

Adjuster

Joined Dec 26, 2010
2,148
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.
 

Adjuster

Joined Dec 26, 2010
2,148
As others have mentioned, a resistor may be fitted to provide a default state, and this may apply even when the signal source is not a switch at all. Providing a default state by resistors within a device can be useful, e.g. for inputs which will not be used in every application of a given device.

This can stop unused inputs from misbehaving if not connected up, especially for FET inputs which would otherwise be subject to erratic operation (and possible damage) due to leakage currents, or charges induced by electric fields.

There is a lot more that could be said, much of which you could find on line.

http://http://en.wikipedia.org/wiki/Pull-up_resistor
 
Top