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. 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.


Update

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.

Comments

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.

Hello.
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.

Add new comment

superannuation