Page 1 of 1

Sinking Current of GPIO

Posted: Fri Sep 05, 2025 8:09 am
by MohdRais
I want to use a button switch with one switch terminal attached to the 3.3V power pin and the other switch terminal attached to a GPIO as an input pin, to monitor whether the switch is press or not. I was informed that the normal input (sinking) current should be 20mA. How to limit the input current? (If I am not mistaken, the current from the power pin can be as high as mA 400)

Re: Sinking Current of GPIO

Posted: Sat Sep 06, 2025 1:52 am
by Sprite
That current is only applicable if you set the pin to an output pin (which you shouldn't and don't do in this case). The pin is high-impedance when it's an input, so no need for current limiting. Make sure to have some sort of pulldown resistor, though, either in your circuit or enable the one built into the GPIO pad in software.