Welcome Visitor:

Fixing the Raspberry Pi's Power Problems

Now I don't know about you, but I for one am sick to death of the Raspberry Pi complaining about under-voltage being detected. The closest I have ever come to curing it has been to use a 2A 12V power supply feeding a 3A 5V switching regulator connected into the USB (or direct to the 5V pins) with very short, very thick, wires. And that is both awkward and still didn't 100% fix the problem. Using a high quality, high power, USB power supply and a "high current 5A charge cable" (or so it claims) and it's impossible to eradicate those pesky power problems.

So I decided to tackle the problem once and for all, and to do it from the other end. After all, if the system is really so picky about what kind of power cable it has there really must be something wrong with the system. Which means diagnostic and hacking time...!

Step one: consult the schematics. Now, for a supposedly "open" system the schematics for the Pi 4 are remarkably hard to come by. There seems to be only one page available, and that just covers a smattering of the connectors and not much else. Certainly nothing in the core circuitry. But what it does include, fortunately, is the power supply schematic. And that is the one bit that I really want to look at.

It's a pretty simple schematic - a single chip doing all the work. But as I looked at it one thing struck me about the input to the power supply. That's this bit here:

Power Input

The component that made me gasp is R5 - the 10 ohm resistor that's in line with the main power input (actually - read the update at the bottom of the page). With any decent current draw that's going to drop even more voltage than even the worst power cable. So my first task is to find that resistor and remove it. Replace it with a link. Fortunately it's not too hard to find. The components aren't labelled on the board, but tracing the tracks out from pin 24 of the power supply chip to a via led me straight to it, and buzzing out one side of it to the 5V pin in the 40 pin header confirmed it. Here it is:

Location of R5

Tricky to solder: it's an 0402 component. Fortunately I'm used to working with those. I don't have a 0 ohm 0402 resistor to hand, though, but a simple little bit of single-core wire cut to length and coated in solder paste does the job nicely. Here it is replaced. A delicate job that takes a steady hand:

Replaced with a link

Test time...! I'm running all my testing with the exact same setup: Booting LibreELEC and running MAME. Traditionally this arrangement has always, even with a good cable and power supply, given under-voltage alerts.

With this fix? It's improved. The problems haven't gone away, but it's down to just a couple of brown-outs when certain things happen: WiFi connecting, Kodi loading, etc.

So that's getting there. But still not right. Time for option two. Again on the schematic you can see that there is a 10uF capacitor on the power input. That's all the capacitance on the whole of the input to the power supply. Now I know that the USB specifications say that you shouldn't have more than 10uF capacitance on the VBUS, but that's when bus powering on a normal data port, something that this Pi for certain is never going to do. Let's increase that capacitance. More can't hurt. Identifying that existing capacitor is simple enough, it's this one here:

C12 Location

Not a lot of room for adding more capacitance. The simplest option is to just add another capacitor in parallel. There's two ways:

  1. Piggy-back another SMD capacitor, or
  2. Use a through-hole capacitor

I chose option 2 as it allowed me to use a much bigger capacitor and was simpler to solder in place. The first that came to hand was 470uF - maybe overkill, and a smaller one would do the job (this one is also rated at 10V which again is overkill, a 6.3V one would have done), but this is good for testing.

Trimming, shaping and soldering in the leads took just a moment, with the result looking like this:

New Capacitor Fitter

Fits nice and snugly between the power supply and the WiFi module. Now to test...

Drum roll....

It's fixed!

Not a single sign of any under voltage. I'll call that a win...

Now it would be worth testing this with the 10 ohm resistor still in there to see if just the capacitor alone would fix the problem, but I'm not about to re-install that just for this. But if anyone else wants to try just fitting the capacitor and reporting back if that alone will cure it that'd be most helpful. Or maybe the next time I get a new Pi 4 I'll just add the capacitor anyway and find out.


After discussion with Hackaday users it has become apparent that I mis-read the schematic slightly. A slightly better arrangement would be to put the capacitor across one of the nearby 22uF capacitors, not the 10uF. With it where it is at the moment it is a requirement that the 10R resistor is removed, but across one of the 22uF capacitors the 10R resistor can stay. And it really should stay to help reduce noise in the power systems.

Another option may be to add the large capacitor directly to the 5V pins of the GPIO header (not an option for me, those pins are currently in use) - let me know if you try this out and it works for you, it'd be interesting to know how much of a detrimental affect the long traces to that header have.

Yet another option, if you don't mind having the capacitor external, would be to build a small USB adaptor with the capacitor in it to plug into the power input. Again it'd be great to hear in the comments below from someone that's tried this out to see how effective it is.


Awesome hack. I was wondering if you think this would continue to stabilize the draw with two power-hungry USB hard-drives?

Ideally you'd power the USB drives separately. I have only ever used USB SATA adapters that have their own built-in power supply with the Pi. I never assume the Pi can power anything more than itself and maybe a second WiFi dongle and keyboard/mouse dongle.

The resistor and capacitor on pins 24 and 31 of the MXL7704 is a low pass filter and is there to supply the IC with a clean supply voltage to the voltage monitor input. Power does not flow through these connections. Everything is explained there: https://www.maxlinear.com/ds/mxl7704.pdf.
Adding a large cap on the GPIO pins 5V and GND is I think a better solution.

Yes, that's what I alluded to in the "update" at the bottom. I still don't like the idea of the 5V pins of the GPIO header - they're too far from the regulator. You need the capacitor close to the regulator otherwise the impedance of the traces has a detrimental effect on it.

An electrolytic capacitor has a large inductance anyway, so its physical properties would defeat any effort you could do to put it close to the regulator. Ceramic capacitors are much more suitable for this use.

And more important, if your remove the 10 ohm resistor, you’re increasing the low-pass filter cutoff frequency to let pass much more noise, and this is important for monitoring power supply accurately. From the IC datasheet about the 5VSYS pin:
“Filtered from VIN through a RC to provide internal circuits with clean 5V.”
“5VSYS pin should have a low pass filter in front. A 100nF capacitor between 5VSYS and AGND should be placed as close as possible to the IC.”
“For best ADC performance, the 5VSYS pin must be bypassed to AGND with
a 10µF, 1µF and 0.1µF capacitor.”

The capacitor is quite heavy compared to the SMD pads and acts like a lever arm with the distance, so I would put some glue not to force the solder joints.

Like Thierry, I think this mod is unreliable too, and that a good reservoir capacitor at the GPIO pins (did you test this solution?) or USB power connector would be enough to mitigate the power issue, safer and more accessible for the less experimented people.

I love this idea. It certainly makes sense, however, I will be honest I sell RPis and I don't want to be modding them. I would be interested in making a board that could improve the capacitance on the 5V USB input, any thoughts?

Sure you could increase the capacitance at the socket. It may not be quite as effective as having it right at the chip, but it can't hurt. I wonder if you can get PCB mount USB-C plugs?

Add new comment