8x8x8 RGB LED-Cube
8x8x8 RGB-Cube with an Arduino micro controller.
Etch own circuit boards using as less wires as possible.
Steps are explained in following order:
Bill of material and all you will need for this project
Files & data sheets Understanding the schematics
How to etch multilayer circuit boards How to build the PCBs
How to build the case
How to build the cube
Final assembly & testing
Arduino code samples
Bill of Material
Jigs (all measures in mm)
- One 400x300x10 wooden board
- Six 300x40x10 wooden board
- Some 10x10 wooden bars
- Four 0.8mm drills
- A piece of circuit board about 40x40
Cube
- 512 RGB LEDs common anode http://www.ebay.de/itm/LED-5mm-RGB-4-Pin-Dioden-Le...
- About 80m of 0.8mm silver wire http://www.reichelt.de/SILBER-0-8MM/3/index.html?..
- About 3m of 1,2 or 1,5mm silver wire http://www.ebay.de/itm/131404528567?_trksid=p20592...
PCB & Electronic
- Arduino Microcontroller
- One DC-DC Step down Voltage Regulator I-Out at least 5A http://www.ebay.de/itm/201245841161?_trksid=p20592...
- Some double sided positive Pre-Sensitized boards 300x210mm and 200x150mm https://www.reichelt.de/zweiseitig-beschichtet/BEL...
- 192x cooper tubes 2x15mm with 1mm hole http://www.ebay.de/itm/311282979776?_trksid=p20592...
- 8x cooper tubes 10x3 with 2mm hole http://www.ebay.de/itm/281363349796?_trksid=p20592...
- Some cable brackets http://www.ebay.de/itm/360102302707?_trksid=p20592...
- Terminal blocks http://www.ebay.de/itm/261470485226?_trksid=p20592...
- 192x 2N3904 NPN Transistors or similar http://www.ebay.de/itm/360754773890?_trksid=p20592...
- 8 IRF9Z34N International Rectifier MOSFET or similar http://www.ebay.de/itm/361052530047?_trksid=p20592...
- Developer for positive presensitized boardsfree from NaOH http://www.voelkner.de/products/39902/Entwickler-N...
- Etchand iron (III) chloride http://www.conrad.de/ce/de/product/530736/Bungard-...
- 24x 74HC595 shift registers http://www.reichelt.de/74HC-595/3/index.html?&ACTI...
- 24x IC 16pol-socket https://www.reichelt.de/IC-Sockel/GS-16/3/index.ht...
- 220x 1kOhm resistors
- 64x 120Ohm resistors
- 64x 180Ohm resistors
- 64x 220Ohm resistors
- 24x 100nF capacitors
- 1pF electrolyte capacitor
- 10pF electrolyte capacitor
- 1000pF electrolyte capacitor
- 1x DC Jack
- One 10kOhm resistor
- 3x BC547 Transistor
- 3x BC557 Transistor
- Some spacers https://www.reichelt.de/Distanzhuelsen-etc-/AH-11-... https://www.reichelt.de/Distanzhuelsen-etc-/AHS-4-...
- Some male and female multi-pin connectors https://www.reichelt.de/Stiftleisten/MPE-087-1-024...
Case
- Wood glue and varnish
- One Plexiglas/Acrylic glass satin finished http://www.ebay.de/itm/121378411029?_trksid=p2059...
Files & Data Sheets
Schematics
The Push-Pull line driver in the schematics is only necessary if you use large wires from the micro controller and the first shift register
The 100 Ohm resistors that connect the MOSFET Drain to ground in the anodes must have at least 3W power, but these resistors are not really necessary, they only helps to keep all LEDs off when connecting to the DC.
Downloads
How to Etch Multilayer Circuit Boards
How to Build the PCBs
How to Build the Case
How to Build the Cube
Final Assembly
DEMO
Arduino Code Samples
The code includes 4 tabs
The "8x8x8 RGB Cube" tab: here is the main code: the loop() function and variable definitions
The "All functions overview" tab: overview of all functions I have done until now
The "Basic" tab: basic functions you will always need to do new animations
The "Functions" tab: include all functions for the animations
All functions have the same structure or pattern:
- clearAll(), layersOff() and reset() to clean all data
- switch() function for colours from white=0 to magenta=6
- digitalWrite(layer[i], HIGH) to set layers on from i=0 to i=7
- one array for every primary color RED[], GREEN[] and BLUE[]
- use values from 0 to 7 within the brackets to define which row (from forward=0 to backward=7) you want to turn on
- use values between 0 to 255 for the arrays for binary representations: for example RED[1] = 1 will turn on the first red LED on the left side on the first forward row; BLUE[7] = 129 will turn on the first and last blue LED from left and right the last row; GREEN[2] = 255 will turn all green LEDs on the second row. Here is a useful page to convert binary to decimal http://www.binaryhexconverter.com/binary-to-decima...
- or use values from LED[0] to LED[7] for the arrays for decimal representations: for example RED[1] = LED[0] will turn on the first red LED on the left side on the first forward row; BLUE[7] = LED[0] and BLUE[7] = LED[7] will turn on the first and last blue LED from left and right the last row; for(int i=0; i<layerNr; i++){GREEN[2] = LED[i];} will turn all green LEDs on the second row.
- some functions require multiplexing turning layers on and off very quickly for more about multiplexing you can take a look here: https://www.instructables.com/id/Multiplexing-with-...
- between each multiplexing step you need clearAll(), layersOff(), reset() and shiftData() functions
Thats all you need to know about the code
With this explanation you may be able to create your own animations
Downloads
Improvements
I add a potentiometer to control brightness of the cube as well as an external reset button.
I additionally used the map function in the code to scale the potentiometer value