ECE 477 Digital Systems Senior Design Project Spring 2006

Homework 5: Theory of Operation and Hardware Design Narrative

Due: Friday, September 22, at NOON

Team Code Name: Wirelessly Integrated Menu System Group No. 2

Team Member Completing This Homework: Neil Bedwell

e-mail Address of Team Member: nbedwell @ purdue.edu

Evaluation:

Component/Criterion / Score / Multiplier / Points
Introduction / 0 1 2 3 4 5 6 7 8 9 10 / X 1
Theory of Operation / 0 1 2 3 4 5 6 7 8 9 10 / X 3
Hardware Design Narrative / 0 1 2 3 4 5 6 7 8 9 10 / X 3
Updated Block Diagram / 0 1 2 3 4 5 6 7 8 9 10 / X 1
List of References / 0 1 2 3 4 5 6 7 8 9 10 / X 1
Technical Writing Style / 0 1 2 3 4 5 6 7 8 9 10 / X 1
TOTAL

Comments:

Comments from the grader will be inserted here

1.0  Introduction

The Wirelessly Integrated Menu System (WIMS) is a portable device designed to provide restaurant patrons with a means of placing food and beverage orders from a customized, interactive menu. The proposed implementation is for the restaurant host to provide a WIMS to each party when seated. Each customer will have the option to customize the menu display by swiping a credit card. The customer information will be obtained wirelessly by a server query that provides previous order history and food preferences submitted via an electronic survey. After the customer finalizes his or her menu choices with the WIMS, the order will be transmitted to the kitchen’s order queue.

Five major systems work together in the WIMS: a power supply, a microcontroller, an embedded wireless adapter, a magnetic card reader, and a graphical LCD. By carefully planning modes of operation and interface methods, these systems will produce one product that meets all expectations. Design constraints must be considered and accounted for in the initial system layout, in order to avoid any later conflicts. By defining how each component works in the device, it becomes possible to design the system to optimal constraints.

2.0  Theory of Operation

Each component of the WIMS has been selected to integrate effectively into the overall system. One of the major constraints of the device’s design is power limitation. As such, all device functions will be implemented with power savings in mind. All components with a voltage input choice will be operated from the 3.3 V source to conserve power and to eliminate the need for a 5 V power rail.

2.1  Power Supply Operation

Ten Nuon NiMH AA rechargeable batteries connected in series will provide power to the WIMS 12 V nominal and 2500 mAh [1]. Two devices will be powered directly from the unregulated battery supply: the Maxim MAX8756 DC step-down controller and the JKL Components Corporation BXA-12594-5M backlight inverter. The 12 V nominal supply voltage will allow both the backlight inverter and the DC step-down controller to operate throughout the effective battery supply voltage range of 9-15 V by utilizing the component values designated in Table 2.1.1, located in Appendix B [2] - [6]. The DC step-down controller will regulate a single output voltage of 3.3 V, which will be used to power the Freescale MC9S12E128 microcontroller, the Magtek 21045082 magnetic card reader, the Lantronix WiPort embedded wireless adapter, the Reach Technologies SLCD LCD/touch-screen controller, and the Maxim MAX3223E RS-232 level translator [7] - [11].

Two devices that typically operate at 5 V were taken into special consideration when choosing the power rail voltages. The microcontroller is capable of operating at 3.3 V, however the maximum operating frequency is reduced to 16 MHz from 25 MHz at 5 V. In addition, the digital input pins are not 5 V tolerant when powered by a 3.3 V supply [7]. The SLCD controller also posed an issue, as the reference manual is ambiguous as to the necessary changes needed to utilize a 3.3 V supply [8]. Reach Technologies technical support confirmed that it is possible to power the SLCD board with 3.3 V without board modification; however the buzzer volume will be reduced. By confirming the capability of all PCB components to operate at the 3.3 V level, the need for a 5 V power rail was eliminated from the WIMS design.

Battery drain and charge will be monitored by a Maxim MAX1660 digitally controlled fuel gauge. This gauge is the only device connected directly to the battery, and provides charging or sourcing capabilities via the IC’s PACK connection [12]. The gauge will communicate battery charge information with the microcontroller using SMBus at the fuel gauge to IIC at the microcontroller [7]. Two additional GPIO pins will be interfaced to allow for a critical power indicator interrupt line and for a device shutdown signal.

WIMS power will be controlled by a single pull, double throw switch. In the “on” position, the fuel gauge’s PACK pins will be connected to the WIMS power, allowing for current to be drawn from the battery. In the “off” position, the PACK pins will be connected to the Maxim MAX713 charging circuit, allowing for the device to be charged while off, if the external wallwart is connected to the WIMS charging unit [13].

2.2  Freescale MC9S12E128 Microcontroller Operation

As power consumption in the device is very important, the microcontroller will be operated at a low operating frequency, while still maintaining full functionality. The WIMS will be periodically monitoring the three SCI ports for input, and must operate at a frequency fast enough to accommodate the WiPort and SLCD SCI baud rates of 115,200. This communication will be the most time-critical operation of the microcontroller. As mentioned in section 2.1, above, the microcontroller will be powered by 3.3 V, yielding a maximum possible clock frequency of 16 MHz; much faster than is required. A baud rate of 115,200 requires a minimum clock frequency of (115,200*16) = 1.8432 MHz [7]. A clock frequency of 8 MHz will be used to provide additional processing power over the minimum requirements of the SCI ports.

2.3 SLCD LCD/Touch-Screen Controller Operation

The SLCD, powered by 3.3 V, is controlled by its own onboard microprocessor that handles all of the communications with the LCD, the touch-screen, and the backlight inverter. To update the graphic display as fast as possible, the SLCD will communicate with the microcontroller via a serial interface at the SLCD’s maximum baud rate of 115,200 [7]. The secondary SLCD serial interface will have two methods of connection; two jumpers will select which interface is connected. The SLCD can be connected to via a PCB-mounted DB-9 connector interfaced to the SLCD with a Maxim MAX3223E RS-232 level translator to interface to a PC, or via TTL logic with a direct connection to the secondary serial interface of the WiPort module, which will allow for wireless programming of the SLCD module [9], [8]. Both of these serial interfaces will operate at the SLCD’s default speed of 9,600 baud, as data reliability is more important than speed in this situation.

2.4 WiPort Embedded Wireless Module Operation

The WiPort module, powered from the 3.3 V power rail, communicates with the microcontroller via 3.3 V TTL serial data [8]. The WiPort acts as a wireless serial bridge, by encapsulating the serial data within the TCP/IP stack, and decoding it back to serial data at the other end. Because of the potential to send large amounts of data in short amounts of time, it is important for the microcontroller to communicate with the WiPort at a high data rate; thus 115,200 baud was selected. As per section 2.3, the WiPort’s secondary serial interface will be connected to the SLCD’s secondary serial interface using 3.3 V TTL serial logic.

2.5 Magtek Magnetic Card Reader Operation

The Magtek card reader is powered from the 3.3 V power rail, and communicates with a 3.3 V TTL logic level [10]. The reader requires that two pins be interfaced to the microcontroller; a shift-out data line and a shift-out strobe line. Data transmission is controlled by the microcontroller in a bit-bang strategy.

3.0  Hardware Design Narrative

The WIMS device will utilize three SCI ports, an IIC interface, and several GPIO pins, as can be seen in the block diagram of Appendix A. To provide for microcontroller flashing via a PC serial interface, the functionality of Freescale’s serial monitor program will be preserved. The serial monitor program utilizes SCI0 of port S, and thus will be interfaced to a DB-9 serial header with an RS-232 level translator to provide for this ability [14]. SCI1 of port S will be assigned for communication with the WiPort module, and SCI2 of port M will be assigned for communication with the SLCD. These ports were assigned to the two devices based on their proximities to their respective interfaces, as can be seen in the preliminary PCB layout of Appendix C. As both of these serial ports will be operated at a baud rate of 115,200 with a system clock frequency of 8 MHz, a baud rate divisor of 4 will be set for each of these two serial ports, and a divisor of 52 will be required for SCI0 [7].

Interfacing the fuel gauge is accomplished via the IIC lines of port M [12]. The microcontroller will be configured for master operation at a frequency of 100 kHz. Two additional GPIO pins, PAD14 and PAD15, were chosen to interface to the fuel gauge because of the port’s ability to trigger keyboard interrupts, as will be utilized by one of the pins in a critical battery current situation. The magnetic card reader is interfaced using two GPIO pins: PAD00 and PAD01. These pins were selected because of the card reader’s location on the preliminary PCB layout. To aid in debugging of the system during development, the relevant background debug mode (BDM) pins will be mapped to a 6-pin header on the PCB. These pins are BKGD, ECLK, VCC, RESET, and GROUND.

Microcontroller clocking will be controlled by an external 8.000 MHz crystal resonator circuit. The component values to populate the circuit of Appendix D were obtained from the M68EVB912E128 development board schematic [15]. These values are RS = 0Ω, RB = 10MΩ, and C1 = C2 = 22pF. In order to correctly implement the Maxim MAX3223E RS2332 level translator, five capacitors are required, as seen in the user manual: C1 = C2 = C3 = C4 = CBypass = 0.1µF [11]. In order for the Maxim MAX1660 digitally controlled fuel-gauge to operate correctly, many component values must be selected per the data sheet requirements [12]. The schematic in Appendix E was obtained from the MAX1660 evaluation kit, and contains all necessary values for implementation [16]. The Maxim MAX713 charging IC requires that component values be carefully selected to ensure proper operation and compatibility with the batteries [13]. As no preexisting schematics were found that meet the requirements of the WIMS, the schematic was created manually, and is attached as Appendix F.

4.0  Summary

The Wirelessly Integrated Menu System has four major electrical systems that are controlled by the microcontroller. Details of how each of these systems will interact were documented. Component values for each major system within the WIMS were selected, and modes of operation were defined. Port selections for each data bus were documented. The final WIMS device will be a collection of all of these design considerations, and will result in an easy-to-use customizable menu experience.
List of References

[1]  Batteries Plus, “NUREAA-4 NUON AA RECHARGEABLE NIMH 4 PACK,” [Online Document], unknown publication date, [cited September 20, 2006], http://www.batteriesplus.com/p-34291-nuon-aa-nimh-4-pack.aspx.

[2]  Maxim, “8546_3f3,” [Online Document], February 19, 2004, http://www.maxim-ic.com/cookbook/powersupply/pdfs/CB159.pdf.

[3]  Maxim, “Switching Between Battery and External Power Sources,” [Online Document], June 27, 2002, http://www.maxim-ic.com/appnotes.cfm/an_pk/1136.

[4]  Maxim, “Using the DS2770 as a 3-Cell NiMH Charger,” [Online Document], September 17, 2002, http://www.maxim-ic.com/appnotes.cfm/appnote_number/222.

[5]  Maxim, “MAX8545/MAX8546/MAX8548 Low-Cost, Wide Input Range, Step-Down Controllers with Foldback Current Limit,” [Online Document], May, 2005, http://datasheets.maxim-ic.com/en/ds/MAX8545-MAX8548.pdf.

[6]  JKL Components Corporation, “BXA-12594-5M Inverter Spec Sheet,” [Online Document], December 27, 1999, http://www.reachtech.com/collateral/Hitachi_SX14Q001-ZZA_CD/Panel%20and%20Inverter/BXA-12594-5M.pdf.

[7]  Freescale, “MC9S12E128 Data Sheet,” [Online Document], October, 2005, http://www.freescale.com/files/microcontrollers/doc/data_sheet/MC9S12E128V1.pdf.

[8]  Lantronix, “WiPort Data Sheet,” [Online Document], unknown publication date, [cited September 20, 2006], http://www.lantronix.com/pdf/WiPort_DS.pdf.

[9]  Reach Technologies, “SLCD Controller Kit,” [Online Document], unknown publication date, [cited September 20, 2006], http://cobweb.ecn.purdue.edu/~477grp2/files/SLCD_Manual_v2.13.pdf.

[10]  Magtek, ”90-Millimeter Swipe Reader With Shift-Out ASIC,” [Online Document], unknown publication date, [cited September 20, 2006], http://www.magtek.com/documentation/public/99875286-3.02.pdf.

[11]  Maxim, “MAX3222E-MAX3246E Data Sheet,” [Online Document], September 2005, http://datasheets.maxim-ic.com/en/ds/MAX3221E-MAX3243E.pdf.

[12]  Maxim, “Digitally Controlled Fuel-Gauge Interface,” [Online Document], October 1998, http://datasheets.maxim-ic.com/en/ds/MAX1660.pdf.

[13]  Maxim, “NiCd/NiMH Battery Fast-Charge Controllers,” [Online Document], April 2002, http://datasheets.maxim-ic.com/en/ds/MAX712-MAX713.pdf.

[14]  Freescale, “Serial Monitor Program for HCS12 MCUs,” [Online Document], September 2003, http://www.freescale.com/files/microcontrollers/doc/app_note/AN2548.pdf.

[15]  Freescale, “Schematics for M68EVB912E128 Evaluation Board ,” [Online Document], unknown publication date, [cited September 20, 2006], http://www.freescale.com/files/soft_dev_tools/hardware_tools/schematics/M68EVB912E128SCH.zip

[16]  Maxim, “MAX1660 Evaluation Kit,” [Online Documen], October, 1998, http://datasheets.maxim-ic.com/en/ds/MAX1660EVKIT.pdf


Appendix A: System Block Diagram

Appendix B: Table 2.1.1 Charging Circuit Component Values [2]

DESIGNATION / QTY / DESCRIPTION
C1 / 1 / 6.8nF ceramic capacitor (0603)
C2 / 1 / 0.1uF 50V ceramic capacitor (0805)
C3 / 1 / 2.2uF 10V ceramic capacitor (0805) Taiyo Yuden LMK212BJ225MG
C4,C8 / 1 / 0.1uF ceramic capacitor (0603)
C5 / 1 / 100uF 35V aluminum electrolytic capacitor Sanyo 35MV100AX
C6 / 1 / 330pF ceramic capacitor (0603)
C7 / 2 / 470uF 10V aluminum electrolytic capacitor Sanyo 10MV470AX
D1 / 1 / 100mA 30V Schottky diode (SOT-23) Central Semi CMPSH-3
L1 / 1 / 22uH 3.6A Power inductor
Sumida CDRH127-220
N1 / 1 / 55m Ohm 30V N-channel MOSFET (SO-8) Fairchild FDS6930A
R1 / 1 / 82k Ohm 5% resistor (0603)
R2,R3,R6 / 2 / 4.7 Ohm 5% resistor (0603)
R4 / 1 / 31.6k Ohm 1% resistor (0603)
R5 / 1 / 10.0k Ohm 1% resistor (0603)
U1 / 1 / MAX8546EUB (10-uMAX)

Appendix C: Preliminary PCB Layout