need help with LT spice simulation of a LED

Thread Starter

jhtran

Joined Sep 22, 2011
3
Hi guys,

I am trying to simulate 3 LEDs to turn on/off at a duty cycle of 33%

I supply 20 mA to each LED during a 25m period
so each 1st led will turn on at 0 to 8.3 ms
2nd led turn on at 8.4ms to 16.8 ms
3rd turns on at 16.7ms to 25.0ms

for some reason I am getting current spikes in the LEDs,
I want the current in each LED when it is on to be around 20mA
but I am getting spiking up to 120 mA

I tried to attach the snubber circuit across the mosfet to correct the spiking.
but I am unsure on how to calculate the R and C values for this.

please take a look at my LT spice simulation, thanks for reading this message.
 

Attachments

crutschow

Joined Mar 14, 2008
34,420
Those current spikes are apparently due to parasitic capacitances in the MOSFET and are too short to damage the LEDs, so I would just ignore them.
 

Thread Starter

jhtran

Joined Sep 22, 2011
3
what do you mean too short?

can i still reduce the spikes by using a snubber RC circuit?

I'm looking at this website http://www.daycounter.com/Calculators/Snubbers/Snubber-Design-Calculator.phtml

but i am confused since i calculated my: Ipeak to be 17 mA (peak current flowing thru mosfet) , rise time = 1 ns (chosen value), Vrail = 4.2V (voltage across mosfet)
and Frequency = 1/T = 1/(24.9*10^-3) = 40.16 Hz

but it calculates the R and C values: C = .004 nF and R = 0 ohms

which does not make any sense at all
 
Last edited:

crutschow

Joined Mar 14, 2008
34,420
By too short I mean the current spikes are so narrow that they will not damage the LEDs so you don't need to suppress them. If you really wanted to suppress them you would likely need to put a small inductor in series with each LED.
 

Thread Starter

jhtran

Joined Sep 22, 2011
3
thanks alot that seemed to reduce the spiking greatly.

can you explain how the small inductor in series with each LED

reduces the spiking?

i put a 100 uH in series with the LED
 

crutschow

Joined Mar 14, 2008
34,420
The spiking is caused by rapid discharge of stray capacitance in the circuit elements. The inductance resists the rapid change in current, thus suppressing the current spikes. But you are solving an effect that is not a problem in a real circuit. The energy in those current spikes is too low to damage the LEDs.
 
Top