LEDCube

8

Transcript of LEDCube

Summary

• 8x8x8 LED cube built with 512 red, green, and blue (RGB) common anode LEDs.

• The cube is driven by an Arduino UNO microcontroller.

A 4-bit value for brightness allows for a virtual color palette of 4096 different colors.

• The cube is capable of displaying a wide variety of 3D animations, math functions, and text.

The Brain• The cube is controlled by a

serial data stream from an Arduino UNO microcontroller.

The microcontroller’s bit stream determines three conditions:

• on/off state of each LED

• LED intensity (brightness)

• efresh rate.

• Complex effects, like Virtual motion and enhanced field depth, can be achieved by varying the LED brightness and matrix location.

The Circuit• The serial data stream from

the microcontroller is fed into one of 25 8-bit shift registers.

• Each of the 8 outputs of the shift registers are wired to a transistor circuit that controls a specific lead on each LED.

• Each shift register is cascaded into the next, which multiplies the number of outputs available for the Arduino to drive. A single pin on the Arduino is expanded to control 200 pins on the cube.

The Cube/Interface• The LEDs used to construct the

cube are of the common anode type with a diffused lens. The common lead is +5V, with the three other leads (RGB) going to ground through a current limiting resistor.

• The controlling circuit interfaces with the cube through 200 connections. There are 192 connections for the RGB ground leads, while the other 8 are designated to supplying the positive +5 voltage to the 8 levels of the cube.

The Code• The controlling code is written in C

and is run on the microcontroller.

• The program uses a technique called multiplexing that controls when each level of the cube is to be lit (refreshed).

• The brightness value is coded as a 4-bit binary value that is used to control the duty cycle of each LED. This technique is known as Bit-Angle Modulation.

Multiplexing• Multiplexing is a term

used to describe the cyclic way in which the LED cube is actually lit (refreshed).

• At any given point in time only one level of the cube may be lit.

• Multiplexing cycles through these on off states at such a high refresh rate that it is not apparent to the viewer.

Bit Angle Modulation• Bit angle modulation is a term

used to describe the duty cycle of the LEDs on state. Thereby controlling its effective brightness.

• The software uses a 4-bit binary value that determines how many clock cycles the LED is on. With a maximum brightness value of 15, a minimum of 1, and off at 0.

• The image at upper right shows the duty cycle equivalent of binary 1101 (decimal 13). The translates to 13 clock cycles on, and 2 clock cycles off.