Introduction: 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

Step 1: 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

    PCB & Electronic


    Case

    Step 2: Files & Data Sheets

    Step 3: 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.

    Step 4: How to Etch Multilayer Circuit Boards

    Step 5: How to Build the PCBs

    Step 6: How to Build the Case

    Step 7: How to Build the Cube

    Step 8: Final Assembly

    Step 9: DEMO

    Step 10: 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

    Step 11: 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