Two colour LED array circuit woes...

Thread Starter

GLaDOS

Joined Oct 19, 2011
4
I apologise in advance. It's been over a decade since I took electronics and I'm dreadful at math.

So what I've got so far:

2x 10 mm super bright LEDs, 20 mA, 50,000 mcd. Unknown forward voltage...
9V battery
Various resistors from 150 to 470 ohm.
Small PCB
On-off-on rocker switch

What I want to do is have it so that when you switch to the first position, it's orange, middle position is off, and the third position is blue.

I've been all over this site and others all evening trying to work it out. The fellow at the electronics store recommended i use the 470s.
 

SgtWookie

Joined Jul 17, 2007
22,230
The 470 Ohm resistors should work fine. It'll allow your battery to last longer. You'll probably have around 11mA current through the blue LED, and around 12mA through the orange.

Since you're using one resistance for both LEDs, you could just connect one end of the resistor to the common switch terminal (usually the middle one if they're all in a row), the other resistor to the battery + terminal. Then connect the LED's anodes (the longer lead) one each to the other two terminals. The cathodes (shorter leads) get connected together to the battery - terminal.
 

Thread Starter

GLaDOS

Joined Oct 19, 2011
4
Cool! I will try to draw that out now...

Oh dang. I just realised I wrote 2x for the LEDs when I meant to say "2x of each colour." So there are four LEDs - two orange, two blue.
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, that gets a bit more complicated. Each LED needs a separate resistor. However, since you will only power 2 LEDs at once, here is a way to wire them that you can share the resistors with the LEDs that aren't being powered with those that are:



In the schematic, the anodes of the LEDs are on top; those are the leads which are longer.

Also, many LEDs have a flat spot in the rim on the cathode side.
 

Attachments

elec_mech

Joined Nov 12, 2008
1,500
Since you've got 9V, couldn't you put the LEDs in series? This would waste less energy and increase battery life, at least in theory . . .

Blue LED: ~3.6V each

Orange LED: ~2.1V each

Blue:
9V - 2(3.6) = 1.8V
V=IR
1.8 = 0.02R
R1 = 90 ohms

Orange:
9V - 2(2.1) = 4.8V
4.8 = 0.02R
R2 = 240 ohms
 

Attachments

Last edited:

Audioguru

Joined Dec 20, 2007
11,248
Since you've got 9V, couldn't you put the LEDs in series? This would waste less energy and increase battery life, at least in theory . . .

Blue LED: ~3.6V each
You will see the two blue LEDs slowly dim then turn off when the 9V battery drops to 7.2V.
Here is a graph showing how quickly a 9V alkaline battery drops to 7.2V when its current is 27mA:
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Operating LEDs in series is certainly more efficient than in parallel, but as AG has shown (and I omitted from my prior post) is the poor mAh capacity of a typical PP3 9v "transistor" battery.

It would be preferable to use four AA batteries wired in series, and to use lower value resistors. However, until the Vf of the LEDs is known (by verifying using a voltmeter and constant current circuit) I suggest that the circuit I proposed, while not being very efficient, will maintain relatively constant brightness of the LEDs over the life of the battery, and will not risk subjecting them to excessive current.
 

elec_mech

Joined Nov 12, 2008
1,500
Ah yes, I forgot about the discharge characteristics as a factor. Shame on me as I commented about this on another topic yesterday. Excellent points -thank you both!
 

Thread Starter

GLaDOS

Joined Oct 19, 2011
4
Thank you so much :) I have enough of the 470s to give each LED its own resistor if that would be better. I waited long enough for the blue LEDs to come in to the store so I definitely don't want to fry 'em. :eek:
 

Audioguru

Joined Dec 20, 2007
11,248
A blue LED is about 3.5V so the 470 ohm resistor in series with it will have (9V - 3.5V)= 5.5V and will limit the current to 11.7mA. A 220 ohm resistor will limit the current to 25mA and make the LED brighter but the battery will not last as long. Two LEDs each with their own resistor will have a total current of 23.4mA or 50mA.
 

iONic

Joined Nov 16, 2007
1,662
A blue LED is about 3.5V so the 470 ohm resistor in series with it will have (9V - 3.5V)= 5.5V and will limit the current to 11.7mA. A 220 ohm resistor will limit the current to 25mA and make the LED brighter but the battery will not last as long. Two LEDs each with their own resistor will have a total current of 23.4mA or 50mA.
So Sgt's circuit is ideal as it uses the 470 ohm resistor and 2 parallel LED's will draw only about 23.4mA. Ay other way will cause the 9V battery life to dwindle quickly.
 

SgtWookie

Joined Jul 17, 2007
22,230
I wouldn't call it "ideal". A switching supply would be far better, but that's a bit difficult for someone who's just starting out, or just returning to electronics after a long absence.

Once they get that working, if they want to try something more, we can go there.
 

Thread Starter

GLaDOS

Joined Oct 19, 2011
4
So I got the blue working. Today I will conquer the orange. Thank you all so much for your help! This is...well, it's not like I need another hobby, but I'm already looking at this as a rough prototype for something bigger down the line...hee hee
 
Top