Even this relatively simple circuit arrangement has subtleties that affect performance.
Part 1 explored the role of pull-up and pull-down resistors to ensure that the binary (digital) circuit points are at an unambiguous 1 or 0 level. This part explores basic issues of sourcing, sinking current, and resistor sizing.
Sourcing and sinking current
Q: What does “sinking” mean?
A: In sinking, the “top” side of the load (resistor or other component) is connected to the power rail, and the transistor as switch interrupts the current flow between the other side of the load and ground, Figure 1 (left). One side of the transistor is grounded, and it “sinks” current from the power rail and loads to that ground. This circuit topology is generally easier to implement since the driver transistor is grounded. It is often used between circuits on a circuit board, for example.
Q: Does sinking have a complementary arrangement?
A: Yes, called sourcing, Figure 1 (right). In this case, the transistor provides current to the load’s ungrounded (top) side, and the other side is connected directly to the ground.
Q: Why does source versus sink matter?
A: In many real-world applications, the external loads must be grounded for safety or performance reasons. One good example is the automobile, where the many electrical loads such as motors (there are at least 30 to 40 in a modern car!), SCR and MOSFET switches, ignition-system components, and more must be connected to the common ground of the chassis. Further, many loads require that their low side is at the ground, without an intervening switch element for load-loop stability.
Specifying the pull-up/pull-down resistor
Q: Is a particular resistor needed for the pull-up or pull-on function?
A: No, a basic, plain resistor is appropriate in almost every case as long as it has the correct power rating and resistance.
Q: How do you determine the resistance value?
A: This is a classic tradeoff situation with relatively wide boundaries. The resistor value is generally not critical, so the resistors are often sized at round values such as 10 kΩ, 50 kΩ k, or 100 kΩ. (Node that tradeoffs are inherent in engineering: consider the simple calculation for the “right” value of the current-sensing resistor in series with a load.) Power dissipation and pin voltage must be balanced to calculate the resistance value.
Q: How do you size the resistance value of the pull-up or pull-down resistor?
A: Consider a basic push-button connected to an input pin, which will be pulled low when the switch is pressed. The value of the resistor determines the amount of current going from the supply rail through the button and then to the ground. If the resistance value is low, a larger current will flow through the pull-up resistor. This, in turn, will result in higher dissipation at the resistor when the switch is closed. This is called a “strong” pull-up, which should be generalized and minimized if low power consumption is required.
Q: So why not make the resistor larger to minimize power dissipation?
A: When the button is not pressed, the input pin is pulled high via the pull-up resistor, which, therefore, controls the voltage on the input pin. When the switch is open, and a high pull-up resistance value is combined with a large leakage current from the input pin, the input voltage may be insufficient to keep at its high logic level, called a weak pull-up.
Q: So what do you do?
A: The pull-up resistor’s actual value depends on the impedance of the input pin, which is closely related to the pin’s leakage current. As a first-pass guide, you should use a resistor with a value at least ten times smaller than the value of the input pin impedance.
For example, in 5-V bipolar-logic families, the typical pull-up resistor value is between one and five kΩ, while for switch and resistive-sensor applications, it is between one and ten kΩ. For CMOS devices with much smaller input-leakage current, much higher resistance values, from around 10 kΩ up to 1 MΩ, are used.
Q: What about for pull-down resistors?
A: The pull-down resistor should always have a larger resistance than the logic circuit’s impedance. If it does not, it will pull the voltage down too much, and the input voltage at the pin will remain at a constant logical low value regardless of whether the switch is on or off.
Q: Why not just make the resistance as large as can be tolerated?
A: The pairing of the resistor value combined with the pin and wire capacitance at the switching node forms an RC circuit. The circuit’s time constant determines how fast that node can be switched. A larger RC value may inhibit the circuit from switching at the needed rate. This is a non-issue for slowly changing loads such as relays; this can be a serious one for RF circuits and even LEDs used for driving data links.
Q: How does the dissipation factor fit into the calculation?
A: These resistors generally do not carry much current, and their power dissipation is low. In most circuits driving other circuits and ICs, resistors of ¼ watt or smaller are adequate. Of course, once you have determined the required resistance value and current, the resistor’s power rating is easily calculated.
Conclusion
The topic of pull-up and pull-down resistors applies to many digital circuits. It is not complicated, yet it illustrates how even simple topics still have issues that must be acknowledged and tradeoffs to be made, even if the assessment has only modest criticality.
Related EE World content
What is an open drain?
FAQ: How to wire a switch to a microcontroller with pullup resistors
150-V fast high-side-protected N-channel MOSFET driver provides 100% duty cycle
Choosing the right encoder – open-collector, push-pull, or differential output?
When to use NPN and PNP transistors and FETs
Why I still like electromechanical relays – and you should, too (maybe)
External references
Sparkfun, “Pull-up Resistors”
Circuit Basics, “Pull-up and Pull-down Resistors”
Wikipedia, “Pull-up resistor”
EE Power, “Pull-up and Pull-down Resistors”
Utmel Electronic, “What are the Differences Between Pull up and Pull down Resistors?”
Electronics Tutorials, ”Pull-up Resistors”
Robu.in, “What are Pull-up and Pull-down resistors?”