When pulling something up or down why is a resistor used and it not just connected straight to the +V or 0V rail?

link|improve this question

2  
If it were connected directly to V+, then it would always be V+. You couldn't pull it down. – endolith Mar 7 '11 at 16:36
1  
@endolith - that's the answer. Simple. And you would create a short circuit trying to pull it down. – stevenvh Jun 15 '11 at 10:19
feedback

5 Answers

up vote 12 down vote accepted

It limits current to protect the switch (transistor, etc.) and allows signal sources with limited driving capability to change that node's voltage. Rails generally have high drive capability, or low resistance. Think voltage divider, including source impedance of signal and rail, then let the rail impedance be 0-ohms for simplicity.

Other factors, other than operating current and voltage drops, to determine the pull resistance is charge time and substrate leakage. A 2M-ohm pull-down resistor on a top layer exposed to humidity and salts won't do anything due to sub-1M-ohm electrical resistance of grime layer.

link|improve this answer
2  
If the board is exposed to environmental conditions that severe, the value of your pull-up isn't what you should be worried about. – Nick T Mar 6 '11 at 23:13
Often have boards subjected to high humidity and hydrocarbon mist (exhaust, etc.), @NickT, but you are right: salts would be a killer. – tyblu Mar 7 '11 at 8:25
if they are, a sealed enclosure and/or conformal coating is a must. The only reason that you should up the strength of a pull-up is for manufacturing reasons (flux residue left on the board) or for part tolerances, especially IC and transistor leakage at higher temperatures. – Nick T Mar 7 '11 at 15:50
Well, conformal coatings have measurable conductance, too... – tyblu Mar 8 '11 at 1:05
feedback

Another point not mentioned is that if it's necessary to alter the board, it's possible to pull off the resistor and replace it with a wire connecting one of the resistor pads to something else. By comparison, trying to rework a surface-mount pin which connects to a power ground plane using a via which is under the chip can be difficult or impossible (at least difficult enough that scrapping the board would be cheaper).

link|improve this answer
Yes, though this could be done with a 0-ohm SMT part too. – Chris Stratton Mar 8 '11 at 18:24
@Chris Stratton: Indeed it could, but usually there will be some other resistor value that's already used elsewhere on the board that would work just as well. The rare possibility that a port pin might accidentally get configured as an output might not justify using a part where none would otherwise be needed, but if one is going to use a part, it may as well be a resistor. – supercat Mar 8 '11 at 20:41
feedback

You can also think of it this way - without a pull-up (or pull-down) resistor in place on an input, the source of the input would have to directly oppose your device's power supply to change the voltage at that input. Depending on the situation, you'd either cause problems for your power supply, or the input source, or both. With the resistor, the input can be controlled by the input source without inordinate currents. The situation for output pull-ups is similar, except that the 'input source' is the device's output transistor.

link|improve this answer
feedback

Another reason is that it makes it very easy to alter the input - just connect it to the positive supply if it is pulled down, for instance, rather than rewiring the connection. A couple of pins for a jumper are all that is required. A typical example is pin P0.14 on an NXP ARM chip, which determines whether it boots from a serial input or from internal flash memory.

link|improve this answer
What? I don't understand this? Are you saying its easier to swap it from being pulled up to being pulled down? – Dean Mar 6 '11 at 22:08
Just one connection has to be made, instead of one having to rewire the input. It applies to both pull-up and pull-down resistors on inputs. – Leon Heller Mar 6 '11 at 22:22
The edit makes it alot clearer. – Dean Mar 6 '11 at 23:26
Yes - and you could even manually hold a powered or grounded jumper wire on a configuration pin's pull up/down resistor to over-ride the resistor while tripping the reset. – Chris Stratton Mar 8 '11 at 18:24
feedback

If you only want to supply a defined logical level to a definitely unused input, a direct connection to ground or vcc would be ok in my opinion. BUT: if you do that, it is impossible to drive the input from other sources. (see posts above)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.