Pull-up resistor

In electronic logic circuits, a pull-up resistor (PU) or pull-down resistor (PD) is a resistor used to ensure a known state for a signal.[1] More specifically, a pull-up resistor or pull-down resistor ensures that a wire will have a high logic level or low logic level, respectively, in the absence of a driving signal.[2] It is typically used in conjunction with components such as switches, transistors and connectors, that physically or electrically interrupt the connection of other components to a low impedance logic-level source, such as ground, positive supply voltage (VCC), or an actively-driven logic circuit output and thus cause the inputs of those components to float (i.e. to have an indeterminate voltage) — a condition which can lead to unpredictable and potentially damaging circuit behavior.[3]

For example, in the case of a switch which, when closed, connects a circuit to ground or positive supply voltage, without a PU or PD, when the switch is open, the circuit would be left floating. In such cases, a pull-up or pull-down resistor ensures stable, reliable, and safe operation of the circuit.

Pull-up and pull-down resistors are implemented in various ways. Often they are provided as discrete devices, mounted on the same circuit board as the logic devices that use them. Many microcontrollers and FPGAs provide internal, programmable PU and PD resistors for their logic input pins to reduce the need for external components.

Principle

In a circuit with an open switch, no current flows through that branch. Because of this, Kirchhoff's laws do not specify the voltage across the open switch. The voltage can vary unpredictably due to ambient electrical noise, leakage currents, and parasitic capacitance.[4] Without additional sources or boundary conditions, the voltage remains indeterminate and consequently the voltage across connected components are undefined, too.

A pull-up (or pull-down) resistor provides a defined path for current to flow to a voltage source when the switch is open. This ensures the voltage at the connected node is set to a known level, typically logic high (or low). By doing so, it eliminates the indeterminacy caused by the open switch, allowing Kirchhoff's laws to determine the voltage reliably.

Truth table of pull-up and pull-down resistors
Logic level at switch output
Switching
device
Resistor
Pull-up Pull-down None
Closed to Vcc
(logic 1)
1 1 1
Closed to 0V
(logic 0)
0 0 0
Open 1 0 Indeterminate

Optimal resistance

A pull-up resistor must have an appropriate amount of resistance to be effective and not otherwise interfere with circuit operation. For this, it is assumed that the critical components have infinite or sufficiently high impedance, which is guaranteed, for example, for logic gates made from FETs. In this case, when the switch is open, the voltage drop across a pull-up resistor (with sufficiently low impedance) practically vanishes, and the circuit looks like a wire directly connected to positive supply voltage. On the other hand, when the switch is closed, the pull-up resistor must have sufficiently high impedance in comparison to the closed switch to not affect the connection to ground. Together, these two conditions can be used to derive an appropriate value for the impedance of the pull-up resistor. However, usually, only a lower bound is derived, assuming that the critical components do indeed have infinite impedance.

A resistor with relatively low resistance (relative to the circuit it is in) is often called a "strong" pull-up or pull-down;[2] when the circuit is open, it will pull the output high or low very quickly (just as the voltage changes in an RC circuit), but will draw more current. A resistor with relatively high resistance is called a "weak" pull-up or pull-down;[2] when the circuit is open, it will pull the output high or low more slowly, but will draw less current. This current, which is essentially wasted energy, only flows when the switch is closed, and technically for a brief period after it is opened until the charge built up in the circuit has been discharged to ground.

Applications

A pull-up resistor is often used in conjunction with a jumper or DIP switch to generate configuration information for an electronic system. The jumper is installed to generate a logic low, or removed to generate a logic high:

In cases where switching devices can only sink or source current, multiple outputs may be connected to a common PU or PD. This is commonly done to implement a wired-OR or wired-NOR function, or to allow multiple active switching devices (e.g., open-collector drivers) to transmit data on a shared bus.

A PD or PU resistor may be shared by two or more series-wired switches to implement a wired-AND or wired-NAND function. These circuits are often used to monitor safety interlock switches, asserting a logic high or low output state, respectively, only when all interlock switches are closed.

Pull-up resistors may be used at logic outputs that cannot source sufficient current (e.g., open-collector TTL logic devices) to guarantee a valid logic high. In bipolar logic families operating at 5 VDC, a typical pull-up resistor value will be 1000–5000 Ω, which sources sufficient current to ensure a valid logic high voltage over the full operating ranges of temperature and supply voltage. For CMOS and MOS logic, higher resistance values can be used because logic outputs typically source more current than TTL.

Pull-down resistors can be safely used with CMOS logic gates because the inputs are voltage-controlled. TTL logic inputs that are left unconnected inherently float high, and require less pull-down resistance to force the input low. A standard TTL input at logic "1" typically draws 40 μA, and a voltage level above 2.4 V, allowing a pull-up resistor of no more than 50 kohms; whereas the TTL input at logic "0" will be expected to sink 1.6 mA at a voltage below 0.8 V, requiring a pull-down resistor less than 500 ohms.[5] Holding unused TTL inputs low consumes more current. For that reason, pull-up resistors are preferred in TTL circuits.

Drawbacks

A pull-up or pull-down consumes power when current passes through it, resulting in heat generation and wasted energy. Also, its resistance together with stray circuit capacitance forms a low pass filter that stretches (extends the duration of) rising or falling signal edges, thus limiting the maximum speed at which the circuit can operate. Certain logic families are susceptible to power supply transients introduced into logic inputs through pull-up resistors, which may force the use of a separate filtered power source for the pull-ups.

See also

Further reading

  • Paul Horowitz and Winfield Hill, The Art of Electronics, 2nd edition, Cambridge University Press, Cambridge, England, 1989, ISBN 0-521-37095-7

References

  1. ^ Platt, Charles (2012). Encyclopedia of electronic components. Volume 1, [Power sources & conversion : resistors, capacitors, inductors, switches, encoders, relays, transistors]. Sebastopol CA: O'Reilly/Make. ISBN 978-1-4493-3387-4. OCLC 824752425.
  2. ^ a b c "Pull-up and Pull-down Resistors". EEPOWER. Retrieved 2025-02-25.
  3. ^ Horowitz, Paul. The Art of Electronics. Cambridge University Press. ISBN 9780521809269.
  4. ^ Sedra, Adel S.; Smith, Kenneth C. Microelectronic Circuits. Oxford University Press. ISBN 9780190853501.
  5. ^ "Quadruple 2-input positive-NAND gates" (PDF). Texas Instruments. October 2003. Retrieved 2015-08-11.