8x24x8 RED GREEN BLUE LED CUBE

12,438

135

40

Introduction: 8x24x8 RED GREEN BLUE LED CUBE

About: PLC, Arduino - Do it yourself project

I have previously done an 8x16x8 Led Cube Clock controlled by Arduino Mega 2560 and Real Time Clock Module DS3231 more than 2 years ago and until now it still works fine.

I also conducted the tests using ESP-01 to display time/ weather information on led matrix 13x15 and control an 4x4x4 RGB led cube on previous topic, named “MAXIMIZE THE CAPABILITIES OF ESP-01 ESP8266”. They all work very well.

Today, I would like to share how to use an ESP-01S ESP8266 to control a big size - led cube 8x24x8 in the simplest way of hardware. We can easily perform many beautiful effects with smooth transistion, as well as, display time/ weather information on this led cube without any extra-components because ESP-01S ESP8266 has 1MB Flash Memory, fast CPU speed 80/160 MHz and WIFI connectivity.

Let’s getting started.

Step 1: THINGS WE NEED

MAIN COMPONENTS:

TOOLS AND EXTRA COMPONENTS IF WE DO ETCHING PCB BY OURSELVES:

  • 4PCS X SINGLE SIDED COPPER CLAD BOARD – A4 SIZE.
  • CLOTHES IRON (CLOTHES IRON TONER TRANSFER).
  • IRON CHLORIDE (FERRIC CHLORIDE), PCB ETCHING.
  • PCB CLEANING LIQUID.
  • PCB HOOK KNIFE.
  • PCB DRILLING MACHINE.
  • SUPER STRONG GLUE (I COULDN’T BUY SPECIAL GLUE FOR ACRYLIC SO I USED 502 SUPER STRONG GLUE).
  • WOODEN TEMPLATE. (TEMPLATE FOR LED SOLDERING)
  • 1 SET OF 9 V BATTERY AND BATTERY CLIP CONNECTOR (TO CHECK THE LED).
  • MASK, GLOVE, SMALL FAN FOR PROTECTING OURSELVES DURING SOLDERING.

PROGRAMMING TOOL FOR ESP-01 ESP8266:

  • 01PCS X FTDI FT232RL USB TO TTL SERIAL ADAPTER.
  • 01PCS X USB CABLE MINI TYPE B TO TYPE A.

Step 2: SCHEMATIC

The overall schematic for 8x24x8 led cube has big size file, you can download it in high resolution HERE.

I divide this overall schematic into 2 blocks to easily visualize:

Block 1: Led modules, include 3 x 512 = 1536 leds which are soldered in 3 separated sets of led cube 8x8x8

  • 8x8x8 red led cube module: 512 leds.
  • 8x8x8 green led cube module: 512 leds.
  • 8x8x8 blue led cube module: 512 leds.

Below schematic only shows one layer (ANODE 0) with 192 leds, all led's anodes in same layer are connected together (to ANODE 0) and their cathodes are separately connected to cathodes scanning module. An 8x24x8 led cube has 8 layers with 1536 leds in total.

Block 2: Control modules, include:

  • Anode scanning module: 1pcs x 74HC595 + 8pcs x 2N2222 + 8pcs x IR9540.
  • Cathode scanning module: 24pcs x 74HC595 + 24pcs x ULN2803. If we use 24pcs x power logic shift register TPIC6B595N, all ULN2803 would be omitted.
  • ESP-01S controller module: including mode slide switch, reset button, programming header and AMS1117 power module for converting from 5V to 3.3V.

Step 3: PCB DESIGN

I designed the printed circuit boards on EAGLE software. Because I do etching these PCBs myself, I had to design them in such a way that they could be easily fabricated.

  • Led cube base PCB:

We need 3 x led cube base PCB for led cube 8x24x8. You can download it in real size high resolution PDF file HERE.

Notes: We can print out this PCB file, stick on the wooden template, and drill at 64 cathode holes with diameter 5mm. Later, after soldering 64 leds on wooden template, we can place and align 64 led's cathode easily on cube base PCB.

  • Cathode scanning board PCB

Cathode scanning PCB is divided into 3 groups, each group consists of 8x74HC595 + 8xULN2803 and is used to control 512 leds.

You can download cathode scanning PCB in real size, high resolution PDF file HERE.

  • Anode scanning board PCB

It consists of 1x74HC595 + 8xIRF9540 and is used to control 8 layers of led cube.

Anode scanning PCB in real size, high resolution PDF file is posted HERE.

Note: Firstly, the anode scanning PCB is designed base on the schematic below, take note that R002 (R100) was finally removed on my real PCB. In my overall schematic, these resistors R100 also don't exist.

Step 4: PCB ETCHING, DRILLING AND SOLDERING

To make a circuit board at home, I used Clothes Iron Toner Transfer method that simply print the circuit design out on a laser printer, iron it onto the copper, and etch by Ferric Chloride.

You can see some processes that I did with Led cube base PCB.

  • Etching

  • Ink removing

  • Drilling holes

My result for anode and cathode scanning PCBs after soldering all components:

  • Anode scanning PCB

  • Cathode scanning PCB

Step 5: LED SOLDERING

Soldering 1536 LEDs is not easy. It take your time and efforts. Be patient, solder it carefully and double check every single LEDs by battery before/ after soldering. To build an 8x24x8 led cube, I soldered 3 separated led cube 8x8x8 with different colors: red, green and blue.

After soldering 64 leds arranged on the wooden template, we have one plane of led cube 8x8x8. The picture below shows 8 x led cube's planes which will form an 8x8x8 led cube later.

Soldering 8 planes to led cube base PCB, doing alignment and connecting 64 leds in same layer by bare copper wires diameter 1.5mm.

At backside, I soldered 8 layers to anode header by bare copper wires.

Just finished one led cube 8x8x8, I did the same with 2 remaning led cubes. Take notes that we should check carefully one more time when we finish every cube. If one led or some leds are damaged, shorted-circuit or open-circuit, it would effect to all other leds in the cube, it causes ghosting or flickering.

Step 6: BOX ASSEMBLY AND CONNECTION

BOX ASSEMBLY:

  • Bottom box: dimension LxWxH = 800x350x100mm, it contain: power supply, Arduino/ ESP8266, all PCBs, power switch and made by white acrylic.

  • Top box: dimension LxWxH = 700x250x250mm, contain all 1536 leds and it is made by clear acrylic.

  • Before placing 3 x led cube 8x8x8 inside the top box, I did alignment and adjustment to ensure the led cube in acceptable symmetric condition.

CONNECTION

  • Preparing 5V power supply.

  • Preparing anode scanning board.

  • Preparing cathode scanning board

  • Connecting all together

DONE!!! It's been a monumental effort and it looks so cool!!!

Step 7: PROGRAMMING

Programming code for led cube 8x24x8 is available at my GitHub:

https://github.com/tuenhidiy/ESP-01-LED-CUBE-8x24x...

With below setup(), the timer1 clock runs at 5MHz (80MHz/16=5MHz) or 1/5MHz = 0.2us. When we set timer1_write (1000), this means the interrupt will be called every 1000 x 0.2us = 200us, which gives a multiplex frequency of about 5kHz. To minimize the flickers detected by camera, we can reduce this value to 500 or 100, for example, but in this case, the led cube will be dimmer. That why I selected 1000 and you can see some small flickers in my video which couldn't recognize by human eyes.

void setup () 
{
  anodelevel = 0;  
  pinMode(DATA_Pin, OUTPUT);
  pinMode(CLOCK_Pin, OUTPUT);
  pinMode(LATCH_Pin, OUTPUT);
  //pinMode(BLANK_Pin, OUTPUT);
  
  timer1_isr_init();
  timer1_attachInterrupt(timer1_ISR);
  timer1_enable(TIM_DIV16, TIM_EDGE, TIM_SINGLE);
  timer1_write(1000);
  clearfast();
}

When interrupt happens, the interrupt service routine timer1_ISR will be carried out its mission: shift out 25 bytes at specified anodelevel (layer) to control anodes and cathodes of led cube.

void ICACHE_RAM_ATTR timer1_ISR(void)
{
    digitalWrite(BLANK_Pin, HIGH);
    
    // Cathodes scanning
    for (byte i = 0; i<24; i++)
    {
      DIY_shiftOut((cube[anodelevel][i]));
    }
    // Layer - Anodes scanning
    DIY_shiftOut(anode[anodelevel]);
    
    delayMicroseconds(5);
    digitalWrite(LATCH_Pin, HIGH);
    delayMicroseconds(5);    
    digitalWrite(LATCH_Pin, LOW);
    delayMicroseconds(5);    

    digitalWrite(BLANK_Pin, LOW);
    delayMicroseconds(5);
    anodelevel++;   
    if (anodelevel==8) anodelevel=0;
    pinMode(BLANK_Pin, OUTPUT);        
    timer1_write(1000);      
}

In my video, you can see the texts can move in ellipse shape around the cube. I did it based on one Excel template. With this template, we can easily edit to get programming code for any other shapes.

const unsigned char ellipse[38] PROGMEM =
{
0xF1,0xF2,0xF3,0xF4,0xD5,0xB6,0x97,0x77,0x56,0x35,0x14,0x13,0x12,0x11,0x10,0x0F,0x0E,0x0D,0x0C,
0x0B,0x0A,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x22,0x41,0x60,0x80,0xA1,0xC2,0xE3,0xE4,0xE5,0xE6
};

For example: the first byte of above ellipse array 0xF1 (B11110001) stores led cube's coordinates(x0,y0) = (7,17) which x0 = B111 and y0 = B10001.

x0 = (ellipse[0]>>5) & 0x07);
y0 = (ellipse[0] & 0x1f);

Step 8: FINISH

In the future, I should do a few more things with this led cube.

Update on July 21, 2020: Internet clock with randomized effects, controlled by ESP-01 ESP8266.

Thank for your reading!!!

Colors of the Rainbow Contest

Participated in the
Colors of the Rainbow Contest

Be the First to Share

    Recommendations

    • Micro:bit Contest

      Micro:bit Contest
    • Plastic Challenge

      Plastic Challenge
    • Robots Contest

      Robots Contest

    40 Comments

    0
    kcraske
    kcraske

    2 months ago

    At last! I have completed the electronics and built 1 cube. All seems to be working. However, are you going to publish the schematic and code for the internet clock with randomized effects?

    0
    christiandasilva165
    christiandasilva165

    Question 2 months ago on Step 2

    A foto do esquemático ficou muito manchado não da pra ver praticamente nada, principalmente as ligações dos pinos, atualize vai ajudar muito com este projeto irado😞😞😞

    0
    tuenhidiy
    tuenhidiy

    Answer 2 months ago

    Hi. Did you download PDF file in STEP 2? It is high resolution version and you can see the schematic clearly. Thank you for being interested in my project!

    0
    kcraske
    kcraske

    1 year ago

    I have to admit defeat. Wanting to build this I started to design a PCB and it very soon became aware that I could not achieve the neat layout of the board on the article. Closer inspection shows that the board does not correspond to the schematic. For instance, if I have got it right, the board connects pin 1 of the ULN2803 to pin 7 of the 74595. However the schematic connects pin 1 of the ULN2803 to pin 15 of the 7495. The only way I can start to achieve something near the neat layout is to place the 7495 on the outer side of the board, which clearly is not done.
    Totally lost, wondering where I have gone wrong.

    0
    tuenhidiy
    tuenhidiy

    Reply 1 year ago

    Dear kcraske,
    The ULN2803 chip consists of 8 Darlington transistor pairs that act as eight individual switches, so it is no problem with the PCB board. In my design, ULN2803 and 74HC595 are opposite each other for easy PCB routing.

    0
    kcraske
    kcraske

    Reply 1 year ago

    Thanks for that. I'm not questioning your board works. From looking at the schematic, that would work as well but it appears that the LEDs are 'mapped' differently on the schematic compared with the board layout. I assume then that the effects would not look the same. My problem is that I no longer can produce my own PCBs, I used to but as I often need double sided boards I went down the route of using Chinese suppliers. If I am correct about the different mapping, I assume if I reverse engineered your board to produce the files, rather than use the schematic, all would work. Any help gratefully received. Winter is approaching and soldering all those LEDs would while away the dark evenings.

    0
    tuenhidiy
    tuenhidiy

    Reply 1 year ago

    In fact I have designed by Eagle software for a PCB with 8x(74HC595 + ULN2803) then duplicated it to 3 and the schematic on instructables was redrawn by Fritzing software. I didn't think it will cause anyone trouble since I shared the printed circuit file. If you didn't use my printed circuit design and re-draw according to my schematic then it's still okay. You can reverse the connector direction when you plug 8P cable to PCB or you can try to change "bit order" of shiftout function in the program by following tip:
    Change the command in "DIY_shiftOut":
    digitalWrite(DATA_Pin, !!(DATA & (1 << (i)))); // LSBFIRST
    by
    digitalWrite(DATA_Pin, !!(DATA & (1 << (7-i)))); // MSBFIRST
    Hope this help!

    0
    kcraske
    kcraske

    1 year ago

    I would be grateful if you could just clear up something for me. On the LED cube base PCB you show a connector on each side. These seem to be connected to the anodes of the 8 layers. Do you need 1 at each side or have you included both to make the boards symmetrical. The other possibility of course is that I have not understood something.
    I am really wanting to construct this.
    Thanks

    0
    tuenhidiy
    tuenhidiy

    Reply 1 year ago

    Hi kcraske,
    I designed base PCB like this, so that we can rotate the led cube in the front or back direction. After you decide which side is back and front, you have to connect to the led anodes (layers) by wires or bare copper core at the back of led cube. It could not be connected in the front because it looks very ugly.

    0
    kcraske
    kcraske

    Reply 1 year ago

    Thank you so much for your time. Yes I can see that, good idea. I want to make sure I understand as much as possible before launching in. You must have spent hours in this project so I am sure you understand that as this will mean I will be investing a lot in terms of time and a bit of money I don't want to get stuck. However I think I'll now have a go at programming the ESP-01S ESP8266. First steps.

    0
    160pp160
    160pp160

    1 year ago

    You are the number one....fantastic

    0
    keitha9
    keitha9

    1 year ago on Step 8

    Beautiful, absolutely beautiful. I wish I had a tenth of your skills.

    0
    tuenhidiy
    tuenhidiy

    Reply 1 year ago

    Thank you!

    0
    lbmcconnell
    lbmcconnell

    1 year ago

    FANTASTIC!!! Quite a feat!!! I had a thought on a next step for you though. It seems as if you separated colors in the cube. How difficult would it be to have each bulb be RGB and use twice the number of bulbs in the same space? Essentially making a pseudo 3d crude monitor? I know daunting task indeed but I would be interested to see what it would cost to build let alone design.

    and Sadly this is beyond my abilities so I would need to buy one :(. Even still this is an awesome build!!!

    0
    tuenhidiy
    tuenhidiy

    Reply 1 year ago

    Hi lbmcconnell!
    Thanks. I'm glad you like my led cube project!
    I have made a small size RGB led cube 8x8x8 about 2.5 years ago and until now it still works fine: https://www.instructables.com/id/Interactive-Colo...
    If the distance between leds is too close, the front led will cover the back led and it looks not so good!
    Relating the cost, it is not so costly, we can buy 1 box - 1000pcs RGB led from China with reasonable price. :-)

    0
    lbmcconnell
    lbmcconnell

    Reply 1 year ago

    tuenhidiy,

    I remember your 8X8X8 cube. That was equally as awesome back in the day. I do understand the issue with regards to layering the LED. But to put it bluntly is it not a matter of perspective? if the box assumed that someone was in front of it and dimmed the rearward LED? Maybe I am oversimplifying things again. I mena we can take a 2d screen and make it look 3d we should be able to make a 3d (CUBE) 3D.

    0
    tuenhidiy
    tuenhidiy

    Reply 1 year ago

    Hi lbmcconnell. Thank for your comment. This idea is beyond my abilities, so I should learn more!

    0
    winker.inc
    winker.inc

    1 year ago

    That's great but I can't make one ☹️not got a laser printer