I want to write a lipoly powered arduino device that can be launched from sleep mode by pressing a certain key that is connected to ground. Usually, when no in sleep mode I enable the internal pull-up resistor for a definite level. But when in sleep mode, I assume this would drain to much power and hence I want to avoid it. Is it sufficient to just wait for a pin-change interrupt on the same port pin without the internal or an additional external pull-up resistor?

  • The rule for micropower sleep mode is not that you can't have pulling resistors, it's that you can't have anything such as a switch holding a signal against it's pulling resistor, as that would put a voltage difference across the resistor and cause measurable current to flow. Commented Aug 2, 2014 at 14:22

2 Answers 2


You must not leave CMOS inputs floating. This will increase power consumption, and as a worst result may damage the device. Use an external pull-up if you feel that the internal pull-up passes too much current.

  • It doesn't matter what internal or external value you use for a pullup resistor unless something is creating a current path to ground. Hopefully the button is not being held down while the device is trying to sleep, so that is a non-issue. The other possible path would be leakage through the input structure itself, but if that is present you are going to have to put current through it if you want the input to be high, and there isn't going to be a drastic difference between the current necessary to be reliably high and the current which would be supplied holding the input even closer to Vdd. Commented Aug 2, 2014 at 14:19
  • Yes, was a thinking error about the pull-up resistor draining to much current. The push-down button of my rotary encoder usually is open, but for the two rotary channels I'll set the outputs to low - in case the rotary encoder has a connection to GND which would result in the pull-up resistor draining current. BTW, IIRC, the default port state is input by default. For unused port pins, should I always enable the pull-up resistors or make them to output? Or does the massive default code produced by Arduino already does it?
    – Thomas S.
    Commented Aug 2, 2014 at 18:35

Tutorial from University of South Florida https://www.youtube.com/watch?v=HiAbxSO_9nU

Internal pull-up resistor does not drain too much current. Only leakage in nA range. It is correct to use pull up, in your case, as this is what it is designed to do. As Ignacio Vazquez-Abrams, do not leave input pin open.

MCU are designed to do the precise action you mentioned, to wake up on pin change as in mass produced wrist watch and TV remote controller. On remote, MCU sleeps until key pressed. On watch, it wake on timer 1 second) and key change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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