Project tutorial
LED Cube 7x7x7

LED Cube 7x7x7 © GPL3+

How to make a 7x7x7 LED cube with Arduino.

  • 5,208 views
  • 6 comments
  • 30 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

About this project

I always wanted to make my own LED cube, and now I share with you my project.

Step 1

The first thing to do is create the LED matrix.

In this case I have created seven 7x7 LED matrixes.

I have divided anodes and cathodes and I have soldered them in rows and columns, so at the end I have 7 anodes and 7 chatodes for each led matrix.

Step 2

Now you need the necessary hardware to use the LED cube.

This is the most difficult part if you don't know quite well the electronic.

But I try to explain this part clearly.

I have used seven 74HC574.

This IC is a 8-bit D Flip Flop, it is a 8 bit memory. In this way I can load some bits on they to see the image on the cube. I need seven 74HC574 because there are seven LED matrix.

I need also 7 NPN transistor to decide which layer turns on.

In this way with the technique of multiplexer I can visualize an image on all cube.

Finally I need also an 74LS138, it is a 3 to 8 line decoder demultiplexer, so with it I can control all Flip Flop with only 3 bits because they need also a pulse to save the data.

This is the block diagram of the hardware:

I made by myself the circuit, and I used ATmega328P standalone of Arduino.

You can see all the circuit diagram below.

Step 3

You need also a structure for hardware and LED cube. I have used some pieces of wood to make it.

After that you can assemble everything, each LED matrix must be placed in front of the other and the cathodes of each layer are connected to the same transistor.

Step 4

Finally, you can write the code to make the cube on, the block diagram above can help you to write the code.

This part can be a lot of confused but with some practice it will be easier.

The code below represent the easiest animations because the others are too much long but with a little fantasy you can do what ever you want.

Code

AnimationArduino
//This code represent the easiest animation for LED CUBE

int temp = 50, cont = 0;

//This function loads all the cube
void load_all(void) {
  //layer 1
  digitalWrite(A2, LOW);
  digitalWrite(A1, LOW);
  digitalWrite(A0, LOW);
  delay(1);

  //layer 2
  digitalWrite(A2, HIGH);
  digitalWrite(A1, LOW);
  digitalWrite(A0, LOW);
  delay(1);

  //layer 3
  digitalWrite(A2, LOW);
  digitalWrite(A1, HIGH);
  digitalWrite(A0, LOW);
  delay(1);

  //layer 4
  digitalWrite(A2, HIGH);
  digitalWrite(A1, HIGH);
  digitalWrite(A0, LOW);
  delay(1);

  //layer 5
  digitalWrite(A2, LOW);
  digitalWrite(A1, LOW);
  digitalWrite(A0, HIGH);
  delay(1);

  //layer 6
  digitalWrite(A2, HIGH);
  digitalWrite(A1, LOW);
  digitalWrite(A0, HIGH);
  delay(1);

  //layer 7
  digitalWrite(A2, LOW);
  digitalWrite(A1, HIGH);
  digitalWrite(A0, HIGH);
  delay(1);

  //layer 8
  digitalWrite(A2, HIGH);
  digitalWrite(A1, HIGH);
  digitalWrite(A0, HIGH);
  delay(1);

}

//This function actives each layer one time and you can decide the time that the layer turns on
void scrolling(int t) {
  PORTB = 0x00;
  digitalWrite(7, HIGH);
  delay(t);
  digitalWrite(7, LOW);

  digitalWrite(8, HIGH);
  delay(t);
  digitalWrite(8, LOW);

  digitalWrite(9, HIGH);
  delay(t);
  digitalWrite(9, LOW);

  digitalWrite(10, HIGH);
  delay(t);
  digitalWrite(10, LOW);

  digitalWrite(11, HIGH);
  delay(t);
  digitalWrite(11, LOW);

  digitalWrite(12, HIGH);
  delay(t);
  digitalWrite(12, LOW);

  digitalWrite(13, HIGH);
  delay(t);
  digitalWrite(13, LOW);

}

//This animation turns on one layer per time, and it increases the speed of it, so finally you see all cube switched on
void one(void) {
  PORTD = 0xff;
  load_all();
  while (1) {
    scrolling(temp);

    temp = temp - 2;

    if (temp <= 0) {
      temp = 1;
      cont++;
      if (cont == 1000) {
        cont = 0;
        temp = 100;
      }
    }

  }
}

void setup() {
  DDRD = 0xff;
  DDRB = 0xff;
  DDRC = 0xff;

}

void loop() {
  one();
}

Custom parts and enclosures

The complete control circuit
gestione_mankWMoVhz.sch

Schematics

control circuit's layout
I use the image for components arrangement
Layout con atmega bb laup2ngcqe

Comments

Similar projects you might like

4x4x4 LED cube with Arduino Uno and 1sheeld

Project tutorial by Hassan Ibrahim

  • 30,584 views
  • 7 comments
  • 61 respects

LED Cube

Project tutorial by Praditha Alwis

  • 5,037 views
  • 0 comments
  • 12 respects

Interactive 4x4x4 LED cube

Project tutorial by Tong Xin Hua

  • 1,775 views
  • 0 comments
  • 0 respects

4*4*4 LED Cube Using Arduino Embedded Prototyping Platform

Project tutorial by STEMpedia

  • 1,784 views
  • 0 comments
  • 9 respects

LED CUBE 4x4x4

Project showcase by MakerRobotics

  • 23,970 views
  • 4 comments
  • 61 respects

LED Emergency Lights using WS2812 RGB LED Module

Project tutorial by bigboystoys13

  • 10,667 views
  • 7 comments
  • 27 respects
Add projectSign up / Login