Please print this document single-sided! ECE 477 Final Report Spring 2004 Mike Klockow Ed Sheriff Dan Sparks Jon Hopp Team Code Name: ____Universal Exports_________________________ Team ID: __5__ Team Members (#1 is Team Leader): #1: __Edward Sheriff______________ Signature: ____________________ Date: _________ #2: __Dan Sparks_________________ Signature: ____________________ Date: _________ #3: __Mike Klockow______________ Signature: ____________________ Date: _________ #4: __Jon Hopp_______________
ECE 477 Final Report Spring 2004 REPORT EVALUATION Component/Criterion Score Multiplier Abstract 0 1 2 3 4 5 6 7 8 9 10 X1 Project Overview and Block Diagram 0 1 2 3 4 5 6 7 8 9 10 X2 Team Success Criteria/Fulfillment 0 1 2 3 4 5 6 7 8 9 10 X2 Constraint Analysis/Component Selection 0 1 2 3 4 5 6 7 8 9 10 X2 Patent Liability Analysis 0 1 2 3 4 5 6 7 8 9 10 X2 Reliability and Safety Analysis 0 1 2 3 4 5 6 7 8 9 10 X2 Ethical/Environmental Impact Analysis 0 1 2 3 4 5 6 7 8 9 10 X2 Pa
ECE 477 Final Report Spring 2004 TABLE OF CONTENTS Abstract 1.0 Project Overview and Block Diagram 2.0 Team Success Criteria and Fulfillment 3.0 Constraint Analysis and Component Selection 4.0 Patent Liability Analysis 5.0 Reliability and Safety Analysis 6.0 Ethical and Environmental Impact Analysis 7.0 Packaging Design Considerations 8.0 Schematic Design Considerations 9.0 PCB Layout Design Considerations 10.0 Software Design Considerations 11.0 Version 2 Changes 12.0 Summary and Conclusions 13.
ECE 477 Final Report Spring 2004 Abstract This design of a wireless ordering device (WOrD) will allow a customer to view limited menus and possibly other information at a commercial establishment (e.g. a restaurant or bar). A transmitter connected to a host computer will serve as a base station transmitting menus and other information. A remote device will act as a user interface receiving the transmitted information and transmitting orders to the base station.
ECE 477 Final Report 1.0 Spring 2004 Project Overview and Block Diagram The WOrD system allows a user to remotely access a menu, and select items from that menu. The remote device accepts menu information from a base station. The user will then navigate these menus and select their choices. An LCD display will be used to view the menu information and navigation buttons are provided for the user to access menu items and make their selection.
ECE 477 Final Report Spring 2004 Figure 1-1 Base Station Block Diagram The remote unit is a little more complicated. At the heart of its design is an Atmel ATmega162v microcontroller. It receives its data from the same Atmel transceiver that is in the Base Station as well as five user navigational buttons on the device. From this, it decodes the signal and controls the menu displayed on the LCD module as well as the status of the notification LEDs as shown in Figure 1-2.
ECE 477 Final Report 2.0 Spring 2004 Team Success Criteria and Fulfillment Success Criteria Status Details Ability for remote device to send FAILED Problems arose from reference design. order information wirelessly and Not enough development tools available confirm order. to debug and fix RF connection. Ability for the base station to alert COMPLETE Base station sends alert message to turn remote unit and illuminate LEDs. LEDs on and another to turn them off.
ECE 477 Final Report 3.0 Spring 2004 Constraint Analysis and Component Selection This design of a Wireless Ordering Device (WOrD) will allow a customer to view limited menus and possibly other information at a commercial establishment (e.g. a restaurant or bar). A transmitter connected to a host computer will serve as a base station transmitting menus and other information. A remote device will act as a user interface receiving the transmitted information and transmitting orders to the base station.
ECE 477 Final Report Spring 2004 requires the development of a communication/authentication protocol between the host and remote devices. It must be possible for many remote devices to be in operation at the same time. The protocol must have a way to validate received orders or request the re-transmission of an order and the remote device must re-transmit any order if it has not received a confirmation of that order within a certain time.
ECE 477 Final Report Spring 2004 The LCD screen will be the most expensive part of the design. Some of the larger graphical displays can be up to $60 or $80, while some of the text only displays can be between $20 and $40. Since one of the main focuses of our project is cost, we decided to send out many requests for LCD displays and see what companies responded. In doing so, Microtips agreed to supply us with their 128x128 Graphics Display for no cost.
ECE 477 Final Report Spring 2004 All three of these designs have a dual USART capability which is a must for our project design. These three devices differ in only memory sizes, boot loader support, and interrupt vector sizes. Also, power consumption for each of these three designs is similar. For our design, we need to have a considerable amount of memory for the graphical LCD menu display for storage of graphics and character generation.
ECE 477 Final Report 4.0 Spring 2004 Patent Liability Analysis The goal of this project is to create a wireless ordering device that allows one to send orders for food into the kitchen of a restaurant while waiting for a table and have that order prepared and ready to eat as soon as a table is available. This system consists of one or more remote devices that communicate menu and ordering information over an RF link to a base computer.
ECE 477 Final Report Spring 2004 ordering system. The search for patents was quite difficult and time consuming because a similar device was not found that could help narrow down a search. D371,054 Coaster and Pager [4-4] Figures portray a square coaster with an arrangement of LEDs inside its transparent casing. Nothing is said about how the coaster is alerted to light up.
ECE 477 Final Report Spring 2004 This would be an infringement under the doctrine of equivalents. The project will certainly utilize LEDs to inform users that their table is ready for them. It is most likely easy to circumvent this infringement by arranging the LEDs in a distinctly different pattern. This design patent covers only the design. No patent was found that covered the method used to communicate to the coaster the need to illuminate the LEDs.
ECE 477 Final Report Spring 2004 that the patent specifically mentions wired communication and the project specifically calls for wireless. This is a substantially different way of communicating. Action Recommended to Avoid Infringement For patent D371,054 it would be best to avoid an arrangement of LEDs that looks similar to the arrangement depicted in the figures published with the patent. As it is a design patent, only the final appearance of the project would be considered an infringement.
ECE 477 Final Report 5.0 Spring 2004 Reliability and Safety Analysis For your consideration, our project has been called the “Wireless Ordering Device,” with the unfortunate acronym “WOrD.” This device will not only perform the same function as current restaurant seating devices, which light up when a waiting customer’s table is ready, but adds the functionality of being able to order drinks and appetizers while waiting, so that they can be ready when the table is.
ECE 477 Final Report Spring 2004 For a Schottky Power Diode, base failure rate λb = 0.0030. According to the graphs in the design specs, we can expect our diode to run around 85C with the current draw estimated during design time, making πT = 5.7. For Voltage stress πS, since the Voltage applied isn’t near the maximum rated voltage, the value of 0.054 can be used. An appropriate Quality factor was 5.5, or commercial grade, and contact construction looked like 2.0.
ECE 477 Final Report Spring 2004 λp = λb πR πQ πE λb takes into account both temperature and stress factors. If we go with earlier temperature considerations, and assume high stress, 0.017 should be a safe base rate. However, maximum stress cannot be calculated because at that assumed temperature, maximum would be beyond tolerance, and our design may or may not push the line. Testing and measurements will tell, so we will assume it is high.
ECE 477 Final Report Spring 2004 This result is not surprising, considering we assumed a low quality capacitor and high stress and temperature. However, actual values may be within a power of 10. Using this value, MTTF = 1/ λp = 77,519 hours. This is a lousy value. Before accepting this, I would want to go back and measure temperature and stress levels in an actual circuit, because this capacitor is scheduled to blow in under 8 years of use. In a commercial product, this is utterly unacceptable.
ECE 477 Final Report Spring 2004 Conclusion It was surprising how quickly components can fail under high temperature and high stress situations. Although some assumptions made may have been toward the extreme conservative side, it shows how these considerations need to be taken into account during design time. It is interesting to note that the Power MOSFET and Power Diode are rated to last longer than the capacitor and resistor, likely because they were designed specifically for use in power supplies.
ECE 477 Final Report 6.0 Spring 2004 Ethical and Environmental Impact Analysis The wireless ordering device (WOrD) allows a customer to view limited menus and possibly other information at a commercial establishment (e.g. a restaurant or bar). A transmitter connected to a host computer will serve as a base station transmitting menus and other information. A remote device will act as a user interface receiving the transmitted information and transmitting orders to the base station.
ECE 477 Final Report Spring 2004 grounding the LCD case since it requires a slightly higher bias supply. This will ensure that no shorts or excessive currents will cause harm to the user. Also, it is necessary to pay close attention to the RF sections of both the base unit and the remote unit in order to prevent interruption of service to any other FCC certified devices. This means that these units must be designed such that there are little or no spurious emissions.
ECE 477 Final Report Spring 2004 In addition to the above suggestions on ethical design several other steps can be taken. These include adding warning labels in appropriate places to advise the end user that attempting repair of the device may result in injury. Also, warning of repeated shaking or dropping may result in damage. This ensures that the end user will know how to prevent damage to the unit and protect themselves from injury.
ECE 477 Final Report Spring 2004 will enter its normal usage phase. Even though the product will have a minimum environmental impact at the time, several precautions should be taken. Since the remote unit will utilize battery power, the consumer should be educated in proper recycling methods. By placing warning labels on batteries and in the user’s manual, the end user will have a better understanding of disposal and recycling methods.
ECE 477 Final Report 7.0 Spring 2004 Packaging Design Considerations This design for a wireless ordering device (WOrD) will allow a customer to view limited menus and possibly other information at a commercial establishment. A transmitter connected to a host computer will serve as a base station transmitting menus and other information. On the host side physical size and weight are not too important.
ECE 477 Final Report Spring 2004 Figure 7-2: Similar Devices produced by Visiplex, NTN, and Microframe The J-Tech GuestAlert Guest Paging System (figure 7-1) allows establishments to silently notify their guests. The hostess device features [7-2] an FM mode transmission operating in UHF (450-470 MHz) at 2 watts of power and is powered from a standard 110V outlet. J-Tech offers a range of guest units, so for this comparison the most popular one has been selected, the Glowster Plus [7-3].
ECE 477 Final Report Spring 2004 In contrast to the design to be made, it does not offer a bi-directional communication link nor does it allow the guest to receive menus and other information. In order to achieve this, an LCD, buttons, and a unique menu system will have to be developed for the handheld device. The integration with a display and simple user interface could greatly increase its usefulness in the restaurant industry.
ECE 477 Final Report Spring 2004 paging service; its only use is for an interactive gaming environment. In addition, they are more expensive than conventional restaurant paging services. The bi-directional communication used by the RF transceiver in the Playmaker is a feature that will be adopted. Also, the large (preferably graphical) display is a very important feature that will be required in the design.
ECE 477 Final Report Spring 2004 box [7-8] and all other devices will be mounted to the surface of the PC board. Parts that will be needed are: • Soldering equipment • Drilling and cutting tools • Screwdrivers • Wire strippers Estimate of Packaging Weight and Cost Part Type Weight (lbs) Cost ($) (Base Station + Remote) LCD Display 0.3 0 Push Buttons (5) 0.1 2 Project Boxes (2) 0.6 10 Screws 0.1 1 Total 1.
ECE 477 Final Report 8.0 Spring 2004 Schematic Design Considerations The goal of our project is to design a wireless ordering device (WOrD) which will allow a customer to view limited menus and possibly other information at a commercial establishment (e.g. a restaurant or bar). The end purpose of this project is to allow a patron of a restaurant to be able to order drinks and appetizers while they wait for a table and have their order waiting for them as they are seated.
ECE 477 Final Report Spring 2004 information to the LCD driver memory, monitor the RF transmission line and detect and debounce button presses. Running at 1MHz is certainly enough to handle these tasks easily, meaning that no external oscillator is needed. The graphic LCD display used is the Microtips MTG-S12128XRGNS [2] with and Epson SED1335 driver [3]. The chief reason for this choice was the fact that the company was willing to sample the near $60 part.
ECE 477 Final Report Spring 2004 For the remote device, the LCD module dictates the level of the battery supply. A 6V power supply is easily made using a number of combinations of batteries. It was decided to use 4 AA alkaline batteries. AA alkaline batteries are 1.5V compared to the 1.2V lithium ion and nickel metal hydride batteries. This supply can be regulated to 5V and 3.3V levels using National Semiconductor LP2992 low drop-out voltage converters [8].
ECE 477 Final Report 9.0 Spring 2004 PCB Layout Design Considerations The wireless ordering device (WOrD), which allows customers to view limited menus, requires two separate PCBs: one for the base unit and one for the remote unit. A serial port connection with the host computer serves as the interface between the base station and the computer providing control. This PCB is not size critical and only requires special RF considerations.
ECE 477 Final Report Spring 2004 and digital sections separated so that as little noise as possible passes between them. In addition to the base station requirements, the remote unit layout is intended to reduce the overall size of the device. This should help minimize weight and reduce total package size such that it is small enough to be comfortably held in the user’s hand.
ECE 477 Final Report Spring 2004 10.0 Software Design Considerations Group five’s project, the Wireless Ordering Device, is a tool which is aimed for a commercial industry. This device, about the size of a coaster, will have an LCD screen interface that will allow customers waiting to be seated the chance to order and have drinks and appetizers waiting at their table when they are ready to sit. However, the project is not simply confined to the device itself.
ECE 477 Final Report Spring 2004 Because we are implementing a memory map model, our code and stack will be relatively sleek, but we will need a chunk of space to store it. However, external memory is not needed because of the built-in 8k memory of the LCD module. The memory map will be structured like the screen itself… each “line” of memory will be a line of text on the menu. The first line is 0x00-0x1F (0-31); the second line is 0x20-0x3F and so forth. Each screen is one “page” of 8 lines.
ECE 477 Final Report Spring 2004 in its memory map. Low power consumption is the key feature to interrupt driven programs, and important for the battery driven wireless device. Coding the base station will also be interrupt driven, simply because most of the time it will be inactive. After initialization, the base unit will wait for one of two events.
ECE 477 Final Report Spring 2004 memory. Simultaneously, the LCD screen will be set to show “Updating… Please Wait” until the process is over, when it will resume normal function by displaying the main menu and going back to sleep. Button Interrupt The button interrupt indicates that someone is moving through the menu structure. Pressing the “up” arrow will cause the current item to be deselected and the item above it In the list to be highlighted, if such an item exists.
ECE 477 Final Report Spring 2004 inner workings here. A picture of the program and function of the current version of source code will be included in the Appendix.
ECE 477 Final Report Spring 2004 Wireless Start-up Sequence Set Ports A-E to In/Out/Tri-state Initialize LCD* RF Start-up Sequence Set Wake-up Control Register enable Display Welcome Message on LCD Set Wake-up Data Register enable Initialize RF** Set RF module to Receive mode Set Wake-up Data Rate Register enable Display Main Menu Set Wake-up Address Register enable Sleep until Interrupts -37-
ECE 477 Final Report Spring 2004 Base Start-up Sequence Set Ports A-E to In/Out/Tri-state LCD Start-up Sequence (simplified) Initialize RF** Initialize LCD size information Set RF module to Receive mode Initialize start Addresses of each Layer Sleep until Interrupts Blank Screen Set Cursor Initial Position Hide Cursor -38-
ECE 477 Final Report Spring 2004 11.0 Version 2 Changes Throughout the development of this project we have thought of better ways to implement our objectives as well as wished for features that we could add.
ECE 477 Final Report Spring 2004 12.0 Summary and Conclusions The hardest lesson to learn this semester was to implement our objectives in the simplest way possible. It’s easy to fall into the trap of envisioning a fantastic final product, but having no previous experience with the hardware means that the development lead time is huge. We placed too much faith in our RF reference design and it ultimately let us down. Aside from the RF, our schematic and board layout were excellently done.
ECE 477 Final Report Spring 2004 13.0 References 3-1. Rabbit 2000: http://www.rabbitsemiconductor.com/products/rcm2000/index.shtml 3-2. ATmega88: http://www.atmel.com/dyn/products/product_card.asp?part_id=3302 3-3. AT86RF211: http://www.atmel.com/dyn/products/product_card.asp?part_id=2575 3-4. nRF401 Transceiver: http://www.nvlsi.no/index.cfm?obj=product&act=display&pro=56 3-5. MTG-S12128XRGNS LCD Display: http://www.microtipsusa.com/product_pdfs/Graphic%20Module/128x128/12128X/M TG-S12128XRGNS.
ECE 477 Final Report 5-1. Spring 2004 1N5822 ON Semiconductor Reference Sheet: http://www.onsemi.com/pub/Collateral/1N5820-D.PDF 5-2. Department of Defense. Reliability Prediction of Electronic Equipment: http://shay.ecn.purdue.edu/~dsml/ece477/Homework/Spr2004/Mil-Hdbk-217F.pdf 5-3. MAXIM MAX776 Reference Sheet: http://pdfserv.maxim-ic.com/en/ds/MAX774-MAX776.pdf 5-4. Meyer, D.G. Module 9: Designing for Reliability, Maintainability, and Safety: http://shay.ecn.purdue.
ECE 477 Final Report 7-5. Spring 2004 NTN Guest Paging: http://www.ntn.com/hospitality_tech/products_services/paging_communication/guest _paging.asp 7-6. NTN iTV Network: http://www.ntn.com/hospitality_tech/products_services/entertainment_promotion/itv_ network.asp 7-7. Visiplex VP-Coaster: http://www.visiplex.com/products/coaster.htm 7-8. Project Box: http://www.radioshack.com/product.asp?catalog%5Fname=CTLG&category%5Fnam e=CTLG%5F011%5F002%5F012%5F000&product%5Fid=270%2D1806 7-9.
ECE 477 Final Report Spring 2004 http://pdfserv.maxim-ic.com/en/ds/MAX774-MAX776.pdf 8-8. National Semiconductor LP2992 low-drop out voltage regulator: http://www.national.com/ds/LP/LP2992.pdf 9-1. AT86RF211 Data Sheet: http://www.atmel.com/dyn/resources/prod_documents/DOC1942.PDF 9-2. System Design and Layout Techniques for Noise Reduction in MCU-Based Systems: http://shay.ecn.purdue.edu/~dsml/ece477/Homework/Spr2004/AN1259.pdf 10-1. SED 1335 - LCD Driver Documentation: http://shay.ecn.purdue.
ECE 477 Final Report Spring 2004 Appendix A: Individual Contributions Contributions of Edward Sheriff: Throughout the semester I took on many important roles in the design and development of this project. Initially, Dan and I came up with the idea of the project and we determined the main characteristics and goals of the project. Then as a group we refined these into our project specific outcomes.
ECE 477 Final Report Spring 2004 worked hard to ensure that all portions of the design would be successful. During this time I also learned a lot about coding and I wrote several functions that were used to set up the LCD module and to test the RF section. In order to accomplish this I spent many hours going through the data sheets for nearly all the major components in order to determine startup sequences and work through timing diagrams.
ECE 477 Final Report Spring 2004 down system components, trying to find low power dissipation parts that operated at the 3.3V level that was ideal for the design. It was my goal to have the final remote device package small enough to be easily held and operated while still allowing for a large information viewing area. I was responsible for the circuit design and theory of operation homework. This involved creating the project schematic from the list of components the group had selected.
ECE 477 Final Report Spring 2004 and decode them properly as well as transmit packets based on button presses that were debounced in software. I interfaced the LCD module with the remote device microcontroller so that data sent to the remote device could easily be written to the appropriate address in the LCD memory. I helped integrate the firmware and PC software so that the two worked together flawlessly. I have contributed great time and effort in driving this project to meet its success criteria.
ECE 477 Final Report Spring 2004 code that ended up in the remote unit, and contributed to the base unit code (this code was very simple). I contributed a small portion to hardware design. I was responsible for researching and designing our serial port hardware. I found out that we needed a level translator for the actual serial communication, so I chose one of those for our design. I also found what pins were needed for communication. I also completed the base server software.
ECE 477 Final Report Spring 2004 hardware side of our product, while Mike and I felt we would be better off working with the software design and implementation of the product. Through the course of this semester, my main area of contribution was through the software on the PC end. Together with Mike, we were in charge of all software related programs and development for the design. The first task that Mike and I worked on was the serial transmission.
ECE 477 Final Report Spring 2004 Along with this, I also helped out other team members whenever I could. With Mike I helped interface blinking LEDs to our microcontroller when we first got our development board. Also, along with everyone else I helped debug the microcontroller when we were unable to send and receive serial data from the remote unit. This proved to be a major hurdle that took a considerable amount of time to find the source of the error.
ECE 477 Final Report Spring 2004 Appendix B: Packaging Figure B-1. Initial CAD drawing of Base Station Figure B-2.
ECE 477 Final Report Spring 2004 Figure B-3. Photoshop Rendition of Base Station Figure B-4.
ECE 477 Final Report Spring 2004 Figure B-6. Base Station and Power Connecter Figure B-5.
ECE 477 Final Report Spring 2004 Appendix C: Schematic C-1
ECE 477 Final Report Spring 2004 Figure C-1 Base Device Headers Schematic C-2
ECE 477 Final Report Spring 2004 Figure C-2. Base Device MAX3222 Schematic Figure C-3.
ECE 477 Final Report Spring 2004 Figure C-4.
ECE 477 Final Report Spring 2004 Figure C-5 Base Device Microcontroller Schematic C-5
ECE 477 Final Report Spring 2004 Figure C-6.
ECE 477 Final Report Spring 2004 Figure C-7.
ECE 477 Final Report Spring 2004 Figure C-8.
ECE 477 Final Report Spring 2004 Figure C-9.
ECE 477 Final Report Spring 2004 Figure C-10.
ECE 477 Final Report Spring 2004 Figure C-11.
ECE 477 Final Report Spring 2004 Figure C-12.
ECE 477 Final Report Spring 2004 Appendix D: PCB Layout Top and Bottom Copper Figure D-1.
ECE 477 Final Report Spring 2004 Figure D-2.
ECE 477 Final Report Spring 2004 Figure D-3.
ECE 477 Final Report Spring 2004 Figure D-4.
ECE 477 Final Report Spring 2004 Appendix E: Parts List Spreadsheet Component Vendor Part Number Cost Microcontroller (x 2) Atmel ATmega162V $14 Transceiver (x 2) Atmel AT86RF211 $20 LCD Screen Microtips MTG-12128XRGNS $0 (regularly $60) Project Box (x2) Radioshack 270-1806 $10 Total: $44 (regularly $104) E-1
ECE 477 Final Report Spring 2004 Appendix F: Software Listing Base Firmware (Embedded C) /********************************************* This program was produced by the CodeWizardAVR V1.23.8d Standard Automatic Program Generator © Copyright 1998-2003 HP InfoTech s.r.l. http://www.hpinfotech.ro e-mail:office@hpinfotech.ro Project : Version : Date : 04/23/2004 Author : Chuck Barnett Company : Purdue University Comments: Chip type : ATmega162V Program type : Application Clock frequency : 8.
ECE 477 Final Report Spring 2004 char status,data; #asm push r26 push r27 push r30 push r31 in r26,sreg push r26 #endasm status=UCSR0A; data=UDR0; if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0) { rx_buffer0[rx_wr_index0]=data; if (++rx_wr_index0 == RX_BUFFER_SIZE0) rx_wr_index0=0; if (++rx_counter0 == RX_BUFFER_SIZE0) { rx_counter0=0; rx_buffer_overflow0=1; }; }; #asm pop r26 out sreg,r26 pop r31 pop r30 pop r27 pop r26 #endasm } #pragma savereg+ #ifndef _DEBUG_TERMINAL_IO_ // Get a char
ECE 477 Final Report Spring 2004 // USART1 Receiver interrupt service routine #pragma savereginterrupt [USART1_RXC] void uart1_rx_isr(void) { char status,data; #asm push r26 push r27 push r30 push r31 in r26,sreg push r26 #endasm status=UCSR1A; data=UDR1; if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0) { rx_buffer1[rx_wr_index1]=data; if (++rx_wr_index1 == RX_BUFFER_SIZE1) rx_wr_index1=0; if (++rx_counter1 == RX_BUFFER_SIZE1) { rx_counter1=0; rx_buffer_overflow1=1; }; }; #asm pop r26 out
ECE 477 Final Report Spring 2004 } #pragma used// Standard Input/Output functions #include
ECE 477 Final Report Spring 2004 OCR0=0x00; // Timer/Counter 1 initialization // Clock source: System Clock // Clock value: Timer 1 Stopped // Mode: Normal top=FFFFh // OC1A output: Discon. // OC1B output: Discon.
ECE 477 Final Report Spring 2004 // USART1 Transmitter: On // USART1 Mode: Asynchronous // USART1 Baud rate: 9600 UCSR1A=0x00; UCSR1B=0x98; UCSR1C=0x86; UBRR1H=0x00; UBRR1L=0x33; /* // USART0 initialization // Communication Parameters: 8 Data, 1 Stop, No Parity // USART0 Receiver: On // USART0 Transmitter: On // USART0 Mode: Asynchronous // USART0 Baud rate: 4800 UCSR0A=0x00; UCSR0B=0x98; UCSR0C=0x86; UBRR0H=0x00; UBRR0L=0x67; // USART1 initialization // Communication Parameters: 8 Data, 1 Stop, No Parity
ECE 477 Final Report Spring 2004 input = getchar(); checksum = checksum ^ input; putchar1(input); } putchar1(checksum); } /* If rx_counter1 == 1 and rx_buffer_overflow1 == 0 then full packet received from remote unit. Check checksum and if matches transmit to PC.
ECE 477 Final Report Spring 2004 Remote Firmware (Embedded C) /********************************************* This program was produced by the CodeWizardAVR V1.23.8d Standard Automatic Program Generator © Copyright 1998-2003 HP InfoTech s.r.l. http://www.hpinfotech.ro e-mail:office@hpinfotech.ro Project : Version : Date : 04/23/2004 Author : Group 5 Company : Purdue University Comments: Chip type : ATmega162V Program type : Application Clock frequency : 8.
ECE 477 Final Report Spring 2004 char status,data; //int i; #asm push r26 push r27 push r30 push r31 in r26,sreg push r26 #endasm status=UCSR1A; data=UDR1; //write_LCD(0, '*'); if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0) { // write_LCD(0, '@'); /* write_LCD(0, 'F'); if (FRAMING_ERROR == 0) {write_LCD(0, '0'); write_LCD(0, ' ');} else {write_LCD(0, '1'); write_LCD(0, ' ');} write_LCD(0, 'P'); if (PARITY_ERROR == 0) {write_LCD(0, '0'); write_LCD(0, ' ');} else {write_LCD(0, '1'); write_
ECE 477 Final Report Spring 2004 data=rx_buffer1[rx_rd_index1]; if (++rx_rd_index1 == RX_BUFFER_SIZE1) rx_rd_index1=0; #asm("cli") --rx_counter1; #asm("sei") return data; } #pragma used// Write a character to the USART1 Transmitter #pragma used+ void putchar1(char c) { while ((UCSR1A & DATA_REGISTER_EMPTY)==0); UDR1=c; } #pragma used// Declare your global variables here int lineh[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01 }; int linel[] = { 0x00, 0
ECE 477 Final Report Spring 2004 PORTB=0x00; DDRB=0x00; // Port C initialization // Func0=Out Func1=Out Func2=Out Func3=Out Func4=Out Func5=Out Func6=Out Func7=Out // State0=0 State1=0 State2=0 State3=0 State4=0 State5=0 State6=0 State7=0 PORTC=0x00; DDRC=0xFF; // Port D initialization // Func0=Out Func1=Out Func2=Out Func3=Out Func4=Out Func5=Out Func6=Out Func7=Out // State0=0 State1=0 State2=0 State3=0 State4=0 State5=0 State6=0 State7=0 PORTD=0x1B; DDRD=0xFD; // Port E initialization // Func0=In Func1
ECE 477 Final Report Spring 2004 OCR2=0x00; // External Interrupt(s) initialization // INT0: Off // INT1: Off // INT2: Off // Interrupt on any change on pins PCINT0-7: Off // Interrupt on any change on pins PCINT8-15: Off MCUCR=0x00; EMCUCR=0x00; // Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x00; ETIMSK=0x00; // USART1 initialization // Communication Parameters: 8 Data, 1 Stop, No Parity // USART1 Receiver: On // USART1 Transmitter: On // USART1 Mode: Asynchronous // USART1 Baud rate: 9600 UC
ECE 477 Final Report Spring 2004 write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, 0x05); 0x07); 0x17); 0x21); 0x7F); 0x16); 0x00); // // // // // // // P2 P3 P4 P5 P6 P7 P8 write_LCD(1, write_LCD(0, write_LCD(0, write_LCD(0, 0x44); 0x00); 0x00); 0x80); //Scroll // SAD 1L // SAD 1H // SL1 write_LCD(1, 0x5a); //HDOT SCR write_LCD(0, 0x00); write_LCD(1, 0x5b); //OVLAY write_LCD(0, 0x01); write_LCD(1, 0x58); // Display Off write_LCD(0, 0x04); write_LCD(1, 0x46)
ECE 477 Final Report Spring 2004 write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, 's'); 'a'); 'l'); ' '); 'E'); 'x'); 'p'); 'o'); 'r'); 't'); 's'); ' '); ' '); ' '); write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, write_LCD(0, w
ECE 477 Final Report Spring 2004 write_LCD(0, '.'); write_LCD(0, ' '); write_LCD(0, ' '); for (i = 67; i <= 0x0FFF; i++) { write_LCD(0,0x20); } #asm("sei") while (1) { /*if (USART1_RXC != 0) { write_LCD(0, '%'); putchar1(getchar1()); }*/ /*If rx_counter1 == 24 and rx_buffer_overflow == 0 then a full packet has been received from the PC (base station). Compute and check checksum then transmit confirmation and act accordingly.
ECE 477 Final Report Spring 2004 write_LCD(1, 0x42); for (j = 0; j < 22; j++) { write_LCD(0, ' '); } } } else if (input[0] == 1) { //it's for me, and it's an alert packet!!!! // send confirm packets 0x07, 0x07 and clear button press flags// putchar1(0x07); putchar1(0x07); button_press = 0; // light up LEDs, delay for a few seconds, turn off LEDs PORTD.0 PORTD.1 PORTD.3 PORTD.4 /* PORTD.0 PORTD.1 PORTD.3 PORTD.4 } */ // = !PORTD.0; = !PORTD.1; = !PORTD.3; = !PORTD.
ECE 477 Final Report // // // Spring 2004 } else if (PINA.6 == 0) { // down key pressed delay_ms(12); if (PINA.6 == 0) { // yes, it's really pressed button_press = 1; //send down press packet w/ checksum! putchar1(0x03); putchar1(0x03); write_LCD(0, 'D'); } } else if (PINA.7 == 0) { // left key pressed delay_ms(12); if (PINA.7 == 0) { // yes, it's really pressed button_press = 1; //send left press packet w/ checksum! putchar1(0x04); putchar1(0x04); write_LCD(0, 'L'); } } else if (PINE.
ECE 477 Final Report Spring 2004 PC Server Software (Visual Basic) Const Const Const Const CATMAX = 3 'Category Maximum ITEMMAX = 13 'Item Maximum SPACE = " " 'Space character ARROW = "~" 'ARROW character Dim Dim Dim Dim item_type(CATMAX) item1(ITEMMAX) As item2(ITEMMAX) As item3(ITEMMAX) As As String String String String Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim item_menu(CATMAX) As New item1_screen(ITEMMAX) As item2_screen(ITEMMAX) As item3_screen(ITEMMAX) As item1_cN(ITEMMAX) As New item2_cN(ITEMMA
ECE 477 Final Report Spring 2004 Private Sub CmdRight_Click() Call Menu_move(3, CurMenu) End Sub Private Sub CmdUp_Click() Call Menu_move(1, CurMenu) End Sub Private Dim Dim Dim Dim Sub Command1_click() Items() As String Counter As Integer QTY As Integer Found As Boolean Items = Split(Text1.Text, ",") Found = False For Counter = 0 To (List1.ListCount - 1) If (Items(0) = List1.List(Counter)) And (Items(1) = List2.List(Counter)) Then QTY = List3.List(Counter) QTY = QTY + 1 List3.
ECE 477 Final Report Spring 2004 Case 2: 'down If Not (Ptr.down Is Nothing) Then Set Ptr = Ptr.down End If Case 3: 'right If Not (Ptr.item = "") Then 'Item Order Screen Text1.Text = Ptr.item + ",1" Call Command1_click Text1.Text = "" Set Ptr = item_menu(0) ElseIf Not (Ptr.right Is Nothing) Then Set Ptr = Ptr.right End If Case 4: 'Set Ptr = item_menu(0) If Not (Ptr.left Is Nothing) Then Set Ptr = Ptr.left End If End Select Call SendToSerial(Ptr.menu) End Sub Private Sub Dir1_Change() Dir1.Path = Drive1.
ECE 477 Final Report MSComm1.CommPort = 1 MSComm1.Settings = "9600,N,8,1" MSComm1.PortOpen = True Spring 2004 ' Set the port number ' Set UART parameters ' Required, might lock port Call SendToSerial(CurMenu.menu) End Sub Private Sub Happy_Delay() 'pause for 0.1 seconds to allow RF buffer to send Start = Timer 'Microsoft.VisualBasic.DateAndTime.Timer Finish = Start + 0.02 ' Set end time for .05-second duration. Do While Timer < Finish ' Do other processing while waiting for time to elapse.
ECE 477 Final Report Spring 2004 'MSComm1.Output = Temp 'CheckSum = 0 'temp = i 'For j = 1 To Len(temp) ' k = Mid(temp, j, 1) ' CheckSum = CheckSum Xor AscW(k) 'Next j 'MsgBox CheckSum DOutput.Text = DOutput.Text + Trunc_Width(temp) + vbNewLine Next i 'DOutput.
ECE 477 Final Report Spring 2004 Input #1, item1(i) Next i For i = 0 To ITEMMAX - 1 Input #1, item2(i) Next i For i = 0 To ITEMMAX - 1 Input #1, item3(i) Next i Close #1 Set CurMenu = item_menu(0) ' -mikeCall SendToSerial(CurMenu.menu) 'Call MenuLoad_Click Set CurMenu = item_menu(0) ' ********TOP LEVEL********* For i = 0 To CATMAX - 2 Set item_menu(i).down = item_menu(i + 1) Next i Set item_menu(0).right = item1_screen(0) Set item_menu(1).right = item2_screen(0) Set item_menu(2).
ECE 477 Final Report Spring 2004 For i = 1 To ITEMMAX - 1 Set item1_screen(i).up = item1_screen(i - 1) Next i For i = 0 To ITEMMAX - 1 For j = 0 To ITEMMAX - 1 If i = j Then item1_screen(i).menu = item1_screen(i).menu + ARROW Else item1_screen(i).menu = item1_screen(i).menu + SPACE End If item1_screen(i).menu = item1_screen(i).menu + item1(j) + vbNewLine Next j Next i ' ********SECOND LEVEL********* ' ******** ITEM 2 ********* For i = 0 To ITEMMAX - 2 Set item2_screen(i).
ECE 477 Final Report Spring 2004 For i = 1 To ITEMMAX - 1 Set item3_screen(i).up = item3_screen(i - 1) Next i For i = 0 To ITEMMAX - 1 For j = 0 To ITEMMAX - 1 If i = j Then item3_screen(i).menu = item3_screen(i).menu + ARROW Else item3_screen(i).menu = item3_screen(i).menu + SPACE End If item3_screen(i).menu = item3_screen(i).menu + item3(j) + vbNewLine Next j Next i ' ********THIRD LEVEL********* For i = 0 To ITEMMAX - 1 Set item1_cN(i).left = item1_screen(i) item1_cN(i).
ECE 477 Final Report Spring 2004 Set item3_cY(i).left = item3_screen(i) item3_cY(i).menu = "Are you sure you want a(n)" + vbNewLine + SPACE + item3(i) + vbNewLine + YesStr + vbNewLine Next i Call SendToSerial(item_menu(0).menu) End Sub Private Sub MSComm1_OnComm() Dim temp As String ' ' MSComm1.Output = OutgoingText.Text Buffer$ = Buffer$ & MSComm1.Input temp = Buffer$ If Temp = "+" Then Call Command1_click ' Send data ' Read data ' Text1.Text = "" ' Else ' Text1.Text = Text1.
ECE 477 Final Report Spring 2004 List1.RemoveItem (Counter) List2.RemoveItem (Counter) List3.RemoveItem (Counter) Counter = Counter - 1 End If Next myString = Combo1.Text For Counter = 0 To (Combo1.ListCount - 1) If (Combo1.List(Counter) = myString) Then Combo1.RemoveItem (Counter) Counter = Counter - 1 End If Next 'Combo1.RemoveItem (Counter) Address = 0 OpCode = 1 Cmd = &H100 MSComm1.
ECE 477 Final Report Spring 2004 Menu Editor (Visual Basic) Dim Counter As Integer Private Sub Dir1_Change() Dir1.Path = Drive1.Drive Call File1_Click End Sub Private Sub Drive1_Change() ChDrive Drive1.Drive Call Dir1_Change End Sub Private Sub File1_Click() File1.Path = Dir1.Path Location.Text = File1.Path + "\" + File1.FileName End Sub Private Sub OpenFile_Click() Dim sTemp(42) As String If Not Location.Text = "" Then Open Location.
ECE 477 Final Report Spring 2004 Open Location.Text For Output As #1 For Counter = 0 To 2 Print #1, Cat.Item(Counter) Next For Counter = 0 To 12 Print #1, Item1.Item(Counter) Next For Counter = 0 To 12 Print #1, Item2.Item(Counter) Next For Counter = 0 To 12 Print #1, Item3.Item(Counter) Next Close #1 Debug1.Text = "Saved " + Location.
ECE 477 Final Report Spring 2004 Menu Editor (C++) /* Name: Jon Hopp Compiler/OS Used: gcc UNIX ECE 477 Group 5 - Simple Menu Editor */ #include #include #include #include #include #define CHARMAX 20 #define ITEMMAX 16 #define CATMAX 3 using namespace std; string openTextFile( string filename ) { string s1 =""; // converts the string into a char* const char* newname = filename.
ECE 477 Final Report Spring 2004 } // saveTextFile() void setStrings(string text, char s1[], char s2[], char s3[]) { int i; int i2 = 0; int i3 = 0; int s = 1; const char* cp = text.
ECE 477 Final Report Spring 2004 void newscreen () { for (int i = 0; i < 50; i++) cout << endl; } int main() { int i,j,k; int selection1; int submSel; string subMore = ""; int editNum = 0; int editNum2 = 0; //char text[4 + 3*CHARMAX] = ""; string stext = ""; string filename = ""; char item_menu[CATMAX][CHARMAX]; char cat_menus[CATMAX][ITEMMAX][CHARMAX]; char s1[CHARMAX] = ""; char s2[CHARMAX] = ""; char s3[CHARMAX] = ""; char newstr[CHARMAX] = ""; char n[2] = "\n"; char * sptr; char buff[C
ECE 477 Final Report Spring 2004 switch (selection1) { case 1: //newscreen(); cout<< "File to Load: "; cin >> filename; stext = openTextFile(filename); if ( stext == "" ) filename = ""; else { //setStrings(stext, s1, s2, s3); strcpy (&buff[0], stext.
ECE 477 Final Report Spring 2004 strcat (buff,n); } for (i = 0; i < CATMAX; i++) { for (j = 0; j < ITEMMAX; j++) { strcat (buff,cat_menus[i][j]); strcat (buff,n); } } saveTextFile(buff,filename); break; case 4: do { //cout << endl << endl; do { newscreen(); cout << "****************************" << endl; for (int i = 0; i < CATMAX; i++) cout << i+1 << ": " << item_menu[i] << endl; cout << "****************************" << endl; cout<< "Show which submenu?: "; cin >> submSel; } while ( (submSel-1 < 0) || (
ECE 477 Final Report Spring 2004 cout<< endl << 2*CATMAX + 1 << ": Cancel" << cout<< "Edit line number to Edit: "; cin >> editNum; endl; if ( (editNum >= 1) && (editNum <= CATMAX) ) { cin.getline(newstr, 1); cout<< "Enter replacement string: "; cin.
ECE 477 Final Report Spring 2004 return(0); } F-36
ECE 477 Final Report Spring 2004 Appendix G: User Manual WIRELESS ORDERING DEVICE SYSTEM 2004 Universal Exports Patent pending G-1
ECE 477 Final Report Spring 2004 THANK YOU You have purchased the key to revolutionizing your patron’s dining experience. With Wireless Ordering Devices (WODs) it is now possible to reduce lead time in serving your customers. As the customer waits for their table, they can utilize the easy to use WOD to communicate their order to the kitchen. Imagine their satisfaction to sit down at their table and have their order fresh and waiting for them.
ECE 477 Final Report Spring 2004 Table of Contents Table of Contents……………………………………………………………………………………………….3 Setting up the system…………………………………………………………………………………………4 Using the hardware…………………………………………………………………………………………….5 Using the software……………….…………………………………………………………………………….7 Safety Information………………………………………………………………………………………………11 Troubleshooting………………………………………………………………………………………………….
ECE 477 Final Report Spring 2004 Setting up the system Minimum System Requirements: PC running Microsoft Windows® 98, 2000, NT, XP or later AMD Athlon® or compatible microprocessor running at 667MHz or faster 32MB unused memory CD-ROM drive Unused serial port Step 1: Install batteries into the remote unit and move power switch to on. Step 2: Plug the base station’s power supply into the wall. Step 3: Plug the serial cable of the base station into the COM1 serial port of your computer.
ECE 477 Final Report Spring 2004 Using the hardware Hardware Overview The WOD System contains a base unit and multiple remote units (quantity depends upon system purchased). The base unit has two connectors. The DB-9 Serial Port connector (on the left) must be connected between the base unit and your computer using the supplied cable. Then, the power cable must be connected between the base unit an electrical outlet using the supplied 5V power adaptor.
ECE 477 Final Report Spring 2004 The remote unit is intended to be simple to use and menu navigation should be intuitive for all user. An arrow will appear next to the current selection and the up and down navigation buttons can be used to scroll up and down the list. Once the selection arrow is next to the desired item, the right navigation button can then be used to select the item and the left navigation button can used to move back to the prior menu.
ECE 477 Final Report Spring 2004 Using the software Set up Before running your new WOD System, you need to set up the available menu items on your device. From CD Drive, run menu.exe and open the menu. Create up to 3 submenus (e.g. Drinks, Appetizers) and save them. Then, edit the submenus and add in as many items as you would like available to the customers on their device.
ECE 477 Final Report Spring 2004 Once you are satisfied, save and close them menu, and run WOD_system.exe. Normal Operation WOD_system.exe is the brains of the WOD System environment. From here, remote devices get their menu items and tell servers that they have an order from the customer.
ECE 477 Final Report Spring 2004 Once running, everything is done automatically. The only thing that needs to be done is to observe the order window for new customer requests.
ECE 477 Final Report Spring 2004 …and their information will be cleared from the list… …and a message will be sent to light the remote device and alert the customer that their table is ready.
ECE 477 Final Report Spring 2004 Safety Information • Do not submerge base station or remote devices in water. If any component becomes wet or dirty, wipe moisture off with soft, dry cloth and let component air dry for a minimum of 2 hours. • Do not tamper with internal components of base station or remote devices. There are no user serviceable parts inside the cases. The only maintenance this system needs is to replace the batteries in remote devices as they fail. (See troubleshooting).
ECE 477 Final Report Spring 2004 Troubleshooting Problem LCD screen on remote device is not turning on when remote is powered on. LCD screen displays wrong information. Navigation buttons are unresponsive. WOD_system.exe hangs or crashes unexpectedly. Solution Ensure batteries are fresh and that power switch is set to ON. To replace batteries, unscrew remote device, locate and open battery case, and replace with 4 fresh new AA batteries.
ECE 477 Final Report Spring 2004 Appendix H: FMECA Worksheet Failure Failure Mode No.
ECE 477 Final Report Spring 2004 Observation Low Unpredictable Observation Low Order will not be received; Patron will not know table is ready. Observation Low LED-1 All LEDs fail to light Power supply failure, Unit will not software malfunction, flash; Patron will not know table is LED failure ready.