Why a Raspberry Pi shouldn't be powered through its GPIO pins

speckx1 pts1 comments

Why a Raspberry Pi shouldn't be powered through its GPIO pins - 82MHz

I recently repaired the Micro USB socket of an old Raspberry Pi; the one through which the Pi receives it's power. It was a bit of a fiddly soldering job because the connections for the USB port are tiny. Because of this, I briefly considered just sending the power straight into the 5V and GND pins on the Pi's pin header. I've seen projects where a Raspberry Pi was powered through it's GPIO pins, and even ones where the Pi itself wasn't connected to a power supply at all and instead to a powered USB hub through it's normal USB ports and then the USB hub was modified to send the power back through the USB cable into the Pi. These solutions work, but they're not necessarily a good idea, and here's why.

In order to understand how the Raspi is powered, it helps to take a look at the board's schematics. This is the power input section from the Raspberry Pi 1's schematics, which is what I was working on. Newer models have slightly different components, but the functionality is the same.

Power input section from the Raspberry Pi 1 schematic

If you've never seen something like this, this might not mean much to you, so let's walk through it step by step, left to right.

The first component (1) is the Micro USB socket through which the Pi is powered. It has five pins, but only two are connected: GND and VBUS. VBUS is the 5V coming through the USB cable. This is labeled as VIN after the connector, but it's the same thing. It's the Pi's input voltage.

Next in line (2) is a fuse. This will blow if the current going into the board becomes too high, which can happen if a component on the board shorts out or if something is connected to the GPIO pins which draws too much current or shorts the power rails. If that happens the board will appear dead, but the only thing that's broken is the fuse which can easily be replaced.

Then we have a transient voltage suppressor (3), which is essentially just two diodes connected in opposite directions. In normal operation these diodes don't conduct, so this component does nothing. If there is a sudden spike in the input voltage however, which can happen during a lightning strike or from a faulty power supply, these diodes will conduct and short out the voltage spike before it can reach the more sensitive components on the board.

This might seem unneccessary because we already have a fuse, but fuses take some time before they blow open, and during this time the board would receive the high voltage spike which would probably damage the chips and other components. Diodes react much quicker than fuses, so these protect against sudden or very short spikes in the input voltage.

Lastly we have a series of capacitors (4), a big electrolytic capacitor and two small ones. They serve as filters for the input voltage. Low quality power supplies might not deliver a very steady 5V but have some noise or ripple on it, which might cause glitches in the chips. The capacitors smooth out these ripples so that the other components on the board receive a clean input voltage. They also act as buffers for sudden current spikes. If a component on the board or connected to the Pi suddenly draws a large amount of current, the power supply might be too slow to supply the current quickly enough, resulting in a voltage drop. The capacitors can react quicker than the power supply and supply the high current, keeping the voltage stable.

After this the now filtered voltage goes to the 5V power rail of the board (that's the +5V0 top right) which supplies the chips, the USB ports, the GIPO pins and a few voltage regulators which step it down to lower voltages that some components require.

So now back to the original question, why shouldn't the Pi be powered by sending 5V straight through the GPIO pins into the 5V power rail? After all, it does work. But it skips all this protective circuitry that we just looked at. And so if there's a low quality or faulty power supply connected to the GPIO pins, there's a chance that it will damage the components on the board if something goes wrong, killing the Pi in the process and not just blowing the fuse like it would if it were connected to the proper power input.

So in order to avoid risking damage, a Raspberry Pi and similiar boards should always be powered through their dedicated power input.

The exception to this rule of course is if the circuit that sends power into the GPIO pins has the same type of protective circuitry on it that the original power input stage has, in which case the Pi is protected through that and powering it this way is fine.

If you would like to send me a message, comment or share this post, you can do so here:

Send me an E-Mail |

Reply on Mastodon |

Share on Mastodon

power through voltage pins board input

Related Articles