Shop OBEX P1 Docs P2 Docs Learn Events
Need help with LED Cube — Parallax Forums

Need help with LED Cube

ryfoa6ryfoa6 Posts: 7
edited 2012-09-29 14:11 in General Discussion
I recently purchased the Parallax Propeller P8X32A QuickStart Microcontroller and I want to build a 5X5X5 LED Cube but I cant find a tutorial using the Propeller. Does anyone know of a tutorial using a Propeller? I also have the Velleman PIC Programmer and Experiment Board. Should I program it with a PIC? I found alot of guides using a PIC. One tutorial that I read said to use a constant current sink driver. Should I use it and what are the advantages of using it? I also wanted to know where I can find a plastic case to cover the cube. I want it to play music when it displays the animation and want to have buttons so I have multiple animations to choose from and each one plays a different song. I appreciate any help you guys can offer.

Comments

  • kwinnkwinn Posts: 8,697
    edited 2012-09-25 18:58
    I think you would be better off with the propeller for this project since you will get a lot of help in this forum by using it, and it is a better choice from a hardware/software perspective (at least in my opinion).

    That's 125 leds. How do you plan to control them? Do you want to be able to light them individually or in groups, and do you want to control intensity or just on/off.
  • ryfoa6ryfoa6 Posts: 7
    edited 2012-09-26 00:35
    Somebody recommended multiplexing with LED driver ICs. What do you think about this method? Are there any better methods?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-09-26 03:09
    If you really want to do anything neat or with a larger cube, multiplexing is just about the only way you can handle the power requirements.

    If you want really neat effects, you may eventually require PWM. The Propeller could easily proved 5 separate PWM channels for multiplexing.

    Starting with the PIC code will get you something that is working. After having established that you have a good working cube, it might be easier to adapt to a Propeller after that.

    The fact that lighting is rather slow as far as processing times allows a PIC to work pretty good with these. The added speed and multiple processors of the Propeller are of use if you want to get into more advanced visuals.

    You picked out a cube size 5x5x5. Have you figured out a build scheme?

    Multi-color LEDs require a more complicated build as they have more wiring. I used a perf board with holes every .1 to lay out the LEDs for each layer and to solder them into a single plane. To do so, I drew all the LED locations with a magic marker on the board. Then, I bent the LEDs so that the leads that required soldering on that plane were available. And inserted an LED in each location.

    This seemed to work well for an 8x8x8 LED cube or smaller.

    Once each plane is neatly built, it is much easier to use the same board to temporarily hold the bottom plane and build up one level at a time.

    After than, you can make a PCB or use the perf board as the base for the whole cube.

    Having the cube and supporting multiplx logic on a board that is the base and creating a cable interface to a separate board for the processors will allow you change processors quite easily.
    The cube itself and the multiplexing logic can use quite a bit of power as there are quite a few LEDs that may be on at the same time.

    The processor board doesn't require much power, so it is a small add-on that can also get power provided from the cube base.

    In some cases you can use IC drivers -- but if there is a lot of power required, you might end up driving with regular transistors. A UNL2803 will only provide about 60ma per pin.

    Often you see a scheme where some of the multiplexing is done by a counter chip so that the uP doesn't have to do as much work.
  • kwinnkwinn Posts: 8,697
    edited 2012-09-26 18:34
    ryfoa6 wrote: »
    Somebody recommended multiplexing with LED driver ICs. What do you think about this method? Are there any better methods?

    For 125 leds you could drive them directly with 16 shift register/driver chips but multiplexing is the way to go. Multiplexing also makes the wiring of the cube simpler.
  • ryfoa6ryfoa6 Posts: 7
    edited 2012-09-26 21:37
    The cathode on the leds that I bought are only 18mm long. If leave 1mm to overlap for soldering, the center of the leds are only 17mm apart from eachother Is that too short? Should I add on some wire to them?
  • jered11jered11 Posts: 7
    edited 2012-09-26 23:10
    i built a led 4x4x4 cube with the quickstart board and used multiplexing, it works great. i am currently building a 7x7x7 cube which i will do the same way except i will have to use some transistors to keep from sinking to much current.
  • jered11jered11 Posts: 7
    edited 2012-09-26 23:14
    ryfoa6 wrote: »
    The cathode on the leds that I bought are only 18mm long. If leave 1mm to overlap for soldering, the center of the leds are only 17mm apart from eachother Is that too short? Should I add on some wire to them?
    on my 4x4x4 i used 20mm between leds. i think 17mm distance on a 5x5x5 would be ok.
  • skylightskylight Posts: 1,915
    edited 2012-09-27 00:45
    jered11 wrote: »
    i built a led 4x4x4 cube with the quickstart board and used multiplexing, it works great. i am currently building a 7x7x7 cube which i will do the same way except i will have to use some transistors to keep from sinking to much current.
    Hi jered, are you saying the quickstart directly drove that many leds without drivers? Wow i'd love to see the project, have you posted it anywhere?
  • ryfoa6ryfoa6 Posts: 7
    edited 2012-09-28 12:20
    I was thinking about cutting the cathode leads really short so that I can lay a piece of steel wire across the cathodes and solder all the cathodes together with the steel piece of wire. By doing this it will allow me to space the leds 1" apart. Otherwise I will only have a 16mm space between leds. Which will look better? A 1" space or 16mm space between each led? The 1" space will make the cube 1" bigger than having a 16mm space.
  • Roger LeeRoger Lee Posts: 339
    edited 2012-09-28 13:50
    Distance between LEDs is totally up to you. Any of the choices listed will work just as well.
    I used .9 inch spacing in both horizontal and vertical. (Missed school the day they covered metric.:innocent:)
    I'm very happy with the overall look of it.

    Now I remember, I used parallax jumper wires to connect all 16 cathodes on a level together.
    They are 3 inches long leaving just a little to trim off after soldering
    (Part number 800-00016)
  • ZootZoot Posts: 2,227
    edited 2012-09-28 14:02
    Using the LED leads themselves is the easiest way to go. There are quite a number of good Instructables on the topic; you can search at their site.

    Given the length of most LED leads, you can go larger than 1" or smaller. I usually bend all the cathodes 90 degrees, then lay an Y x Y "plane" out in a jig. Solder all the cathodes to each other. Once you have 4 or 5 or 8 "planes" (i.e., if you are doing 4x4x4 or 5x5x5, etc), you build up your cube soldering all anodes together *vertically*.

    This gives you a cube with little to no extra wiring, and ready to go for logical multiplexing, where each X x Y "plane" is a single cathode with individually addressed LEDs. For 5x5x5 you'd have 5 cathodes for multiplexing, and 25 individual LEDs. Depending on preference, micro and setup, you could use a driver, or a common sink darlington (e.g. ULN 2903), or individual transistors for each cathode (digit/plane) of the cube.

    The propeller is a nice choice, as it has the memory and speed to handle the multiplexing plus PWM on all 125 leds without trouble. That plus 5 transistors for sinking the cathodes and you'd be set. My own cubes generally use an SX28 or SX48.

    I've built some cubes and LED chasers where I drive the cathodes right off the micro, but that's generally been with a somewhat smaller LED count and running the individual LEDs at much lower (dimmer) current, say 5ma rather than 17-20ma.

    For example, see here for nice physical construction tips:

    http://www.instructables.com/id/LED-Cube-4x4x4/

    The jig for laying the LEDs down is worth the 10 minutes it takes to drill. My first cube took maybe 4 hours to build up (4x4x4). Now I can do it in about 90 minutes :)

    Attached photos are from one of my own builds.
    1024 x 768 - 60K
    1024 x 768 - 60K
    1024 x 768 - 65K
  • kwinnkwinn Posts: 8,697
    edited 2012-09-28 14:40
    ryfoa6 wrote: »
    I was thinking about cutting the cathode leads really short so that I can lay a piece of steel wire across the cathodes and solder all the cathodes together with the steel piece of wire. By doing this it will allow me to space the leds 1" apart. Otherwise I will only have a 16mm space between leds. Which will look better? A 1" space or 16mm space between each led? The 1" space will make the cube 1" bigger than having a 16mm space.

    I'm not sure you will be able to solder the leds to steel wire. At least I have not had much luck doing so in the past. #18 solid wire works well though.
  • BitsBits Posts: 414
    edited 2012-09-28 20:16
    Kwinn
    I'm not sure you will be able to solder the leds to steel wire. At least I have not had much luck doing so in the past. #18 solid wire works well though.
    Why?

    You should be able to solder any metal to any other metal as long as both are of the same family i.e. ferrous metals and non-ferrous metals. You will have better luck if a flux is used (in fact a flux should be used) in the soldering process. Most solder comes with a flux in the core but one could apply more to be safe.

    Never try to solder a metal that is ferrous to non-ferrous its just not going to hold up.

    If its a thickness issue then apply the heat to the thicker metal first as it takes longer to come to temperature, then move to the smaller metal and apply solder.
  • kwinnkwinn Posts: 8,697
    edited 2012-09-28 21:35
    @Bits

    First, I guess I should say I meant #18 copper wire in my prior post. AFAIK the leads on the leds are not ferrous metal so soldering them to steel wire will not be easy. I also learned that special fluxes are required to solder dissimilar metals from having to solder copper tubing to an aluminum diffusion pump. Temperature is also a problem as you stated. Even with the proper flux the solder needs to be much hotter to stick to the steel wire.

    I'm not saying it's impossible to do, however it will not be simple.
  • max72max72 Posts: 1,155
    edited 2012-09-29 14:11
    don't know if it is feasible, but S2801 leds are very nice.
    I started playing with them and they are really great fun.
    There is also a great object..
    http://forums.parallax.com/showthread.php?141495-WS2801-Driver
    Massimo
Sign In or Register to comment.