This question was asked before, but I am struggling with the same question and I can't figure out "how to deal with it in the real world" as someone put it at the time.

Olin's approximation is the first idea I came up with: assume the LED is a voltage source, assume the capacitor initially charges up to 5V - Vled_drop, and assume a simple RC discharge. However simulating the circuit seems to show that the approximation is nowhere close to being valid. With this circuit: Circuit

If I assume a simple RC discharge model the simulator gives

RC = - 3s / Ln(V(3s) / (5V - Vs)) = 4.5

after 3s, when the calculated value would be

RC = 1.8mF * 1k = 1.8

(the simulator uses Vs = 1.64V for a red LED).

t = 0s t = 3s

In other terms the capacitor discharges much slower than the RC=1.8 would indicate. Is there any better way to predict what will roughly happen without a simulator, or without solving the actual differential equations?


  • \$\begingroup\$ Why would anyone not use a simulator? \$\endgroup\$ – Andy aka Apr 9 '20 at 8:22
  • \$\begingroup\$ I tried that yesterday to tune a MosFET based astable multivibrator, and my conclusion is that when you don't understand the basics that doesn't really get you anywhere :) \$\endgroup\$ – Franck Apr 9 '20 at 13:16

Your first RC formula is not right. You need to consider Vf=1.64V of the LED as an offset for the input voltages. This is the correct formula:

RC = -t/ln((Vt-Vf)/(V0-Vf)) = -3/ln((2-1.64)/(3.87-1.64)) = 1.65 Seconds

  • \$\begingroup\$ That was my mistake indeed, thanks! \$\endgroup\$ – Franck Apr 9 '20 at 11:50


simulate this circuit – Schematic created using CircuitLab

Figure 1. The test circuit.

I haven't time to try to figure out your equations which seem to contain both variables and SI unit symbols (which makes it very difficult to read). I offer the following comments:

  • Assume that the LED Vf = 2 V.
  • When SW1 is closed C1 will charge up to about 2/3 of the way from VD1 to 5 V due to the R1 / R2 ratio - so about 4 V.
  • During discharge you can assume that Vf will remain fairly constant although it will decrease with current.
  • Your RC discharge is now calculated from 4 V to 2 V. So your RC time constant is τ = R2C1 = 1.8 s so you should see a discharge of 63% from 4 V to 2 V (1.26 V) in 1.8 s.

Try that out and see if it clarifies anything.

  • \$\begingroup\$ Indeed, I had missed that the discharge is down to Vd, not to 0... thanks! \$\endgroup\$ – Franck Apr 9 '20 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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