Electronic – How to calculate the current in a PWM LED driver circuit

boostinductorled-driverpwmswitch-mode-power-supply

I've been fascinated by the simplicity of the driver circuit based in the YX8018 in the prominent solar garden lights, they were able to simplify the circuit a lot in a simple boost topology by just running at fixed frequency and using the LED as the output rectifier. I was interested in building my own circuit using a 555 timer driving a small transistor, just to learn more about the topology, but in my research I was not able to find a equation, or at least a simpler explanation between the frequency, input voltage, and inductor value to be able to calculate the output current to the LED. Could someone help me understand how I can calculate the output current given these parameters?

The closer I got to an answer was by reading the SLVA372C App Note, in the equations section, the inductor ripple current:

$$
\Delta Il = \dfrac{Vin \times D}{f \times L}
$$

Plugging the values I tested on my solar light's circuit:

$$
\Delta Il = \dfrac{1.5 \times 0.5}{200000 \times 330 \times 10^{-6}} = 0.0107
$$

But when I measured the current to the LED using my DMM I got 6.3mA.

Best Answer

The equation you are using is to calculate the ripple current, The peak-peak current. Your DMM will not be able to measure this

enter image description here

The next two equations are needed to determine the current

\$I_{max out} = (I_{limmin} - \frac{\Delta I_L}{2}) * (1-D)\$

\$I_{swmax} = \frac{\Delta I_L}{2} + \frac{I_{max out}}{1-D} \$