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)?

  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – jonk
    Nov 10, 2016 at 17:47
  • \$\begingroup\$ Thanks! It says 1.8A, but I'm not sure if it can actually deliver that. \$\endgroup\$
    – axk
    Nov 10, 2016 at 18:08
  • \$\begingroup\$ 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? \$\endgroup\$
    – jonk
    Nov 10, 2016 at 18:09
  • \$\begingroup\$ 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. \$\endgroup\$
    – axk
    Nov 10, 2016 at 18:14
  • \$\begingroup\$ 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? \$\endgroup\$
    – jonk
    Nov 10, 2016 at 18:18

1 Answer 1


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.

  • \$\begingroup\$ 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? \$\endgroup\$ Dec 17, 2020 at 23:36
  • \$\begingroup\$ @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. \$\endgroup\$
    – jonk
    Dec 18, 2020 at 3:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.