LED Light Show Crititcal Design Review
Download
Report
Transcript LED Light Show Crititcal Design Review
LED Light Show
Critical Design Review
Team Lit
Michael Hatt
Scott Butler
Kristin Haeusler
Brock Smith
System Overview
•
We are using a Spartan 3 controller board to output a
light pattern to 4 LED boards.
Each board contains 16 sets of red, green, and blue
LEDs
Each LED will have 8 bit varying levels of brightness
(256 shades). Theoretically each set of 3 LEDs will be
able to display 256^3-almost 17 million colors! (if the
color blends, BIG if)
2 modes:
1. Manual-outputs one of several stored patterns chosen
by the user.
2. Serial-mode-FPGA takes input from the computer
and outputs a corresponding pattern to the LED
boards.
System Limits
The Limit of the system is
the shift registers on the
LED boards
These boards run reliably
at a speed of 5 MHz
The latch rate will then
depend on the amount of
boards daisy chained
together.
For 4 boards the latch rate
is 26 kHz
We will go on to the
section of the pattern for
each LED at 101 Hz, this
the is the “refresh rate”
All of these frequencies
are much faster than the
eye can register change
Manual Mode
User will choose between three pre-determined
patterns.
Only the initial states of the LEDs will be stored
on the FPGA. The rest of the pattern will be
determined by feeding the output through various
logic gates and looping the new pattern back into
the RAM.
This way the pattern will change every cycle.
Serial-Mode
FPGA will take RS-232 input, convert into
usable data, and output corresponding
pattern to LEDs.
The user programs a pattern from a PC, we
will use the hyper terminal but it could be
expanded, which is then sent through a RS232 port to the FPGA.
System Block Diagram
Data
Clock
Latch
N/C
12
13
RCLK
G
SRCLK
SRCLR
SE R
RCLK
G
SRCLK
SRCLR
74HC595
11
10
14
12
13
11
10
SE R
RCLK
G
SRCLK
SRCLR
74HC595
N/C
14
12
13
11
10
SE R
RCLK
G
SRCLK
SRCLR
SE R
RCLK
G
74HC595
N/C
14
12
13
11
10
14
12
13
SRCLK
SRCLR
74HC595
N/C
N/C
SE R
RCLK
G
SRCLK
SRCLR
SE R
RCLK
G
SRCLK
SRCLR
74HC595
11
10
14
12
13
11
10
14
12
13
11
10
SE R
74HC595
N/C
N/C
14
QH
QA
QB
QC
QD
QE
QF
QG
QH
QH
QA
QB
QC
QD
QE
QF
QG
QH
QH
QA
QB
QC
QD
QE
QF
QG
QH
QH
QA
QB
QC
QD
QE
QF
QG
QH
QH
QA
QB
QC
QD
QE
QF
QG
QH
QH
QA
QB
QC
QD
QE
QF
QG
QH
QH
QA
QB
QC
QD
QE
QF
QG
QH
9
15
1
2
3
4
5
6
7
9
15
1
2
3
4
5
6
7
9
15
1
2
3
4
5
6
7
9
15
1
2
3
4
5
6
7
9
15
1
2
3
4
5
6
7
9
15
1
2
3
4
5
6
7
9
15
1
2
3
4
5
6
7
N/C
N/C
N/C
N/C
N/C
N/C
N/C
Schematic of LED boards
74HC595
Data
Clock
Latch
FPGA Internal Schematic
Modularity
Parts repeated for each set of boards:
– Reader,Manual Writer, Switchers, RAM, LED
controller, Pattern changer
Single-use parts:
– State Machine, Stored patterns, RS-232
Controller, Computer Writer, LCD Controller
State Machine
Takes an input from user keypad
– User will press button to change state (mode)
Outputs the current state to nearly every
block of the controller
6 states: 3 pre-programmed patterns, serial
mode, initialization, and reset
LCD controller
Inputs: Current State
Outputs: Sends data to LCD
Outputs data in ASCII format to display the
current mode on the LCD, according to the
State Machine.
Dual-Port RAM
Inputs: RAM control signals
Outputs: Data being read to LED board controller
We are using two 1x1536 bit chunks of RAM (4 boards*48
LEDs/board *8 bits/LED =1536) to store patterns which are output to
LEDs.
Each byte of data determines the intensity/shade of each LED
One half of the RAM will read in data while the other simultaneously
reads out data, as determined by the switchers.
Using dual-port RAM allows us to create manual-mode patterns, via
the feedback loop, without having to use massive amounts of RAM to
store a sustained pattern.
LED controller
Inputs: Pattern data from RAM
Outputs: Clock, Serial data and latch signal
Takes the data from RAM.
Determines if LED should get a high or low and
then shifts out the correct bit.
After shifting 192 bits it triggers a latch to display
the pattern
After 256 cycles it moves to the set of data
The LED value determines the fraction of the 256
cycles that the LED will be turned on, so as to
give the appropriate shade
Data Reader
Inputs: Clock, Reset
Outputs: Address and count information
Tells RAM the address of the data that is to
be sent to the LED board controller
When the data is ready, a “ready” signal
will also be sent to the controller
Cycles through 192 addresses, then returns
to first address
Example VHDL
Schematics from VHDL
Manual-mode Writer
Inputs: Pre-programmed initial-state pattern,
current state, logical pattern changer.
Outputs: Address info, write enable, data from
input
When activated by state machine, the writer takes
pre-programmed pattern, then after one cycle,
takes the altered pattern from the logic changer,
and writes it into the RAM.
Main purpose is to write new data to RAM, while
other half of RAM is being displayed
Serial-Mode Writer
Inputs: RS-232 data, state machine
Outputs: Address, data, write enable
Takes converted RS-232 input and writes it
into the RAM when activated by the state
machine
RAM Input Switcher
Inputs: Data reader outputs, manual and
serial-mode writer outputs
Outputs to RAM
Routes all data and signals to the
appropriate half of the RAM
Continuously switches between the two
halves of the RAM at the correct time
RAM output switcher
Inputs: Outputs of RAM
Outputs: Data and control signals being read to
LED controller
Takes output data from RAM and outputs data
from one of the two halves of RAM, in an
alternating manner.
Synchronous with the input switcher to assure that
one chunk of RAM is reading in data while the
other chunk is outputting data.
Stored Data
No inputs
Outputs: Data to be written to RAM
Stores initial data patterns for first cycle of
manual mode
Only stores 4*48 bytes of data
The entire duration of the pattern is
determined by this initial data
Pattern Changer
Inputs: Current State, Data being read to
LED controller
Outputs: Changed data
Takes each byte being read out and changes
it using pre-determined logic circuitry
Prepares altered data for next cycle as
previous data is being read out
RS-232 controller
Inputs: Data from RS-232 port
Outputs: Data(in bytes)
Communicates with the RS-232 port to
gather data from the computer.
Converts the input data to a form that is
ready to be written into RAM.
Parts List
Spartan-3 Development Kit
PCBs(provided)
LEDs(3840)
Optrex DCM 16433 LCD (acquired)
2 Power Supplies(5V @ 40 A)
Resistors,etc.
Shift registers
Grand Total:
Electricity bill to power this wall:
$100
~$650.00
~$800
$7.00
~$400
~$80
~$80
$2117
too much
Schedule
Goals
Milestone 1:
– Manual Mode working
Outputs changing
patterns to board
Intensity varies
– LCD working
Milestone 2:
– Reading data from RS-
232 port
– Mode switching works
EXPO:
– Serial Mode working
– Can easily switch
between modes
– Change patterns with
keypad
– Documentation
complete
Division of Labor
Scott
Kristin
– RS-232 controller
– Pattern changer
– RAM controllers
– Stored pattern
– RAM controllers
Michael
– RAM controllers
– LED controller
Brock
– LCD controller
– state machine
– switchers
?