-1
\$\begingroup\$

A pull-up or pull-down resistor is used to set a default voltage level somewhere in the circuit. Since in electronics we dislike random behavior, should we overuse these resistors?

When a microcontroller starts up, output voltage level is usually unknown. Are pull-up/down resistors necessary to avoid weird starting behavior?

When are such resistors necessary?

\$\endgroup\$
7
\$\begingroup\$

A pull up/down resistor (or an on-chip current source) is used to give a certain "default" value to a node which would otherwise not have a default value but does need it.

Such a value is needed when the node feeds into a CMOS logic input because then undefined erratic behavior can occur as such a CMOS input has an extremely high input impedance so the voltage on the node can be easily disturbed making the gate "flip" randomly. In this case a pull up/down sets a default value and prevents random "flipping".

Is it needed everywhere ?

No because many nodes will be connected to some output which will provide a default value. Only nodes which could be high ohmic at some point and connect to a CMOS input need a pull up/down.

You mention that a microcontroller's output level is unknown at startup. That can be true if the uC starts with the outputs in HighZ (high impedance, Tri-state) mode. Most uCs do this. After initialization the uC should define the output state properly. If the circuit connected to the uC's output cannot handle the HighZ mode properly (even for a short time) then a pull/up down is indeed needed.

A different use for pull up/down resistors is with open collector or open drain outputs. These outputs can only pull the voltage up or down. For example an open collector NPN can only pull the output down.

enter image description here

To be able to make a "high" signal a pull up resistor is needed.

\$\endgroup\$
1
\$\begingroup\$

Yes, they are generally used to hold certain signals to high or low levels so that when powering up, if the signal is not driven by a MCU pin, they will default to a certain level. The best example is a MCU pin driving a MOSFET. Because MOSFETs are voltage controlled, they are very sensitive to noise on the gate. If there is no pull down on an n-ch MOSFET gate, as the power is applied, before the MCU firmware starts and sets the pin as a low output, the FET may start to switch the output and give undesirable results.

Another common use is when working with open collector or open drain transistors. A device with an open drain output will be able to switch the drain to the source when turned on, but when turned off, it is open so the drain will be floating. That may cause other unexpected behavior with the circuitry tied to that. A pull-up resistor pulls the signal back to the voltage rail when the transistor is turned off.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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