# Why is capacitor discharge time higher when an LED is included?

I'm testing the discharge time of a capacitor. I found that the time is higher when an LED is present.

1. Circuit with a capacitance of 100mF, 10k resistance and 5V voltage. By calculating discharge time of 63% of its value, it will discharge to 1.85V from 5V in time of 1 second. That is true following the LTspice diagram.

1. Same circuit, but with a LED containing the following diode characteristics:
.model NSPW500BS D(Is=.27n Rs=5.65 N=6.79 Cjo=42p Xti=200 Iave=30m Vpk=5 mfg=Nichia type=LED)


The discharge time is much different.

I'm sure that I missed some property of the LED that changes the discharge time in the same circuit, but I can't figure out what.

The short answer is the "voltage drop" of the diode, but the longer answer is the non-linear I-V characteristic of the diode. In hand-wavy engineering we resort to a simplified piecewise-linear (PWL) model of diodes. It's generally good enough for many scenarios, but your question requires a higher level of detail.

In SPICE, the main DC characteristics of your diode are modeled by Is, N, and Rs. Rs is the series resistance and is swamped out by the 10KΩ discrete series resistor so we'll ignore it. The equation which models your diode is the following: $$\large I_D = I_S(e^{\frac{V_D}{NV_t}} - 1)$$

where

$$\I_D\$$ is the current through the diode,

$$\V_D\$$ is the voltage across the diode,

$$\V_t= \frac{kT}{q}\$$, or the thermal voltage and is roughly 26mV at the default LTspice temperature of 27°C (or 300.15K),

$$\N\$$ and $$\I_S\$$ are defined in your model parameters as N and Is respectively.

By copy/pasting your circuit a couple times we can run a concurrent comparison of the actual LED, a PWL equivalent (2.4V when "on"), and a behavioral model of the non-linear voltage characteristic of the diode. First, with some maths we can rearrange the above equation to solve for $$\V_D\$$ instead.

$$\large V_D = N \cdot V_t \cdot \text{ln}\left({\frac{I_D}{I_S}} + 1\right)$$

We can implement this as a B-source as shown below. The .param statements define all the required parameters discussed above. If you notice, the PWL model (ignore the first section before the pulse comes in) tracks the initial discharge quite well. However, once the capacitor discharge current gets too low (below ~100µA), the approximation not longer holds as it has drifted too far from the diode's actual exponential I-V curve. The behavioral model tracks identically and is difficult to see so I added another image which purposely offsets the vertical by 50mV for clarity.

If you’re putting the LED in series with the resistor then the discharge current will be significantly lower, and will drop almost to zero when the capacitors discharge to the forward drop of the LED.