Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2016, 09:09:57 09:09


Login with username, password and session length


Pages: [1]
Print
Author Topic: Has anyone built led cube?  (Read 19475 times)
0 Members and 1 Guest are viewing this topic.
th_sak
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 149
-Receive: 149



« on: November 12, 2007, 02:31:32 14:31 »

Hi,
I want to build a 4x4x4 LED cube using blue LEDs or multicolor (RGB LEDs). Has anyone built something like this? Any schematics, code? No matter what microcontroller used.

See some sample videos on youtube:
http://www.youtube.com/watch?v=_SO1J1kP3YQ
http://www.youtube.com/watch?v=S79txezYCVg

thank's for any help
Logged
robban
Senior Member
****
Offline Offline

Posts: 265

Thank You
-Given: 34
-Receive: 38


Warrior


WWW
« Reply #1 on: November 12, 2007, 04:35:02 16:35 »

An idea would be to use the "union" command in ANSI-C. Then You can control a 3-dimensional array. You can possibly use a random function or some other function on how to lit the differen t LED:s.You also have to check the different pic-compiler manuals wether they support unions or not.

Good luck!
« Last Edit: November 12, 2007, 04:41:17 16:41 by robban » Logged

Code Warrior
xatax
Junior Member
**
 Muted
Offline Offline

Posts: 45

Thank You
-Given: 7
-Receive: 47



« Reply #2 on: November 15, 2007, 12:07:05 00:07 »

Hello th_sak!

Try to read this, maybe will be usefull ...

http://forums.bit-tech.net/showthread.php?t=76578

Best regards!
Logged
robban
Senior Member
****
Offline Offline

Posts: 265

Thank You
-Given: 34
-Receive: 38


Warrior


WWW
« Reply #3 on: November 16, 2007, 03:53:25 15:53 »

After givin' it some thoughts... Have a look at "Tips 'n Tricks" on Microchip site. There You can find an I/O-multiplexing method. The number of LED:s(D) that can be controlled by number of pins(P) is D = P x (P-1). In Yr. case it will take 9 pins(actually You can have room for 80 LED:s). Your task is to alternate between in-/outputs and high/low on the pins to get the desired effect.
Logged

Code Warrior
th_sak
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 149
-Receive: 149



« Reply #4 on: November 16, 2007, 07:11:47 19:11 »

I have already thought about this method, but is not so good for this application because needs many wires from GPIO connected to LEDs and it will be a really mess with all these wires. See the images to understand. But thank you anyway robban

                          Preferred  method                                                                   Microchip's method
   
Logged
robban
Senior Member
****
Offline Offline

Posts: 265

Thank You
-Given: 34
-Receive: 38


Warrior


WWW
« Reply #5 on: November 17, 2007, 11:05:19 11:05 »

I have already thought about this method, but is not so good for this application because needs many wires from GPIO connected to LEDs and it will be a really mess with all these wires. See the images to understand. But thank you anyway robban

                          Preferred  method                                                                   Microchip's method
   

Yers, that could work if You connect the different anodes to the analog ports. You have to have resistors between the different anodes and measure the voltage when the ports are configured as inputs, but how do You do it when they are outputs?
Logged

Code Warrior
th_sak
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 149
-Receive: 149



« Reply #6 on: November 17, 2007, 01:14:16 13:14 »

Hi robban
First of all thank you for your interest and your help. I think this method is too complicated and requires many lines of programming and I don't understand why I should measure the voltage when the ports are configured as inputs. After a web search I found this algorithm and seem pretty compact and working. I think I will use it as a base of my program and also use the above schematic (preferred).

Code:
'---------------------------------------------------------------------------
'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
Logged
robban
Senior Member
****
Offline Offline

Posts: 265

Thank You
-Given: 34
-Receive: 38


Warrior


WWW
« Reply #7 on: November 17, 2007, 01:57:40 13:57 »

Well, since You obviously do Yr. homework, You can't fail. Let me know when Yr. finished, maybe I'll learn something...
Logged

Code Warrior
th_sak
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 149
-Receive: 149



« Reply #8 on: November 17, 2007, 05:17:15 17:17 »

Well, since You obviously do Yr. homework, You can't fail. Let me know when Yr. finished, maybe I'll learn something...

It's not homework for school or something, but I want to do it just for fun and spent my free time (when I have). Possibly I 'll start after christmas.

Thank you
Logged
maiasj
Junior Member
**
Offline Offline

Posts: 41

Thank You
-Given: 151
-Receive: 12


« Reply #9 on: November 18, 2007, 08:52:52 20:52 »

I made one 5 x 5 x 5 led cube. I used 4 74hc164 to shift data for each plane (5 x 5 leds) and 5 PNP transistors to switch the planes every 20 mS. After showing the 5 planes it started again shifting the data for a new frame into plane 0.
Logged
robban
Senior Member
****
Offline Offline

Posts: 265

Thank You
-Given: 34
-Receive: 38


Warrior


WWW
« Reply #10 on: November 19, 2007, 01:03:35 13:03 »

I think I've seen this before... Isn't this the same technique that most graphic card programmers addres their pixels? I recall Rob Anderton(the writer of NASM - the Netwide Assembler) used this to show how a flickering fire(originally written in TASM by Dentor of Asphyxia) could be written. It's a 16-bit DOS program that can be shown in any Windows environment(maybe not Vista?). Just relax and let the flames warm You...
« Last Edit: November 19, 2007, 03:25:48 15:25 by robban » Logged

Code Warrior
th_sak
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 149
-Receive: 149



« Reply #11 on: February 03, 2008, 01:58:01 13:58 »

Finally the cube is ready. After a while I made a 5x5x5 led cube with high brightness blue LEDs. You can find the schematic, PCBs ant a test program in the attached file.



See it in action: http://www.youtube.com/watch?v=7DDpv8N1vHs
« Last Edit: February 03, 2008, 02:02:14 14:02 by th_sak » Logged
Biggles
Junior Member
**
Offline Offline

Posts: 46

Thank You
-Given: 14
-Receive: 22



« Reply #12 on: March 09, 2009, 11:12:40 11:12 »

Very nice.  I just finished a project needing port expanders. I think maybe if you want to be able to address each LED individually you could use port expanders. Shift registers would also work.

Microchip port expanders  MCP23S17 gives you 16 bit full I/O with only 4 lines needed from the CPU for SPI bus. The port exanders have hardware addressing, so you can have 8 devices on the SPI bus, give you a total of 128 outputs for the same 4 lines from the CPU.
Logged

Man who act in haste, repent at leisure.
eoasap
Newbie
*
 Muted
Offline Offline

Posts: 13

Thank You
-Given: 39
-Receive: 43


« Reply #13 on: March 09, 2009, 03:44:46 15:44 »

Some students of undergrad senior design project made an LED rubics cube about a year or so back. Each LED in each side array is a single RGB led which is adjusted with PWM to produce one of 6 different colors. When you slide your finger across the LED cube, the logic inside the device changes the color, similar to moving a real rubics cube.

 I can probably get you in touch with them if you're interested.

I agree with Robban's method for driving the solid 3D matrix. Its simple digital logic









« Last Edit: March 09, 2009, 03:59:03 15:59 by eoasap » Logged
OlDrunk
Guest
« Reply #14 on: March 31, 2009, 11:57:47 23:57 »

I've just built a 4x4x4 single color LED cube, based on the instructables guide , just the cube is done I still have to work on the controller. Got a lot of pics and tips of the build I'll have post some where , it was fairly easy to build.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC