0

My project is using a genuine Arduino Mega 2560, probably 3-4 yrs old since purchased (I don't see any revision numbers on the PCB). It's being used to read a lot of switches, buttons and drive some LED's and displays.

When using a digital pin as INPUT with the internal 10k pullup enabled, do I need to consider the draw with respect to the 200mA total through all pins? Is it simply the 10k ohm resistor with 5V so 0.5mA? Can I just ignore it? (there's only so many pins I suspect I can ignore it)

I've seen several posts/pages about driving LED's using transistor arrays powered by an external source and those spec sheets describe the transistor input currents so I can estimate the draws for those elements, but not sure if I need to concern myself with the Arduino pins used as INPUT.

  • 2
    The pull-up resistors of the I/O pins are specified as 20 to 50 kΩ, so they are not going to source more than 250 µA at 5 V. The “Typical characteristics” section of the data sheet shows a current of the order of 140 µA. – Edgar Bonet Oct 1 '19 at 7:19
  • 1
    I found them to be about 34kΩ - 37kΩ: Read how I found that here: majenko.co.uk/blog/measuring-arduino-internal-pull-resistors – Majenko Oct 1 '19 at 9:22
  • In case of a button, the 0.15mA of current only flows while the button is pressed. Zero current flows when the button isn't pressed, which is probably most of the time. I think it's pretty safe to ignore these currents. – Gerben Oct 1 '19 at 12:02
  • I think Gerben is right. The pull-up resistors connect +5V to the solid state capacitors on the CMOS inputs, which have virtually infinite resistance to DC current. The pull-ups will only draw current when the pin is grounded, and shortly afterwords. – Duncan C Oct 1 '19 at 12:08
0

You are right. The current through digital inputs is so low, that you can normally ignore it.

And the 0.5mA, that you calculated don't flow all the time, just, when the corresponding button is pressed and thus shorted to ground, because only then a current will flow through the pullup resistor. The current into the actual input hardware is even smaller. So, as long as not all buttons are pressed at once, the current will be even lower as calculated.

Buttons are somewhat voltage devices. They don't need a specific amount of current, just of voltage. So the actual value of pullup/pulldown resistors are not critical. LEDs in contrast are current devices. They need a specific current to light up, which is often higher, than the maximum output current of a digital pin. Thus they are often driven with an additional transistor.

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.