Shop OBEX P1 Docs P2 Docs Learn Events
Propeller powered 3D led cube — Parallax Forums

Propeller powered 3D led cube

Reset_VectorReset_Vector Posts: 55
edited 2007-12-24 12:11 in Propeller 1
HI alls !
I'm newbie with the propeller, and my first attempt to use the chip is a 3D tricolor leds cube.
The cube is made of 64 RGB leds arranged in 4X4X4 lattice.

At this stade, the functions used are quite basic, but the result is not too bad.
I've attached the code, I think it could be modified to be more efficient.
Some errors are present at the top of the source file in the comments, don't care.
Thanks to Dennis Ferron for it's PWM method i've used.

Merry christmas to ayou from France

Comments

  • OakGraphicsOakGraphics Posts: 202
    edited 2007-12-24 10:14
    Howdy Reset Vector!

    Wow - I was wondering about a simular project since I saw a simular thing on http://www.hypnocube.com/ but thought it would be cool to do it in the propeller - and voila! Here it is! Amazing. smile.gif
    It looks like you are using all 32 pins of the propeller - is that correct?
  • Reset_VectorReset_Vector Posts: 55
    edited 2007-12-24 10:27
    Hi OakGraphics

    You're right, the whole pins are used, but i'm working on another solution using a UCN5818 shift register from ALLEGRO, it use only 4 pins
    on the propeller, but i have to do a few tests to see if the speed of the serial stream is enough fast.
    To be honnest, i've seen the Hypnocube too, and it was the start of my project.

    The code I've put is not very efficient, next year I'll post the entire modified project (soft & hard) to the forum (if someone is interested.)
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-24 10:46
    OakGraphics said...
    It looks like you are using all 32 pins of the propeller - is that correct?
    Yes it is smile.gif Quite astonishing I must say... But I shall refrain from improvement suggestions (But can I? see (*2) )
    You will see the multiplex working in routine DISPLAY.

    I wonder what external hardware is used (current drivers/transistors?) but it will not be necessary to use any...
    One of the 8 cathodes sinks the current (I/O 24 to 31) - this is the brightness bottelneck when not boosted.
    4 of the LEDs (in fact 12 anodes because of RGB, I/O 0..11) are driven at the same time (*1)
    In the second half of the cycle the other half of a row (another 12 anodes, I/O 12..23) is driven.

    BTW: I am really intested in the mechanical part of the construction! A nightmare?


    (*1) The SPIN code will take around 30µs for each lighting of 12 chips
    There are 8x2 "packages", so the cycle time seems to be around 200µs with a "micro" duty cycle of 6% max.

    So it should be much brighter when each anode is driven with - say - 40mA.
    However this would need 500mA for the whole construction, quite beyond the capabilities of the Propeller (without anode drivers, not to mention cathode boosters..)
    When the 8 cathodes really sink directly into I/Os 24 to 31 then the 40 mA have to be devided by the 12 anodes (in case of "bright white")...

    The situation looks much better with one colour only and only half the LEDs shining...

    ----
    (*2)
    This is a nice use of the 32 pins. With a 3:8 decoder and a 2*12 multiplexer the number of needed pins can be readily reduced to 16, of course smile.gif

    It would also be slightly more advantages to distribute the 12 anodes of each 4-pack throughout all 4 power sections of the Propeller: e.g.

    cat1 cat2 anR1a anG1a anB1a anR1b anG1b anB1b
    cat3 cat4 anR2a anG2a anB2a anR2b anG2b anB2b
    cat5 cat6 anR3a anG3a anB3a anR3b anG3b anB3b
    cat7 cat8 anR4a anG4a anB4a anR4b anG4b anB4b

    Post Edited (deSilva) : 12/24/2007 10:57:56 AM GMT
  • Reset_VectorReset_Vector Posts: 55
    edited 2007-12-24 11:13
    Hi DaSilva

    Of course, all suggestions are welcome!
    The only external hardware used is one darlington array ULN2803 to drive the leds cathodes and a few resistors on the anodes (24 resistors).
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-24 12:11
    Quite! That was obviously the bottle neck!
    The next bottleneck is the propellers limit to provide current for the anodes. Substituting your 24 resistors with eight at the cathode side might improve the brightness (4.7 or 10 Ohm/ 1W) But this should go hand in hand with the re-ordering of pins according to my proposition above.

    As you only use one of the eight cathodes at a time having eight drivers seems like overkill, but is the most cost and space economic way to do it.
Sign In or Register to comment.