Maker Pro
Maker Pro

2x2x2 LED Cube (Bi-Color, 2Pin)

Hexile

Aug 14, 2011
10
Joined
Aug 14, 2011
Messages
10
Hi, I have some bi-color led's which I would like to make a led cube out of.

I'm not quite sure what solution would be best for the wiring, as I want to be able to control each led independently and the led's are 2 pins. (Red/Green)

One way is to connect every LED like this.

But I'd like to know if there is a better way, even tho i could spare 32 transistors for this project.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
That will never work -- at the very least you require some resistors.

But you only need 2 transistors. I posted a circuit a while back. I'll try to find it.

But really, you'll be better off multiplexing them and for that you'll probably want a series of outputs that can be pulled high or low, or left floating -- it's a bit tricky -- almost like charlieplexing.

edit: Here it is. The circuit show here has the led either red or green based on the logic level input. For your circuit you probably need to control both bases desperately so you can have either colour or off.
 
Last edited:

Hexile

Aug 14, 2011
10
Joined
Aug 14, 2011
Messages
10
That will never work -- at the very least you require some resistors.

Sure it would, I omitted them for simplicity as it was about controlling, not powering.

But you only need 2 transistors. I posted a circuit a while back. I'll try to find it.
It was just an example of how to do it

But really, you'll be better off multiplexing them and for that you'll probably want a series of outputs that can be pulled high or low, or left floating -- it's a bit tricky -- almost like charlieplexing.
That sounds interesting.

edit: Here it is. The circuit show here has the led either red or green based on the logic level input. For your circuit you probably need to control both bases desperately so you can have either colour or off.
I don't see how that would help with several led's.
 

Sheldon_89

Jun 3, 2012
2
Joined
Jun 3, 2012
Messages
2
Hi
I dont know what you really want to realised but if you want to make some effects with more than 2 diodes better use some pic controller. If you want to just turn off and on this diodes u can make it with only 2transistors.
 

Hexile

Aug 14, 2011
10
Joined
Aug 14, 2011
Messages
10
I will be using a AVR microcontroller which would control it.
It doesn't seem you read or understood what this is supposed to be.
 

Sheldon_89

Jun 3, 2012
2
Joined
Jun 3, 2012
Messages
2
Your design depends of how many diodes you wanna have.If you make 2x2x2 led cube you have 12pins and this is easy to achieve only with AVR microcontroller.
 

Hexile

Aug 14, 2011
10
Joined
Aug 14, 2011
Messages
10
I will go with the Charlieplexing solution as i find that quite easy.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
Sure it would, I omitted them for simplicity as it was about controlling, not powering.

Your circuit will let the smoke out of at least one of the transistors.

IT WILL NOT WORK.

I don't say it won't work for no reason you know. Sheesh.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
I will go with the Charlieplexing solution as i find that quite easy.

2x2x2 is only 8 LEDs and charlieplexing is a good solution.

However it has problems that mean it gets more difficult as you get more LEDs. The issue is that it limits the number of LEDs that can be illuminated simultaneously. If you want the illusion of a pattern of LEDs lit (i.e. several at a time) then the peak current demands (per LED) rise quite quickly.
 

Hexile

Aug 14, 2011
10
Joined
Aug 14, 2011
Messages
10
Well, if i want to build a bigger cube later, I will probably need to rethink it anyway.


Your circuit will let the smoke out of at least one of the transistors.

It depends on the transistors you choose. Again, it was only an example.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
It depends on the transistors you choose. Again, it was only an example.

Don't fight a losing battle.

You're supplying +5V from a voltage source to the base of an NPN transistor that has it's emitter grounded.

That will let the smoke out. OK, it may damage your power supply or load it down to 0.7V in some cases. Either way. Things are certainly not going to be working properly.

Let's say, for some reason the transistor doesn't fail, and the power supply somehow isn't damaged or loaded down. The next problem is that you've tied the base of one transistor to the base of another NPN transistor that has its emitter at a much higher voltage. This means that the voltage on the base of the lower transistor (with the grounded emitter) is insufficient to turn on the upper transistor.

So, IT WILL NOT WORK.

I am saying this because I don't want you to think that this circuit could ever work.

If you're designing circuits you need to know this stuff.
 

Hexile

Aug 14, 2011
10
Joined
Aug 14, 2011
Messages
10
Then explain how we where able to use transistors as dc motor control without issues in class...
(VCC -> Transistor -> Motor -> Transistor - Ground)
(Same setup as i showed in the example, difference is the load)
However I do not remember what kind of transistors we used.

Or no, lets leave it here as i will not use that solution.
 
Last edited:

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Then explain how we where able to use transistors as dc motor control without issues in class...
(VCC -> Transistor -> Motor -> Transistor - Ground)
(Same setup as i showed in the example, difference is the load)
However I do not remember what kind of transistors we used.

Or no, lets leave it here as i will not use that solution.

Google 'Cherry Picking Fallacy'

A drunk driver made it home without causing an accident, thus drunk driving is accident free...
 

davenn

Moderator
Sep 5, 2009
14,077
Joined
Sep 5, 2009
Messages
14,077
Sure it would, I omitted them for simplicity as it was about controlling, not powering.

ALWAYS draw a complete circuit, else it will lead to confusion and the sort of comments you got.
People need all the information if you expect them to be able to help you :)

cheers
Dave

PS .... interesting link, CocaCola, wasnt familiar with that term before
 
Last edited:

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
When you say 2x2x2, are you talking about 4 dual diodes or 8 dual diodes?
Some other questions:
Do you want to time multiplex these or just showing one at the time?
I suppose you want to blank the unused LEDs when not in use?
Are you going for a tri-colour solution?

TOK ;)
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
Ok, did a little droodling here. You can drive each (dual) LED with 2 transistors only, but it will cost you current. For a 5V circuit you'll need 2.6 x the current trough the LEDs. if you set 20mA LED current, you'll draw around 53mA. You'll also need 2 lines to control the LEDs, one for each colour.

Each end of the LED is connected with a resistor to 5V. The same ends are connected to the collector of 2 NPN transistors, emitters to 0V. A base resistor to the MCU.

When one transistor is active it is drawing current through both the LED and the resistor on that side. The Resistor-only side will draw more current than through the LED, a total af about 2,6 times the LED current. The forward voltage drop of a red and green led is 1.7 and 2.1V approx.

Charliplexing of these LEDs is not easy, if possible at all, since they are bipolar and not unipolar in nature.

TOK ;)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
Charliplexing of these LEDs is not easy, if possible at all, since they are bipolar and not unipolar in nature.

Charlieplexing has pairs if LEDs placed in inverse parallel (aka anti-parallel) between all combinations of pairs of outputs. In this case each bicolour LED is both of these LEDs.

The brightness might vary, but you can deal with that by having a shorter on time for the brighter of the two LEDs.

Works like a charm :)
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
Charlieplexing has pairs if LEDs placed in inverse parallel (aka anti-parallel) between all combinations of pairs of outputs. In this case each bicolour LED is both of these LEDs.

The brightness might vary, but you can deal with that by having a shorter on time for the brighter of the two LEDs.

Works like a charm :)

I suppose you are right for separate leds. I had the tri-colour configuration in mind and that would be a bit tricky.

But, I stand corrected, at least on one leg. :)

TOK ;)
 

Hexile

Aug 14, 2011
10
Joined
Aug 14, 2011
Messages
10
When you say 2x2x2, are you talking about 4 dual diodes or 8 dual diodes?
Some other questions:
Do you want to time multiplex these or just showing one at the time?
I suppose you want to blank the unused LEDs when not in use?
Are you going for a tri-colour solution?

TOK ;)

There would be 8 led's but they are 2pin bicolor which is actually 16.

With charlieplexing i can control it quite easy.
 
Top