Home
ECE 477 Final Report − Spring 2013 Team #20 − Marble Maze
Contents
1. 24 ECE 477 Final Report Spring 2013 11 0 Version 2 Changes Pick better motor drivers from the start From a more reliable and well tested vendor Get beefier power for the motors They work but the power could easily be improved Not even drawing max amperage the regulator gets rather hot Use unipolar stepper motors instead of bipolar Unipolar seem easier to control Choose a microcontroller that does not use peripheral pin selection or has much better documentation on it Order parts earlier and begin interfacing immediately Try to have a working prototype using the development board in case there are setbacks with the PCB Route all pins from the microcontroller to headers then to any components on the PCB Make additional header pins for power and ground other than the ones needed for the microcontroller pins Use the amount of microcontrollers in stock at popular electronic supply outlets as another component criterion Order a development board with headers that are easier to access and that has as many header connections as it does pins on the microcontroller 25 ECE 477 Final Report Spring 2013 12 0 Summary and Conclusions We designed and constructed a smart phone controlled mechanized marble maze This product is meant as a fun pastime for children but is certainly entertaining to adults as well The product is basically a heavily modified store bought game with electronics and high resolution stepper motors
2. 31 showed to be the best choice for solving the problem of initial board orientation When first powered up the microcontroller needs to level the game board before the game starts Additionally to prevent the motors from spinning the knobs beyond the maximum angle for the game board a feedback mechanism was needed With a triple axis accelerometer the flat orientation can be found at the start of the game and the rotation of the board can always be known This in addition to step counting with the motors could provide a very effective feedback mechanism for board control The stepper motor and corresponding driver circuits StepGenies were chosen to try and match either the 3 3V or 5V supplies that were already being used The goal was to eliminate the need for a third voltage regulator on the board When the drive mode is fixed each driver requires three inputs step direction and enable 32 Unfortunately when our stepper motor drivers arrived they showed no signs of life We quickly ordered new stepper motor drivers the L297 33 These provided built in drivers which also eliminated our need for hexfets Because the addition of the motors on the axels and the circuit components on the inside of the marble maze hindered the motors in different amounts per direction the triple axis accelerometer proved ineffective for providing feedback Instead we stuck to counting steps taken in either direction For the final operation the board
3. cache freescale com files microcontrollers doc data_sheet MC68HC908GP32 pdf fps p l amp WT_TYPE Data 20Sheets amp WT_VENDOR FREESCALE amp WT_FILE FORMAT pdf amp WT_ASSET Documentation Kraemer Sandy F 1974 Tilt Board Game United States http www freepatentsonline com 3787055 pdf Cheuk Miu Kwan Hong Kong HK 2012 MOTOR SPEED CONTROL SYSTEM United States KING GOLDEN LIMITED HONG KONG HK http www freepatentsonline com 20120223662 pdf Pulford Jr Robert Wolcott CT 2000 Stepper motor control United States Tri Tech Inc Waterbury CT http www freepatentsonline com 6150789 pdf Military Handbook Reliability Prediction of Electronic Equipment Online https engineering purdue edu ece477 Homework CommonRefs Mil Hdbk 217F pdf Fairchild Semiconductor IRF530 Datasheet Online http www datasheetcatalog org datasheet fairchild IRF530 pdf Microchip PIC18F97J94 Datasheet Online http ww1 microchip com downloads en DeviceDoc 30575A pdf Texas Instruments LM2576 Datasheet Online http www ti com lit ds symlink lm2576 pdf 10 Wikipedia 2013 April 12 Printed Circuit Board Online Available http en wikipedia org wiki Printed_circuit_board Chemical_etching 11 Wikipedia 2013 April 12 Ammonium Persalfate Online Available http en wikipedia org wiki Ammonium_persulfate J7 ECE 477 Final Report Spring 2013 12 Wikipedia 2013 April 12 Fer
4. closed microcontroller or source 1A current stepper drivers part failure constantly could cause combustion Figure F 1 FMECA Table for Power MOSFETs ECE 477 Final Report Spring 2013 Failure Failure Mode Possible Causes Failure Effects Method of Criticality Remarks No Detection Bl Output 0V Failure of power Lack of power to Observe Low Inconvenient to user supply circuit circuit components capacitors inductors diodes B2 Actual output gt Failure of power Power MOSFETs Observation High Could destroy expected output supply circuit source 1A current components on board either 3 3V or components constantly could 5V capacitors cause combustion inductors diodes B3 Output out of Failure of power Unpredictable Observation Medium Could overpower tolerance supply circuit output components or under components capacitors inductors diodes power components and cause them to function incorrectly Figure F 2 FMECA Table for Voltage Regulators ECE 477 Final Report Spring 2013 Failure Failure Mode Possible Causes Failure Effects Method of Criticality Remarks No Detection Cl Output Software peripheral No output to Observation Low Inconvenient to user continuously 0 failures peripherals C2 Output Software peripheral Constantly on Observation High If motor control always continuously 1 failures output to periphera
5. 8 and based on data from its datasheet 9 This component is present in both the 3 3V and 5V power supplies The biggest risk associated with failure of the voltage regulator would be overpowering other components on the printed circuit board and destroying those components due to the voltage overload This could cause a chain reaction that leads to other failures and irreparability of the game To try to mitigate the risks of this failure fuses could be inserted in the circuit to break power to the rest of the board under failure conditions 10 ECE 477 Final Report Spring 2013 Parameter name Description Value Comments Ab Base Failure Rate 0 0020 Voltage Regulator Value TT Temperature Factor 6 7 150 Max Junction Temp Ts Electrical Stress Factor 1 0 Voltage Regulator Value Tc Contact Construction 1 0 Metalurgically Bonded TQ Quality Factor 5 5 Non Military Grade TTE Environment Factor 6 0 Ground Fixed Entire design p bNTISTCTNQTNE 4 422 x 107 MTTF 257 9818 years units hr Figure 2 Texas Instruments LM2576 MTTF Calculations Calculations for the Microchip PIC18F67J94 microcontroller were performed based on microcircuit section information specified in section 5 1 of the MIL HDBK 217F handbook 10 and based on information from its datasheet 11 The biggest reliability issue with this component comes from bugs in the microcontroller code or incorrect inputs from peripherals tha
6. 24 Potential hazards include electric shock chocking on the marble and getting a body part pinched by the playing surface Some of these risks can be reduced substantially but none can be completely removed It s important to keep in mind that there will always be a potential for personal injury and the goal is to make that potential as small as possible Other ethical issues we must address include providing the consumer with a reliable and long lasting product in a way which doesn t increase the environmental impact of the device The risk of electrical shock can be reduced by ensuring all electric components are physically isolated from the user by placing them inside the housing of the device and using appropriately sized and insulated wiring The device should also be sealed such that the user has no access to the electronic components All external metal components should be grounded and a fuse or circuit breaker to limit the device current should be incorporated The choking hazard could be eliminated by sealing the marble in the playing surface with a transparent plastic overlay This would allow gameplay to proceed as normal while removing access to the item small enough to choke on The overlay should be constructed from a shatterproof material that doesn t introduce any additional hazards Alternatively a minimum age limit could be suggested to prevent the most at risk users children under four 25 from coming in contact with
7. added on The tilt of the maze is dictated by the orientation of an iPhone utilizing the accelerometer in the phone and translating that motion into motion on the board There are also joysticks to play the game in the absence of an iPhone The board runs off a 9V power supply and keeps track of player statistics and high scores As for new knowledge that we gained over the semester working with Eagle to create a real working PCB from scratch was fairly new territory All the tools techniques and procedures used in the design and construction of the PCB gave us a new skillset Another major part was learning to use a new microcontroller From learning what pins to connect to program it to how to initialize and write to pins it was a process of reading documentation and finding what we needed to know Also a lot of learning went on to effectively control the stepper motors without killing the rest of the circuit Learned about wireless routing capabilities of Linux web servers and services and interfacing several applications together in order to connect the iPhone to the RPi and the MCU Overall it was a good experience that we gained a lot from 26 ECE 477 Final Report Spring 2013 References 1 2 3 4 5 6 7 8 9 Microchip 2012 PICISF97J94 Family Online Available http ww1 microchip com downloads en DeviceDoc 30575A pdf 2008 January MC68HC908GP32 Online Available http
8. drive each stepper motor Some non critical functions the microcontroller will perform are detecting if a ball has fallen through a hole possibly by using a sensor and an interrupt playing different sounds keeping track of time elapsed for the game displaying information on LEDs an LCD sending data back to the phone through a serial connection to the wireless module and storing game data These functions will not happen as frequently and can be performed in between packets received The only real time constraint of the device will be to perform motor control before the next packet arrives 3 2 Interface Requirements Our device will be interfaced through UART or SPI to the wireless module requiring two wires to transmit and receive An SPI port will be used while debugging to transfer data ADC will be used to read data from sensors specifically two for a joystick used for debugging and two for a tilt sensor gyroscope mounted to the board PWM will be used to control a speaker and numerous LEDs Two pins will be used for the PWM and an additional for a clock which will go to a PWM enabled LED driver attached to the LEDs Four GPIO ports will be used to control the stepper drivers which will be optically isolated from the two motors 4 ECE 477 Final Report Spring 2013 3 3 On Chip Peripheral Requirements For serial communication the chip needs to support two ports for UART one for transmitting and one for receiving for the wireless mod
9. neces eens eae ees 5 3 5 Power OMSIESIOUS cianiaraes an picardeacessesentducancs EEE EE EEEE EEEE 5 3 6 P ckagi g Constraints eee ommno n E E EEE EEE EER 5 3 7 Cost Constraints cg saceagieassiasetanhanseecenesd ontdnaeitedeonseoaieagn REEERE BAREN 6 3 8 Component Selection Raonale sic cece se sdyancverestadsescxoenseinwesevacaueevenseeuesieus 6 4 0 Patent Liability A alysiS eein a extn eaud e a a a E eaa 8 4 1 Results of Patent and Product Search c cece ccc ccecee eee e ee ene eens eae eeenees 8 4 2 Analysis of Patent Liability xc isiesc ssa niaaiiexeaye sheotitraneoiascseaasiverecesiaunleeies 10 4 3 Action Recommended rosier even cena i E area Gta 11 5 0 Reliability and Safety Analysis cececccecsseceseceseceeeceeseecsseceseeeeeeeeseecsueceseeeeeeeeaeeeaeens 12 Sel Reliability AnalySiSicrrreskers Siea eat vests rann rene O VEETEE ENFER IAES 12 32 FEMCA aieea mer E E E ea eres 15 6 0 Ethical and Environmental Impact Analysis ssssseseesessseessessssesseesesessseeseserssresseserss 147 6 1 Environmental Impact Analysis sssseeeesnneesssssssssseerrseessssssrserrrrrereesn 17 6 2 Ethical Challenges ca 422 vais sin ceeensieena E TE EEEE EE SE 19 7 0 Packaging Design Considerations c cccccecsseceseceseceeeceeseecaeceseeeeeeeeseecsaeceeeeeseenseeesaeens 20 7 1 Commercial Product Pack a ing lt 4 d aciveventnsy eceneeasyedounidersse essa pleaubinessesies 20 7 2 Project Packaging SPECINCAN ONS duo ecsywed
10. of voltage regulators 35 were used for both the 3 3V and 5V supply the capacitors are the same for both The unregulated voltage capacitors are 100uF and the regulated voltage capacitors are 1000uF The microcontroller uses its internal crystal and runs at 8MHz The PIC uses luF capacitors for decoupling as recommended by the datasheet Each motor draws around 1A of current during operation and the Raspberry Pi draws about 7A Because of this we chose a power supply rated at 9V and 4A to give plenty of overhead with current 21 ECE 477 Final Report Spring 2013 9 0 PCB Layout Considerations The PCB for the Marble Maze has four major components that need to be laid out The PIC18F67J94 MCU will be placed at the center with a nearby oscillator On one side of the board the stepper motor drivers are positioned such that the motors control lines will be connect to a header Sequestered in a corner are the voltage regulators which need to be separate because of rapidly switching signals The raspberry pi and tilt sensor are placed around the edge of the board and extra MCU pins are routed to headers 9 1 PCB Layout Design Considerations Overall To minimize EMI the voltage regulator circuit should be isolated as much as possible from the rest of the board Similarly the signals to the raspberry pi should be kept separate Also important with the raspberry pi is to connect it to the same ground as the rest of the board since otherwi
11. them the usable life of the product is extended considerably Another area of conflict resides in the users ability to disassemble the device for disposal while still providing adequate physical protection from the electronics while the device is in operation 16 ECE 477 Final Report Spring 2013 7 0 Packaging Design Considerations 7 1 Commercial Product Packaging Product 1 Figure 7 1 Baseball A commercial product similar to our project is the Front Porch Classics Baseball 26 desktop game Baseball is a tabletop game that simulates a version of the sport baseball using a marble and flipper to represent a ball and bat and these are built into a wooden frame shaped like a baseball field The flipper is used to hit the marble across the playing surface and into one of several holes which simulates batting and scoring The playing surface has holes in it and the interior is sloped to return the marble to the player Baseball is constructed out of unfinished wood in a baseball diamond shape Utilizing wood as the primary construction material is low cost the game costs approximately 23 dollars and makes the product s frame sturdy The game s durability is increased by using wood because of its capability to absorb many small impacts without breaking whereas plastic could shatter if not specifically designed to be impact resistant Wood has low tooling requirements and is easy to modify The downside of using wood is increased wei
12. there are quite a few unused pins on the microcontroller but we may have need for those pins later in the semester 9 3 PCB Layout Design Considerations Power Supply The power supply circuitry including a barrel jack to connect to a wall wart is located in the lower left of the PCB board Large aluminum electrolytic capacitors were selected as the bulk capacitors 38 a 100uF Cin and a 1000uF Cout These capacitors are located near the edge of the board close to the barrel jack All power supply components isolated from the other major components on the board to help prevent the fast switching of the regulator from causing unwanted noise in other signals An inductor and a diode are also needed as support circuitry to the LM2576 voltage regulator 40 The circuitry is duplicated for a 5 volt regulator chip and a 3 3V regulator as both voltages are required by other components Thick traces were used for all power components and these traces extend around the board but without forming a complete loop When we have moved farther along in the project we will be able to add in a ground plane to the PCB design which should help ensure better function of the ground and power lines The ground line which is kept at a 100 mil trace where possible runs up and around the top of the board ultimately feeding to the hexfets and motor drivers on the far side of the board The Vdd line moves up the middle of the board for ease of access to all the co
13. with most of our parts Aside from that I helped in designing our schematic using the datasheets from the parts we had selected to know which pins connected where what decoupling capacitors were needed and which pins had to be routed to headers At the beginning of the semester I did a lot of work selecting the microcontroller based on our constraints and picked out a lot of the parts that we would need to get our design to work After we decided on which parts we would use I helped design the schematic with the parts and ensure all the pinouts were correct I also spent a lot of time familiarizing myself with the PIC s 700 page datasheet and looking through all the possible peripherals we could use and deciding on which would be best to do certain functions such as drive the motors communicate with the Raspberry Pi and monitor digital inputs from buttons gates Once our development board arrived I began learning in depth how to control different features of it Once I had the correct software to connect and program it I was able to load on the first heartbeat program After that it was just a matter of reading the data sheet and learning new peripherals I began writing functions that could be used in later programs for things such as delays timers ADC and UART I spent a large amount of time learning new peripherals and then writing a program that could test them out with one of our components as they slowly arrived I also spent time
14. writing functions for interfacing with parts such as shift registers or an LCD that did not require complex peripherals but still needed a lot of debugging My main downfall was not having a way to test UART receive which ended up not working and used up a lot of time After I got an LCD functioning by using an Arduino as a serial controller it was very easy to interface with other components such as our accelerometer Instead of simply toggling LEDs I could now print informative messages and debug efficiently I was able to write functions that could be used with our PCB for the accelerometer joysticks timers for motor control and keeping track of play time within a game sending and I assumed receiving over UART an interrupt service routine and writing to and reading from flash all before our PCB was functional Once the PCB was assembled I spent a lot of time loading heartbeat programs onto it and testing that it worked correctly Because I was the only one who knew how to program our microcontroller I had to work alongside Justin and Mark a lot when testing that the motors worked and the PCB was functioning again when it would burn out When the PCB wasn t working I d work with John on getting the PIC and Raspberry Pi to communicate and inventing the protocol we d use for transmitting tilt angles high scores and game times ECE 477 Final Report Spring 2013 Finally after our PCB was assembled and the motors were mounted and wo
15. 1 2 83 Instruments Digikey Texas SN74HC164DR Shift Register 49 2 98 Instruments Newark Raspberry Pi MODB 512M Raspberry Pi 35 00 1 35 00 Adafruit Adafruit 1140 Pi Shell 7 90 1 7 90 Adafruit OURLiNK 814 WiFi Module 11 95 1 11 95 Sparkfun 4UCON PRT 09011 USB Female A 1 25 1 1 25 Connector Digikey Microchip PIC18F67J94 Microcontroller 3 34 3 34 Jameco Reliapro 39BYG001 R Stepper Motor 21 95 2 43 90 Mouser Condor SL CENB1040 Plug In AC 23 36 1 23 36 Power A0903F01 Adapter Amazon Brio B0001 WGISK K Marble Maze 39 99 1 39 99 Game Sparkfun Sparkfun COM 09032 Joysticks 3 95 2 7 90 Digikey TE 5555165 1 RJ11 Jack 93 4 3 72 Connectivity Sparkfun Sparkfun SEN 00241 IR emitter and 1 95 2 3 90 detector Digikey Micro MMBD301 TP_ Schottkey Diode 70 2 1 40 Commercial Microtivity Texas L297 Stepper motor 4 95 2 9 90 Instruments driver Sparkfun Arduino DEV 11113 Arduino Pro 9 95 1 9 95 Mini 5V Sparkfun Xiamen LCD 09052 LCD display 14 95 1 14 95 Amotec Display Co Total 225 27 ECE 477 Final Report Spring 2013 Appendix F FMECA Worksheet Failure Failure Mode Possible Causes Failure Effects Method of Criticality Remarks No Detection Al Output stuck open Error from Motors Observation Low Inconvenient not microcontroller or unresponsive dangerous stepper drivers part failure A2 Output stuck Error from Power MOSFETs Observation High Dangerous to user
16. 477 Final Report Spring 2013 mounting the motors in line with their axis and directly coupling them together with hardware I mounted all the components to the chassis and routed their wires back to the PCB headers I altered the original chassis to provide space for attaching the PCB and dongles inside the marble maze chassis I filled the holes on the surface of the maze and later removed excess filler During the integration phase I spent considerable amounts of time connecting and debugging all the components Some of the issues that I addressed were incorrect voltage levels being delivered to IC s incorrect output pin assignments and poor solder joints One of the tricky bugs I solved was identifying the pin headers as faulty connections to the PCB I traced the problem using a digital multimeter and logic analyzer and found that the pin headers didn t work well with the ribbon cables initially used on the dongles This was a difficult bug because it was intermittent and not visibly apparent I fixed this problem by substituting different i e thicker wiring for the ribbon cables reattaching all the pin headers and then checking each connection individually for continuity ECE 477 Final Report Spring 2013 A 3 Contributions of John Jachna I did my best to contribute my unique skill set and talents to this project as well as supporting my teammates in accomplishing their tasks First I design programmed and tested the iPhone ap
17. ECE 477 Final Report Spring 2013 Team 20 arble Maze Left to Right Mark Sears John Jachna Justin Spencer Jordan Wagner Team Members 1 Mark Sears Signature Iltut AA Date 4 29 2013 2 Justin Spencer Signature Zee Genen Date 4 29 2013 3 John Jachna Signature E Date 4 29 2013 4 Jordan Wagner Signature Om A Li ave _ Date 4 29 2013 CRITERION SCORE 6 Technical content Design documentation Technical writing style Contributions Editing Comments ECE 477 Final Report Spring 2013 Table of Contents ADSI AC sa scauincsuchatvanstacantesuadniseadussiesauisonacticeseundsdlpussuigeusshaaesmpandenysesssaseusesuewnaanswantedasiamuasaasuasmudnaeteids 1 1 0 Project Overview and Block Diagram 00 ccceccceccesseeesceceseceeceeceeeaeecsaeceseeseeeesseeesaeenseenaes 1 2 0 Team Success Criteria and Filia llme titssse cies cccccepneteteaatiaindeeansetcaaniaeadeumeinigancunaaaaennne 2 3 0 Constraint Analysis and Component Selechi0ths c ccsvessssacsasssesacsrescesustvsntaveasssedseutsesaiavnsenines 3 3 1 Computation REQUireniGits ss 2 02ncessucserctenssandstardensssonrteadsanciosanbasanesegies 4 3 2 Interface RE GUILeMCnLs ga uicatieuense sea veisessusveureeseese yhoasiieianeisersaeieaeiness 4 3 3 On Chip Peripheral Requirements 5is ester excderteanvs ul Cie eoneded envetvendcderauatixs 5 3 4 Off Chip Peripheral Requirements 00 0 cece cee cc cece ee ee ee ence
18. Instruments LM2576 Voltage Regulators and the Microchip PIC18F67J94 microcontroller Calculations for the Fairchild IRF530 were performed based on the low frequency transistors specified in section 6 4 of the MIL HDBK 217F handbook 6 and based on information from its datasheet 7 The most critical reliability and safety issue in this project revolves around the power MOSFETs that driver the stepper motors These components have the potential to get extremely hot 170 C maximum junction temperature and if the part fails in the stuck closed position it could generate extreme amounts of heat by sourcing 1A of current that could ignite the wooden game board and endanger the safety of the users To reduce this risk a temperature sensor could be installed that would open the circuit if the MOSFETs exceeded the recommended temperature for an extended period of time Parameter name Description Value Comments Ap Base Failure Rate 0 0045 Power MOSTFET Value TT Temperature Factor 8 3 170 Max Junction Temp TA Application Factor 8 0 Max Pow Dissipation 79W TQ Quality Factor 5 5 Non Military Grade TE Environment Factor 6 0 Ground Fixed Entire design p bTTTANQTE 9 8604x10 MTTF 11 5694 years units hr Figure 1 Fairchild IRF530 MTTF Calculations Calculations for the Texas Instruments LM2576 were based on the guidelines for low frequency diodes in section 6 1 of the MIL HDBK 217F handbook
19. Patent 2 Motor speed control system 4 Patent Pending Inventor Miu Kwan Cheuk Filed March 4 2011 Abstract A motor control system which can be connected with Wi Fi and Bluetooth comprising of a motor a power supply and a cooling fan There is also a speed control circuit connected with the cooling fan wherein there is a mode of Wi Fi and or Bluetooth in the control circuit of which it can connect with all kinds of devices which have Wi Fi Claims that may cause infringement 1 A motor control system which can be connected with Wi Fi and Bluetooth comprising of a power supply a motor a cooling fan the power supply the motor and the control circuit board are connected with the cooling fan there is also a mode of Wi Fi and or Bluetooth in this control circuit board the present utility can connect with all kinds of electronic devices which have a mode of Wi Fi and or Bluetooth 2 A motor control system as in claim 1 there is also a button which is connected with the cooling fan for mode operation conversion Patent 3 Stepper motor control 5 Inventor Robert Pulford Jr Filed June 1 1999 Abstract A stepper motor control including a driver to drive the stepper rotor a detector to detect a command step rate signal provided to the driver and to provide an output signal to provide driving power to the driver and to increase voltage to the driver in proportion to an increase in magnitude of the output signal Voltage con
20. aciheea Gena bisa edaneedia a eiaUenie 21 7 3 PCB Footprint LAyOuts sescccceesdtanenseaceantencaphevennd rand exsnrheieandensandandsaneen 21 8 0 Schematic Design Consider wns ig lt cstnesacsaviccsseboadecstaacoeuiteasnemeesa rian 201 8 1 Theory of Op tatiot sorses iaioe EEEE E EEE TEE 21 8 2 Design Narrative ssssssssesreeesrsssssrerrrrrrsrrrrrrerrsrsssssrerrerresesrsseee 22 9 0 PCB Layout Design Considerations ccecceeseeeeees Error Bookmark not defined 2 9 1 PCB Layout Design Considerations Overall cc cceceee ence eee eeeeneenes 23 9 2 PCB Layout Design Considerations Microcontroller ceeeeeeee eens 23 9 3 PCB Layout Design Considerations Power Supply cccceeeeeeeeee ees 23 10 0 Software Design GC onsiGera Ons o csisasssenesausussoeasartnssavdesdosuu siaii ia gie iois 244 10 1 Design ConsideraOns is cad snccacnsnusecsnadeiniedeendscdiansidaewavesspesaaxeden sapees 24 10 2 Design Narrative cccascoscndenndeasens iiine re E ETE EEEE EKE E 24 11 0 Version 2 Chah deS cccitiocsesiinecsistirediea sanee reenen ene SERA E E ERAR ann enna ER SEERE Er AREARE 25 ECE 477 Final Report Spring 2013 12 0 S mm ry ad CONG SIONS ais tepeieksisinams svi spcndvevnpueanoueedsewsallye E AE TE AE aa aasa Eh 26 SOS CECE CIC ES ne eea a a a A A a e A A E ae 21 Appendix A Individual Contributions ce ccutcncedatinwisle bisa 1 Al Contributions of Mark Seals enon ni a uiacn andy ened a EE ee
21. ally It also has clear plastic over the playing surface to prevent the loss of the ball Pinball costs approximately 20 dollars and weighs 2 6 pounds Its dimensions are 16 3 x 9 8 x 8 These specifications aren t significantly different from those of Marble Maze even though the game play is totally different One of the features of Pinball which could be adopted by Marble Maze is its use of a clear plastic topper to enclose the playing space and prevent the loss of pieces To implement this feature however a mechanism to reset a marble at the starting position of the maze would be required and currently we haven t found any such suitable mechanism Another feature utilized 18 ECE 477 Final Report Spring 2013 by Pinball is the incorporation of an external LCD screen to display the user s score Marble Maze could use an externally mounted LCD screen to display the elapsed playing time and other metrics 7 2 Project Packaging Specifications The packaging for the Marble Maze project is going to be the same packaging as the donor Marble Maze with a few enhancements It will be a wooden box approximately 1 foot square with external ports for power and joysticks and an LCD The LCD will be placed on one of the sides of the box to be determined after selecting a motor mount position The controlling electronics will be mounted out of sight inside the box and the ports will be flush mounted in the side The goal is to utilize the d
22. because the stepper drivers will output a set voltage to step the motor and should not vary in proportion to anything Instead it acts in a very binary fashion either on for a single step or off 4 3 Action Recommended For the game board itself no action is required As these patents have been expired the worry of infringement no longer exists To avoid the 2nd patent it simply a matter to limit the control to iPhones over the Raspberry Pi connection and not allow for other devices as it says in the claim Also it is worth noting again that this method is patent pending For the 3rd patent to keep from infringing we must ensure that the IC we are using prevents us from being liable We must also keep from increasing the driver voltage in a proportional manner However the means for detecting the step command signal is still in question and perhaps should be clarified with the stepper driver manufacturer 9 ECE 477 Final Report Spring 2013 5 0 Reliability and Safety Analysis 5 1 Reliability Analysis In order to determine the reliability of this design several parts were chosen and analyzed based on several factors The analysis was done on parts that had a high likelihood of failure contributed integrally to the entire function of the product or that could cause physical harm or raise safety concerns to users of the product Based on these concerns the parts chosen for analysis were the Fairchild IRF530 power MOSFETs the Texas
23. ble http www universitygames com ugitem asp itemno FP10055 amp brand FP 23 Amazon 2013 Feb 7 Spider Man 4 Table Top Pinball Online Available http www amazon com Spider Man 4 Table Top Pinball dp B00859UTQI ref sr_1_6 s toys and games amp ie UTF8 amp qid 1360307396 amp sr 1 6 amp keywords pinball 24 Microchip 2013 Feb 8 PIC18F97J94 Data Sheet Online Available http ww1 microchip com downloads en DeviceDoc 30575A pdf 28 ECE 477 Final Report Spring 2013 25 Mouser 2013 Feb 8 Microchip Technology MTS2916A HGC1 Online Available http www mouser com ProductDetail Microchip Technology MTS2916A HGC1 2qs sGAEpiMZZMvYc73DDAmzVIUgDWvAO099k62nbBc9m93 Y 3d 26 Mouser 2013 Feb 8 Texas Instruments TLC5916IPWRG4 Online Available http www mouser com Search ProductDetail aspx qs vPP9GyyTAo0Mny 2fTOeRILQ 3d 3d 27 Mouser 2013 Feb 8 On Semiconductor MC74HC4094ADR2G Online Available http www mouser com ProductDetail ON Semiconductor MC74HC4094A DR2G qs sGAEpiMZZMtsbn 1 GaJysl 2f0XjUzVqixQge ZoTsILZVc 3d 28 Embedded Linux Wiki 2012 Dec 6 RPi Hardware Online Available http elinux org RPi_Hardware 29 Freescale Semiconductor Technical Data 2008 Nov 5g 6g Three Axis Low g Micromachined Accelerometer Online Available http www sparkfun com datasheets Components General MMA7361L pdf 30 Step Genie Online http www ste
24. e 1 A 2 Contributions of Justin Spencer 50 adlcaivi va diveyaeccenscase aa igbonacus auacsdelotuctansten ekg hates vers aceane 2 A 3 Contributions of John Jachniass 3 ccuccensnienisaneiaenccniadaninleae wove aaa eds 4 AA Contributions of Jordan Wagner ss ciscccdoas ssscvieenisadaeveacscciusendicaraeu mentee asvacdie usantiabeadeds 5 Appendix B PAK aI Osorio a E E e oa A E E A A as 1 Appendix C Schemat sasian ein csiteceitaaetee dieses ea ates 1 Appendix D PCB Layout Top and Bottom Copper ccccecccecsseeeseceeeeeeeeeeseecsseceeeneeeenseeeaeens 1 Appendix E Parts List Spreads neeys city 2y hess acc vav chase sesuensvignsasebstotusc vaseas seni aveauaas Senses twleseoesenns 1 Appendix Fe FEMECA Worksheet cicsotutisscechyuelaines teatime aul aitnes aaa 1 iii ECE 477 Final Report Spring 2013 Abstract Our team is implementing a smartphone controlled marble maze Players guide a marble through a maze by controlling the degree of tilt of the playing surface via a wireless link to a smartphone The accelerometers in the smartphone capture the players input and relay it to the game controller The game controller then adjusts the tilt of the playing surface via stepper motors on each axis to match that of the smartphone This causes the marble to move along the surface and the time taken to traverse the maze is recorded by sensing the marble as it passes between IR gates at the start and finish 1 0 Project Overview and Block Diagra
25. eat sink will be used if needed 3 6 Packaging Constraints The main packaging constrain is that our circuit board needs to fit on the underside of the game board Depending on the design of the game board a failsafe might be needed to prevent the motors from burning out if they try to tilt the board too far for too long The game is already designed to be played on a flat surface so any packaging issues would only arise from mounting additional features onto the game board itself 3 7 Cost Constraints Currently one of the most popular smartphone paired games is the Nerf Lazer Tag It uses a Nerf gun with an iPhone attached to create a virtual world generating enemies by adding them to the screen in front of what the camera sees If two or more players are fighting the guns can detect when they are shot at using IR transmitters and receivers The devices plug into the phone eliminating the need for additional wireless support A set of two blasters currently retails for around 75 Our device will be competing with this other iPhone enabled toy 5 ECE 477 Final Report Spring 2013 However because we need additional support for wireless capabilities and are not fabricating our own game board we expect our device will initially cost more to make ending up being around 150 The Raspberry Pi and wireless dongle will account for the bulk of the cost totaling 50 The game board itself will be around 25 and the stepper motors will cost 25 t
26. ght Baseball weighs approximately 2 8 pounds The same product utilizing plastic could be made thinner and lighter Using plastic would also allow the package to be more streamlined Wood construction is limited in the way it can be shaped and connected Plastic could be molded into a unified game board without any hard edges The overall size of Baseball is approximately 14 x 12 5 x 3 5 except for the difference in shape this size is comparable to that of Marble Maze 17 ECE 477 Final Report Spring 2013 The base packaging of both Marble Maze and Baseball share many similarities They re constructed of unfinished wood and roughly the same size and weight Due to the nature of the Marble Maze project and it s similarity to Baseball no packaging features present in Baseball will be incorporated into the final design of Marble Maze Product 2 Figure 7 2 Pinball Another similar commercial product is Table Top Pinball This game comes in several versions similar in most respects differing only in the theme The version of Pinball analyzed for this report was Spider Man 4 27 Pinball is a miniature version of a full sized arcade pinball amusement machine Pinball is constructed almost entirely of plastic The exterior is colored to match its theme and shaped to eliminate hard edges The formed plastic creates a very sleek look for the game Pinball has a hinged scoreboard where the player s stats are displayed electronic
27. iming Once the game ends the PIC sends the high scores to the Raspberry Pi which passes them along to the iPhone over a wireless connection which the RPi generates The iPhone can then keep a list of all high scores for the user to view 8 2 Hardware Design Narrative The PIC transmits data to the Raspberry Pi over a UART connection Because the Raspberry Pi is monitoring the two IR gates there is a GPIO line from the RPi to the PIC indicating if a game is currently running or not on pin RCS This pin was chosen because it did not interfere with any of our debugging setups The PIC supports PPS Lite or peripheral pin selection for the UART line 34 It can reconfigure the UART connection to be on any RP pin We chose RP39 because it was closest to where the RPi header was on our PCB The connection runs at 1200 baud It was initially set to 9600 baud but lowered because the complimentary RX portion had to be done in software on port RGO Joysticks are connected to the PIC with two analog input pins and one digital input pin each Joystick 1 used REO for the digital input and AN17 and AN18 for the analog inputs Joystick 2 used RF4 for the digital input and AN10 and AN11 for the analog inputs These were selected because they were all in a group on our PCB headers For the UART connection to the serial LCD controller RP1 was selected because it was easily accessible on our pin headers This connection runs at 9600 baud Because the same family
28. ing of a rod that winds a string In this case the function of tilting the playing board and manipulating the marble is very similar the means by which is it accomplished is very much different The 2 patent claims a motor control with a cooling fan Not having a cooling fan but instead utilizing a basic heat sink separates our project from the claim Also using a MCU as the brains of the device instead of just having the motor control and fan furthers this In the claim the present utility can connect with all kinds of electronic devices which have a mode of Wi Fi but our project plans for only an iPhone with a specific app to be able to interface with the Raspberry Pi module so this again should not pose a problem However the claims made in the stepper motor control patent share many similarities to the method we are using to control our game board The claim for driver means to drive said stepper motor is in our case taken care of by the Step Genie a chip designed to drive a stepper motor Since our stepper motor driver IC is a packaged product that we are not liable for so its use is not a problem for our project The claim also states that the commanded step rate is derived from an on board or external source Well this is pretty all encompassing so it is somewhat difficult to avoid this particular part of the claim Also increase the voltage in proportion to an increase in magnitude does not seem to cause an issue
29. itialization module This module will initialize ports and set session variables and reset any flags to their inactive state This module will run once on power up independent of interrupts The next module is the Level Board module This module is responsible for calibrating the tilt of the board to a level position so that all subsequent board adjustments are made relative to this zeroed starting position This module will be run immediately following Initialization and after a player completes a game The remaining modules are all associated with peripherals that will generate interrupts to trigger different game events The most important module is the Motor Control module This module will listen for data coming in from the Raspberry Pi over UART or via the joysticks on the ADC ports if not using an iPhone interpret the data and send the appropriate command to the motor drivers to step the motors to the position requested This module will also rely on feedback from the triple axis accelerometer to determine if it has reached the targeted position The iPhone app is being written in Objective C and is utilizing several of Apple s built in frameworks to access accelerometer data and to send requests of HTTP 42 Currently the iPhone app reads position data displays it on screen with a GUI and can send position data by HTTP request and receive responses A code listing for the iPhone is available at github 43 and will b