Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science at UCF
What is the DAC? The DAC is an array of LEDs assembled in a 16 * 16 * 16 array designed to simulate animation by producing images in 3-dimensional space in the Red, Green, Blue color spectrum.
Specifications Cube size: 3.5 x 3.5 x 4 ft (L x W x H) Visible sides: 5 sides Light Emitting Diode type: RGB Pixel resolution: 16 x 16 x 16 = 4096 Case construction: Transparent acrylic Communication: USB/ SD card controller Working temperature: F Working Humidity: 10-80% Working Voltage: AC 110V-230V Number of animations: 100
What hardware is required? 1 Microcontroller 48 LED Drivers 96 Resistors 54 Capacitors 16 PNP transistors 1 UART connection 1 Computer power supply 1 DC/DC step down voltage regulator 1 Designed Printed Circuit board 4,096 RGB common anode LEDs 1 SDHC card
What are the hardwares functions? Store the animations that are to be displayed. Select the layer that is to be illuminated to display the animation. Provide current to the required diode to provide the desired color.
What software is required? Sprite implementation program to design the animations to be displayed on the cube. Cube operating code.
What are the software functions? Sprite implementation program: o Take the animations designed by the sure and write them into code that can be read by the microcontroller. Cube operating code: o Take the animation code written by the sprite implementation program and use it to display the desired images.
How does the DAC work?
What LED driver to select? Led Driver Outputs Gray Scale Control Brightness Control Error Detecti on Cost Per Driver TLC bit7-bit No$1.79 TLC bitN/A Yes$3.53 TLC bit6-bit Yes$3.36 LT bit6-bit Yes$6.07
What are the benefits of the TLC5941? 16 Channels with 6-bit Dot correction Controlled In-Rush Current Two Separate Error Information Circuits 12-Bit Pulse Width Modulation Grayscale Control Current Accuracy
Stellaris LM3S bit ARM Cortex-M3 50-MHz processor core 256 KB flash and 64 KB SRAM 42 GPIOs Bit-Banding UART Synchronous serial interface (SSI) Pulse width modulation
TLC5941 LED Driver 1 st PCB will contain the LED drivers Ability to arrange devices in cascade allows a single control line to transmit data to an individual array of drivers
TLC5941 LED Driver 2 control lines per color o Best way to ensure that ideal amount of frames per second were displayed
Surface mount Vs. Dip Surface mount takes up significantly less space than dip A major factor in PCB design because 48 TLCs will be used to drive the LEDs
LED Lattice 5cm pitch This allows for the best possible viewing orientation If LEDs are too close together it would be impossible to see through the cube Arranged in a 16 x 16 x 16 architecture An RGB LED is actually three separate LEDs inside one "bulb" One common anode, three common cathodes
Layer Select 2 nd PCB will contain the Stellaris Stellaris uses 16 GPIOs to control which layer is selected. Sends output to array of transistors on separate PCB
Layer Select 3 rd PCB will contain the layer select transistors Transistors Receive Layer Select From MCU Output goes directly to layer 0 through 15
Displaying Images MCU sends data serially to the array of TLC5941s 2 input lines per color Other signals sent: o Latch o Output Enable o Input Clock o PWM Clock
Displaying Images Data received by drivers Held in internal registers until latch signal received
Displaying Images Layer is selected; states of LEDs are displayed Layer is turned off; Data is erased from the TLC Repeat Process 16 times for one frame
Current Requirements Maximum current draw of the LEDs is determined by assuming all LEDs in one layer are turned on at a single instant: o A single LED needs 20 mA of current to be in the on state o There are 256 LEDs per layer, if all LEDs are lit that is 5.12 A drawn. We will use a 5V computer power supply to step down to 3.3 V for the Stellaris Minimum current: 48 mA (Stellaris) + 3 x 50 mA (LED driver) + 0 x 20mA (LEDs) =.198 A ± 10% Maximum current: 48 mA (Stellaris) + 3 x 50 mA (LED driver) x 20mA (LEDs) = A ± 10%
Multiplexing Almost all LED cubes rely on persistence of vision. An entire image is made up of 16 layers Impractical to light up all 16 layers at once as we would need IO ports 1 Frame: a. Layer 0 is switched on for a short duration, a section of the image is displayed, then switched off b. Repeat for all 16 layers
Multiplexing
Persistence of Vision The effect is that the image is perceived as a whole by the viewer as long as the entire path is completed during the visual persistence time of the human eye. Our goal is to produce a 24 frame/second animation One image requires: 16 layers x 24 frames /sec = 384 layer selects/sec Almost all LED cubes rely on persistence of vision.
Pulse Width Modulation Without PWM the cube could only display red, green, or blue for each LED With PWM there are thousands of colors to choose from This is done by adjusting the brightness of each individual LED diode in a particular bulb o This allows the cube to turn on multiple colors without drawing too much current PWM is performed by the LED drivers Each output can have a value of 0 to 4096 because the length of a single output from the TLC is 12 bits
Color Wheel
phase < colorWheelLength/3 r = maxBItColor x sin(π x phase / (2 *colorWheelLength/3)) g = 0 b = maxBitColor x cos(π x phase / (2 *colorWheelLength/3)) phase < 2 * colorWheelLength/3 r = maxBitColor x cos(π x (phase - colorWheelLength/3) / (2 *colorWheelLength/3)) g = maxBitColor x sin(π x (phase - colorWheelLength/3) / (2 *colorWheelLength/3)) b = 0 phase < colorWheelLength r = 0 g = maxBitColor x cos(π x (phase - 2 *colorWheelLength/3) / (2 *colorWheelLength/3)) b = maxBitColor x sin(π x (phase - 2 *colorWheelLength/3) / (2 *colorWheelLength/3))
red(phase) = 0 <= phase < colorWheelLength/3 red(0) = maxBitColor x sin(0) red = 0 - no red red(colorWheelLength/3) = maxBitColor x sin(π/2) red = maxBitColor - max red
Animations The LEDs will be controlled using an animation file The color and location of which LEDs will be lit will be determined by the animation file SD Card will hold the animations Two Types of Animation Sprite based Function based
Sprite Animations Sprite based animations use the concept of sprites A group of images are displayed in sequence to make an animation This is done fast enough to create the sense of motion They will each have a specific number of frames and a specified frame delay
Function Animations Used for the more random based animations or animations with a strict pattern Such as a rain animation or moving cubes in a set pattern They will each have a set parameters and a duration
Creating Animations Sprite based animations will be created using a standalone program that will produce file that can be read from the SD Card Function based animations will be functions already defined and given variables from the SD Card
Displaying Animations
Class Diagram
Interrupt Service Routine The cube will have one ISR Its only job is to read the SD Card to display the animations Will simply loop through all the data on the SD Card forever
What is the budget? ComponentsCost per piece# of piecesTotal LED Drivers$3.3648Sampled Microcontroller$14.191Sampled LED$0.144,300$ PCBTBD2 Resistors & Capacitors $0.10-$ $48.49 UART$0.761Sampled PNP Transistors $0.8216$13.12 Total$ The University of Central Florida Department of Electrical Engineering & Computer Science has provided the group with an endowment of $1,000 for the completion of this project.
How far are we?
What is our time line?
Obstacles The cube will be 16 x 16 x 16 Size of the cube Prototype didn't work Stellaris MCU Testing LEDs Time
Problems to be solved Image storage o 24 fps / (144 fpg * 2gig) = 12 sec of animation o Use another storage medium? o 2 gig partitions? How to select? o USB to Synchronous Serial Interface (SSI)?
Questions?