Make A 3D LED Cube Using Arduino

3D LED Cube (1)

The 3D LED Cube is a really cool device that enables you to see in three dimensions, get some depth perception and has 512 LED’s or 512 pixels. It is based on an Arduino Uno which is an Atmel AVR microcontroller on a development board with some standard interfacing pinouts that allow you to quickly assemble prototypes.

3D LED Cube (1)

Step 1: 3D LED Cube Hardware

The best way to look at the hardware system is to break it up into subsystems:

  • The LED Matrix
  • Control electronics for Columns
  • Control electronics for Layers

The LED Matrix

By addressing the appropriate layer and column in the LED matrix, it is possible to switch a particular LED on or off or vary its intensity. For each of these sets of controls, we have an interface to the brain which is an Arduino Uno running an Atmel AVR microcontroller. The Arduino Uno is programmed via a USB port from a PC. The Arduino Uno brain (or AVR brain) contains standard interfacing pins which allow connection to the outside world and external devices.

Step 2: 3D LED Hardware – Control Electronics For Columns

Control electronics for Columns

To the interfacing pins on the Arduino Uno brain, we connect two PWM shields which are cascaded together in a long chain. Each of these PWM shields provides up to 32 pulse modulated outputs so these are the brightness controls for 64 columns in total (2 shields with 32 LED controls each). To light up a particular LED, we switch on that column and that layer at the same time to pinpoint an LED. Using this idea we can light up an entire column.

The PWM shield is designed to sync current so to turn on an LED, the PWM shield expects to be connected to the negative or cathode connection of the LED. However because of the way this cube has been wired, this chip has to interface with the positive or anode connection of each LED. In order to do this, you need to assemble an interposing transistor board. Using PMP transistors and sizing the current reference resistor on each PWM shield appropriately to compensate for transistor gain, we can provide a current source rather than sync to each column. The column will source or supply the current via the positive anode to the LED and the common cathode layer will be sunk to ground using MOSFET

3D LED Cube1 (1)

Step 3: 3D LED Hardware – Control Electronics For Layers

Control Electronics for Layers

To switch to layers we use a hardware d-multiplexer. We have three pins coming out of the Arduino Uno that are a binary coded decimal representation of the layer address. When you convert the binary coded decimal to a decimal you have 3 inputs into the d-multiplexer and 8 outputs on 0 – 7. Out of the hardware d-multiplexer we run a Darlington buffer which provides the current to quickly charge the gates of the MOSFET devices. Each power MOSFET (8 in total) controls a layer and each layer has the potential of up to 1.6 amps of current so MOSFETS are the high power devices.

Step 4: 3D LED Software

Software for the LED cube is written in C and compiled under the arduino development environment. The code is transferred to the arduino uno via a USB cable so this requires a USB to serial converter to program the AVR directly.

The best way to think of the software is in two main parts:

  •  the philosophy of displaying the image
  •  the patterns and algorithms used to generate the image

Read more: Make A 3D LED Cube Using Arduino

Leave a Comment

Your email address will not be published. Required fields are marked *