Skip to main content
2 of 3
added 48 characters in body
stevenvh
  • 146.6k
  • 21
  • 460
  • 669

At first sight case A doesn't look like it's going to cause us trouble (but wait!). Back-of-envelope-calculation: the duty cycle is only 1 %, so the 25 mA will have to be compensated by a 250 µA, linear approximation. But the current isn't constant, and charging/discharging the capacitor over a resistor will go exponentially. You have only 1 V difference between the capacitor's 3 V and the LED's 2 V, and you don't want to drop the capacitor's too much before the 25 ms are over: not that fading will be noticeable as such, but the average brightness will be. So assuming a maximum allowed 300 mV drop in 25 ms will mean:

\$ 3 V \times e^{\dfrac{-25 ms}{R C}} = 2.7 V \$

then \$ R C\$ = 0.24 s.

For recharging we'll have to set an end voltage; if we would like to recharge to the full 3 V it would take an infinite time. So if we set our target at 99 % of 3 V we can write a similar equation:

\$ (3 V- 2.7 V) \times e^{\dfrac{-(2.5 s-25 ms)}{R C}} = 3 V \times 1 \% \$

then \$ R C \$ = 1.07 s.

Yes, that's different \$ R C\$ times because the \$ R\$ is different: for the discharge it's the LED's series resistor, for the recharging it's the resistor from the battery.

For the series resistor with the LED we can calculate

\$ R_1 = \dfrac{3 V - 2 V}{25 mA} = 40 \Omega\$

I'm cheating here: the 25 mA is the begin current, it will decrease during the 25 ms. (For the moment I'm going to ignore this, but the begin current should be higher if you want 25 mA average. I'll have to do some integration here.)

Since we know \$ R_1 C\$ and \$ R_1\$ we can find \$ C\$:

\$ C = \dfrac{0.24 s}{40 \Omega} = 6 000 \mu F \$

And now we can find the charging resistor too:

\$ R_2 = \dfrac{1.07 s}{6000 \mu F} = 180\Omega \$.

(more later. There's one snag: after the first 2.5 s cycle we have 2.97 V across the capacitor, where we started with a full 3 V. So next time we'll have 2.97 V \$\times\$ 99 % = 2.94 V, and so on. The capacitor seems to be drained slowly. Why doesn't this happen in reality? Because it's not only being discharged during the 25 ms on-time, but the battery keeps supplying current as well. I'll think it over and report back)

stevenvh
  • 146.6k
  • 21
  • 460
  • 669