PWM to mitigate inrush current?

I am building a RetroPie arcade which uses an Arduino Nano for its power management system. The Nano turns on and off all the peripheral devices in the arcade, and can put it into standby for quick resume of play.

The issue I have run into is that the audio amplifier I picked has a 2A (or at least that is what I was able to catch with my bench DMM), at least, inrush current spike. The Mean Well power supply seems to momentarily sag when the amp is powered. Since this can happen when the RPI is already powered, it occasionally causes it to reset.

I tried adding a 6800uF CAP (just what I had) on the power rail but it did not resolve the issue. I tried a larger power supply but that too did not help.

A TI paper said that one way to address this issue would be to slow down the charge of the capacitors... which got me thinking...

Can I power the amp using PWM to ramp up power to it? The idea would be to go from 0 to 100% in a couple seconds and leave it at that. Would this address the inrush issue in a safe way?

There are three approaches to this I think - one is to add a constant current limit circuit between supply and
amp. This will lose a volt or so however.

Secondly you could use a soft-start arrangement where a series resistor is in circuit to limit the current when
power is first applied, then short-circuited after a second or two once the caps are basically charged.

Thirdly use an inductor to smooth the current pulses that PWM would otherwise produce - supplys tend to
cut out on instantaneous current, not average current. An inductor prevents the supply seeing the full
current pulses as it smooths variations in current.

@MarkT - thank you for the suggestions.

I can't go with option one as the amp is already powered at its low input voltage spec which results in lower power output which I factored in when I chose it.

This is the amp I am using:

I also swapped out the power supply with a cheaper clone of the Meanwell power supply I'd like to use which also had 24V rail. Even on its own rail, the RPI was complaining of undervoltage when the amp was powered on.

The 3rd option is something that would require better electronics knowledge than I have so I will likely not go for it.

The 2nd option sounds like the description of what an NTC is for. I guess that would be my solution if I can figure out which one to use. I believe the max current the amp uses is under 2A @ 12V. The current spike I measured with my bench DMM in trend mode was just under 2A, but I am not sure that is the actual spike (meaning I wonder if it is actually higher).

Inrush current into the power supply caps is what the supply can deliver.
Could be a lot more than 2Amp. You can only measure that with a scope, not with a slow DMM.

Current draw of a class-D amplifier depends on supply voltage and speaker impedance.
With 8-ohm satellite speakers (not including woofer), and a 24volt supply, that could already be ~4Amp full blast.
I expect you need a 24volt/10A supply for that board.

How are the RPI/Nano powered.
Should be a separate supply, or that buck supply should be buffered with a cap and diode between the two supplies.
Leo..

A TI paper said that one way to address this issue would be to slow down the charge of the capacitors... which got me thinking...

I had to solve a similar issue but on a totally different circuit. Had to drive qty 40 100A impulse relays each having a 12V/6 ohm coil. Instead of using an 12V/80A power supply, I was able to use just one 12V/6.5A supply to drive all those relays. The solution was to just have the smaller supply charge a 1 Farad capacitor with a 2.5A polyswitch connected in series. That was more than 10 years ago, and I think its still in service.

Anyways, I would think that perhaps a suitable polyswitch directly charging a capacitor could solve the problem. There are many types and sizes to choose from, some have a faster trip time than others. If your amplifier is oversized, and your continuous current draw is under 0.5 amp, then a 500mA polyswitch limiting the max current to 1 amp just might work.

If a MOSFET is used for the switching maybe slowing down the turn on by a large Gate resistor and possibly a capacitor could solve this. But of course the transistor will dissipate a lot of power during turn on/off. It can easily die if it is too small. (I have no idea how large transistor you need for this - using two transistors is probably better.)

It is simple.

You need to power the Pi with its own separate power supply. :roll_eyes:

Wawa:
Inrush current into the power supply caps is what the supply can deliver.
Could be a lot more than 2Amp. You can only measure that with a scope, not with a slow DMM.

Current draw of a class-D amplifier depends on supply voltage and speaker impedance.
With 8-ohm satellite speakers (not including woofer), and a 24volt supply, that could already be ~4Amp full blast.
I expect you need a 24volt/10A supply for that board.

How are the RPI/Nano powered.
Should be a separate supply, or that buck supply should be buffered with a cap and diode between the two supplies.
Leo…

I was suspecting that what I caught, even after setting the DMM to Fast Mode, was probably not the full spike. I attached the image of the screen showing my measurement. It shows just under 2A but in a previous measurement it clearly reached 2A. I have a scope but I don’t have a current probe. I guess I could likely figure it out using a large low ohm resistor but have not done so yet.

The speakers are 4 ohms, and I assume the sub as well (I can’t see the back of it). I do not need anywhere close to full power as this is a two player table top arcade. The only reason I went with this amplifier was that it could be powered at 12V and it was 2.1. I had an itch to add a sub to my arcade to see how it would sound. Well… if I can the arcade not to reboot, I will keep it as it sounds cool (the bass…).

The power supply I used in a similar arcade, and chose to use again, is the Mean Well RD-65A. It has 2 rails: 12V 3A (~4A max) and 5V 6A (~8A max). With a smaller 10W stereo amp it works great…

https://www.meanwell.com/productPdf.aspx?i=166

One of the images attached shows my spartan layout inside the arcade. No space for another power supply unless I redo it all. :frowning:

The LED marquee is powered at 12V and it draws 1A or less at the brightness level it is set at (50% or so via PWM).

The power amp is powered by the 12V rail and my measurements showed it generally was between 300 and 800mA at the desired volume. I tried to blast it as loud as it would go and never saw it exceed 1.5A but I may be missing fast spikes. I was using test sounds to drive the amp.

The RGB LED arcade buttons are all powered at 5V. The power requirement is low but I don’t know the exact amount. There are 20 RGB LED buttons with a small control board. They could, but rarely are, all turned on.

The Arduino Nano is on a shield that require 7 to 12V. If I power it at 12V the Arduino’s regulator gets hot and eventually burns out. I have an LM2596 board that reduces the 12V to 8V and is capable of 3A. There are 2 regulators on the Arduino shield that provide the 3.3V and 5V for the things powered by the shield.

The Raspberry Pi 4 is powered by the 5V rail. The rail is set to 5.2V which I believe is the upper limit of the USB bus that is directly connected to the RPI power input. The RPI is sitting on top of a USB3 SSD interface in case you wonder. I have 500GB worth of storage space.

Smajdalf:
If a MOSFET is used for the switching maybe slowing down the turn on by a large Gate resistor and possibly a capacitor could solve this. But of course the transistor will dissipate a lot of power during turn on/off. It can easily die if it is too small. (I have no idea how large transistor you need for this - using two transistors is probably better.)

The amp and RPI are both turned on using a relay. I could switch to a MOSFET though... I have a DFRobot board that has a 20A MOSFET on it. It is the one I was thinking of driving with PWM to achieve the slow power up. What confuses me is that the stuff I read talks about slowing down the voltage rise, and PWM just changes the duty cycle but leaves the voltage at its normal level so I may have just answered my original question... I can't do it with PWM. I was just hoping I was wrong.

dlloyd:
[...] The solution was to just have the smaller supply charge a 1 Farad capacitor with a 2.5A polyswitch connected in series. That was more than 10 years ago, and I think its still in service.

Anyways, I would think that perhaps a suitable polyswitch directly charging a capacitor could solve the problem. There are many types and sizes to choose from, some have a faster trip time than others. If your amplifier is oversized, and your continuous current draw is under 0.5 amp, then a 500mA polyswitch limiting the max current to 1 amp just might work.

A youtube video talking about NTCs also mentioned polyswitches. I believe one decreases its resistance when it heats up, and the other just turns off, right? Based on what I read, it would seem that an NTC is what I need but I have not figured out yet how to pick the right one.

Do the speakers "thump" when you switch the amp on?
If so, there is part of the current surge. Can you switch
the amp on, wait a while, then switch on the pi?

Here, it says Typically, NTC-based limiting is used for most applications. However, there are certain scenarios that require a PTC thermistor over an NTC thermistor. These include equipment with a near-zero reset time, extreme temperature conditions, and systems that experience frequent shorts.

If you consider the current surge as being caused by a temporary short or overload, then I think a PTC would be better. However, if you try NTC and then PTC, you'd find which type performs better with your application.

From datasheets I got impression that common PTC "fuses" take looong time to fire - tens or hundreds of ms even with considerable overcurrent. Is it a good device to prevent brownout?

From datasheets I got impression that common PTC "fuses" take looong time to fire - tens or hundreds of ms even with considerable overcurrent. Is it a good device to prevent brownout?

PTC Example 10ms trip, 0.35A hold

Pick a PTC size that would handle the continuous load current of the amp, the capacitor would handle the peaks.
I don't think it needs to be this fast ... could use slower through hole type.
The power supply circuit would be modified like this:

Power Supply -----> PTC ---> Filter Capacitor 1 ---> Amplifier (soft start)
               |
                -----------> Filter Capacitor 2 ---> Everything Else

EDIT: Disclaimer: Reply #6 could be the simplest solution!

dlloyd:
PTC Example 10ms trip, 0.35A hold

I wonder where Digikey got the 10ms number. From the datasheet:


it takes 100ms to trip when the current is 8(!)A. I think this is a LOT of charge from the power supply caps drained before the fuse trips - 800 mC, for example 8V drop for 100 000 uF cap.

mf-fsml-x.pdf (633 KB)

I wonder where Digikey got the 10ms number. From the datasheet:

Wow - nice catch! I use Digikey frequently ... what an amazing database interface they have, errors seem quite rare. I think they should reduce the cost, seems too expensive now!

Are you sure I need a PTC and not an NTC?

The NTC has a high resistance upon start up, and it decreases as current flowing warms it up. So my amp's power input would see a reduced voltage/current due to the higher resistance, which will gradually go down to its lowest resistance. As long as I pick the corect NTC, I should avoid the spike and not interfere with the amp's power input after that.

The PTC starts off with no resistance and it increases with current. Therefore unless the PTC can react fast enough to block the initial spike, I would still see spike and then cause issues during normal functioning of the amp.

Am I wrong?

For that "soft-charge" circuit used to power those impulse latching relays, the PTC served 2 purposes - slow charge power-up and "continuous" overload protection for the relays. I used a relatively slow PTC in comparison to what's available today. I think it had 1.5 -2 second trip time. On startup, the PTC wasn't sized large enough to overload the supply so the first trip delay wouldn't cause an issue. As the large capacitor charged up, the PTC would oscillate (trip/reset/trip/reset) at about 4Hz and the ramp-up voltage looked like the blue waveform here. It took about 5 seconds to charge the 1 Farad capacitor.

Anyways, I didn't use the PTC to block the initial surge - I used it to break the surge up into many smaller pieces. The output of the 1 Farad capacitor had enough power to operate the relays (needing 80 amps / 50 ms pulse to operate), while at the same time, the same 12V/6A power supply was powering all the control electronics with full 12V (instant-on).

I'm wondering if neither NTC or PTC would be suitable for your purpose. Have you thought about using a separate supply as Paul__B suggested?

A few posts above I posed the internal layout. While there might be space, it would require me to move everything and redo most of the wiring. As a last resort I can revert to the smaller 2.0ch amp that does not cause this issue, however I like having the sub as the games sound so much better.

The power supply may indeed be a little under powered but it works perfectly in a nearly identical arcade I built. The only difference between the two is that this one has the RGB LED buttons and the 2.1ch amp. The issue on this arcade started when I replaced the 2.0ch amp with the 2.1ch amp. I can try other models I can find on amazon but it will be hard to find one that meets all my criteria (input voltage, connector locations, controls, etc - nothing fancy).

MarkT:
Secondly you could use a soft-start arrangement where a series resistor is in circuit to limit the current when
power is first applied, then short-circuited after a second or two once the caps are basically charged.

I think this is the best solution for your situation.