Connect with us

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

Discussion in 'LEDs and Optoelectronics' started by Hexile, Jun 3, 2012.

Scroll to continue with content
  1. Hexile

    Hexile

    10
    0
    Aug 14, 2011
    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: Jun 6, 2012
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    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: Jun 3, 2012
  3. Hexile

    Hexile

    10
    0
    Aug 14, 2011
    Sure it would, I omitted them for simplicity as it was about controlling, not powering.

    It was just an example of how to do it

    That sounds interesting.

    I don't see how that would help with several led's.
     
  4. Sheldon_89

    Sheldon_89

    2
    0
    Jun 3, 2012
    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.
     
  5. Hexile

    Hexile

    10
    0
    Aug 14, 2011
    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.
     
  6. Sheldon_89

    Sheldon_89

    2
    0
    Jun 3, 2012
    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.
     
  7. Hexile

    Hexile

    10
    0
    Aug 14, 2011
    I will go with the Charlieplexing solution as i find that quite easy.
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    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.
     
  9. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    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.
     
  10. Hexile

    Hexile

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


    It depends on the transistors you choose. Again, it was only an example.
     
    Last edited: Jun 4, 2012
  11. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    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.
     
  12. Hexile

    Hexile

    10
    0
    Aug 14, 2011
    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: Jun 4, 2012
  13. CocaCola

    CocaCola

    3,635
    5
    Apr 7, 2012
    Google 'Cherry Picking Fallacy'

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

    davenn Moderator

    13,866
    1,958
    Sep 5, 2009
    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: Jun 4, 2012
  15. gorgon

    gorgon

    603
    24
    Jun 6, 2011
    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 ;)
     
  16. gorgon

    gorgon

    603
    24
    Jun 6, 2011
    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 ;)
     
  17. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    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 :)
     
  18. gorgon

    gorgon

    603
    24
    Jun 6, 2011
    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 ;)
     
  19. Hexile

    Hexile

    10
    0
    Aug 14, 2011
    There would be 8 led's but they are 2pin bicolor which is actually 16.

    With charlieplexing i can control it quite easy.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-