Author |
Message |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Mon Sep 05, 2011 10:36 pm Post subject:
A Collection of LED Drivers |
 |
|
Hi Everyone,
In my never-ending quest for more blinky lights, here are some LED drivers I’ve found around the Interweb, and even a few tweaks I’ve made. This stuff is fairly simple, and you’ll see circuits like this all over the place, but I thought I’d bring some of them together in one place here.
Why use a driver circuit? Well, the best reason is to avoid loading down the circuit the LED is attached to. If you load down a circuit like an LFO, it can change the LFO’s output level or even affect the frequency, and asking a CMOS chip to directly drive an LED can result in erratic operation or even damage to the chip. For example, the 4017 used in many simple sequencers can only supply about 8mA (and that’s the max rating – you generally don’t want to depend on that for long term operation).
Of course, here’s the classic. An NPN transistor actually supplies the current to the LED, and the amount of current required from driving circuit is minimal. This circuit works well with digital or analog inputs, and is dirt simple. R1 sets the current to the base of the transistor - I’ve used a wide range of values from 10K to 150K. R2 sets the current through the transistor and into the LED. Most LEDs can take up to 20mA (0.020A), but you can usually get away with MUCH less than this and still have a very visible indicator. Use Ohm’s Law (I = V/R) to figure out how much current you’re putting through your transistor and LED. For example, in the circuit below with a +15V supply and a 2K resistor, we’re running about 7.5mA (15 / 2,000 = 0.0075A) through the green LED. The protection diode D2 is recommended if the input signal goes more negative than -6V (this is the base – emitter “breakdown voltage” for the 2N3904 and negative voltages greater than this will damage the transistor).
Let’s not forget that there are problems with LEDs. They consume a relatively large amount of current, and they can switch on and off very quickly. This means that your power supply is suddenly expected to deliver an extra 10 or 20mA, and can cause a spike through the supply and every circuit connected to it, resulting in switching noise getting into your audio. One solution is to use as little current through the LED as possible. It can vary with the color and brand of LED, but just a few milliamps can be enough in many cases. Experiment with a larger value current limiting resistor (R2), and see what works. Another thing I do with my LFOs is to run the LED off the triangle wave rather than the square. This turns the LED on and off more gradually, and gives the power supply and filter capacitors throughout the system more time to supply the necessary current. If all you have available is a square wave, you might want to try adding a capacitor to ground after R1. This forms a low pass filter and can help round off the sharp edges of the switching signal going to the transistor.
Enjoy!
Tim (Captain Blinky) Servo
Description: |
|
Filesize: |
580.1 KB |
Viewed: |
56000 Time(s) |

|
Last edited by Tim Servo on Mon Sep 05, 2011 10:49 pm; edited 1 time in total |
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Mon Sep 05, 2011 10:48 pm Post subject:
A Bipolar LED Driver with Bias Adjustment |
 |
|
Okay, so to have our indicator show the lower voltages around 0V, we need to bias the input signal by adding a volt or two to it. This forces the LED to come on earlier and lets us monitor the changes around the 0V area better. This is basically the same thing as biasing an audio amplifier to reduce crossover distortion. You can use a couple of resistors as a voltage divider to add a volt or two to the input signal and bias it up (or down in the case of the negative voltage monitor). The values I’ve shown should be close, but you may want to experiment to get the effect you like. We’re looking for the LED to come on when the input signal is just barely above (or below) 0V. What I really like is the second solution with the adjustable bias trimmers. Put in a 100K (or even 1M) trimmer, and adjust it so that the LED comes on when you like. You can even set them so they come on just before the signal crosses the 0V line. If you don’t want to ‘waste’ a trimmer, just measure the resistance between the trimmer’s legs, and substitute the closest available fixed resistors. I’ve set mine so that there is a bit of overlap – the LEDs are both on (dimly) during the crossover around 0V. It makes a great indicator for the odd waveshapes on the LFX, and the whole mess consumes only about 7 or 8mA. (LFX link...
http://www.electro-music.com/forum/topic-49081.html
Also, since the current through the LEDs is inversely proportional (when one is high, the other is low, and there is overlap in the middle where both are at lower levels), the system has a relatively stable power draw. It seems to vary from 5 to 8mA, but doesn’t swing from 0 to 20mA like some LED circuits. You still need to make sure your power supply has enough current capability before you add LEDs, but this setup is a little more “gentle” as far as sudden current swings and spikes.
One more thing: blue LEDs aren’t necessarily evil, but most of the time they are too darned bright! Don’t be afraid to throw in a really big current limiting resistor (like 10K or even 20K). Also, I stack the LEDs, putting the blue one BEHIND a red or green diffused LED. It can be a bit of a challenge to mount (try putting the first LED in a regular panel mount and then using heat shrink tubing to fix the second one behind it), but the color combinations can be really nice.
Well, I have a few more, but I'll shut up for now. Have fun!
Tim (Queen of the Blinky People?) Servo
Description: |
|
Filesize: |
112.04 KB |
Viewed: |
1306 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |

|
|
|
Back to top
|
|
 |
bubzy

Joined: Oct 27, 2010 Posts: 594 Location: United Kingdom
Audio files: 64
|
Posted: Tue Sep 06, 2011 2:11 am Post subject:
|
 |
|
it would be nice to have one that drives a rgb led so that all states of the lfo could be indicated.
just a thought. im sure its no problem and i havent really had time to read the whole post (should be working ) |
|
Back to top
|
|
 |
Dougster

Joined: Sep 20, 2005 Posts: 272 Location: Tucson, AZ, USA
|
Posted: Tue Sep 06, 2011 2:35 pm Post subject:
Re: A Bipolar LED Driver with Bias Adjustment |
 |
|
Tim Servo wrote: | One more thing: blue LEDs aren’t necessarily evil, but most of the time they are too darned bright! |
Nope. They're evil. _________________ Once you start down the modular path, forever will it dominate your destiny!
Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com
Blue LEDs are evil. |
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Tue Sep 06, 2011 5:18 pm Post subject:
A Collection of LED Drivers |
 |
|
Hi Bub,
Let's see... an RGB level meter could maybe do something like
Red >2.5V
Blue -2.5V to 2.5V
Green <-2.5V
I'm not 100% sure how to do this, but it could be a fun challenge. I think it could be done with four transistors, which isn't too bad but it is certainly more complex than the other drivers here. I'll post if I can come up with something.
Hi Doug,
Okay, maybe they're evil. To quote Jessica Rabbit - "I'm not bad, I'm just drawn that way. And my current limiting resistor should be increased."
Probably not a perfect quote there, it's been a while since I've seen that movie.
Also, is it just me, or does that first "Basic Driver" graphic not show up?
Tim (Who Framed) Servo |
|
Back to top
|
|
 |
Dougster

Joined: Sep 20, 2005 Posts: 272 Location: Tucson, AZ, USA
|
Posted: Tue Sep 06, 2011 5:26 pm Post subject:
Re: A Collection of LED Drivers |
 |
|
Tim Servo wrote: | Also, is it just me, or does that first "Basic Driver" graphic not show up? |
Shows up for me... _________________ Once you start down the modular path, forever will it dominate your destiny!
Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com
Blue LEDs are evil. |
|
Back to top
|
|
 |
Danno Gee Ray
Joined: Sep 25, 2005 Posts: 1351 Location: Telford, PA USA
|
Posted: Tue Sep 06, 2011 7:45 pm Post subject:
|
 |
|
No show for me. |
|
Back to top
|
|
 |
marvkaye
Joined: Mar 14, 2011 Posts: 225 Location: Fla
|
|
Back to top
|
|
 |
Paradigm X
Joined: Feb 15, 2011 Posts: 363 Location: Null and void
Audio files: 2
|
Posted: Wed Sep 07, 2011 2:58 am Post subject:
Re: A Collection of LED Drivers |
 |
|
Tim Servo wrote: | Hi Bub,
Let's see... an RGB level meter could maybe do something like
Red >2.5V
Blue -2.5V to 2.5V
Green <-2.5V
I'm not 100% sure how to do this, but it could be a fun challenge. I think it could be done with four transistors, which isn't too bad but it is certainly more complex than the other drivers here. I'll post if I can come up with something.
|
Found this recently on the Deathlehem/S0und 0f L0g1c form (Rykhard's).
http://www.techlib.com/electronics/bargraph.htm
Could be altered with different LEDs obviously
(i like blue LEDs ! ) |
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Wed Sep 07, 2011 12:41 pm Post subject:
A Collection of LED Drivers |
 |
|
Hi Para,
Nifty, I like that! A couple of notes though: 1) I would NOT feed any negative-going signals into that one. Use a resistor and diode to block any negative voltages going in, or else you could fry that CMOS chip. 2) At the maximum signal level, all the LEDs are lit so you're going to consume a fair amount of current. With a 9V supply and 1K current limiting resistors, each LED will consume 9mA, and the whole chain will consume 45mA when fully lit (by comparison, most synth modules consume 50 to 100mA, so that indicator can take as much current as an entire module).
Tim (fully lit) Servo |
|
Back to top
|
|
 |
Paradigm X
Joined: Feb 15, 2011 Posts: 363 Location: Null and void
Audio files: 2
|
Posted: Thu Sep 08, 2011 9:16 am Post subject:
|
 |
|
Oh Ok, thanks. Bit of a noob at all this
To paraphrase the simpsons;
"Right!! That's why you're the judge and I'm the law-talking guy."
 |
|
Back to top
|
|
 |
VW

Joined: Feb 06, 2011 Posts: 3 Location: Finland
|
|
Back to top
|
|
 |
Thomas_Henry
Joined: Jul 24, 2009 Posts: 170 Location: N. Mankato, MN
Audio files: 3
|
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Sun Sep 11, 2011 12:00 am Post subject:
A Collection of LED Drivers |
 |
|
Nice, Thomas! I like the oscillator that creates the yellow mix color.
Tim (mixing it up) Servo |
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Sun Sep 11, 2011 1:00 am Post subject:
A Collection of LED Drivers |
 |
|
Okay, I'm going to try this again. For some bizarre reason, some of my JPG images don't show up in previews or when I look at the thread later. I know some others have had the same problem, while others can see them just fine. If the images are too small I don't see them, but if I put them in a wide border they work just fine... go figure.
Anywho, these images are for those who can't see the basic LED driver and Single Transistor Bipolar LED driver schematics I've posted above.
Tim (Invisible Man) Servo
Description: |
|
Filesize: |
603.6 KB |
Viewed: |
764 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |

|
Description: |
|
Filesize: |
586.83 KB |
Viewed: |
681 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |

|
|
|
Back to top
|
|
 |
richardc64

Joined: Jun 01, 2006 Posts: 679 Location: NYC
Audio files: 26
|
Posted: Sun Sep 11, 2011 5:04 am Post subject:
Re: A Collection of LED Drivers |
 |
|
Tim Servo wrote: | Okay, I'm going to try this again. For some bizarre reason, some of my JPG images don't show up in previews or when I look at the thread later. |
They all show up for me, but there's definitely something not right about them. No way should images those dimensions be 600KB, unless they're BMPs with an erroneous JPG extension. I get 19KB and 42K after I Open and re-Save them. Whatever.
Thanks for the info. _________________ Revenge is a dish best served with a fork... to the eye |
|
Back to top
|
|
 |
footfleet
Joined: Oct 09, 2011 Posts: 2 Location: Providence, RI
|
Posted: Sun Oct 09, 2011 2:03 pm Post subject:
Resistor-only + gate-length |
 |
|
Hey all - This site has been a huge help so many times. First post...
2 questions...
1) Is my LED set up bad?
- I have no negative voltage. I'm pretty new to this, but my in-progress 4017 CV sequencer has simply a 2.2k resistor before each LED... receiving current from the 4017 outputs. So, it's about 7.5V into the resistor, and 1.8V hitting the LED anode. If I'm doing Ohm's Law right, each LED is getting around 0.8mA (.0008A), which is less than what Tim Servo was getting with his first transistor circuit (low is good, right?).
- So, is this LED set up ok? ...or is it that even though the current is low, there is an issue with taking the current right from the 4017 like that?
2) Considering I have no negative voltage (just a 9V battery), what's the simplest way for me to switch to a gate-length LED blink?
- I have a 3-way switch on each step (I'm receiving my clock from the Korg MS-20 sq wave 0 to +5V) which gives me the trigger options: 'gate-length' / off / long. I can set the gate length with the LFO sq wave duty cycle knob on the synth.
- I built Ken Stone's LED driver, and took current off the individual gated steps, yet for some reason the LED blinked full-length, instead of gate-length. I haven't had a chance to try and figure out why, but I was wondering if anyone has a suggestion for theee simplest gate-length LED driver that doesn't need to deal with negative voltage?
...With 30 steps, I'm desperately trying to keep every corner of this circuit minimal... mostly cause its getting too confusing for me to keep track of!
THANKS |
|
Back to top
|
|
 |
bubzy

Joined: Oct 27, 2010 Posts: 594 Location: United Kingdom
Audio files: 64
|
Posted: Sun Oct 09, 2011 3:40 pm Post subject:
|
 |
|
welcome to electro-music
i put the leds directy into the outputs of the 4017, doesnt seem to make any difference. |
|
Back to top
|
|
 |
footfleet
Joined: Oct 09, 2011 Posts: 2 Location: Providence, RI
|
Posted: Wed Oct 12, 2011 10:40 am Post subject:
|
 |
|
Good to know. I won't sweat it, then...
Thanks |
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Fri Oct 14, 2011 11:11 am Post subject:
A Collection of LED Drivers |
 |
|
My concerns over driving an LED directly off a 4017 output are only from reading the spec sheet, not actual use. It just seemed to me that it was awfully close to the max that the chip can supply, but of course, that also depends on how much current you run through the LED. I'd say that if it's a module for your own use and it works, then go for it. I would probably avoid doing that on a commercial product though.
Tim (current events) Servo |
|
Back to top
|
|
 |
Paradigm X
Joined: Feb 15, 2011 Posts: 363 Location: Null and void
Audio files: 2
|
Posted: Sat Nov 05, 2011 1:13 pm Post subject:
|
 |
|
Hi
Bumping this up with what might well be a stupid question. (!)
Ive got a midi to trigger deivce which has 23 outputs... to make a blinky for each, would i really need 23 of the first transistor circuits, or is there a cleverer way of going about it?
Cheers, Ben
[/right] |
|
Back to top
|
|
 |
Dougster

Joined: Sep 20, 2005 Posts: 272 Location: Tucson, AZ, USA
|
|
Back to top
|
|
 |
Paradigm X
Joined: Feb 15, 2011 Posts: 363 Location: Null and void
Audio files: 2
|
Posted: Mon Nov 07, 2011 5:06 am Post subject:
|
 |
|
Thanks Doug. However,
Dougster wrote: | It'll take a bit of programming |
puts me right off tbh... best ive ever done is
10 Print Hello world
20 goto 10
Still getting my head around attaching bits of metal to each other with a hot pencil.
Ill have a read thru those links when i get a chance tho
Cheers
Ben |
|
Back to top
|
|
 |
|