Microcontrollers do have internal pull up-pull down resistors yet most of the circuits have external pulling resistors.

I looked on Google for answers and a few sites said that those resistors are not that strong but I thought they were good enough to work. I had the thought that they might need external because the internal resistors need to be triggered by programming.

So for some unplanned situation, they attach external resistors as well. But I'm not certain about it.

What is the real reason behind using externals when we do have internals?

  • 6
    \$\begingroup\$ Some microcontrollers have internal resistors. And those resistors are not sized correctly for all applications (they're typically optimized for low power). \$\endgroup\$ – Dave Tweed Dec 19 '17 at 0:56
  • 2
    \$\begingroup\$ What happens if I omit the pullup resistors on I2C lines? This thread is an analysis of an attempt to use internal pull-up resistors with I2C. \$\endgroup\$ – Nick Alexeev Dec 19 '17 at 2:30
  • \$\begingroup\$ "So for some unplanned situation, they attach external resistors as well." Sometimes planned situations too. Often it's easier/faster/cheaper in a production environment to simply move a resistor from one place to another than to have to re-flash the firmware to achieve the same result. Doing it in firmware would likely involve a second release of the same firmware that needs maintaining. With a soldering modification all that is needed is a conditional work instruction. \$\endgroup\$ – Wossname Dec 19 '17 at 11:25

There are a few possible reasons, such as

  • Needing the resistor to be present during power-up, as the microcontroller will not yet have started executing.
  • Needing a more precise resistance than the internal resistor. Internal pull-up/-down resistors have very wide tolerances.
  • Needing a resistance larger or smaller than that provided internally. For example, I2C typically uses stronger pullups, while you might want a very weak pullup for monitoring a switch, to save power.
  • Needing to pull to a voltage other than the microcontroller's supply voltage or ground.
  • Using a pull-up/-down resistor along with the ADC on the microcontroller. Some microcontrollers disable their internal resistors on any pin the ADC is connected to.
  • Needing a pulldown resistor on a microcontroller that only has pullups.
  • \$\begingroup\$ I couldn't understand the last second point... Why would microcontrollers disable their on internal resistors with ADC \$\endgroup\$ – Gunjan Gangwani Dec 19 '17 at 3:19
  • 3
    \$\begingroup\$ @GunjanGangwani I don't think it's a good design decision, but the idea is that usually you don't want the ADC to draw any current from the thing it's measuring, so you want a high-impedance connection. I guess some designers don't trust the firmware developers to always disable the internal resistors. \$\endgroup\$ – Abe Karplus Dec 19 '17 at 3:41
  • 7
    \$\begingroup\$ I think it's normally because the pull-ups/pull-downs are associated with the digital input buffers, and enabling the ADCs can sometimes completely disable the digital buffering circuitry (and with it, the pull-up/down resistors). \$\endgroup\$ – Connor Wolf Dec 19 '17 at 5:42
  • 3
    \$\begingroup\$ @Ashutosh If you want high-impedance, of course you don't use any pullup. Some microcontrollers enforce this by automatically turning off their internal pullups, which is a problem in those situations where you don't want high-impedance. \$\endgroup\$ – Abe Karplus Dec 19 '17 at 11:25
  • 1
    \$\begingroup\$ @GunjanGangwani ADC inputs should be isolated from all other circuits to provide the lowest noise floor. Digital inputs often consume more current than desired when driven between their "high" and "low" voltages. Older microcontrollers used an internal switch to disconnect the input from the digital portion when that pin was used for ADC, and it's that digital portion that has the pull up. This is disconnected to both isolate the ADC and lower the noise floor, as well as prevent possible additional current draw (or in very old chips, cmos latchup). \$\endgroup\$ – Adam Davis Dec 19 '17 at 17:11

Some (or perhaps many) microcontrollers do have internal pull-up resistors, but these are often quite high values. Many applications would require lower value pull-ups.

Pull-up resistors may also be required at the inputs to normal logic circuits (gates, counters, etc.) which do not have internal pull-ups (and sometimes we want pull-down resistors, instead...)

  • 1
    \$\begingroup\$ internal pull-up resistors, but these are often quite high values I was building a low-power application recently and found that the pull up resistors were about 50 k which I found to be rather low resulting in too much current usage. So I used a higher value external resistor. In the end it depends on what your needs are. \$\endgroup\$ – Bimpelrekkie Dec 19 '17 at 7:15

In addition, you would use an external resistor every time you need an actual resistance value. MCUs usually don't have actual pull-up resistors but rather MOSFETs sinking a small current, so their equivalent resistance value can vary wildly depending on the signal you apply to the pin.


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.