# The Current in mA at 3.3 V When Using the Internal Pull-up Resistors

I'm using RPi.GPIO in Python 3.

If I do

``````GPIO.setup(24, GPIO.OUT, pull_up_down=GPIO.PUD_DOWN)
GPIO.output(24, 1)
``````

will then a current flow internally from the pin to ground even if it is not connected?

If I do

``````GPIO.setup(24, GPIO.OUT, pull_up_down=GPIO.PUD_UP)
GPIO.output(24, 0)
``````

will then a current flow internally from 3.3 V to the pin even if it is not connected?

Would these currents be 0.066 mA? It could be 1.12 mA for 17 GPIOs and 1.72 mA for 26 GPIOs (assuming 50 kΩ internal pull-up resistor), but then the internal current could be even higher for GPIO2 and GPIO3 because the internal pull-up is lower there: 1.8 kΩ corresponding to 1.83 mA per GPIO, i.e. in total 4.66 mA in the last case for 17 GPIOs, and 5.25 mA for 26 GPIOs. Is this correct? If not, why not? It would be useful to know this in order to minimize power consumption.

I don't know if the internal pull-ups are connected when the gpio is set as an OUTPUT. I don't know how to find out.

For the sake of argument assume they are.

Each pull-up/down is of the order of 50k+. So at most 3300mV/50000R or 0.066mA will flow per gpio. For 24 gpios that gives a total of 1.584mA.

For the two I2C gpios with hard wired 1k8 resistor pull-ups to 3V3 each one will use 1.83mA, so 3.67mA for both.