1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Help with LED cube wiring

Discussion in 'Modding' started by jgrade, 3 Dec 2004.

  1. jgrade

    jgrade New Member

    Joined:
    2 Mar 2004
    Posts:
    534
    Likes Received:
    0
    Not wanting to double post, but want some input from the people in this forum. See this link and please help with some of the fundamentals. We, and certainly I, am struggling with the wiring of this cube. Plus if anyone has an idea as to how to use a pic to control this type of display I would be most appreciative. Programatically I understand exactly what I need to do (although not familiar as to programming a PIC) but the electronics are perplexing. Lovah and I are looking for the same outcome. Some type of a audio specturm display of either a single channel or 10 channels of different frequencies.

    Thanks for any help.
     
  2. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    I would guess you would need to serialize the output from the PIC since controlling it directly parallel would require a whole lot of outputs.

    Maybe serial to parallel converting would work? This could be in the form of a shift register with flip-flops. Have the output output each bit on a stipulated channel, 0 for off for that channel and 1 for on. Then after reaching the maximum number of channels, go back to channel one and go through the sequence again except with the required changes for the animation.

    Like this (if there are three channels total): 0,0,0,1,0,1
    Channel 1: off
    Channel 2: off
    Channel 3: off
    Return back to channel 1 with reset to flip-flops
    Channel 1: on
    Channel 2: off
    Channel 3: on

    I think you might want to look at shift registers.

    Hope that helps.
     
  3. jgrade

    jgrade New Member

    Joined:
    2 Mar 2004
    Posts:
    534
    Likes Received:
    0
    Thanks, that does, help. The consensus has been that the cube is made up of 10 - 10x10 matrices each controlled buy it’s own PIC or similar controller. Then, an 11th PIC is used to control the 10 PICs. Using a fast clock (60hz in the links cube) the LEDs would be lit similar to a TV. Granted I am talking out me a$$ since I have no idea how to design such a circuit, but conceptually I think it works.
     
  4. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    I very much doubt 11 PICs would be used - that would be shameful for any serious MCU user. It's easily possible with a single PIC, either using 30 I/O's (x/y/z), or serial to parallel converters - at the expense of reducing the refresh rate.
     
  5. Alvin

    Alvin Guest

    Just to sum it up: At this site http://www.jamesclar.com, and select "3D Display Cube V3" to see a stunningly good looking 3D "VU led".

    Am I to understand that you guys would actually like to build such a thing? Or do you just wonder how it can be done?

    1000 LEDs may be a bit of a setback. But it is do-able. I buy my LEDs here http://shop.dotlight.de/shop/product_info.php/cPath/1_22/products_id/208 With High Bright Blue LEDs (app. 5000 mcd) that would amount to app. $240 for the LEDs. With standard LEDs (app. 100 mcd) it could be done a lot cheaper, but it would probably look better with High Bright LEDs.

    Controlling each of the LEDS? Based on a 2D 10 x 10 LED matrix, that takes 20 pins to control. As shown in http://www.acm.uiuc.edu/sigarch/tutorials/ledarray/ And then ten layers of the 2D matrixes, that would take another 10 pins to control.
    So with 30 control pins it is possible to control each LED individually.
    Or as has been suggested, assigning one microcontroller (uC) to each of the ten 2D matrixes, in order to get 10 times higher refresh rates. Let's see if more than one uC will be needed.

    To find the timing needed to do this?
    So each LED is lit as many times a second as possible.
    James Clar is able to light his LEDs 60 times a second, which should be a minimum. 80 or 100 times a second would be better, but lets see if that is actually atainable with just one uController.
    The 2D matrix has 10 rows, that will be ex. 100updates x 10rows = 1000 10bit writes a second.
    Then with 10 x 2D we get 10.000 10bit writes a second. And as small uC's usually only operate at 8-bit, each 10-bit write translates to 2 write cycles. So We will need 20.000 I/O write cycles per second, in order to maintain 100 updates a second on a 10 x 10 x 10 LED matrix.

    That should be do-able with most any of todays MicroControllers (uC).

    So am I to understand that you would like examples of schematics and a program to control a uC to do this?

    Do you have any PC software that can do the spectrum analyzing on the sounds? So the uC can just get the info through the serial or parallel port?
     
  6. Lardarse

    Lardarse New Member

    Joined:
    17 Nov 2004
    Posts:
    25
    Likes Received:
    0
    I know that It wouldn't be as impressive, but why not drop down to 8x8x8?

    All the numbers add up. With the size reduces to 8, the number of LEDs is reduced from 1000 down to just 512. The 2D matrix has 8 rows, so 8 rows @ 120 Hz (Yes, faster again than what Alvin suggested) = 960 8bit updates. With 8 storeys of LEDs, this becomes 7200 8bit I/O writes. The fact that we are running at 8-bit means that we only need 1 write cycle per update, which means that we can do just a third of the updates that are necessary, giving us more time to do other things, like obtain all 512 numbers from the PC... :duh:

    There's also a more practical side in the construction as well. Since each axis is only 8 bit, then each can be assigned to its own port on a PIC (probably something like a PIC16F877, with the outputs on ports B, C, and D), and will also fit into just 1 internal variable, making things like bit rotation easier... :rock:

    But that's just my .02

    LA Greg
     
  7. Alvin

    Alvin Guest

    8x8x8 would make it more affordable, and probably still looking good.
     
  8. Lovah

    Lovah Apple and Canon fanboy

    Joined:
    10 Jul 2002
    Posts:
    3,846
    Likes Received:
    25
    I agree, 8x8x8 sounds fine. I have no idea what everybody is talking about, but it sounds really impressive. But I'm starting to get a feeling that all of this is going to depend on alot of different factors.

    • Soldering
    • Wiring the microcontroller
    • software developping
    • link between the software and microcontroller

    I can solder, reasonable good. But I never worked with a microcontroller before. And I don't thinks there is plug and play software to controll all of this.. so we would need to devellop software aswell.

    I was thinking about a way to controll the cube
    I thought about using a bitmap (black white) image as input. a long banner that exist out of 8 squares of 8x8.

    L
     
  9. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Certainly the programming will be the most interesting part of creating this LED cube. I wouldn't think that the electronics would pose much of a challenge to you. If you've never worked with microcontrollers before then I'd suggest some practice before starting on this project, although if you're planning on controlling the microcontroller from a PC then it may be somewhat simpler.


    The Chi-Wing LED Product Shop has 1000 Blue LED's for $101, which is pretty good tbh, they're not particularly quality LED's, but they'd be ideal for something like this.
     
  10. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    Wiring a circuit like this would actually be really simple if you think about it. It can even be done with even hard-wired logic gates if one wishes to keep their pattern "forever".

    Three things keep a person from doing such a thing: time, money, and being lazy.
     
  11. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    Just found this.

    This would be worth something to reverse engineer.
     
  12. Sea Shadow

    Sea Shadow aka "Panda"

    Joined:
    15 Jan 2004
    Posts:
    614
    Likes Received:
    13
    I came accross that one, I have a very good idea of how you can drive that cube, I am going to make a small version during my electronics class over the next few weeks as my teacher thinks it is a good learning experience to build more complex circuits.
     
  13. Alvin

    Alvin Guest

    Here is a sample of the core program in BASCOM BASIC for driving the 3D LED display using an AVR ATmga16 MCU chip.

    It still needs
    - the Serial port communication for being able to recieve data from the PC
    - optimizing with some real-time parts, to ensure that all LEDs are turned on for the same duration of time.

    But I think it will be easier to develop the softwware by taking one step at a time, and then combining the parts at the end.

    Hardware ports A, C and D are used on the ATmega16 chip

    Code:
    '***************************************************************************
    '*                                                                         *
    '*                           LED 3D Display                                *
    '*                                                                         *
    '***************************************************************************
    '---------------------------------------------------------------------------
    'Made by:         Per Frederiksen, November 2004
    'Email:           Per.Alvin@Windred.dk
    'Web:
    '
    'Language:        Bascom-AVR, version 1.11.7.4
    'File:            LED 3D Display.bas
    'Revision:        1.0
    'Chip:            AVR ATmega16 @ 8MHz
    '---------------------------------------------------------------------------
    'Test setup note:
    '                 PortD is low-end for the LED driver
    '                 PortA is high-end for the LED driver
    '                 PortC is driver for 2D Matrix select
    '---------------------------------------------------------------------------
    
    
    '*** Config Ports ***
       config PortA = output
       config PortC = output
       config PortD = output
    
    '*** Variables / storage space ***
    
       'Create RAM storage space for each of the LEDs
       '  in the 8x8x8 LED matrix
    
       Dim LEDbuffer(64) as byte
    
       'This way the first 8 byte in the array corresponds to the
       '  first 2D LED array.
       '  The next eight bytes correspond to the next 2D LED array etc.
    
    
       'Variables needed to loop through the LED buffer Array
       Dim Aloop as byte
       Dim Bloop as byte
       Dim LEDpointer as byte
    
    '***** MAIN LOOP *****
    DO
    
       'Update the LED display
       for Aloop = 0 to 7
    
         'open one of the 2D matrix's
         PortC.Aloop = 1
    
         'now circle through each of the 8 lines of LED's in this 2D matrix
         for Bloop = 1 to 8
    
            'prepare the LEDpointer
            LEDpointer = Aloop * 8
            LEDpointer = LEDpointer + Bloop
    
            'turn the LED lines off
            PortA = 0
    
            'prepare the LED line buffer
            PortD = LEDbuffer(LEDpointer)
    
            'turn that LED line on,
            ' that corresponds to the content of the LED line buffer
            PortA.Bloop = 1
    
         next Bloop
    
         'close the open 2D Matrix
         PortC.Aloop = 0
    
       next Aloop
    
    LOOP
    
    End  'end program
     
  14. jgrade

    jgrade New Member

    Joined:
    2 Mar 2004
    Posts:
    534
    Likes Received:
    0
    If you look at the original web site, this is the cube he calls the V1. I assume it is his prototype of the V3 cube.
     
  15. map

    map New Member

    Joined:
    11 Nov 2003
    Posts:
    2
    Likes Received:
    0
    You could use 10 of these and a pic, with I²C it should be relatively easy to control them.
     
  16. myke

    myke New Member

    Joined:
    15 Dec 2002
    Posts:
    68
    Likes Received:
    0
    There is an example of how a 2d led matrix works here

    I'm not that good at electronics, but using the example and an extra 74164 shift register to control a 3rd axis, the whole lot could be controlled from 6 pins of the parallel port. Just don't know if the refresh would be fast enough.
     
  17. pwled

    pwled New Member

    Joined:
    27 Dec 2004
    Posts:
    12
    Likes Received:
    0
    I am also working on a schematic for this 10x10x10 cube with a pic16f877 and 14 other serial input, parallel output chips, (74hc164). it will be programmable through the parallel port and a visual basic program. I am also about to use ca 150 transistors, for ensuring that the parallel output chips won't overload and the cube will be dimmable. the powersupply would at least have to supply about 3 amps and a 5v, 12v and a supply that can be regulated between ca 5v-8v.

    So a lot of work is still to be done, I am now working on the layout of the board, and I can tell you, that's already a lot of work.

    But the end product will be SO cool :rock:
     
  18. jgrade

    jgrade New Member

    Joined:
    2 Mar 2004
    Posts:
    534
    Likes Received:
    0
    Please share pics and shcematics! Are you documenting this in the projects section?
     
  19. Alvin

    Alvin Guest

    I almost thought that you guys had lost interrest in this project.

    I have made some of my own designs for making a 3D LED cube. I'll share some pictures.
    In the pictures I'll work with a 3x3x3 cube, as this is big enough to show the principles.
    The final layout of a PCB is 12 x 12 cm (4.7" x 4.7") and is designed for a 3D 10x10x10 LED cube (1000 LEDs).
    The driver/controller board will be able to handle as large as a 16x16x16 LED cube (4096 LEDs).

    I may make a smaller version for an 8x8x8 cube (512 LEDs), as I want to make a cube, but think that a 16x16x16 may be a little too expensive to just have for my own amusement.


    First an illustrative schematic of a 3x3 2D LED matrix
    [​IMG]
    Notice how the A1, A2 and A3 transistors are connected to ALL the LEDs, and how you also need to operate transistor B1 or B2 or B3 to light up a LED.

    This small animated gif may help to illustrate how a 3x3 LED matrix can be controlled.
    [​IMG]
    By the way, do you know of a free gif ani editor? I can create the images, and the sequences, but I can not edit the timing with the payed tools I have at the moment.

    This is how one could wire a 3x3 2D LED matrix.
    [​IMG]
    Notice how all the minus wires (dark grey wires) are connected downwards the the Ax transistors.
    And how all the plus wires are connected across (light grey wires), and then from the light grey plus cross wires, then one wire (red) runs down to the base to the Bx transistors.
    You could choose to have a lot of plus wires at one end of the light grey wires, but this way the red down wires get distributed over the surface of the matrix, And I think they in real life will be less visible this way.
    Also, this distribution of the red down wires will show some advantages, when a PCB has to be made.

    Please note, that I do not suggest that colored wires should be used in the real life 3D LED box, as that may mess up the looks of the design, I only use these colored wires for the illustrations, as I think they make it easier to follow the logic of how a 2D matrix / 3D cube can be built.


    Then on to a 3D cube example of 3x3x3 LEDs.
    [​IMG]
    The Letters are supposed to be transistors.
    The A1, A2 and A3 are connected to the grey minus wires of the LEDs.
    The B1-B9 transistors are connected to each a row of 3 LEDs
    The C1, C2 and C3 transistors operate one 2D matrix each.

    For a 10x10x10 Cube one would need 10x Ax transistors, 10x Cx transistors and 100x Bx transistors


    For a 10x10x10 cube you would need something like this for the LED base board layout
    The pink dots show where the LED minus wires would attach to the board.
    [​IMG]

    In this illustration you can better see all the 100 Bx transistors
    [​IMG]


    Schematic 2 shows an illustration of the controllerboard and the LED base board
    The left side is what is on the controller board, the right illustrates what is on the LED base board.

    In schematic 2 I did not put in all the LEDs, so you'll have to try to imagine how there are gropus of three LEDs connected to each of the B transistors, and groups of 3x3 LEDs connected to the C transistors.
    [​IMG]

    The controller board (as it is right now)
    [​IMG]

    On this I/O controller board there are double buffered Latches, as this will ensure that each LED is lit for as long as possible.

    Compared to the 3 steps of controlling a 3x3 matrix, as shown in the animated GIF. With 10x10x10 LEDs there will be something like a 8-12 step writing fase to load all of the latches needed for 10x10x10 Cube, and this is just to light up ONE row of LEDs.
    And the LEDs in that row would only be lit during ONE of those steps, were it not for the double buffered latch design.
    With double buffered latches, the LEDs will be lit through all the steps save one, as the double buffers transforms an 8 bit data bus into a 48 bit data bus.

    The controller board is far from finished, but all the basic functionality has been thought out and put in there.
    What remains is just to hook it up to a MCU (Micro controller)

    I may put the MCUs on a seperate board, as I plan to use AVRs, and some may wish to build a cube using PIC controllers.

    What do you think about the designs so far?
     
    Last edited by a moderator: 13 Jan 2005
  20. bigal

    bigal Fetch n Execute

    Joined:
    8 Oct 2004
    Posts:
    609
    Likes Received:
    0
    nice... very nice! :D
     

Share This Page