I am using a 555 timer and an NPN transistor to drive an array of 12 LEDs from a 9v battery, and a potentiometer to control the duty cycle. I am concerned about the voltages the LEDs will be subjected to during the transistor's on/off transitions.

My simulated circuits:

Top Level

Top Level Circuit Design

PWM Driver

555 Timer Circuit Driver

LED Array

LED Array

Simulated Output


I understand that when the transistor is off, having 9v on the anode side of the LEDs is fine because there's no path to ground. Likewise, when the transistor is fully on, an operating voltage of just over 3 volts for my LEDs is fine. But real transistors won't transition between on and off instantaneously, so how can I protect my LEDs from voltage spikes that will either destroy them or wear them out faster? Is it even necessary for this circuit?

  • 1
    \$\begingroup\$ It does not directly answer your question, but please see this SE Answer regarding the placement of current-limiting resistors on parallel LEDs \$\endgroup\$ Aug 22 '18 at 20:15
  • \$\begingroup\$ @KevinKruse Bummer. Thanks for the link. I wasn't aware of that consideration. These LEDs are going into a guitar fretboard, so I guess I'm going to have to figure out where the hell to fit resistors in. \$\endgroup\$
    – skrrgwasme
    Aug 22 '18 at 20:42
  • \$\begingroup\$ @KevinKruse This is an app note from OSRAM on the placement of resistors. dammedia.osram.info/media/resource/hires/osram-dam-2496697/… \$\endgroup\$ Aug 23 '18 at 0:31

There's no problem with the circuit.

The voltage across the LEDs take a bit of time to build up to the 3V because of capacitance the LEDs have. That's all you are seeing.

When the transistor turns on, the VLED voltage drops to about 0V quickly, then over a period of time the capacitance charges and the VLED voltage rises to a voltage such that the LEDs are conducting essentially all the current through R1.

Try plotting the actual voltage across the LEDs. If you are using LTspice, then just edit "V(vled)" to "V(vled) - V(vgnd) by right-clicking on the label and changing it in the Expression Editor. Also plot the LED current. You won't see excessive forward or negative voltage, nor will you see excessive LED current.

  • 1
    \$\begingroup\$ Plotting Vled vs Vgnd was a great suggestion. You're correct that it shows the actual LED voltage never rising above ~3v. Current stays in a reasonable range as well. Thanks for the explanation. \$\endgroup\$
    – skrrgwasme
    Aug 22 '18 at 20:39

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.