Here’s a list of everything you’ll need to build the cube:

Supplies

Electronic Components:

  1. ATmega328p microcontroller (SMD MLF version)
  2. 384 WS2812B-1010 RGB LEDs (1x1mm): Buy here
  3. 1.27mm SIL headers (for charging and ON/OFF)
  4. 3.7V lithium-ion battery: Buy here
  5. SS14 Schottky diode
  6. 22pF ceramic capacitors (0402 package)
  7. P-channel MOSFET
  8. 16MHz crystal oscillator

PCB and Soldering Materials:

  1. Custom PCB (order from JLCPCB)
  2. Solder paste: Buy here
  3. PCB stencil
  4. Flux remover solvent: Buy here
  5. Hot plate (or reflow oven): Buy here

Tools and Software:

  1. 3D Printer: Buy here
  2. Altium Designer (for circuit design)
  3. Arduino IDE (for programming)
  4. Soldering iron and core wire
  5. Microscope for inspecting solder joints: Buy here
  6. USB-C cable for programming: Buy here

Designing the Circuit Schematic

The core of this RGB Cube is the ATmega328p microcontroller paired with WS2812B-1010 addressable RGB LEDs. The ATmega328p was chosen for its Arduino compatibility and sufficient I/O capabilities, while the WS2812B LEDs allow for daisy-chaining control, requiring just one pin to handle all 384 LEDs.

Power and Circuit Design:

  1. The cube is powered by a 3.7V lithium battery.
  2. The ATmega328p runs at 5V with a 16MHz crystal oscillator for stable operation.

Using Altium Designer, I created a compact schematic, keeping trace lengths short and adding bypass capacitors to reduce noise. I also optimized power usage through code, ensuring the cube can handle vibrant animations without overloading the system.

Download the Schematic:

You can download the schematic here:

  1. Altium project files (FREE)
  2. Download Gerber Files

Designing and Manufacturing the PCB

With the schematic complete, it was time to move on to the PCB layout. The goal was to fit 384 tiny 1x1mm WS2812B LEDs onto an 8 cubic centimeter cube, so space optimization was key. Using Altium Designer, I carefully placed the components and routed the traces to ensure smooth data and power flow across the entire LED array.

PCB Design:

  1. I created a 2-layer PCB to accommodate the high density of components while keeping the board compact.
  2. To ensure reliable connections, I routed ground plane separately from the signal traces, reducing electrical noise.
  3. The ATmega328p microcontroller was placed at the center, allowing short signal traces to all LED arrays.
  4. I also added mounting pads for a 1.27mm pitch header to allow easy reprogramming and power connection.

Manufacturing:

Once the PCB design was finalized, I uploaded the Gerber files to JLCPCB, who handled the manufacturing. Their precision fabrication and affordable prices made them an excellent choice for a small, complex project like this.

After receiving the boards, I performed a quick inspection to ensure the traces and solder mask were clean and accurate. Everything looked perfect, so I was ready to move on to assembling the components.

Download the PCB Design:

You can download the Gerber files here:

  1. Download Gerber Files

Soldering the LEDs and Components

For this project, I used a hot plate to reflow the solder paste and attach the LEDs and components. These 1x1mm WS2812B LEDs are incredibly small, so using the stencil was essential for applying solder paste evenly.

Here’s a detailed guide on handling these tiny components and ensuring a solid connection:

  1. Use fine-tipped tweezers for placing LEDs.
  2. A microscope will help with inspecting your solder joints.
  3. A flux remover will help clean up any excess solder and ensure clean connections.

If you prefer soldering by hand, then you can only solder the bottom side components, as for the LEDs it is not possible to solder them by hand.

Programming the LED Cube

With the hardware complete, it’s time to program the cube. The ATmega328 microcontroller runs the show, and I programmed it using the Arduino IDE. The code drives animations across the 384 LEDs, creating dynamic light patterns.

You can download the Arduino code I used from the link below....

Read more »