NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Magical LED cube

From Texas Instruments Wiki
Jump to: navigation, search

Have you ever wanted to impress your friends/family with something that combines coolness and your electronic engineering skills? Wait no more, the time has come! I present to you the magical 5x5x5 LED cube! After seeing your cube every one of your friends will want one of these in their living room.

Magical LED cube



Authors[edit]

  • Thanks go to Farid Kilani and Tobias Waschek for their ideas and support!

Features[edit]

  • Blue colored 5x5x5 LED cube
  • Cool animations
  • Implementation of the Capacitive Touch BoosterPack for the MSP430 Launchpad
  • Space Invaders (using the accelerometer on the FRAM board)

{{#evp:youtube|pydjcnIY5x4|Animations|right}}

Functional Description[edit]

The MSP430FR5739 Experimenters Board is used to control an 5x5x5 LED cube. The LED cube is made up from 125 LEDs arranged into 5 layers of 25 LEDs each. All LED anodes of a layer are connected and all cathode of a row are connected. This allows multiplexing with LED driver ICs, so instead of requiring 125 connections it requires one to each of the five layers and 25 to each LED in a layer making a total of 30. 

The cathodes of the LEDs are connected to TI TLC5916 8-bit constant-current LED sink drivers. The LED current is set by a single resistor connected to the R-EXT input of the IC. The 1.8k resistor sets the LED current to ~10 mA; this resistor can be altered to vary the current supplied to the LEDs. The advantage of using a constant current sink driver IC is that almost any LED can be used and the supply current remains constant regardless of the LED forward voltage. If the output current does need to be altered, it only requires the current setting resistor to be changed.

Each of the LED layers is arranged in a 5 x 5 matrix and controlled by a PNP transistor connected to the LED anodes. The remaining free pins of the forth LED driver are used to switch the PNP transistors ON and OFF, so that when the respective layer control output from the LED driver goes low the transistor connects VDD = 5 V to the anodes of the LED layer.

When a layer is connected to VDD and the output of the LED driver goes low it connects the cathode of the respective LED to GND, lighting it up.

The outputs of the current sink drivers are controlled by the MSP430FR5739. Each driver IC contains an 8 bit shift register and an output latch. Via SPI the desired state of the outputs is clocked into the latches. The drivers are cascaded; a full cycle to refresh the whole cube needs to send 30 bits (5 bits for the layer selection and 25 for the LEDs in the selected layer). After all bits are sent the data is latched to the outputs and the outputs are enabled. By using SPI and the LED drivers only 4 I/O pins are needed to control the whole cube.

The layers are turned on one after another. When doing this very quickly the eye can't see the switching anymore, giving us a static image. The refreshing is done by a timer interrupt every 2.5 ms. With this rate you won't be able to see any flickering.

Via UART the current touch position of the Capacitive Touch BoosterPack is sent to the FRAM board. With the support of the Touchpad it is possible to spin an image around the cube. 

Furthermore the accelerometer of the FRAM board is used to play the game "Space Invaders".

When writing the program code, I didn't care about entering any kind of low power mode. Because the cube itself draws ca. 200 mA it wouldn't make a significant difference going from active into low power mode.

 {{#evp:youtube|GE9H6CXCmcA|Space Invaders|right}}

Pictures & Videos[edit]


The first video shows the current set of animations for the cube.

In the second video you can see the game Space Invaders. With the help of the accelerometer of the FRAM board you control one LED on the bottom layer. From the top "rockets" are falling down and you have to avoid getting hit by moving the board. Unfortunately, due to the video resolution, it's a bit hard to see the bottom LED moving in the video.

The third video shows the implementation of the Capacitive Touch BoosterPack for the LaunchPad. By moving your finger over the touch pad you can spin an image, in this case a "1", around the cube.



{{#evp:youtube|qp4pcjQ3Ves|Capacitive Touch|right}}

Usage Instructions[edit]

The easiest way to assemble the cube is to first solder all the layers individually. To make sure that all LEDs have the same spacing and are aligned in a square you need something to hold them while you are soldering. In my case I drilled 25 holes in the box the LaunchPad comes in and mounted the LEDs on it. You actually don't need any wire to build the cube. Bending the legs of the LEDs so that the legs become the scaffolding that holds the LEDs in place works fine.



Source Code[edit]

File:Source Code.zip

Schematics[edit]

File:Schematics.pdf

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Magical LED cube here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Magical LED cube here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Magical LED cube here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Magical LED cube here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Magical LED cube here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Magical LED cube here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Magical LED cube here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Magical LED cube here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Magical LED cube here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity