Multiple pushbuttons and pulldown resistor

SilentDirge:
Would this have any implications for battery life, though, since I would now have to supply a constant 5v except for when the button connection is broken (open) and electrons diverted?

In order for power to be burned you must have both Voltage AND current. Holding a pin up with 5V (nearly) eliminates current from flowing just the same as when tied to ground. So while you are applying a constant 5V, so little current is flowing that the Power is practically Zero. (In the P = I * E you don't use 5V. You use 5V-induced voltage which is practically zero.)

Incidentally, when using a pull-down the same reasoning applies. Keep in mind that if current starts to flow there is a voltage, even a small one. So you burn the same amount of power using a pull-up as a pull-down.

Virtually no current flows until the button is pressed. Once it is pressed, the current is the same whether it is a pull-up or pull-down.

If you are worried about power consumption it is a very good practice to enable the Pull-Up resistors on ALL unused I/O pins. Otherwise, floating pins can draw over 1mA of current. Which, on a device that only consumes 20mA is pretty significant.

1 Like