Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by:...

45
Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science at UCF

Transcript of Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by:...

Page 1: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Dynamic Animation CubeGroup 1

Joseph ClarkMichael AlbertsIsaiah Walker

Arnold Li

Sponsored by: Department of Electrical Engineering & Computer Science at UCF

Page 2: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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.

Page 3: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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: 50-104 F

• Working Humidity: 10-80%

• Working Voltage: AC 110V-230V

• Number of animations: 100

Page 4: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 5: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.
Page 6: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.
Page 7: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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.

Page 8: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

What software is required?

• Sprite implementation program to design the animations to be displayed on the cube.

• Cube operating code.

Page 9: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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.

Page 10: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

How does the DAC work?

Page 11: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

What LED driver to select?

Led Driver OutputsGrayScale

Control

BrightnessControl

ErrorDetecti

on

CostPer Driver

TLC59711 12 16-bit 7-bitNo $1.79

TLC5947 24 12-bit N/AYes $3.53

TLC5941 16 12-bit 6-bitYes $3.36

LT3754 16 12-bit 6-bitYes $6.07

Page 12: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 13: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Stellaris LM3S8962

• 32-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

Page 14: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

TLC5941 LED Driver• 1st 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

Page 15: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

TLC5941 LED Driver• 2 control lines per color

o Best way to ensure that ideal amount of frames per second were displayed

Page 16: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 17: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 18: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.
Page 19: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Layer Select

• 2nd PCB will contain the Stellaris

• Stellaris uses 16 GPIOs to control which layer is selected.

• Sends output to array of transistors on separate PCB

Page 20: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Layer Select• 3rd PCB will contain the layer select transistors• Transistors Receive Layer Select From MCU• Output goes directly to layer 0 through 15

Page 21: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 22: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Displaying Images

• Data received by drivers

• Held in internal registers until latch signal received

Page 23: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 24: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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 stateo 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) + 256 x 20mA (LEDs) =

5.318 A ± 10%

Page 25: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Multiplexing

• Almost all LED cubes rely on persistence of vision.

• An entire image is made up of 16 layersImpractical to light up all 16 layers at once as we would need 4000+ 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

Page 26: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Multiplexing

Page 27: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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.

Page 28: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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 bulbo 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

Page 29: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Color Wheel

Page 30: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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))

Page 31: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 32: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 33: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 34: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 35: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 36: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Displaying Animations

Page 37: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Class Diagram

Page 38: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

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

Page 39: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

What is the budget?Components Cost per piece # of pieces Total

LED Drivers $3.36 48 Sampled

Microcontroller $14.19 1 Sampled

LED $0.14 4,300 $602.00

PCB TBD 2 TBD

Resistors & Capacitors

$0.10-$0.20 128 $48.49

UART $0.76 1 Sampled

PNP Transistors

$0.82 16 $13.12

Total $664.10

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.

Page 40: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

How far are we?

Page 41: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

What is our time line?

Page 42: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Obstacles

• The cube will be 16 x 16 x 16• Size of the cube

• Prototype didn't work

• Stellaris MCU

• Testing LEDs

• Time

Page 43: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Problems to be solved

• Image storageo 24 fps / (144 fpg * 2gig) = 12 sec of animationo Use another storage medium?o 2 gig partitions?

How to select?o USB to Synchronous Serial Interface (SSI)?

Page 44: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.
Page 45: Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li Sponsored by: Department of Electrical Engineering & Computer Science.

Questions?