How peaky is the Raspberry Pi4 current draw? - Page 1
Forum section: electronics / general

author: e100
author_rank: Frequent Contributor
timestamp: September 10, 2022, 06:53:13 am
content: How peaky is the 5v current draw for a Raspberry Pi4 with active WiFi and ethernet?My Pi works fine with a Samsung 5v phone plug pack, however powering it from a cheap 5 amp buck converter gives sporadic low voltage warnings.Apparently these are triggered if the supply dips under 4.65v, however I haven't been able to see anything out of the ordinary using a cheap battery powered oscilloscope. The lack of an AC coupled input makes it hard to see small dips on a 5v rail.If these current spikes are only a few milliseconds then can I fix the issue by adding a cap on the input?

author: Whales
author_rank: Super Contributor
timestamp: September 10, 2022, 10:58:53 am
content: Are you scoping the 5V on the raspi itself or at the output of your buck converter? How long are the wires between each? A few amps is a decent chunk of current, sub-par wires (including those in some USB cables) might be too resistive.> using a cheap battery powered oscilloscope.Does it have single-shot captures, or only does continuous triggering?

author: e100
author_rank: Frequent Contributor
timestamp: September 10, 2022, 01:00:45 pm
content: Measuring at the Pi.The scope only does continuous triggering.I added a bunch of caps and that fixed the low voltage messages that previously appeared during boot up, however I still see an occasional message in dmesg.

author: RoGeorge
author_rank: Super Contributor
timestamp: September 10, 2022, 01:12:30 pm
content: Quote from: e100 on September 10, 2022, 06:53:13 amTo make a DC coupled osciloscope AC coupled is easy, add a 100nF in series with the oscilloscope's probing tip, and probe through the capacitor. You won't see the absolute DC value any more, but you'll see the variations from the average voltage, and you'll be able to use more sensitive ranges, like 0.1V/div or better.There can be very, very short current spikes of a few amps (ns to ms long), very hard to visualize without writing dedicated test software loops, to make the power jumps repeatable for the oscilloscope.Try to add a 1000uF and a 100nF, both in parallel between GND and +5V, near the RPi. Use short and thick copper wires. Might give you less undervoltage alarms, but this is not a fix. If the power supply is low quality or for lower current, no matter how much C you add, you might still get undervoltage, there's nothing you can do, except replacing the power supply with a proper one.You may rather want to use the less powerful supply to charge the phone slower, and use the good Samsung charger for the RPi.Instead of trying all these, better get a proper power supply of 5V and at least 3A, as per RPi4 specs.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 11, 2022, 01:04:03 am
content: Yeah, the Pi4's current draw is peaky so it's pretty picky about power adapters.

author: brucehoult
author_rank: Super Contributor
timestamp: September 11, 2022, 04:03:17 am
content: Quote from: SiliconWizard on September 11, 2022, 01:04:03 amThe Pi 4 comes with a 3A 15W charger that costs $8.Samsung's 3A 15W charger is about $12-$13. Apple's 20W is $19-$20.They all are good enough for powering most boards that take 5V via USB, and I have a few of each, but the Pi 4 one is the cheapest so it's the one I buy now.I don't know why you'd try to go cheaper than that. OK, sure if you want to power from DC.If the buck converter can average 5A as stated then it's more than adequate to the job and for sure can work with a bit of smoothing.On 1980s Apple computers using their switched mode power supplies, both Apple ][ and Mac, I found I could unplug them at the wall and quickly plug it in to an adjacent socket and it would just keep running without a hiccup -- at least on 240V. I never tried it on 110V.Now THAT'S a good amount of output smoothing.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 11, 2022, 06:31:23 pm
content: Yeah. My post above was just a pun.But more seriously, yes, many people get stung by properly supplying power to the RPi's. That's not just with the Pi4.Interestingly, the official Pi adapter is a 3A... 5.1V. Yep. Not 5V, 5.1V. Because yeah, the voltage threshold for the Pi's (and I think that's been the case for the Pi2 and Pi3 as well) is pretty high.So if you're rolling your own supply, I would suggest doing the same. Design for at least 3A max output current, and 5.1V instead of 5V. And you should be good to go.

author: langwadt
author_rank: Super Contributor
timestamp: September 11, 2022, 08:36:17 pm
content: I see on the schematic that the rpi has ~100uF on 5V, I thought the USB spec required that to be less than 10uF

author: Whales
author_rank: Super Contributor
timestamp: September 11, 2022, 10:12:41 pm
content: I think people have given up trying to follow that standard. It probably doesn't make sense for large, dynamic loads anyway; and I don't think there are any devices that dynamically dis/reconnect capacitors after negotiating higher power levels.

author: langwadt
author_rank: Super Contributor
timestamp: September 11, 2022, 10:20:18 pm
content: Quote from: Whales on September 11, 2022, 10:12:41 pmI assume the limit is there to protect the connector, just like USB-C PD is mean to turn the higher power levels off before the plug is fully disengagedI'm not sure an USB-C connector would last the rated 10000 cycles with several amps flowing during disconnects

author: Monkeh
author_rank: Super Contributor
timestamp: September 11, 2022, 10:21:56 pm
content: Quote from: langwadt on September 11, 2022, 08:36:17 pmI don't think it pretends to follow the USB spec - for the supply or the host ports..

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 11, 2022, 11:04:12 pm
content: Quote from: Monkeh on September 11, 2022, 10:21:56 pmIndeed. And certainly do not expect to power the Pi from a typical USB host. Not a very good idea.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 11, 2022, 11:09:08 pm
content: Quote from: Whales on September 11, 2022, 10:12:41 pmAny reasonable design for a USB device (read: USB device, supposed to connect to a USB host, not just a USB connector designed to provide power to some board) should design this properly. It's not a matter of making sense or not. And while large current peaks are usually tolerated (read: usually) on desktop PCs, just because USB ports are not current limited (usually), this isn't the case on most laptops. Plug in a badly designed USB device on a random laptop and see what happens. It will just disconnect saying that the device malfunctioned.Now if you want to sell crap products that will generated endless support queries, go right ahead. It's fun. It even creates jobs if you're into tech support.As to how to do it, there are a number of ways. It's a matter of limiting the inrush current. So you need to include some kind of current limiter that will lift up the limit once the device has enumerated and can draw more current. It's not rocket science. The basic approach can go from just adding a proper inductor on the VBUS rail, to using power switches with current limiters.