Functional Specifications

advertisement
University of Portland
School of Engineering
5000 N. Willamette Blvd.
Portland, OR 97203-5798
Phone 503 943 7314
Fax 503 943 7316
Design
Team Stolen Pie
Project LED cube: An Interactive 3D
MEMS Display
Team Members:
Patrick Bloem (Fall Team Lead)
Jess Tate (Spring Team Lead)
Devin Pentecost
Caleb Pentecost
Industry Representatives:
TBD
Faculty Advisors:
Dr. Osterberg
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
Revision History
.
.
Rev.
Date.
0.1
5 Nov 2011.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
Author
Patrick Bloem
0.2
8 Nov 2011
Team
0.3
0.4
0.45
0.5
0.51
0.6
9 Nov 2011
9 Nov 2011
9 Nov 2011
10 Nov 2011
10 Nov 2011
10 Nov 2011
Devin Pentecost
Caleb Pentecost
Devin Pentecost
Jess Tate
Jess Tate
Patrick Bloem
0.9
10 Nov 2011
Jess & Patrick
0.95
15 Nov 2011
Team
1.0
17 Nov 2011
Jess
UNIVERSITY OF PORTLAND
PAGE II
Reason for Changes
Initial draft. Wrote Design overview
and development plan details. Left
notes for team members in
highlighted text.
Wrote Approach, Testing Plan,
Milestone, and Risks sections.
Completed the Software Section.
Wrote user interface section.
Fixed the Block Diagram.
Added Digital System and MOSIS.
Fixed top level diagram.
Proofread design section, fixed
captions.
Added intro + conclusion and did
final proofreading.
Revised document with faculty
advisor input
Updated Diagrams
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
Table of Contents
.
.
Team Stolen Pie ........................................................................................................................
1
.
.
Introduction ...............................................................................................................................
9
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE III
Design..................................................................................................................................... 10
Architecture ..................................................................................................................... 10
Operating Modes ............................................................................................................. 10
Primary Simulation Mode ........................................................................................ 10
Secondary Attract Mode........................................................................................... 10
12 V DC Power Supply ............................................................................................ 11
MEMS Accelerometers ............................................................................................ 11
Mode Switch ............................................................................................................. 11
Microcontroller ......................................................................................................... 11
Oscillator ................................................................................................................... 12
Sequential Access Memory (SAM) MOSIS Integrated Circuit (IC) ..................... 12
Iterator MOSIS IC .................................................................................................... 12
Drivers/Inverting Drivers ......................................................................................... 12
8x8x8 Cube Array .................................................................................................... 12
Software Component ...................................................................................................... 13
LEDs.......................................................................................................................... 13
Simulation Mode ...................................................................................................... 14
Attract Mode ............................................................................................................. 14
Sending State ............................................................................................................ 14
Pseudo-Code ............................................................................................................. 14
User Interface Component .............................................................................................. 15
Digital Systems................................................................................................................ 16
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
MEMs Accelerometer
.............................................................................................. 16
.
.
Arduino Microcontroller
.......................................................................................... 17
.
.
555 Timer ..................................................................................................................
18
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE IV
Current Drivers ......................................................................................................... 19
LED Cube ................................................................................................................. 20
Integrated Circuits ........................................................................................................... 21
SAM MOSIS IC ....................................................................................................... 22
Iterator MOSIS IC .................................................................................................... 31
MOSIS Chip Backups (Macro Models) .................................................................. 36
Approach ................................................................................................................................ 37
System Test Plan.................................................................................................................... 37
Test #1: Power Up.......................................................................................................... 37
Test #2: Simulation mode display .................................................................................. 38
Test #3: Attract mode display ......................................................................................... 38
Test #4: Mode switch is toggled ..................................................................................... 38
Development Plan.................................................................................................................. 39
Project Proposal ........................................................................................................ 39
Functional Specifications ......................................................................................... 39
MOSIS Chip Design and Macro Model Creation................................................... 39
Software Frameworking ........................................................................................... 40
Design Document ..................................................................................................... 40
MOSIS Fabrication ................................................................................................... 40
Construct Cube ......................................................................................................... 40
Microcontroller Programming ................................................................................. 40
Assemble Circuits ..................................................................................................... 40
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
. ......................................................................................................... 40
Test and Debug
.
. Display............................................................................................. 40
Founder’s Day
.
.
Assumptions...........................................................................................................................
41
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE V
Risks ....................................................................................................................................... 41
Milestones .............................................................................................................................. 41
Final Budget .................................................................................................................... 42
Conclusions ............................................................................................................................ 44
Appendix A: Software Psuedo-Code................................................................................... 45
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
List of Figures.
.
. diagram............................................................................................9
Figure 1. LED cube physical
.
. system block diagram. .............................................................. 10
Figure 2. LED cube high-level
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE VI
Figure 3. System Block Diagram. ............................................................................................... 11
Figure 4. The Arduino Microcontroller Software flow chart. .................................................... 13
Figure 5. System Level Schematic. ............................................................................................. 16
Figure 6. Triple-Axis MEMs Accelerometer.............................................................................. 17
Figure 7. Arduino Duemilanove Microcontroller Board. .......................................................... 18
Figure 8. 555 Timer IC in Astable Mode. ................................................................................... 19
Figure 9. LED Cube Abreviated Schematic. .............................................................................. 20
Figure 10. Full Cube Electrical Schematic. ................................................................................ 21
Figure 11. SAM MOSIS Top Level Diagram. ........................................................................... 23
Figure 12. Full SAM MOSIS B2Logic Circuit Schematic. ....................................................... 24
Figure 13. A 0-to-31 Ripple Carry Counter. ............................................................................... 25
Figure 14. 5-to-32 Decoder.......................................................................................................... 26
Figure 15. Abbreviated D Flip Flop Array. ................................................................................ 27
Figure 16. 32-to-1 Multiplexer. ................................................................................................... 29
Figure 17. Timing diagram showing column number written in and displayed. ...................... 30
Figure 18. Timing Diagram showing complement of column numbers. .................................. 30
Figure 19. SAM MOSIS layout consisting of about 1500 gates. .............................................. 31
Figure 20. Iterator MOSIS Block Diagram................................................................................. 32
Figure 21. Top Level Iterator B2Logic Schematic. .................................................................... 33
Figure 22. 0-to-32 5-bit Synchronous Counter. .......................................................................... 34
Figure 23. Timing Diagram from Iterator MOSIS simulation................................................... 35
Figure 24. Iterator MOSIS Layout consisting of about 100 gates. ............................................ 36
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
Figure 25. Overall development
process..................................................................................... 39
.
.
.
.
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
UNIVERSITY OF PORTLAND
REV. 1.0
SCHOOL OF ENGINEERING
PAGE VII
CONTACT: PATRICK BLOEM
.
.
.
.
List of Tables .
.
.
Table 1. Milestones. .....................................................................................................................
41
.
.
Table 2. Final Budget ...................................................................................................................
43
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
UNIVERSITY OF PORTLAND
REV. 1.0
SCHOOL OF ENGINEERING
PAGE VIII
CONTACT: PATRICK BLOEM
.
.
.
.
Introduction .
.
. is an interactive micro-electro-mechanical system (MEMS)
The LED Cube project
accelerometer display .on a 3 dimensional cube of LEDs. This project is an example of
working with MEMS. sensors to sense real-time data and display it on an electrically
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 9
controlled system. The purpose of this project is to create an enjoyable toy while gaining
valuable experience in custom IC design and working with complex embedded digital
systems.
Challenges in designing the LED Cube included schematic capture software limitations,
integration of complex system components, and embedded software programming. One
major problem experienced in the design was the limitation of B2Logic’s maximum circuit
size. In designing the custom ICs for this project, one was too large to be created in a single
B2Logic circuit. Other challenges were overcome by careful design practices and creative
use of engineering principles. The intended end result of the project can be seen in Figure 1.
Note that rather than large spheres in the diagram will be replaced with small LEDs, allowing
the user to see the LEDs through out the center of the cube.
Figure 1. LED cube physical diagram.
It is assumed that the reader of this document has a technical background in electronics and
digital system design. This document contains: An overview of the design (including details
about each component), detailed discussions of the design and the approach taken to come up
with the design. Finally, this document contains project management details, including
milestones and the final budget.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
Design
.
.
The following sections describe
an overview of how each component is interfaced, and details
.
for each individual component.
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 10
Architecture
Figure 2. LED cube high-level system block diagram.
The system can be thought of as containing three major components: sense, process, and
actuate. A block diagram of the very high level system can be seen in Figure 2. Each major
component is comprised of smaller components, which will be described below. The system
in greater detail can be seen in Figure 3.
Operating Modes
There are up to two operating modes, one of which is secondary. These operating modes
will be selectable via a switch.
Primary Simulation Mode
The LED cube system will have one mode of operation, called Simulation Mode, in
which acceleration is detected and used to illuminate the LEDs in the direction of
forces acting upon the cube. For example, if the cube is idle, the bottom of it will be
illuminated because of acceleration due to gravity, and if the cube is rotated, the LEDs
corresponding to the changing acceleration vectors will light up. The proper operation
of this mode is the primary concern of this project.
Secondary Attract Mode
The LED cube system may have an additional mode of operation which has no user
interaction. In this mode, called Attract Mode, preset animations will play, in order to
display interesting moving patterns on the LED cube. This mode will be entirely
secondary and will be implemented only if time allows.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 11
Figure 3. System Block Diagram.
Each component seen in Figure 3 will be described in overview below:
12 V DC Power Supply
This power supply will provide 12 V DC to the components that require them,
including the Microcontroller and the current drivers. All other components will run
off of the 5 V regulated source by the Microcontroller.
MEMS Accelerometers
The accelerometers are the primary component of the sense design block. Using a
triple-axis single IC accelerometer, the force in each direction (X, Y, and Z) will be
measured and converted to an analog voltage. These analog voltages will be output
from the accelerometer ICs, which can be converted to a digital signal and used to
gauge the acceleration in each direction.
Mode Switch
This switch will be added if attract mode is implemented, and will be used to toggle
between attract and simulation modes.
Microcontroller
The microcontroller used in this project is the Arduino Duemilanove, referred to as
Arduino in this document. It converts the analog output of the sense block into an
easy-to-process digital format (using an onboard ADC). It takes these data, which are
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
vectors of acceleration
in three directions, and uses them to compute which LEDs
.
should be activated
. in the current moment. It indicates which LEDs are on by
outputting several
. signals to the digital components of the process block of the system,
as can be seen in. Figure 3.
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 12
Oscillator
The oscillator in this system will be a 555 timer. This oscillator will provide the
master clock for use in the digital components of the system.
Sequential Access Memory (SAM) MOSIS Integrated Circuit (IC)
There are two identical custom-designed memory MOSIS chips used in this system.
The purpose of these chips is to save information on which LEDs should be on at any
time, as determined by the microcontroller. Two chips are required due to limitations
in the circuit simulation software used to build them, allowing only 256 memory
elements in a single design. The presence of these memory arrays allows the
microcontroller to continue to compute information without having to continuously
output the current LED data, instead just outputting it long enough to clock it into
the memory arrays.
Iterator MOSIS IC
There are two identical custom-designed Iterator MOSIS chips used in this system.
The purpose of these chips will be to continuously cycle through LEDs
on the
cube. These signals will be sent to the Display block of the system, effectively being
the output of the Process block.
Drivers/Inverting Drivers
The noninverting high-current drivers send signals directly to the LED anodes,
while the inverting high-current drivers send signals to the LED cathodes. When a
given noninverting driver is outputting a logical high and its corresponding inverting
driver outputs a logic low, a voltage drop occurs across the LED and current may
flow. Since it requires a fairly large (~20 mA) of current to make an LED emit enough
light to visible, these drivers may source or sink as much as 300 mA, allowing them to
drive multiple LEDs each.
8x8x8 Cube Array
This is the primary portion of the Display block of the system. This is the cube itself,
and is what the user will interact with directly. It consists of 512 LEDs arranged in an
8x8x8 cube formation.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
Software Component.
.
The software programmed
onto the Arduino Microcontroller is a major component of
.
the Process block
. of the system. This component, depending on settings, will compute
the state of the cube.
. The cube is stored as a three dimensional array of LEDs within
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 13
the program. This software flow chart is modeled in Figure 4 below.
Figure 4. The Arduino Microcontroller Software flow chart.
The main components shown are described in detail below.
LEDs
The LED data structure used by the software contains several components – vector
positions relative to the center of the cube, a two dimensional mapping of the position,
and the LED’s actual position within the cube. To calculate the vector positioning, the
following formula is used:
๐‘ฃ๐‘œ = ๐‘ฃ๐‘‘ −
UNIVERSITY OF PORTLAND
๐‘›−1
2
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
.
๐‘ฃ๐‘œ. = ๐‘ฃ๐‘Ž๐‘™๐‘ข๐‘’ ๐‘ก๐‘œ ๐‘๐‘’ ๐‘ ๐‘ก๐‘œ๐‘Ÿ๐‘’๐‘‘ ๐‘“๐‘œ๐‘Ÿ ๐‘กโ„Ž๐‘’ ๐‘‘๐‘–๐‘š๐‘’๐‘›๐‘ ๐‘–๐‘œ๐‘› (๐‘ฅ, ๐‘ฆ, ๐‘ง)
. ๐‘ฃ = ๐ฟ๐ธ๐ท′๐‘  ๐‘๐‘œ๐‘ ๐‘–๐‘ก๐‘–๐‘œ๐‘› ๐‘–๐‘› ๐‘กโ„Ž๐‘Ž๐‘ก ๐‘‘๐‘–๐‘š๐‘’๐‘›๐‘ ๐‘–๐‘œ๐‘›
. ๐‘‘
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
Where:
REV. 1.0
PAGE 14
๐‘› = ๐ฟ๐ธ๐ท๐‘  ๐‘๐‘’๐‘Ÿ ๐‘‘๐‘–๐‘š๐‘’๐‘›๐‘ ๐‘–๐‘œ๐‘› (8 ๐‘–๐‘› ๐‘œ๐‘ข๐‘Ÿ ๐‘๐‘Ž๐‘ ๐‘’)
This vector is then mapped to the LED’s layer, so that it can be easily sent to the
MOSIS SAM. The LED’s actual x, y, and z positions are found by where we look for
the LED in the 3D array of LEDs that make up the cube.
Simulation Mode
If the device is running in Simulation mode, the program first ensures that it is time to
render the next frame. If so, the data from the Accelerometer is read and stored in a
way that can be used for the simulation’s calculations. After storing the acceleration
vector from the Accelerometer, that information is used to compute the state of the
LED cube. After the frame is calculated and stored in the 3D LED array, it is sent to
the MOSIS SAM for storage.
Attract Mode
If the device is in Attract mode, we first determine if it is time to send another frame to
the MOSIS SAM. If this is the case, we check to see if it is time to move on to another
animation in the cycle. Each animation will have a predetermined running time, and
are in a particular, non-important order. If the animation’s running time has run out,
the next animation in the cycle is set up and ran. After determining which animation to
compute, the LED’s current frame state is calculated, and saved to the 3D LED array.
Afterwards, the frame is sent to the MOSIS SAM for storage and eventually
rendering.
Sending State
The LED cube, when ready to be sent to the MOSIS SAM, is clocked into the 256 bit
memory arrays 8 bits at a time. Because the MOSIS memory is designed to not need
frame information at all times, the software is able to spend as much time as it needs to
compute frames for the Simulation and Attract modes, and then send the state to the
MOSIS SAM when necessary.
Pseudo-Code
A pseudo-code sample of the program for use in the Arduino can be found in
Appendix A.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
User Interface Component
.
. has been designed primarily around the cube itself. Once the
The user interface
.
accelerometer data
. has been processed, it will be necessary to display that information
to the user. This
. will be done via the LEDs that make up the cube itself. All
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 15
interactions with the device are done via manual manipulation of the device (rotating
the cube) and the use of switches.
All of the output of the device will be detected by the user through the use of
persistence of vision. The LEDs are arranged in a full 8x8x8 configuration. These will
display a three-dimensional image to convey whatever information the user is
intended to see. The illuminated LEDs will represent the “water” in the water
simulation, while the disabled ones are to be regarded as empty space. As a secondary
goal, the LEDs will simply display the attract mode as described in the microcontroller
section.
Once the device has been properly powered, and the ON/OFF switch is set to ON, the
device will begin functioning. To alter the state of the device, the user must apply
acceleration to it. This can be done by either moving the cube, or by rotating (and
allowing it to experience the acceleration of gravity from a different angle). Should the
secondary functionality of attract mode be implemented, a different switch will be
used to toggle between simulation and attract modes.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
Digital Systems
.
.
The entire .project consists of a single digital system composed of many
components.and subsystems. These subsystems include the microcontroller, the
MEMs accelerometer,
the 555 timer, the MOSIS chipset, the current drivers, and
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 16
the LED Cube. The microcontroller system, described previously, gathers,
processes, and interprets the MEMs accelerometer data in order to determine
which LEDs to illuminate for a given frame. This is then passed to the MOSIS
chipset, which stores and repeatedly iterates through the frame until the
microcontroller loads another. These output signals from the MOSIS chips are
sent to current drivers which illuminate the LEDs. Figure 5 shows the detailed
digital system schematic.
Figure 5. System Level Schematic.
Each of the components will be discussed in more detail in the following sections.
MEMs Accelerometer
The team has chosen the Freescale MMA7341L triple-axis accelerometer, premounted on small carrier PCB with a 3.3 V voltage regulator by Pololu. With a
sensitivity range of 3g’s and a convenient pin spacing of 0.1 inches, this MEMs
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
. fit the project requirement. Figure 6 shows the accelerometer board,
accelerometer
.
along with a.quarter dollar for size comparison.
.
.
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 17
Figure 6. Triple-Axis MEMs Accelerometer.
In order to use the accelerometer, a voltage range of 2.2V to 16V must be applied
to the VIN pin, with the GND pin grounded. Since the Arduino Microcontroller is
a 5V system, 5V is applied to VIN. The onboard voltage regulator steps down the
voltage to 3.3V, which is outputted on the 3V3 pin as a reference voltage or to
supply other 3.3V components. The X, Y, and Z pins output the acceleration
experienced along the corresponding axis as a voltage level from 0 to 3.3V, with
0g’s ideally centered at 1.65V. However, due to inconsistencies with the MEMs
circuit, each acceleration pin must be calibrated as they may have a DC offset. The
GSEL pin is used to select the sensitivity range as either 3g’s or 11g’s. In this
project, the decision was made that 3g’s is sufficient, so the GSEL pin is left
unconnected as it is internally pulled low to default to 3g’s. The TEST pin is used
by the board manufacture to test the solder connections and will be left
unconnected. The 0G pin is an output pin which outputs high when the board is in
free-fall, and this output will not be used since no action will be taken different
from usual in a state of free fall.
Arduino Microcontroller
The Arduino is a microcontroller board based on the ATmega328 microcontroller.
Figure 7 shows the Arduino board. This particular microcontroller was chosen
because of its convenient onboard analog-to-digital converter and easy to use
interface. The board can be programmed by simply writing the code in the opensource Arduino Integrated Development Environment (IDE) on a computer,
plugging the board in via USB to the computer, and pressing the upload button.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 18
Figure 7. Arduino Duemilanove Microcontroller Board.
The Arduino comes with 14 digital I/O pins and 6 analog input pins. It operates off
of 5V, and can either be powered via the USB cable, or a 7-12V DC voltage
source. For this project, the 5V power out pin will supply the accelerometer and
MOSIS chips with power, while the buffers will be supplied directly via the 12V
DC power supply.
The accelerometer X, Y, and Z signals will be connected to the Analog In pins 0,
1, and 2. Digital I/O Pins <7:0> will be used as the data pins for the MOSIS chips,
with pin 8 and 9 for the Data Strobe pins for the two SAM MOSIS chips. Pin 10 is
cmemrstF for the SAM MOSIS chips, while pin 11 is the crstF for the SAM
MOSIS Chips and the rstF for the Iterator MOSIS chips. Pin 12 is the memrstF for
the SAM MOSIS chips. Finally, pin 13 is used for the mode select toggle switch.
See the Integrated Circuits section for the meaning of MOSIS pins.
555 Timer
The 555 Timer IC is used to provide the clock signal for the MOSIS chipset. In
order to achieve a continuous stream of rectangular pulses, the 555 Timer must be
used in Astable mode, with connections as shown the Figure 8. The values of R1,
R2, and C were calculated to provide the frequency required with an approximate
50% duty cycle. First, the decision was made to have a LED Cube refresh rate of
approximately 100 Hz in order to achieve persistence of vision. While 60 Hz is an
acceptable refresh rate, the decision was made to choose 100 Hz after
experimenting with refresh rates and choosing a reasonable refresh rate for
persistence of vision. Then, since 32 LEDs must be cycled through for every
refresh, the 555 Timer frequency is:
1 ๐‘†๐‘’๐‘๐‘œ๐‘›๐‘‘
1 ๐น๐‘Ÿ๐‘Ž๐‘š๐‘’
1 ๐‘†๐‘’๐‘๐‘œ๐‘›๐‘‘
∗
=
= 3.2 ๐‘˜๐ป๐‘ง
100 ๐น๐‘Ÿ๐‘Ž๐‘š๐‘’๐‘  32 ๐ฟ๐ธ๐ท๐‘  3200 ๐ฟ๐ธ๐ท๐‘ 
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 19
Figure 8. 555 Timer IC in Astable Mode.
The equations used to solve for the R1, R2, and C values are:
1
๐‘“=
ln(2) ∗ ๐ถ ∗ (๐‘…1 + 2๐‘…2)
๐ป๐‘–๐‘”โ„Ž = ln(2) ∗ (๐‘…1 + ๐‘…2) ∗ ๐ถ
๐ฟ๐‘œ๐‘ค = ln(2) ∗ ๐‘…2 ∗ ๐ถ
Solving for a frequency of approximately 3.2kHz and a duty cycle close to 50%,
using commonly available resistor and capacitor values yields R1 = 1kโ„ฆ,
R2=100kโ„ฆ, and C = 2200pF, as seen in Figure 7. These values precisely give a
frequency of 3.26kHz with a duty cycle of 50.2%, well within an acceptable range.
Current Drivers
Two types of current driver IC’s are used in the project. These are non-inverting
UDN2981’s and inverting ULN2803’s. In order for an LED to appear bright,
particularly when operating with a low duty cycle, it requires a considerable
amount of current which the CMOS technology MOSIS chips are unable to
directly provide. Therefore, it is necessary to use current drivers to provide the
required current. In this project, Eight non-inverting UDN2981 driver IC’s, each
with 8 buffers for a total of 64, drive the LED anodes for each column. Two
inverting ULN2803 drivers are used as the current sinks for the LED common
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
cathodes on.each level. In addition, resistors are used to prevent too much current
from damaging
. the LEDs.
LED Cube
.
.
Electrically,.the LED cube is a two dimensional array of LEDs that are physically
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 20
placed into a cube formation. Figure 9 shows the abbreviated electrical schematic
of the LED array, while Figure 10 displays the full schematic. Due to limitations
discussed in the Integrated Circuits section, the array is divided into two halfarrays of 256 LEDs each.
Figure 9. LED Cube Abreviated Schematic.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 21
Figure 10. Full Cube Electrical Schematic.
With this design, the two halves of the cube are electrically isolated from each
other. One MOSIS SAM and Iterator control one half of the cube, while the other
MOSIS SAM and Iterator control the other half. Since the L signals, which control
the common cathode on each level of the cube, are driven through the inverting
buffers, they are active low. In one of the cube halves, at any given instant in time,
only one of the sixty-four columns is at high voltage, while any of the eight levels
may be low. This results in the potential for eight LEDs per half, or sixteen LEDs
total, to be on at any given instant. However, by iterating through the entire cube at
least 60 times per second, it is possible to use the phenomenon of persistence of
vision to make it appear to the human observer that all 512 LEDs are on.
Integrated Circuits
Two custom Integrated Circuits were designed for this project. These IC’s are
sponsored by the MOSIS Educational Program and will be fabricated by the
MOSIS foundry. The two custom IC’s are the Sequential Access Memory (SAM)
and Iterator MOSIS. Due to limited I/O pads for the iterator and size constraints in
B2Logic.blt (the schematic capture and simulation program used in the IC gate
level design, for the SAM, two identical IC’s of each type will be used in the final
circuit. This means that with two designs and two copies of each, a total of four
MOSIS IC’s will be required.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
SAM MOSIS IC
.
. more complicated of the MOSIS chips is the Sequential Access
The larger and
.
Memory (SAM).
. This IC’s purpose is to store the state of the LEDs in the cube in
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 22
an array of D flip flops. Due to circuit size limitations with B2Logic.blt, the
originally planned 512 bit memory had to be split into two identical 256 bit
memory chips.
Data is written into the array sequentially, 8 bits at a time, via the microcontroller.
To write in the 8 bits, the microcontroller puts the data onto D<7:0>, and then fires
the DS, or Data Strobe signal for the correct SAM. The DS signal increments an
internal counter to clock in the data into the correct flip flops in the array. Once the
8 bits have been written in, the microcontroller can change the values of D<7:0>,
and fire the DS signal to write into the next 8 bits of the array. This is completed
sequentially 32 times in order to write in an entirely new frame into the memory.
Operating independently of the write process, 8 bits at a time are read out through
the L<7:0> outputs at a time. At each rising edge of the Clk signal from the 555
Timer, the next 8 bits are read, proceeding through the array sequentially. These
outputs, after being driven by the inverting buffers, are used to control the
common cathodes for each level of the cube. Additionally, the counter outputs
C<4:0> are used as output pins. There are meant to be left unconnected, and are
there for a backup. Should for some reason the Iterator MOSIS not work, these C
outputs can be used to control discrete TTL decoder ICs.
There are 3 separate reset signals for the SAM MOSIS chip, each of which is
active low. Input crstF resets the sequential output counter, while input cmemrstF
resets the sequential input write counter, and memrstF resets the data in the
memory array itself. At the start of normal operation, each of these resets should
be set low to ensure that operation begins in a known state. Each of these resets are
asynchronous.
Figure 11 displays the block diagram of the SAM MOSIS chip, while Figure 12
shows the B2Logic.blt schematic of the digital circuit.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 23
Figure 11. SAM MOSIS Top Level Diagram.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 24
Figure 12. Full SAM MOSIS B2Logic Circuit Schematic.
It is clear from the top level schematic that the circuit is quite large. The following
sections examine each major component of the MOSIS chip.
32-to-1 Counter
Two 32-to-1 counters are used in the SAM MOSIS design. The first is used for the
sequential writing of data into the array, while the sequential output counter is
used to iterate through the array for the output data. Due to maximum circuit size
restraints in B2 Logic, the counters for the SAM MOSIS were designed as a
simple, 5-bit ripple carry counter with an asynchronous reset. Figure 13 shows the
B2 schematic of one of the counters. In particular, it is the counter used for the
sequential write.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 25
Figure 13. A 0-to-31 Ripple Carry Counter.
5-to-32 Decoder
The 5-to-32 decoder is used in the SAM MOSIS to decode the 5-bits of the
counter used for sequential write. The 32 outputs of the decoder are used as the
select bits for the multiplexers in the D Flip Flop array. Figure 14 shows the 5-to32 Decoder used in the SAM MOSIS.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 26
Figure 14. 5-to-32 Decoder
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
.
D Flip Flop Array
.
. array is the main component of the SAM MOSIS chip. It consists
The D Flip Flop
.
of 256 D flip flops, as well as 256 2-to-1 multiplexers. The multiplexer
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 27
corresponding to each flip flop is used to determine whether a new data bit is
written in, or the old value currently stored in the flip flop remains. The select bits
for the multiplexers come from the 5-to-32 decoder, such that only one of the
thirty-two columns is written in at a time. Each column has eight levels, so 8 bits
are written into the array at a time. Figure 15 is an abbreviated D Flip Flop array
schematic, showing the connections of the multiplexers. Note in the figure the DS
signal implicitly connects to every flip flop clock input, while memrstF connects
to every flip flop asynchronous reset input. Both of these signals run through a pair
of inverters as a buffer for each level. This is so that rather than having a fanout of
256, the maximum fanout is 32.
Figure 15. Abbreviated D Flip Flop Array.
32-to-1 Multiplexers
For each level of the cube, the flip flop array outputs a bus of 32 signals from the
32 flip flops. However, since only LED on a level is to be illuminated at a time,
these signals must multiplexed down to just one signal. This is accomplished by
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
the 32-to-1 multiplexers.
These multiplexers were hand design from the gate level
.
in order to be
. as compact as possible, as eight of them are required to fit in the
available B2Logic.blt
circuit space. In order to select which of the 32 signals is
.
passed through
. to the output, the five bits from sequential output counter are used
as the select. line. Thus, if the counter is at state 0, then each multiplexer would
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 28
pass input 0, which corresponds to column 0. If the counter is at state 31, then the
multiplexer passes input 31, or column 31. Each time the counter increments, the
next column is passed to the outputs, which illuminates the next set LEDs on the
cube. Figure 16 shows one of the eight 32-to-1 multiplexers used in the SAM
MOSIS.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 29
Figure 16. 32-to-1 Multiplexer.
Timing Diagrams
In order to simulate the SAM MOSIS and ensure proper functionality, test scripts
in the form of B2Logic command files were written and executed. One of the
resulting timing diagrams is present in Figure 17. For this test, the data written into
each column is the binary representation of the column number. Thus, the 8 bits of
column 0 are set to 0000_0000, while the 8 bits of column 31 are set to
0001_1111. This way, the outputs are equal to the counter state for that column,
making it simple to check that the outputs are correct. Then, as seen in Figure 18,
the complement of the previous state is written and outputted. In this figure, note
how the output levels are the opposite of the counter states.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 30
Figure 17. Timing diagram showing column number written in and displayed.
Figure 18. Timing Diagram showing complement of column numbers.
More simulations were completed to test all of the possible reset functionality.
However, in the interest of space, these timing diagrams are not included in this
document.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
SAM MOSIS Layout
.
. completion of the gate level design in B2Logic.blt, the circuit netlist
Following the
.
is converted.into the physical layout for fabrication on silicon. Figure 19 shows the
layout for the
SAM MOSIS as viewed in the layout CAD program L-Edit by
.
Tanner Research.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 31
Figure 19. SAM MOSIS layout consisting of about 1500 gates.
Iterator MOSIS IC
The Iterator MOSIS chip is the other chip in the MOSIS chipset for this project. It
acts as an iterator for the sequential iteration through the LED columns. The
Iterator MOSIS has just two inputs, a reset signal labeled rstF and a clock signal.
The reset is active low, and when low, sets all outputs to low. In addition, it resets
the synchronous onboard counter for the Iterator at the next rising clock edge. It is
imperative that the counter be synchronized with the output counter on board the
SAM MOSIS, which is accomplished by resetting the counters during
initialization.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
. outputs on the Iterator, labeled C0 through C31. Each output
There are 32
. the non-inverting current drivers, the anodes for the eight LEDs
controls, through
.
in each column.
. Thus with each clock cycle, one column of LEDs has the anodes
driven high..Since the level outputs from the SAM MOSIS control the cathodes of
the LEDs, each
. LED is controlled on both the cathode and anode side.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 32
Figure 20 is the block diagram of the Iterator MOSIS chip. Note how much
simpler it is when compared with the SAM MOSIS.
Figure 20. Iterator MOSIS Block Diagram.
Despite the Iterator’s simplicity, it uses every one of the available I/O pins, as it
has 32 outputs and two inputs, for 34 pins. With Vcc and Gnd as another two pins,
this makes 36. Due to limitations with the L-Edit software, the four corner pins are
unusable, which finish off the rest of pins available in the 40 pin dual inline
package.
Figure 21 shows the B2Logic.blt schematic of the Iterator MOSIS chip.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 33
Figure 21. Top Level Iterator B2Logic Schematic.
As space was not a concern when designing the Iterator IC, a more efficient
synchronous 5-bit 0-to-31 counter was developed. This counter does not wait for
changes in state to ripple through the flip flops like the counter used on the SAM
MOSIS, and therefore the delay between state changes is shorter. However, at the
low clock speed of approximately 3.25 kHz that the ICs will run at, the difference
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
is negligible.. Figure 22 is the B2Logic schematic of the 0-to-31 counter used on
the Iterator MOSIS
chip.
.
.
.
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 34
Figure 22. 0-to-32 5-bit Synchronous Counter.
Timing Diagrams
As with the SAM MOSIS, the Iterator was simulated with a test script. Figure 23
shows the results of one of the tests. Note that only one column output is high at a
time, and the active column proceeds sequentially. Also note when the counter is
reset, the iteration begins again at column 0. The brief glitches that appear to
happen every four state changes are due to imperfections in the counter, but are so
brief that they are negligible during operation of the cube, as the human eye will
be unable to perceive such short pulses.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 35
Figure 23. Timing Diagram from Iterator MOSIS simulation.
Iterator MOSIS Layout
As with the SAM MOSIS, the Iterator MOSIS netlist was converted into a
physical layout and viewed with the L-Edit software. Figure 24 shows the layout
of the Iterator MOSIS.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
.
.
.
.
.
.
.
.
.
REV. 1.0
PAGE 36
Figure 24. Iterator MOSIS Layout consisting of about 100 gates.
MOSIS Chip Backups (Macro Models)
The functionality of the MOSIS chip set will be loaded into a programmable logic
device in case of the unlikely event that one or both of the MOSIS chips do not
work. From the B2Logic netlist, it is possible to create the ABEL HDL code for
programming a Complex Programmable Logic Device (CPLD). However, past
projects have shown that for large and complicated MOSIS designs, such as the
SAM MOSIS, this is not always reliable. Therefore, while the Iterator should
easily be burned into a CPLD, it is likely that this will not work for the SAM
MOSIS. In order to create a backup chip macro model for the SAM MOSIS in the
event that a CPLD does not work, the team will write the Verilog code to upload
into a Field Programmable Gate Array (FPGA). FPGAs are typically more reliable
and should work as a backup for the SAM.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
Approach
.
.
This section provides information
on what design decisions were made on merit of good
.
design, rather than those that meet the requirements. This discussion will cover features that
. and why they were. The LED Cube idea remains relatively
were included or excluded,
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 37
unchanged from its inception at a high level. One of the main goals in this design is to
implement a Sense, Process, and Display project architecture. To this end, the design is
successful.
Details pertaining to the implementation of the project have changed from their original
design. One of the most integral component of the design is the memory MOSIS. The
preliminary design called for a single 512 bit sequential access memory, with discrete TTL
MSI decoder chips for the iteration through the columns of the cube. However, the decision
was made to implement the iteration on a separate MOSIS chip in order to save space and gain
more experience in custom integrated circuit design. During the B2Logic.blt implementation
of the SAM MOSIS, it quickly became apparent that the size of the design was too large to fit
in one B2Logic circuit file. In order to circumvent this issue, the decision was made to split the
512 bit memory into two identical 256 bit memory chips.
The microcontroller program contains much of the design effort. The functionality of the
microcontroller is to accept input from the accelerometer, process it, and control the MOSIS
chips. The design approach for the microcontroller tackles all of these tasks. The team chose a
microcontroller with a built-in analog-to-digital converter, and use software for input
processing. It was decided to design the software using the Arduino software because this
allows streamlined and structured C style code, with a USB programming interface. With this
selection, the team can focus on the actual programming algorithms as opposed to spending
time on the A-to-D interfacing. The algorithms used for both input processing and MOSIS
control were based on previous experience, allowing the team’s familiarity to play to its
advantage.
System Test Plan
This section describes the tests that will be performed to verify the overall functionality of the
project. The approach used in testing the system to test each component. The complete
functional LED display will represent each component in the system working properly.
Test #1: Power Up
In this test, the user turns on the system and it boots up normally.
Initial Conditions:
1. The system is not plugged in but otherwise ready to operate.
Steps to run the test case:
1. The user plugs the power supply into a standard 120V AC outlet.
2. The user waits for the boot up sequence to complete.
Expected behavior: The user views LEDs being illuminated based on
accelerometer data
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
. display
Test #2: Simulation mode
.
. user picks up the powered cube and moves it around, either by
In this test, the
.
rotation or translation.
.
Initial Conditions:
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 38
1. The system is powered on and no one handling it.
2. The mode switch is set to select simulation mode.
Steps to run the test case:
1. The user picks up the cube.
2. The user rotates or translates the cube.
Expected behavior: The user observes a change in illuminated LEDs reflecting
the movement of the cube.
Test #3: Attract mode display
In this test, the user observes patterns displayed on the cube during attract mode.
Initial Conditions:
1. The system is powered on and no one handling it.
2. The mode switch is set to select attract mode.
Steps to run the test case:
1. The user observes the cube.
Expected behavior: The user observes a change in illuminated LEDs in an
attractive pattern.
Test #4: Mode switch is toggled
In this test, the user changes operation modes
Initial Conditions:
1. The system is powered on.
Steps to run the test case:
1. The user changes the mode switch to opposite position.
Expected behavior: The device begins operating in the mode selected by the new
position of the mode switch.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
Development Plan
.
. the LED cube is illustrated in Figure 25.
The process used to develop
.
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 39
Project Proposal
Functional
Specification
Fall 2011
Spring 2012
MOSIS Chip Design
and Macro Model
Creation
Design Document
Software
Frameworking
MOSIS Fabrication
(by foundry)
Construct Cube
Microcontroller
Programming
Assemble Circuits
Test and Debug
Founder's Day
Display
Figure 25. Overall development process.
Project Proposal
After some deliberation, Team Stolen Pie settled upon the idea of a cube of LEDs that
was user-interactive. Prior to deciding on this project, two of the members constructed
a smaller cube of LEDs that performed several preprogrammed animations. With this
proof of concept, the idea was expanded to include a larger resolution of LEDs. To
enable user interaction with the device, a method to sense movement was decided on
to be included. The proposal was approved by the University of Portland faculty.
Functional Specifications
This document details the initial plans for the project, including the requirements and
preliminary design, schedule, and method of development. This document undergoes
one revision after turning into the faculty advisor before completion.
MOSIS Chip Design and Macro Model Creation
Once the functional specification is approved, work began on the two MOSIS chip
designs. The MOSIS chips will contain the majority of the design work needed, as
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
well as most of. the logic not present in the microcontroller. In addition, a backup
programmable logic
. device, either in the form of CPLDs or FPGAs, are programmed
to have the same. functionality as the MOSIS chips.
.
Software Frameworking
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 40
This entails preliminary work on the top-level software framework to be used in the
microcontroller. This must be completed before work on the software for use in the
microcontroller may proceed.
Design Document
The design document details the final design of the project before construction begins
in the spring of 2012. It contains detailed logic circuit schematics and block diagrams
outlining system operation.
MOSIS Fabrication
Following the two MOSIS chip designs, a layout file will be sent to the MOSIS
foundry to fabricate the integrated circuit. The MOSIS chips will arrive in the spring.
Construct Cube
This is the labor-intensive task of arranging, securing, soldering, and wiring 512 LEDs
into a cube formation.
Microcontroller Programming
Following software frameworking, the microcontroller must be programmed to
perform the tasks required of it by the project.
Assemble Circuits
Once the components are all acquired, including the MOSIS returning from the
foundry, they can be wired together and construction of the project can be completed.
All design work must be completed for this to be finished.
Test and Debug
Once circuit assembly is complete, the circuit and the microcontroller program will be
tested to ensure that they operate as intended. It is likely that bugs will cause us to loop
back into the development process to alter the microcontroller program, or a small
portion of the circuit wiring.
Founder’s Day Display
The completed project will be demonstrated on Founder’s Day, April 17th, 2012.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
Assumptions .
.
.
There are a number of assumptions
being made that will enable the completion of this project.
.
Based on time and money restrictions, the assumptions are as follows:
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 41
๏ฎ
Hardware will be available for purchase that will work as defined by their datasheet.
๏ฎ
Plexi-glass casing will be provided by the school and constructed with the assistance of
Craig or Allen.
๏ฎ
MOSIS chips will arrive on time and in working condition.
Risks
The risks which may threaten the completion of this project remain unchanged from those
discussed in the Functional Specification. Please refer to Team Stolen Pie’s Functional
Specification for details on project risks and measures taken to reduce their impact.
Milestones
The Milestones found in Table 1 remain largely unchanged from reported in the Functional
Specifications. Milestone number 10, the completion Cube mock-up and pinout, is the only
one subject to change by moving it from 11/6/11 to 11/11/11 in order to coincide with weekly
faculty advisor meetings. In addition, preliminary Spring milestones are added.
Table 1. Milestones.
Number
Description
Completion
Date
1
2
3
4
5
7
8
9
10
11
12
13
14
Project Proposal
Functional Specifications v0.9
September Program Review
Functional Spec v1.0 approved
Component Selection Complete
Top Level MOSIS block diagram complete
Top level microcontroller design complete
October Program Review
Initial B2Logic Edif Files Complete
Cube mock-up and pinout complete
Design Document v0.9
Final Budget Complete
Design Document v1.0 approved
9/3/11
9/23/11
9/30/11
9/30/11
10/9/11
10/16/11
10/23/11
10/28/11
10/31/11
11/11/11
11/12/11
11/12/11
11/19/11
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
. Final MOSIS Edif Files complete
. November Program Review
. FPGA/CPLD macro models complete
Initial
.
. Peer Evaluations/Lab Notebooks Due
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
REV. 1.0
Set up Faculty Advisor and Team Meeting
times for the Spring
Place casing request
January Program Review
CPLDs programmed and determined if
functional
Wire wrap tutorial complete
LED cube constructed
February Program Review
Circuit complete with macro models
Packaging/Casing Complete
MOSIS chips received
Circuit complete with MOSIS chips
Microcontroller program complete (w/ no
attract mode)
March Program Review
Microcontroller program complete (w/ attract
mode if implemented)
Founder’s Day Presentation
Final Report v0.9 turned in to advisor
Final Report v1.0 Turned in to advisor
PAGE 42
11/21/11
12/2/11
12/4/11
12/5/11
1/20/12
1/27/12
2/3/12
2/3/12
2/10/12
2/24/12
3/2/12
3/9/12
3/9/12
3/19/12
3/23/12
3/30/12
4/5/12
4/6/12
4/17/12
4/20/12
4/27/12
Final Budget
The budget for the components of the LED cube can be found in Table 2.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
.
Description
.
.
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
Line Category
REV. 1.0
PAGE 43
Table 2. Final Budget
1 Materials
1.1
Arduino Duemilanove
UDN2981 Noninverting high current
1.2
buffers
1.3
ULN2803 Inverting high current buffers
1.4
Triple Axis Accelerometer + shipping
1.5
12 V, 2 A DC power supply
1.6
1000 LEDs/lot
1.7
Packaging and Casing
1.8
555 Timer provided by Dr. Lu
1.9
MOSIS chips provided by MEP
2.0
CPLD/FPGA provided by Dr. Lu
TOTAL
Number Rate
Amount
# of
parts
Subtotal
1
$30
$30
12 $2.13
5 $0.93
1 $19.90
1 $14.50
1 lot
$40
1
$60
1
$0
4
$0
2
$0
$25.56
$4.65
$19.90
$14.50
$40
$60
$0
$0
$0
$195
1.1
The Microcontroller that will be the primary control source for the project.
1.2
Noninverting anode drivers to provide current to the LEDs.
1.3
Inverting cathode drivers to sink current from the LEDs.
1.4
MEMs accelerometer for sensing environmental changes.
1.5
12v DC Power Supply adapter for powering ICs and LEDs.
1.6
LEDs for constructing and illuminating the cube.
1.7
Secure and protective casing for the LED Cube project.
1.8
Clock for synchronizing and controlling MOSIS Finite State Machines.
1.9
Two designs and four total MOSIS chips are used for the SAM chipset.
2.0
Back up macro model FGPAs or CPLDs will be provided by the school.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
Conclusions
.
The LED Cube .project with user interaction will be a prototype consumer electronic
.
device which illustrates
the use of MEMs accelerometers and custom application
. circuit design. The device will sense changes in acceleration and
specific integrated
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 44
display those changes as an animation on a three dimensional array of LEDs.
The success of this project is likely to hinge on the success of the MOSIS IC and
microcontroller software, including the proper interfacing of these components to
form an integrated embedded system.
It will be important to maintain active lines of communication between team members
and our faculty advisor, Dr. Osterberg.
Should the system be built well before the Founder’s Day presentation, additional
functionality in the form of animations and operating modes will be considered for
implementation, namely attract mode as detailed in the microcontroller section of this
document.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
.
Appendix A: Software
Psuedo-Code
.
. the logic of the software, excluding the more complex routines
The pseudo-code runs through
. logic and order of the program.
in lieu of showing the general
.
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 45
//Psuedo-Code for the Arduino Software
//By: Devin Pentecost
//Pin setups and some functions/variable declarations ommitted
//This program decides if it is time for another frame
//It then determines the operating mode, and acts accordingly
//If it is simulation, it pulls the data from the acceleromer, computing the next frame
//If it is animate, it determines the animation, and run's that animations code
//After setting the cube's new state, the microcontroller communicates with the memory
//Finally, it repeats again, waiting for enough time to pass to start the next frame
//The 8x8x8 cube. x by y by z
Boolean LEDARRAY[8][8][8];
void loop(){
//Regardless of the mode, has enough time passed to constitute another frame?
if(enoughTimeHasPassed){
//Check which mode we are on
switch(cubeMode){
case simulation:
//Get the data from the accelerometer
accelerometerVector = getDataFromAccelerometer();
//Using this vector of forces, compute the next 'state' of the cube.
gravitySimulation(accelerometerVector);
//The cube is in the proper state. We will continue on and send it out
break;
case attract:
//Determine if we need to switch animations, or anything else that
//Could break the flow of the attract mode
if(animationTimeOut){
//Continue to the next animation
if(++currentAnimation > totalAnimations) currentAnimation= 0;
}
//Compute the next state of the cube, based on the current animation
attractMode(currentAnimation);
//The cube is in the proper state. We will continue on and send it out
break;
default:
break;
}//switch
//The cube is set. We need to output the cube.
outputCubeState();
}//if
//We can just burn time until the next frame is up and ready to go...
}//loop
//This function computes the next frame in the simulation based on a vector
void gravitySimulation(AccelerometerVector av){
//Code is complex and not completed.
//But it would go here, and enable/disable LEDs in the 3D array
}//gravitySimulation
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
.
.
.
.
//Figures out the next state of the cube from preset animations
. int ca){
void attractMode(unsigned
//Depending on. which animation...
switch(ca){
case. animationA:
//Do. the appropriate logic to set the next state of the 3D LED array
//Also maintains animation speeds, to not go too fast or slow
.
break;
FUNCTIONAL SPECIFICATIONS
TEAM STOLEN PIE
REV. 1.0
PAGE 46
//And so on and so forth...
default:
break;
}//switch
}//attractMode
//Outputs the current cube state to the memory
void outputCubeState(params p){
//This goes through all of the LEDs in the array
for(int i = 0; i < 8; ++i){
for(int j = 0; j < 8; ++j){
for(int k = 0; k < 8; ++k){
//We set the output pin to match the LED's state
signalPin = LEDARRAY[i][j][k];
//And pulse the clock to tell the memory to hold that value
//And then go to the next value
clockPin = 1;
delay(time);
clockPin = 0;
}//for
}//for
}//for
}//outputCubeState
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: PATRICK BLOEM
Download