Pull Resistors
Introduction
In TTL circuits, pull resistors are resistors used to assign a default value to a high-impedance TTL signal. They are essential in logic circuit design and interfacing digital sensors.
If you’re unfamiliar with TTL logic I will have a guide up soon to explain it. In the meantime, please read this article at Wikipedia. You should also be fairly familiar with Ohm’s Law.
Why do I need them?
Many sensors and logic devices have what’s called an open collector output. This means that the output can be connected to ground (0V) or not connected at all. TTL logic inputs are generally high-impedance, meaning that they have a very high value resistor in series with the input so it takes very little current to drive the voltage level. However once an input is driven low by an open-collector output there is nothing to cause the voltage to go back up, thus your input will stay low. In this case you’d use a pull-up resistor. Also, if something becomes disconnected, depending on the nature of the device, some TTL inputs tend to naturally ‘float’ up and switch to a 1 sporadically. This can wreak havoc with some circuits.
When should I use one?
A pull resistor is usually appropriate anytime a signal can be undriven. As mentioned earlier open-collector outputs are only driving the signal when low, and some devices do not immediately drive their outputs after rest/power-up. In fact may common hobby microcontrollers now contain software controllable pull resistors. By using pull resistor every input always has a known state at power-up, and if anything becomes otherwise not driven. For more information see the last section at the bottom.
What’s the difference between pull-up and pull-down resistors, and which do I use?
As the names imply, pull-up resistors pull signals up to logic high and pull-down resistors pull signals down to logic low. In the case of default values at power-up, simply select the resistor corresponding to the default value you want/need. In the case of an open-collector output, you’ll almost exclusively want a pull-up resistor. This will allow the signal to be pulled high when it isn’t being driven low.
Why does a pull resistor work?
A pull resistor works because you can basically model most logic inputs as a really big resistor. One terminal of the resistor is your input node, this is what is sampled by your logic device. The other terminal goes to ground. This is called a high-impedance input and is pretty standard on most TTL devices. When you put a pull resistor on it you’re creating one of two potential circuits. With a pull-up resistor you’ve got a voltage divider, and with a pull-down you have a parallel resistance.
Pull-up resistor
This is an equivalent circuit for a pull up resistor. When the circuit isn’t being driven, the only current flow is between the high (typically 5V) voltage source, through the two resistors in to the ground. With no other current flow the voltage between the resistors follows the rule of ideal voltage dividers and the voltage is calculated as:
As long as your pull up resistor is suitably smaller than the input resistance (but still big enough that your driving circuit can do what it needs to do) the voltage sensed at the input will be near the high voltage source. Since for TTL anything above 2.2V (in a 5V system) is logic high, there you have it. Now when your open-collector circuit drives the line low, it causes it to sink most (but not all) of the current going through the divider. Because of Ohm’s law this results in a much lower, but non-zero voltage at the node. For TTL circuits you need only to get under 0.8V to indicate a logic low. This is how a pull-up resistor works.
Pull-down resistor
This is an equivalent circuit for a pull-down resistor. When the circuit isn’t being driven you end up with just the resistors connected to ground on one side and together on the other. In this configuration any charge built up at the input will be dissipated through the resistors to ground, and the circuit will go down to 0V, thus being a logic low. When the input is driven, the pull-down resistor in parallel with the input impedance causes the input impedance to drop drastically. This means a circuit has to be actively driving and supplying enough current to drive the voltage up. This is why this configuration tends to pull the signal down. The formula for the equivalent resistance is calculated here:
As you can see, even with a very large pull-down resistor it still more than doubles the current needed to sustain a given voltage in to the input. Circuits not actively driving this input high will result in a low input.
Wow, this is great, should I just put them on all my inputs?
No, pull resistors have a place and a time. As mentioned earlier, in both cases it makes the driving circuit work harder to drive the input. If the circuit driving your input is not strong enough, then it might be time to consider a different design because a pull resistor may be either too strong, or ineffective. Use care when selecting when to use pull resistors and selecting values for them. It would always be advised to check the input characteristics of the IC you’re going to put them on. Some devices have very specific (and sometimes very low) input impedances so it’s important to refer to the datasheet and verify all of your connections. Using the above formulas you can determine how much current a driving circuit would need to sink (absorb) or source (supply) to drive the logic input, and verify it is within limits. For example, picking a small pull-down resistor that would require your circuit to supply 600 mA to switch the circuit is likely going to result in a very poorly functioning circuit.

