# Input capacitor for LED driver circuit

I'm planning to power the circuit from a micro usb charger rated 1.8A. The peak current for the circuit is 1.5A but if the charger is not providing enough current I can use PWM with e.g. a 50% duty cycle, then the average current should be 0.75A (half of 1.5A).

I suppose to average out the current so that to the supply it looks like a constant 0.75A I need a capacitor. Provided the PWM is at approx 1.5KHz with 320uS ON and 320uS OFF and the voltage is 5V what type and value of a capacitor should I use on the input (preferably a smaller size)?

• I don't understand why a 1.8 A rated charger can't supply a peak current of 1.5 A. But it's probably because I can't parse your wording. Regarding a capacitor, $C = I \tfrac{\Delta t}{\Delta V}$. $\Delta t$ is your OFF time, $\Delta V$ is the allowable voltage droop, and $I$ is the average current you expect drawn during this time. – jonk Nov 10 '16 at 17:47
• Thanks! It says 1.8A, but I'm not sure if it can actually deliver that. – axk Nov 10 '16 at 18:08
• Okay. So that makes more sense. I'll provide a very short discussion as an answer, then. I'd still like to know why the 50% PWM, though. Is it ONLY because of your worries about the power source? – jonk Nov 10 '16 at 18:09
• Strictly speaking I need a power supply that can provide the required current but if the one I have cannot handle the load and in absence of a more powerful supply using the LED drivers dimming through PWM can reduce the average current, that was my reasoning. – axk Nov 10 '16 at 18:14
• How are you going to PWM the circuit? It's one thing to just plop down a capacitor. Do you have a mechanism for that aspect, already? – jonk Nov 10 '16 at 18:18

Some entering notes:

• You have a power supply that you doubt can supply full current. Since you are want to continue using this supply (for purposes of discussion), you've decided to PWM your LED circuit at a duty cycle that is less than 100%.
• You want to select a capacitor that will provide adequate current.
• You have an IC on the LED side which you can PWM, already.

Rough behavioral model might look like:

simulate this circuit – Schematic created using CircuitLab

You are worried that $R_s$ is large enough that the voltage from the USB power source will droop too much under full load. You'd like to add a capacitor to supply additional current to your LED controller IC and PWM so as to lower the average current draw to something the USB power supply can handle.

The equation for the capacitor, in general, is:

$$C = I_C \frac{\Delta t}{\Delta V_C}$$

In this case, your USB power source is continually supplying current to the IC and to $C_1$. But your controller is, we assume, pulling more current than the USB source can provide during the ON times.

A minor problem is that you don't know $R_s$, but are just worried about it. In reality, the USB power source will be supplying current (some) all the time, even while the LED controller is ON. Just not enough.

So let's assume it can supply half the current needed during ON times. Then during this time the current from the capacitor will also be half. You've mentioned that you want to be certain of $1.5\:\textrm{A}$. So this gives us a value for $I_C$ when the LED controller is ON: $I_C=750\:\textrm{mA}$. With a PWM frequency of $1.5\:\textrm{kHz}$ and a duty cycle of 50%, the ON period will be $\tfrac{1}{3}\:\textrm{ms}$. So we have an approximation for the period where the capacitor is supplying current and its voltage starts drooping: $\Delta t=\tfrac{1}{3}\:\textrm{ms}$. The only remaining problem is the allowable droop of the voltage at the LED controller IC. Let's assume that this should be no worse than $200\:\textrm{mV}$. (You can choose other acceptable values, though.)

Then the capacitor should be:

$$C = 750\:\textrm{mA} \frac{\frac{1}{3}\:\textrm{ms}}{200\:\textrm{mV}}= 1250\:\mu\textrm{F}$$

Make it the next size bigger, I suppose.

• It seems that if PWM frequency is increased 10 times, then the required capacitor will be 10 times smaller. E.g. 15 kHz PWM will need a 125 μF cap. Is that correct? – Gene Pavlovsky Dec 17 '20 at 23:36
• @GenePavlovsky Yes. If the PWM frequency is higher, then the capacitor will discharge for less time between recharges and, for a given allowable "voltage droop," smaller capacitors can be used. Your calculation looks about right to me, given no change in the other parameters. But this is more than 4 yrs ago so I may be given this short shift. – jonk Dec 18 '20 at 3:25