Best practice for using capacitors with smps

I'm using some of those cheap eBay smps power supplies to drive a bunch of LEDs which are controlled via pwm with and arduino ... And I was wondering what is the best method to handle the power supply... Basically are caps good or bad? Bigger or smaller ...?

I haven't been able to find much info discussing the different considerations, but it seems like the ideal cap size is just large enough to reduce the ripple to an acceptable level, so small sizes around 10uf would be sufficient ( small sizes are effective because of the switching frequency) so are big caps bad or just unnecessary? I suppose large caps act like shorts until they are charged ... But they help absorb peak demands, however the power supply should generally be sized properly to handle that ...

Which leads me to another question, is there an ideal frequency ratio of pwm to switching frequency? I don't suppose they would get into some kind of weird harmonics ?

What are your experiences ?

I don't know which PSUs from eBay you are referring to. A PSU should be capable of supplying the specified current at the rated voltage with minimum ripple (generally a lot less than 100mV).

There should be no need to add additional capacitors. Any capacitors you do add will increase the inrush current (as you suggest) and may cause the PSU to shut down (if it has built-in protection) or to blow its fuse, or worse.

Electrolytic capacitors have a significant inductance and adding them will increase the available DC current but may not reduce high frequency ripple. Low ESR capacitors should be used. General purpose electrolytics have a high ESR and may overheat.

There should be no need to add additional capacitors.

Wrong, it depends what the load is. I had to add 10000uF to a good quality switch mode power supply when I was driving four stepping motors. These were switch regulated, without the extra bulk capacitance the surface mount ceramic capacitors on the chips burnt out from the current ripple.

so are big caps bad or just unnecessary?

Neither.

I suppose large caps act like shorts until they are charged

Not quite, it is only a short for a very small instance, once it starts to charge it is not.

however the power supply should generally be sized properly to handle that ...

No we are talking about ripple current not continuous current, so a 2A power supply is not going to be able to cope with 1A ripple current without extra capacitors.

Basically are caps good or bad?

They are your friend.

Grumpy_Mike:

There should be no need to add additional capacitors.

Wrong, it depends what the load is. I had to add 10000uF to a good quality switch mode power supply when I was driving four stepping motors. These were switch regulated, without the extra bulk capacitance the surface mount ceramic capacitors on the chips burnt out from the current ripple.

That's an entirely different matter. You are referring to the need to decouple the supply lines for a highly inductive load that is being switched rapidly. The resultant spikes cause the ceramic capacitors to break down, as documented in the book:

It's not a fault of the power supply. You'd cause the same damage if you used a battery without appropriate decoupling.

The resultant spikes cause the ceramic capacitors to break down,

No it was not it was the ripple current, the motor had all the flyback diodes it needed. If it were spikes why did the bulk caps fix it?

It's not a fault of the power supply

I never said it was.

Ceramic caps have very low ESR but can have very high dielectric losses. The actual ceramic grade matters for high ripple current (its the dlelectric losses more than the ESR that matters for self-heating I suspect). Some dielectrics can tolerate substantially higher temperatures too.

All the ceramic capacitors based on barium titanate have distinctly non-ideal behaviour (often this is greatly improved if using a voltage rating much higher than the working voltage since the dielectric is more linear and well behaved then).

Barium titanate is highly ferro-electric which is what gives it the massive dielectric constant (in the thousands, compared to 3--10 for many insulators) but also its very poor thermal and linearity / aging properties.

So back to the original issue - choose generously rated capacitors and check the ripple-current and ESR ratings and you should be OK - skimping on them might lead to issues with heating, lifetime etc.