Posts: 7
Joined: Sat Jun 08, 2013 8:48 pm

GPIO random voltage upon boot

Sun Jun 23, 2013 3:08 am

Hi all,

I connected a multimeter to different GPIO pins to examine the default state in my revision 2 RPi. For example for GPIO 18 (physical pin 12), I can see that upon boot, the voltage output is 2V. If I use the python RPi.GPIO library and set the relevant pin manually to HIGH (i.e. GPIO.output(12, True)), I can measure the full 3V3 and if I set it to LOW, it reads exactly 0V.

My question is: Why is the default state a random 2V? This seems to apply to many (all?) pins. Is there a way that I can disable this from the startup? I'd really like to avoid to a bunch of pull up/down resistors just in order to achieve a consistent LOW state on all pins.

Thanks a bunch!

User avatar
Posts: 21198
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: GPIO random voltage upon boot

Sun Jun 23, 2013 4:18 am

Because at start up most of the pins are set as inputs without any pull-up/down resistors, so the level is floating.

When you set it as output it will show as high (3.3v) or low (0v) depending on the output level (1 or 0).

Posts: 921
Joined: Thu Mar 29, 2012 3:37 pm

Re: GPIO random voltage upon boot

Sun Jun 23, 2013 12:16 pm

I know you want to avoid resistors on the GPIO pins, but I don't know any other way around the issue, as most pins are inputs and are floating. I use a 10k resistor from each GPIO I am using to ground, before my other circuitry. By choosing the proper pins (Pins where MODE=IN and VALUE=LOW at boot. See the chart labeled "Rev 2 pin state at boot time" at the url below) and by adding the resistors, you are guaranteed a LOW at boot, and still are able to set the pins to a LOW or HIGH in software. ... 44&t=35321
My Raspberry Pi Project Page:

Return to “Beginners”