LED Cube

Image

This is a 5x5x5 LED cube based on the Cortex-M0+ SoC ATSAML21E16B. The 125 RGB LEDs are multiplexed and controlled by 5 shift registers of 16 bits each, which also control the LEDs Anode. The CPU is running FreeRTOS, which manage the reading of the LEDs animations from a uSD card and the LEDs multiplexing.

First prototype

DIY PCB

The first prototype of this LED Cube was smaller (2x2x2) and it was developed to test the shift registers functionalities.

It is based on an ATXMEGA128A3U microcontroller that controls the shift registers via SPI by sending some hard-coded animations.

  • Image
  • Image
  • Image
  • Image
  • Image
  • Image

Testing…

  • Image
  • Image

The tests was focused on verifying the throughput and speed of the shift registers in multiplexing RGB LEDs, drawing current from the cathodes. Additionally, through a circuit solution, I also control the anodes of the LEDs.

On the prototype, I developed few dedicated firmware to test the LED Cube’s functionalities.

This test is focused on testing PWM functionality: a static animation is displayed on the LED Cube, and the brightness is varied by using PWM modulation.

This test features a dynamic animation where LEDs, operating in multiplexing, create a ‘snake’ pattern with changing colors.

Mechanical assembly

During the construction of the LED Cube, one of the key steps involved employing my manual skills to assemble bending jigs.

These jigs allowed me to bend the LED pins orthogonally and cut them to the correct length, ensuring that the cube was as precise as possible.

Another crucial step in the assembly process was creating jigs to facilitate the soldering of LEDs into a grid, allowing for the construction of different LED planes.

To achieve this goal, I leveraged the same ECAD (Electronic Computer-Aided Design) software used for designing the PCB to draw templates with the LED grid.

These templates were then transferred onto an MDF panel, which I subsequently drilled to accommodate the LEDs.

Testing… again!

Once the final PCB (equipped with an advanced ATSAML21E16B microcontroller) was assembled, I start porting the code to manage animations, integrating it into a FreeRTOS-based firmware.

The LED Cube control board is running FreeRTOS where one task executes a brief shift register test animation while a second task adjusts the brightness of a status LED (orange) using PWM.

The LED Cube control board is equipped with a microSD card slot.

I downloaded the ulibSD library, for which I implemented specific porting for the microcontroller in use, and interfaced it with the FatFs library.

This configuration allows a dedicated task to access the external memory, sending animations via a queue to the task that displays them on the LED Cube.

Great news! The LED Cube is finally operational, running its first animation!

Design a site like this with WordPress.com
Get started