ECE 477 Digital Systems Senior Design Project Spring 2008
Homework 5: Theory of Operation and Hardware Design Narrative
Due: Friday, February 15, at NOON
Team Code Name: ___RoboRubik______Group No. __11__
Team Member Completing This Homework: ___Dave Bukiet______
e-mail Address of Team Member: ___dbukiet____ @ purdue.edu
Evaluation:
SCORE
/DESCRIPTION
10 /Excellent – among the best papers submitted for this assignment. Very few corrections needed for version submitted in Final Report.
9 /Very good – all requirements aptly met. Minor additions/corrections needed for version submitted in Final Report.
8 /Good – all requirements considered and addressed. Several noteworthy additions/corrections needed for version submitted in Final Report.
7 /Average – all requirements basically met, but some revisions in content should be made for the version submitted in the Final Report.
6 /Marginal – all requirements met at a nominal level. Significant revisions in content should be made for the version submitted in the Final Report.
* /Below the passing threshold – major revisions required to meet report requirements at a nominal level. Revise and resubmit.
* Resubmissions are due within one week of the date of return, and will be awarded a score of “6” provided all report requirements have been met at a nominal level.
Comments:
1.0 Introduction
Our design project is RoboRubik, a digital Rubik’s Cube that uses LEDs to represent colored blocks unlike a normal Rubik’s Cube that uses a mechanical system and colored stickers. RoboRubik will be approximately 9cm x 9cm x 9cm which means size is one of our main design issues and thus we are looking for small components that will still perform necessary computations. Because we are dealing with a large number of LEDs we will also need to take into account power consumption issues.
2.0 Theory of Operation
The RoboRubik is comprised of four basic hardware subsystems: power, CPU, wireless control and display.
2.1 Power
Much like a normal Rubik’s Cube, we want RoboRubik to be handheld and compact, and much like the Rubik’s Revolution, we want RoboRubik to have a substantial battery life. Our power options are limited by merely how many batteries we can fit into the cube. The Energizer 9V lithium battery has approximately 1200 milliamp hours [1]. Based upon our large number of LEDs, we’ll be using up a large amount of current. Using two or three of these batteries in conjunction would greatly extend battery life.
Given that all of our components operate in the 3.3V range, these 9V batteries will be too much to handle. Therefore we need a DC/DC converter to step down the 9V input voltage. The RECOM Innoline R-783.3-0.5 can perform this task for us. It takes a wide input range and outputs a 3.3V operating voltage [2]. We will need 7 of these in total, one for each PCB. If we find that the 9V level is too high, we will try to find a lower voltage battery with a higher milliamp hour rating.
2.2 CPU
The RoboRubik CPU is a Freescale MC9S12C32MFA25 16-bit microcontroller. Commands are sent to the microcontroller using a Serial Communication Interface (SCI) and stored on the chip’s onboard memory. Subroutines that change the current state of the LEDs are called when user input is received from the external pushbuttons or when the user requests a hint, via the webserver, as to the next move. The microcontroller can be set to operate at a 5V or 3.3V range [3]. We chose to set the operating voltage to 3.3V for two reasons. The first is that the Lantronix WiPort operating voltage is also 3.3V [4], which means we won't need to amplify signals. Secondly, the forward voltage of the green and blue components of the Optek RGB LEDs is 3.3V [5]. As mentioned before, by using a 3.3V operating voltage for our microcontroller we can use one voltage level throughout the entire project.
2.3 Wireless Control
We chose the Lantronix WiPort Embedded Wireless Networking Device for our wireless communication device. The WiPort provides TCP-to-serial communication between a user interface website and the microcontroller. The WiPort includes a complete 802.11 b/g radio, serial interface to external CPU or other device and 2MB of Flash memory for webpage storage [4]. Upon initialization the WiPort’s serial port is coupled with a specific TCP port number. This serial port is tied to the SCI port on the microcontroller. A static IP address is assigned to the WiPort also upon initialization, which is receives from the DHCP server on a local WLAN [6].
To begin using RoboRubik the user navigates to the homepage of the WiPort embedded web server, which is located on the static IP address port 80 [6]. The homepage lets the user select from different operating modes such as Play, Help, etc. Once the user has made a selection, that command is placed on the WiPort web server IP:port [6]. The command is serialized and transmitted on the TCP stack to the WiPort serial port where it is received by the CPU and further computation takes place [6].
2.4 Display
The display subsystem consists of 54 LEDs (9 per side). There are a total of 48 tri-color RGB LEDs and 6 pushbuttons with embedded LEDs. The RGB LEDs from Optek Electronics contain one red, one green and one blue LED and can subsequently be light to create a large spectrum of colors [5]. 6 distinct colors are necessary for a Rubik’s Cube and are created by signaling one, two or three LEDs at once. Because power is an issue with RoboRubik, we will try to only light two out of three LED’s at a time. This means white (red, green and blue combined) will not be used.
The LEDs are driven by a series of Allegro A6276 latched LED drivers. The A6276 can drive up to 16 LEDs. For our design the A6276 will drive 12 individual LEDs, or 4 RGB LEDs. There will be 2 drivers for each side of RoboRubik. The 6 pushbutton LED’s will be driven by the 3.3V input.
The LED drivers operate by receiving a serial input from the CPU as a shift register. Rather than use the SCI for this, two I/O pins can be configured to represent the serial and clock signals. The data is shifted down and the driver latches the value upon enabling [7]. When the display requires updating, the serial data moves along the shift register every time the input clock goes from low-to-high. Once the 16-bit value arrives, the data is for each shift register is latched upon LATCH ENABLE signaled high. The latch data is then outputted upon OUTPUT ENABLE signaled low. To specify which driver is to be updated, the serial data and clock signal are sent to all 12 drivers and the LATCH ENABLE signal is multiplexed by a 4x16 multiplexer [7].
3.0 Hardware Design Narrative
The main subsystem of the microcontroller that we will be using is the Serial Communication Interface. The rest of the subsystems will be deactivated to allow for more I/O pins to be used.
3.1 Serial Communication Interface
The SCI has two pins on the MC9S12C32MFA25: TXD and RXD [3]. TXD is the output pin for the SCI and RXD is the input pin for the SCI. TXD is tied to the RXD0 pin on the WiPort and RXD is tied to the TXD0 pin on the WiPort. This establishes a flow of communication between the WiPort and the microcontroller, allowing commands from the web server to be processed on the microcontroller and updates in the LED display subsystem to be sent back to the web server.
3.2 Initialization Narrative
Once RoboRubik has been powered on and the user has navigated to the website, the initialization can begin. The user selects from different operating modes depending on their need of RoboRubik. This command is posted to a TCP port that is directly connected to the WiPort. This hardware functionality is already built in for us. Once the command reaches the WiPort the data is sent through the serial port to the microcontroller where a serial interrupt occurs. The interrupt handler interprets the command and dispatches the necessary subroutine located in memory. This subroutine computes what the most current display state should be and once it has been fully processed; it proceeds to load the 12 LED drivers with this information. The output of the LED drivers is enabled and the display now reflects the most current RoboRubik state.
3.3 Pushbutton Narrative
RoboRubik has been powered on and initialized and the user is free to play with the device. They determine what their next move should be and press the corresponding pushbutton. Upon pressing the button, the timer interrupt on the microcontroller that is monitoring the pushbuttons detects a pushbutton event. The interrupt handler interprets the command and dispatches the appropriate subroutine. The subroutine computes the next state of display and sends this information to the LED drivers. The drivers are loaded with this new state and updated to reflect that.
4.0 Summary
In this report, the theory of operation and hardware narrative were discussed. Design issues of size and power were taken into consideration and major subsystems of RoboRubik were outlined. The major subsystems each have a specific purpose and must work in conjunction with the others in order for RoboRubik to operate correctly. There is a block diagram in Appendix A that shows the layout of the two main circuit boards in more detail.
List of References
[1] “Energizer 9V Lithium” [Online document], [cited 2008 Feb 15] Available
HTTP: http://www.interstatebatteries.com/estore/search.asp?details=1&mscssid=NC10FLC4AHFP8MFBQE98B4XTX0K2BJ9F&N=32+4294653872+2147384789&part_number=LIT1003&part_desc=9v+1200mAh+%28L522FP%29+LABEL+%2D+Primary+Non%2Drechrg+Cell+Or+Pac&Nu=Part+Number&Ns=product+Type%7C0%7C%7CRank%7C1&js=1
[2] “RECOM Innoline R-78xx-0.5 Datasheet” [Online document], [cited 2008 Feb 15] Available HTTP: http://www.recom-international.com/pdf/innoline/R-78xx-0.5.pdf
[3] “MC9S12C Family User Guide” [Online document], [cited 2008 Feb 15], Available
HTTP: http://cobweb.ecn.purdue.edu/~477grp11/files/datasheets/Microcontroller%20MC9S12C32MFA25%20-%20Freescale.pdf
[4] “Lantronix WiPort Datasheet” [Online document], [cited 2008 Feb 15], Available
HTTP: http://www.lantronix.com/pdf/WiPort_DS.pdf
[5] “Optek OVSRRGBCC3 Datasheet” [Online document], [cited 2008 Feb 15] Available
HTTP: http://www.optekinc.com/pdf/OVSRRGBCC3.pdf
[6] “Lantronix WiPort User Guide” [Online document], [cited 2008 Feb 15] Available
HTTP: http://www.lantronix.com/pdf/WiPort_UG.pdf
[7] “Allegro A6276 Datasheet” [Online document], [cited 2008 Feb 15] Available
HTTP: http://www.allegromicro.com/en/Products/Part_Numbers/6276/6276.pdf
Appendix A: System Block Diagram
Figure 1 - Main PCB
Figure 2 - Cube Face PCB
-5-