Home

Final Design Report - Harding University

image

Contents

1. 4 Work Breakdown Structure Spring 2010 continued Deliverable Duration Task Activit Description i People Resources Y p Checkpoints Weeks p Compile all modules to Assembled project 3 25 Syst Int t M MTT Project Lab 330 ME create prototype and test data 4 15 J 3 25 S6 0 System Testing Run full system test Test data 4 15 MM T T Project Lab Verify correct operation Completed 4 5 a M M T T P L 57 0 Finalize Prototype and prepare for Prototype 4 29 roject Lab presentation Project Readiness Presentation of project Report and 4 10 M M T T sel Review prototype Presentation 4 29 CS UA der Write detailed report 4 10 R Writt t M M T T C t 58 1 eport pearing ibe 10 ritten repor 4 29 omputer Power point and 4 10 4 P P facul M M T T C t 58 2 resentation resent project to faculty Pee OS omputer Keep logs of work and Engineering 1 1 Computer 04 0 pecimenaten research notebooks 4 29 MO Notebooks Presentation of Bi thl t 1 11 05 0 A3 Status Reports AGO basa al status and current M M T T Computer current project status 4 29 progress Keeping on 1 11 06 0 Time Management Keeping to a schedule sd 4 29 Matt G Computer
2. NR Push Button Figure 15 Figure 16 Figure 17 If the push button is depressed as it is lowered a high signal is sent to the microcontroller indicating the presence of a ship If the push button is not depressed a low signal is sent to the microcontroller indicating the absence of a ship Independently of the presence of a ship the microcontroller will send a signal to the stepper motor to rotate the shaft in the opposite direction to raise the push button and lower the electromagnet so that they are horizontally aligned Based on the high or low signal received by the push button the ball movement system will go to the ball hopper location and will lower the electromagnet by rotating the stepper motorG shaft in the clockwise direction to pick up a ball The movement system will go back to the selected location and drop the appropriate color ball into the selected location Push Button Selection The push button chosen for the ship sensor system is a normally open momentary push button The driving criteria for the selection of this push button was the height of the plunger 13 mm which will reduce the amount that the sensing system will need to go down in order to determine the presence of ships Also the contact area between the board and the push button is more than 0 24 in 152 84mm which provides the necessary F precision on the board dimensions Figure 18 Gear Selection The main design requirements for sele
3. y Output results to game on LCD Check ship locations for computer and Light up remaining LEDs for user to see y Send reset to digital logic y Call LCD Write Function Wait for user to hit y Enter y Enter into Game Initialization Figure 35 Delay for user to see 7 Clears the upper display Pass Hit enter to play again or power off Skip over LCD initialization and welcome message When the game 1s over these are the steps that will take place The game will basically hold until the enter key is hit unless the game is powered off If the enter key is hit The LCD will not need to be initialized again the welcome message will not need to be displayed nor will the I O pin initialization need to take place again Budget Estimated Cost of Supplies Possible Vendor Cost Date of Estimate Latches Transformers Multiplexer Resistors Diodes Voltage Regulators Wire Professional etching board Non professional etching boards Steel balls Motors LEDs Microcontroller Materials for frame Movement supplies Push button Keypad LCD screen Miscellaneous Total The Electronic Goldmine Honeywell Radio Shack Radio Shack Radio Shack Radio Shack McMaster Carr Robot Shop Electronix Express Microchip Schmartboard McMaster Carr McMaster Carr All Electronics
4. the bending stress decreases The goal when selecting the gears was to reduce the bending stress in order to ensure that the movement mechanisms will not fail by fatigue or by yielding The bore size was selected to be the closest to the diameter of the stepper motorG shaft that is 5 mm 0 1969 in f s Jq Gear Specifications Manufacturer Stock Drive Products Sterling Instruments SDP SI Part Number A IT 2 Y24023 Unit Inch Diametral Pitch 24 No Of Teeth 23 Material Acetal Brass insert Style Pin Hub with Set Screw Quality Class Commercial Molded Bore Size 0 1875 Pressure Angle 20 Face Width 0 250 Pitch Dia 0 9580 Hub Dia 0 5469 Gear Material Selection Figure 19 The material of the gear was chosen to be acetal derlin with a brass insert Acetal hydropolymer resins are strong and very rigid They have a high tensile strength stiffness fatigue endurance and moderate toughness It has the highest fatigue endurance of any filled commercial thermoplastic Derlin offers rigidity and wear resistance and for our design purposes it has the necessary strength to carry the maximum load that we are going to handle Decision Matrix Af 39 nn According to DupontE Delrin is a highly versatile engineering plastic with metal like properties It offers a unique combination of physical properties not available with metals or most other plastics The outstanding characteristics of Delrin res
5. 42 Mechanical Analysis of Movement System sense ens aasa ens s ens 43 Mechanical Analysis of Sensing System sssewsssenss sense ene ens ens 45 SOW Are LES i ESS SASS AA AA Y 48 SPAVIBAG Process POW sia SS RSS ES RSS RSIS SSS NSS 49 Grenaa 50 SHIP PLACE MENA SEN NAUNANG 51 Generate Computer MONE iS SEUSS UNS USE SSE NSE 53 S LE EEL ET EL EG Ball Placements isis 0 Ask User for Info Regarding snes nus ss nue ss nme ss ens s ens ss ens ss ene s ens sense 57 Deter mine i Game ON EL Ts 58 Setas User 62 8 AOU MG MOU SON gasses GA AA 59 Brent wp BN PAA APAPAP APAPAP PAPA PABABA PAP AS APAPAP IP APAT APAPAP TAPE 60 Determine Hit Ino MANONG AA ST TS NANA 60 Gamer Over PLIOCENE EEs 61 Budget 62 Estimated Cost of Supplies sissies issue 63 0100608 10811120011 ES SSS SSNS 64 raser 65 CE SEE SEES SER SES 66 Schedule Evalia tio Dei ede Seeded deeded deeded ceded ceded cede deeded 67 KAN SE EES EES LS NAA AA AA NA 68 SPRING ZOU Leseren
6. Corporation Crystal Fontz Table 8 20 00 10 00 15 00 8 00 8 00 8 00 20 00 60 00 30 00 33 00 70 00 30 00 50 00 200 00 50 00 5 00 20 00 25 00 188 00 850 00 10 12 2009 10 12 2009 10 12 2009 10 12 2009 10 12 2009 10 12 2009 10 12 2009 10 12 2009 10 12 2009 10 5 2009 10 5 2009 10 5 2009 10 5 2009 10 5 2009 10 5 2009 10 5 2009 10 5 2009 10 5 2009 10 5 2009 Budget Evaluation Estimated Se Item Cost P Latches Transformers Multiplexer Resisters Diodes Voltage Regulators Wire Professional etching board Non profesional etching boards Steel balls Motors LEDs Microcontroller Materials for frame Movement supplies Push button Keypad LCD screen Miscellaneous 20 00 10 00 15 00 8 00 8 00 8 00 20 00 60 00 30 00 33 00 70 00 30 00 50 00 200 00 50 00 5 00 20 00 25 00 188 00 850 00 33 77 96 56 33 00 165 22 61 05 9 15 11 80 24 41 48 13 530 09 Table 9 As of right now the anticipated budget 1s looking well The stepper motors went over budget because three motors were budgeted and after some group deliberation it was decided that four would be necessary to make the system run as it should We did not anticipate having to purchase an electromagnet but almost 200 dollars was budgeted for such surprises After determining the sizes of Plexiglas that was needed and ordering it
7. RX RN Frame with movement system Figure 6 28 0000000000 o00000000G0 000000000G GOOGOBO6 6 6 GC e 0 6 6 000000DOGD 29 O Q O O O 00000000 O 0 6 6 6 G O OO LE 30 Figure 9 Side view of frame with game boards and ball return system Figure 10 Front view of frame showing upper display and ball return system Figure 11 Top view of frame with game boards and hoppers Figure 12 Movement system without frame Figure 13 Side cart that supports the cross members Figure 14 Cross member cart Ship Sensor Design The ship sensor mechanism will be composed of a set of rails two racks and a gear This system will be physically attached to the movement mechanism of the overall frame The electromagnet will be attached to the end of one rack and the push button will be attached to the end of the other rack as depicted in Fig 15 Whenever the computer makes a move the movement system will move the ship sensing system over top of the coordinate selected to determine the presence of a ship Once in this location the microcontroller will send a signal to the stepper motor and the stepper motorG shaft will rotate in the counter clockwise direction As the gear rotates the push button will be lowered and the electromagnet will go up The front and back views of the sensing system can be observed in Fig 16 and Fig 17 respectively Electromagnet Nf
8. be on the top half to allow us to have access to the LED and digital logic circuitry The other will be to give us access to the components underneath the game board such as the power supply microcontroller keypad and LCD screen 7 Electrical Component Storage If you look at Fig 11 you can see a large space on the right side of the frame and behind the game board where the electrical components can be stored The top of the right section will be where the keypad and LCD will be attached There is also a small amount of room underneath the game boards and ball return system where any wires can be run or a small circuit board can be placed As stated above we will have access to these areas via a door on the back on the frame 8 Movement System Fig 6 shows the movement system incorporated into the frame while Fig 12 shows the movement system alone The cart seen in Fig 13 1s the same as the ones on the sides of Fig 12 and are driven by two stepper motors and a rack pinion system that allow the system to move from the front to the back on the frame and vice versa They are kept straight using rails similar to those used in a kitchen drawer Connecting the two carts is a set of cross members with a cart shown in Fig 14 that functions like the other two carts Inside that cart however is the last stepper motor which controls the height of the ship sensor and the electromagnet Stepper Motor Selection Stepper motors were chosen for t
9. be written so that every possible location corresponds to a hit Then a tester will key in values for all one hundred locations The program will reset the board and repeat the process so that all locations correspond to a miss Only one LED must be lit whenever a coordinate is entered and should be either green miss or red hit If only one LED lights up for each entry and corresponds to the correct color the LED test will be considered a success Also there will be a question on the survey for the volunteers that asks how easily the LEDs were seen Artificial Intelligence Test To test the artificial intelligence of the computer following a hit 1t must continue choosing coordinates in the immediate proximity of the hit Once two hits are found only locations along a straight line should be attempted until a confirmed sinking takes place Also if it is known that a particular ship has been sunk the computer will not attempt to re sink that battleship Once sunk the computer may choose a random location of attack based on an externally programmed algorithm The AI will be tested by playing the game System Design Background Battleship is a very popular game around the world whose origin dates back to the early 1900G when it was invented by Clifford Von Wickler However he never patented the game and it was trademarked and commercially produced by the Milton Bradley Company in 1943 asa paper and pencil game By the 19606 and perhaps ear
10. calculated on the previous section 1s 0 50 5000 3447 From MarinG equation that includes the modifying factors of the endurance limit We use MarinG equation to take into account the material the manufacturing the environment in which the part will be used and the design For the material this equation takes into account composition basis of failure and variability For the manufacturing it takes into account the method the surface condition and the stress concentration For the design it takes into consideration the life the shape the stress state and the stress concentration Surface factor For a machined surface finish 2 70 18 62 0 265 27009 gt 1 50831 Size Factor The sum of the addendum and dedendum 1 1 25 1 1 25 0 09375 02 24 24 The tooth thickness is given by where 3 _ 3 80 034 20424 0 002125 0 0053975 0 028 0 07112 The use of this equation means that only bending of the tooth 15 considered and that the compression due to the radial component of the force is neglected It also implies that the teeth do not share the load and that the greatest force is exerted at the tip of the tooth Examination of run in teeth showed that the heaviest load 1s experienced near the middle of the tooth Therefore the maximum stress probably occurs when a single pair of teeth is carrying the full load at a point where another pair of teeth is just on th
11. goes first This selection will be indicated on the LCD screen On his her turn the player inputs his her move The microprocessor then discerns if the input was a hit or miss and gives the corresponding output on the upper display Outputs include lighting a red LED hit or a green LED miss On the computerG turn it makes a move the microprocessor discerns a hit or miss and shows its output on the lower display by placing a red hit or green miss ball via the ball manipulator into its respective spot This process is repeated until the game is over DELIVERABLES e User amp Manual e Software Logic Flowchart e Technical Drawings and Analysis of Hardware e Schematic of Circuit with Simulation Results e Documentation of Testing e A Final Report e Parts List with Budget e Battleship Game sp DRAFT USER MANUAL Setup e Remove the game from its package e Open the lid for the game e Plug in the power cord to a Type B NEMA 5 15 15 A 125 V grounded outlet e Separate the balls by color and load them into the containers e Turn on the game by flipping the ON OFF switch located on the board Operation Physically place the ship pieces on the lower display board so that the holes in the piece correspond to holes in the board e For the aircraft carrier five cells e For the battleship four cells e For the cruiser three cells e For the submarine three cells e For the destroyer two cells Wait for the comput
12. is one of the more complicated pieces of our system the process of outputting a move to it is very simple The complexity of this setup simply lies within the digital logic of the LED system and only binary input values are needed from the microcontroller Determine which shi as hit Determine hit Lasa information Subtract from user hit variable on particular ship Check if 0 p30 0G Set Variable for ship indicating sunk Write message to Call LCD Write Pass you sunk my x ship LCD Screen Function X is which ship was sunk Enter into gt Determine if game is over Figure 34 fof This portion determines the results of a user hit It simply checks which ship was hit and whether or not it has been sunk It then indicates which ship was sunk to the user It is then determined if the game is over by checking the amount of hits that the user has against seventeen just as it did for the computer move portion Now at the end of the user turn the whose_turn variable is then set to indicate that it is the computerG turn The process flow then enters back into the start of the game play Game is Over Process LCD Screen Write message to Determine who won by checking the whose_turn variable and looking at other player
13. regarding the above ideas Power point and Present ideas to faculty E verbal presentation Report and Finalize design of project 8 pro Presentation Write detailed report Written report regarding the above ideas P Present design and analysis Power point and to faculty verbal presentation Keep logs of work and Engineering research notebooks Presentation of status and current progress Bimonthly reports on current project status Keeping on Keeping to a schedule schedule Duration Weeks 9 20 12 8 9 29 10 15 9 29 10 13 10 4 10 15 11 16 12 9 11 16 12 9 12 1 12 9 9 13 12 31 9 13 12 10 9 13 12 10 People M M T T M M T T M M T T M M T T M M T T M M T T M M T T M M T T M M T T Matt G Resources Computer Computer Computer Computer Computer Computer Computer Computer Notebooks Computer Computer Task 1 0 1 1 1 1 1 1 1 2 1 2 1 3 1 4 1 5 1 6 51 6 1 51 6 2 51 6 3 Activity Parts assembly amp Testing I O System Keypad LCD Microcontroller LED Array Digital Logic Power Supply Ball Placement System Movement System Electromagnet Electromagnet Controller Circuit Work Breakdown Structure Spring 2010 Description Assemble all parts and verify they work correctly Create and test interface between user and game Create and t
14. the AND gate are substitutes that simulate the multiplexers which will be attached to the entire digital logic module One represents the column indicator and the other the row indicator The AND gate requires that both of the switches be at digital signal high 5 V DC in order to output a high signal So when that is not the case the output is low O V DC The output of the AND gate is the input of S on the latch The R input of the latch is constantly low The latch is also constantly enabled at a digital signal high But that is only in this diagram there is no enable pin to set at a digital signal high So when the game is first turned on every latch is forced into the hold stated condition by the microcontroller setting the multiplexers to send a low signal to all the AND gates making S low which will cause the latch and to remain in the digital signal low until S is turned to digital signal high when both column and row are simultaneously high Until that happens Q the output of the latch remains at digital signal low putting no current through the LED leaving it off Once both S has a high output the latch outputs 5 VDC and produces a current through the LED turning it on Even when the S input returns to low the LED remains on because the latch has returned to its Mhold stateO condition so it will hold the last state it was in So regardless of whether S goes high or low the LED will remain on The only way to turn the LED off is by attaching it
15. 3 Key 4 Key 5 TO MICROCONTROLLER R1 2000 wi AYY ws VA Input Pin GND R2 2000 Ay 2 B Input Pin R3 2000 sao A er A ya VV 3 C Input Pin R8 2000 o o o 0 4 D Input Pin Key E Key R Key TI R7 2000 Ww Wy 5 E Input Pin R9 2000 6 F Input Pin Ky sia R ai F MA 7IG Input Pin a R10 2000 0 2 o o 0 y 8 H Input Pin Key D Key F Key G R5 2000 9 Input Pin R11 2000 VV 10 J Input Pin E R4 2000 BACKSPACE 10J ENTER VV BACKSPACE Input Pin olo olo R12 2000 ENTER Input Pin O g O o O Key C Key V Key B V1 5V 3 Leno Figure 4 The keypad 1s the input part of the input output system It receives user Input and converts it into a signal the microcontroller can understand high and low signals The keypad has 12 push buttons Ten of these push buttons are label 1 A through 10 J The other two are an enter key and a backspace key This system runs to 12 pins that accept either a high or a low digital signal 5 V DC or 0 V DC respectively When the keys are in their natural state unpressed they send a low signal to its respective pin When the keys are pressed they send a high signal to their respective pin These respective pins are on a encoder that will convert our 12 pins to 4 pins which will be accepted by the microcontroller as a binary word This is displayed below The keypad is how the user responds to the LCD prompts ItG basically used for inputtin
16. 5 2 15 People M M T T Matt L Tim Matt L Tim Tim Matt L Matt L Matt L M M Tatiana Matt G Matt L Matt L Resources Various digital and general tools ELVIS unit ELVIS unit ELVIS unit Programmer Computer ELVIS unit ELVIS unit ELVIS unit Machine equipment ELVIS unit Computer General tools Machine equipment SolidWorks General tools ELVIS unit Elvis unit sj Task 51 6 4 51 7 52 0 52 1 52 2 52 3 52 4 52 5 52 6 52 8 52 7 53 0 53 1 53 2 54 0 Activity Ship Sensor Board Etching Programming Keypad LCD Movement System Plunger Motor Push Button Electromagnet LED Output Signals Artificial Intelligence Final Design Review Report Presentation Build Frame Description Build and test Plunger to sense ship pieces on the lower display of game Design circuit boards for final system and etch them Write and test code for microcontroller Write and test code for the keypad Write and test code for LCD screen Write and test code for translation motor movement Write and test code for plunger motor movement Write and test code for push button Write and test code for the electromagnet Write and test code for turning LEDs on Write and test code for artificial intelligence Presentation of final design Write detailed report regarding the above i
17. 62 06 According to the book fPlastics Engineering Manufacturing and Data HandBookO eyclic loading significantly reduces the amount of allowable stress a material can withstand If data are not available on the endurance limit of a material being considered for use a percentage of its tensile strength can be used 6 For engineering plastics the endurance limit could be about 50 of its tensile strengtho Based on that fact that the data of the endurance limit for Derlin was not found it 1s assumed that Endurance limit 0 5 0 5 10000 5000 34 47 g Jh Calculations of the Factors of Safety For failure due to yielding 9000 2 24 1340 1 Note that a very conservative approach was used when calculating the factor of safety due to yielding since the yield strength used was one third of the yield strength found on the data sheet for Derlin For failure due to fatigue using the Modified Goodman criteria Where 670 05 4 62 From the calculations of the factor of safety due to fatigue and yielding we can see that both factors of safety are greater than one which implies that the Derlin gear can withstand the load produced by the maximum torque generated by the stepper motor and will not fail by fatigue or by yielding Mechanical Analysis for the Sensing System Since we are using the same gear for the sensing system we have determined that the maximum force that could be transmitted as
18. Aes 69 Work Breakdown stede 70 60011001 Drawings SESS Appendix A RUDI EN Appendix B NAND 21011380 110605 ANNA NG AA Appendix C Power Recher Data SNCS SESS iS ses Appendix 1 Multiplexer Data SIENNA ddd Appendix E LED Daty bevare Appendix F Push Button for Keypad Data ness snes senses Appendix G LCD Data SIENNA NANANA AN NANANA NAANANNANANAANANNANUNANAOKGN Appendix H Microcontroller Data 3110005 Appendix I Voltage Regulator Data Sheets cccssccsssccsssccsssccsssscssssccsssccsssccssscossscsssscoesscees Appendix J Electrolytic Capacitor Data 31000 Appendix K Resistor Data 11600 EN Appendix 1 Electromagnet Data Sheet esseecssccsecosecsseossecsecosecsseosecssecosecssessscssecoseossesseesseeso Appendix M Transformer Dati 0 SSUES UE 1111110 11 Ge Appendix N Encoder Data SIENNA ABA NAN Appendix O Power MOSEET Data SIENNA Appendix P Plexiglas Data She NANANG NBA NANANA NBAN Appendix Q stepper Motor Data Sheets ub nanan iS Appendix R rel Balara DNM Appendix S Push Button for Ship Sensor Data Sheet seccssssccsssccsssccsesccsesccesscceescceesees Appendix T Pelin Data HCL NAA AA AA Appendix U Ny
19. HARDING UNIVERSITY Single Player Against Machine BAttleship Game Final Design Report Matt Goodhart Timothy Hoffmann Matt Lewis Tatiana Zeledon 12 8 2009 Table of Contents Requirements SPECIIIC AION 3GB KANA SE 42044244242 242242 4 ANN 5 Operational Descrip OON 06200 EEE SE ES ELLE CEU CU CIR ES UTE UU 22229 GSS 5 Dr 5 Dratt User Manual iis is iS SNS SBS NAST USS SS STUN SEES 6 User mter ICE SS 7 ST UES Sis i SE SS ES SA RE 7 STN NE 02522243224 7 SEA Dens 9 Pir 10 DY SUCH eres 10 Functional Description of BIOCKS sscccssscssssccssscsssccessccsssccsssccssscosscoessceesscees 11 BORD IT INN 15 Electrical DESIO AA nere 16 Power Supply Circuit eessecssecssecsscosecosecoseosecosecosecsseosecosecosecsseosseosecosecssessseoseessesso 17 Dr DN 18 LED Array SS a USS SSIES 19 01 428114 1 11 1 1 7 7 7 7 7 _ _ _7 20 UN ELLE E AA 21 PAN AA AA AA 22 0011001 1 AA AT 22 Mechanical DEST SN SENSE SSS NSE ESS ESE ESS USE SSNS 23 Erone BY CSN SA UE 24 Stepper Motor Selecto Mo iii Neuss NN puss 26 BIS 27 Ship 301000 DESI Di SS SSNS SLSR NAGANA 37 Push Button 01001101 ESSENSE EUS NAGANA EUS 38 SN 38 Gear Material Selecto 42055 006006 08S SUE EUS SUS UU TUE SU UU TUES SU UTS TEES 39 Kack eT An UY SS 40 Gear Calculations SSS SSS SSIS SSS SSIS USSG
20. alized Pins initialized Yes LCD screen initialized and displays welcome Variables declared and turn Take input from user Take in user s desired attack coordinate via the keypad Was there a ship Yes Light up No corresponding LED red Light up l corresponding LED green Determine results of move and output to user No Computer Move Checks for ship message Panaad Ship Placement Is Game Over Yes No Looks at previous moves if any and determines logically if there is a logical move to make If not ship generates s it the player s Generate a new location to move Uses Ship Sensor at coordinate on game board Place a red marble for hit Was there a ship Yes gt No Sunk a ship which one Place a green marble for miss Ask user for info Store information in Ship Selection This flowchart represents the overall process flow for SPAMBAG as of right now Steps like NGenerate Computer MoveOare very general descriptions of a much more detailed process which is described in
21. aterial While Lexan was a close second further research into Lexan showed that due to its ability to freely bend it would not have been able to be used at all Also while steel was a potential material due to its magnetic nature it would not have been able to have been used because the electromagnet would have been attracted to it That essentially left Plexiglas and aluminum and after review of the scores Plexiglas was decided upon to be the main building material for the frame y jJ 2 Game Board Fig 7 shows a SolidWorks sketch of the main game board It is 12 in x 12 in 254mm x 254mm The holes for the balls to fit into are 5 8 in 15 875mm which is 1 8 in 3 175mm larger than the 12 in 12 6mm diameter of the balls so that there is a small amount of freedom with the ball placement The stepper motors have the ability to move as small as 1 8 corresponding to 0 015 in 0 38mm This is very precise but a step may not land exactly on the perfect spot to allow a ball to be placed in the exact center of a hole Thus a wider diameter 1s used There are two slots on the sides to allow tabs from the sub game board to come through for release of the balls upon completion of a game The game board is pressure fit into the frame which allows it to be removed if the user should desire repairs or access to anything below 3 Sub Game Board Fig 8 shows a SolidWorks drawing of the sub game board It 16 almost identi
22. aze pam ay usisog pedioy uflsag W3 SAS D quawannbay LONIUNJ ONG SWEJ ENJ 42013 7 java UONISOduo2ag EUONDUN4 usag W3JS E PI3AD WOE Dads syuawanbay EU az kr a jeje aje Faso Jaqu222q JSoweanof 1390 3Q Jeg Wwe zd 25 60 THY 3111131179 2111130111 awed dIysa yg 80125 ISUledy IS E d 3 3U15 1023137 BUENE SIME HEIN UUVELULJ KH WIN 152005 HEN ONZ PE4 HEU QUEL 178 odr Usad 101125 83151211110 801 1811 Figure 36 68 1 11 SEU ERY Ul Y vy Y YS aan 11101130316 Woday Malay SSoulpeay polo add 5211 01 Dunsay 15545 Uo B8 3ju 1112758 381151 ping UDIJELUSSSLd MARAH URSA PU 101111 1 1 1 RAS ANE HL 151 3 JU Be j3UbnuogI37 NAG TAMIA Wd DAS LUSLU Ie EY Figure 37 AjddAng Jamo 21907 epg DL 11 9 31113126 3111130111 Sue diysa yg 11 1 7 jsuresy J3 E d duis UOP3 37 805 35 SLMS HEN UUW YO WIN eypoon 18A 12 078 usag 101025 OTOZ Fundg yey puen Aysan zupe Work Breakdown Schedule Task F1 0 F2 0 F3 0 F3 1 F3 2 F4 0 F5 0 F6 0 F7 0 F8 0 F8 1 F8 2 F8 3 F8 4 F9 0 Activity Requirements Specification Overall System Design I O Design Keypad Design LCD Design Microcontroller Selection LED Array Design Digital Logic Design Power Supply Design Ball Placement Design Movement System Design Electromagnet Design Electromagnet Con
23. back letter to LCD if not pressed back or enter Wait for enter or Bark back to be pressed Enter Yesu Ask user if sure Yes Store number in letter variable Has user already moved there NO y y Write Message to LCD Screen Enter into Light up corresponding LED Figure 32 This is when the game takes in a move from the user via the keypad to the right of the lower game board This game allows for the user to select their coordinate of attack by row and then column one at a time being able to back up if they made a mistake It also makes sure that what they wanted by asking the user The coordinate is stored in two variables one is the row and the other is the column The game then moves on to light up the appropriate LED The message for the LCD screen will be done the same as it was in Figure 29 before 5 _ ________ Light up Convert Row to LED binary Convert Column to binary y Determine if hit or miss y Pass all binary data to appropriate pins of LED digital logic Was there a Yes hit No Enter into Determine Enter into Set as additional Als Turn information Figure 33 Though the LED upper display
24. cal to the game board except that the holes are slightly offset to allow the balls to rest on the board when a game 1s in progress The holes in the sub game board are the same diameter as the ones in the game board On the sides are tabs which were mentioned before in the game board section When the game 1s finished the tabs may be slid forward causing the holes of the game board and the sub game board to align The balls may then fall through into the ball return system 4 Ball Return System Fig 9 shows a side view of the frame with the ball return system in place Basically when the balls fall through the sub game board they land on the sloped level and roll to the front of the frame They are directed by small rails to a small slot that can be seen in Fig 10 allowing them to be collected in the collection area in the front of the frame They are then available to the used to remove sort and place back into the respective ball hoppers 5 Ball Hoppers Located in the front of the frame are two ball hoppers You can see in Fig 11 that the hopper on the left is larger than the one on the right This is due to the fact that there are exactly 100 positions a maximum of 17 hits and a maximum of 83 misses The left hopper is for the misses and holds approximately 87 balls while the right hopper is for the hits and holds approximately 20 balls A few extra balls are included in each hopper in case a few are lost The chances though of usin
25. cting a gear were cost and hub style The gears will need to be directly attached to the stepper motorG shaft so a main constraint when selecting a gear is figuring out a way to successfully attach it to the 5 mm shaft of the stepper motors that will be used Based on the design requirement of cost the material selected was identified as a plastic rather than metal Another consideration taken into account for selecting the material was the fact that we are using an electromagnet to manipulate the balls during the game so a non magnetic material was required Knowing that a plastic gear was to be used and that the hub of the gear was going to be interacting with the stainless steel shaft a way to securely attach those two pieces together was needed It had to minimize sliding which would critically hinder the conversion of rotational movement into the linear movement needed The hub style with a set screw provides a way to securely attach the stepper motorG shaft to the gear The brass insert on the hub of the gear avoids the wear produced by the interaction of the metal shaft with the gear Other constraints for selecting the gear were diametral pitch and bore size The selected diametral pitch of the plastic gear with the set screw hub selected was the lowest one available in the market since there is a direct relationship between the diametral pitch and the bending stress produced on the teeth of the gear As the diametral pitch of a gear is decreased
26. d 25mA 1 LCD for power Power 1V DC and 25mA 1 LCD for contrast User Input at Keypad Digital signal to LCD from microcontroller 0 or 5V DC and 0 or 25mA LCD text on LCD The user will place his her move by inputting it on the keypad that looks similar to the keypad on a phone The numbers A J will correspond to the numbers 1 10 such that I A 2 B etc Each button will have both the number and letter printed on it The computer will prompt the user to select a letter and the user will input a letter After the letter 1s selected the computer will then prompt the user to select a number and the user will input a number Those two signals will be sent to the microcontroller as the userG move The LCD screen is the microcontroller amp way of talking to the user and telling him her what to do Power 110V AC Grounded Functionality To keypad 1 5V DC and 25mA To LCD I IV DC and 25mA To LCD I SV DC and 25mA To microprocessor I SV DC and 25mA To 4 motor system I SV DC and 800mA To electromagnet controller circuit I 4V DC and 6 67mA To ship sensor I SV DC and 25mA To digital logic I 12V DC and 2 5A The power supply system receives 110V AC from the wall It then steps the voltage down and rectifies it to provide a clean DC source of power before it sends it out to the appropriate module Inputs Power 5V DC and 800mA Signal to motor from microcontroller 0 or 5V DC and 0 or 25mA Functionality Each of the four stepper motors is r
27. deas Present ideas to faculty Construct a frame to encase the game components 1 Deliverable Checkpoints Five ship pieces and a push button that sends a high signal when pressed professionally made circuit boards Functioning system code Functioning keypad code Functioning LCD screen code Functioning translation motor movement code Functioning plunger motor code Functioning push button code Functioning electromagnet code Functioning LED output code Functioning artificial intelligence code Report and Presentation Written report Power point and verbal presentation Completed Frame Work Breakdown Structure Spring 2010 continued Duration Weeks 2 15 3 21 1 27 3 15 1 11 4 15 1 11 4 15 1 11 4 15 1 11 4 15 1 11 4 15 1 11 4 15 1 11 4 15 1 11 4 15 1 11 4 15 2 20 3 4 2 20 3 4 2 20 3 4 2 4 3 20 People Tatiana Matt L Tim Tim Tim Tim Tim Tim Tim Tim Tim Tim M M T T M M T T M M T T MattG Tatiana Resources Machine equipment SolidWorks General tools Express PCB Programmer Computer Programmer Computer Programmer Computer Programmer Computer Programmer Computer Programmer Computer Programmer Computer Programmer Computer Programmer Computer Computer Computer Computer Project Lab
28. different locations on the board in no more than 20 seconds per move TESTING Ball Manipulator Test Motor Test To test the ball manipulator and the motors a full mechanical system test will be performed where a test program is run and tells the ball manipulator to place one ball in every possible location A1 A10 though J1 J10 in order The test will be considered successful if the mechanical device arrives at the correct coordinate every time and if the ball makes it to the coordinate without dropping prematurely 99 out of 100 times the movement is done This test will be run five times and statistical analysis will be performed on the results If the ball drops prematurely the user can place the ball in the correct location as displayed on the LCD screen Portability Test To determine portability and ease of operation by one person three volunteers not associated with the Senior Design class will move the device to a testing room where outlets are available and will follow the setup and operation as described in the user amp manual Feedback will be gathered from the volunteers via a survey to determine if the device is portable and through observation if it 1s easily operated The game will weigh no more than 22 73 kg 50 pounds and will take up a volume no more than 1 0 m The footprint of the device will be no more than 1 0 m and its depth no greater than 1 0 m LEDs Test To test the proper functioning of the LEDs the program will
29. e verge of coming into contact Treating the tooth as a cantilever beam of rectangular cross section the rotating beam diameter is given by 0 8080 080881 0 250210 028 1 37 348 J CA 0 85 Load Factor 1 for bending Since there 1s not any specified temperature or reliability Stress concentration factor 0 300 0 0125 wie rag 0 028 It is always safe to use if there is any doubt about the true value of is there is any doubt about the true value of Recall 1 50831 710 85 M1 M1 20 714 715000 4576 97 31 58 For the ship sensing system the bending stress 1s _ 1 0209 24 57 124 gt 11 4 0250 0 334 1340 1 21 4 1876 14 12 94 Calculations of the Factors of Safety For failure due to yielding 9000 3 1 60 1876 14 4576 97 T 187614 U Since the factor of safety is greater than 1 it means the gear will not fail by fatigue or by yielding 47 Software Design Spambag Process Flow game pieces continues to wait computer places ships first in the game Informs user of result User is prompted to place e Prompts user to wait while Holds until user hits enter indicating they are done Confirms user is done If not Generates ship locations for Al Randomly generates who goes Power is switched on Y FE Lp Game Initialization initi
30. e_turn is changed to a one to indicate a computer turn Take Input Write Message to Call LCD Write Pass It is your tum Enter a LCD a y Function move From User IN y mme Write Message to Call LCD Write Pass First Enter a letter LCD Screen Function Pass Hit enter when done Write Message to Call LCD Write l pa LCD Screen G Enon back for a different letter NO Wait for user input Clear LCD gi on keypad 1 Screen Clear LCD Enter or Write corresponding Ask user If sure Gasan back letter to LCD if not pressed back or enter Write Message to Yes LCD Screen Wait for enter or PA back to be pressed Store letter in letter CC labl Call LCD Write Pass Already moved there baba Function Enter new move i Enter gt E Call LCD Write Pass Now enter a number Function NO Write Message to LCD Screen Wait for user input Clear LCD i k d S ar HE Pass Hit enter when done Call LCD Write back for a different number Function Clear LCD Screen Enter or Write corresponding
31. er to choose the location of its ships as indicated by the LCD screen located in the upper display of the game Ifthe LCD screen indicates that it is the playerG turn select coordinate of attack a space on the grid you believe the computer amp ship is If the LCD screen indicates that it is the computerG turn continue to step six beginning of game only Enter the coordinate on the keypad by selecting the letter A J that corresponds to the chosen location and then select a number 1 10 that corresponds to the same location Notice the LED light up which indicates that the coordinate selected in step 3 was either a hit red or a miss green Wait for the computer amp turn The attack of the computer will be recorded by dropping a ball on the lower display The ball will be red if it coincides with the location of one of your ships it will be green if it is a miss Repeat steps three through seven until the game is completed as indicated by the LCD screen Select the option to play a new game if desired and repeat steps one through eight or turn off the device using the ON OFF switch on the lower display 10 Unplug the game from the outlet USER INTERFACE The user interface will consist of an ON OFF switch that allows the system to be turned on and off There will also be ship pieces for the user to physically place on the lower display board to indicate the location of the userG ships There will be a
32. esponsible for moving a part of the game in a certain direction There are four motors the two letters motors the numbers motor and the plunger motor Each motor receives power from the power supply and moves as long as power is received as determined by the microcontroller The letters motors cause the ball manipulator and plunger to move parallel to the letters The numbers motor has the same function as the letters motors except it moves parallel to the numbers The plunger motor is what causes the push button and electromagnet to raise and lower to test for the presence of a ship and pick up the ball respectively Electromagnet Controller Circuit Power 4V DC and 6 67mA Digital signal from microcontroller 0 or 5V DC and 0 or 25mA 0 or 4V DC and 0 or 20mA Functionality Accepts a digital signal from the microcontroller which tells the circuit whether or not to allow power to the electromagnet Power 4V DC and 6 67mA Outputs Ball Placement Functionality When the electromagnet receives power from the electromagnet controller circuit it attracts a ball from the ball hopper and carries that ball to the appropriate location via the motors When the electromagnet no longer receives power the ball drops into the hole corresponding to the computer amp move Power 5V DC and 25mA Digital signal to microcontroller 0 or 5V DC and 0 or 25mA Functionality The ship sensor is in the form of a push button The plunger motor will
33. est a keypad circuit for user input Connect and test LCD screen with the microcontroller Create and test code for system Create and test LED circuitry for upper display Create and test digital logic circuitry for upper display Build and test voltage control circuit Build and test device to place balls Build and test the motor and rail system Build and test magnetic device to pick up and drop balls Create and test electromagnet controller circuit Deliverable Checkpoints Working modules and test data Receives all inputs and outputs all text correctly Working keypad that accepts all inputs correctly Working LCD screen that outputs all text correctly at the appropriate time Microcontroller is integrated with all other systems Array of LEDs that are all visible when litin a well lit room Circuit that allows power to go to all of the right LEDs Working module that steps down the voltage and current to the correct values Working module and test data System of motors gears and rails that successfully translates the drive train to the correct location Fully functional electromagnet Circuit that allows power to go to the electromagnet when a signal is received Duration Weeks 1 11 3 21 1 11 2 10 1 11 1 25 1 20 2 10 1 11 3 21 1 25 3 10 1 25 3 10 1 20 2 17 1 15 3 21 1 27 3 21 1 15 2 15 1 1
34. g column and row answering yes or no etc D pO 2 to I O Pins on Microcontroller a o Ww 1 OO 3 U4 HD HI a po 2 B P 3 c 4 D As ENC 10T04 Figure 5 20 ELECTROMAGNET LBS NET PULL WGT DIAMETER HEIGHT THREAD 75 inches EM R75 10 32 Table 1 The electromagnet module is controlled by an on off switch that either stops or allows current flow to the magnet The electromagnet will essentially attract and hold a ball from the ball hopper and release it into a hole coordinate The electromagnet operates at a maximum 12 V DC and 20 mA However operating at the maximum value can lift a string of up to 5 balls at once This is undesirable For our purpose we will only be operating it at 4 V DC and 6 67 mA We are operating at these values because then the electromagnet is strong enough to lift only one ball at a time while still having a strong attraction on the ball to transport it LCD Selection Selecting what type of LCD screen to use for this project was easy to do because of the minimal requirements needed for this project The LCD screenG main purpose is to communicate with the user instructions and other information throughout the game Different types of LCD screens would include character displays serial LCDs USB LCDs and graphic LCDs We went with a character display simply because it 1s the easiest to interface with the type of m
35. g all 83 misses without sinking all of the ships is so minute that there will be plenty of miss balls left over The design of the hoppers is such that they utilize gravity The balls are placed in the track on the outer edge of each hopper The slight decline in height forces the balls to roll towards the center where they can be picked up by the electromagnet The guide rails are sloped toward the center and act like ramps for the balls to switch back This uses the full surface area of the hoppers to store the balls Precautions have been taken to disallow daisy chaining of the balls when the electromagnet picks one up The electromagnet is being supplied with sufficient power to pick up one ball and one ball only Other balls in contact do not attach themselves at all ff os PR 6 Upper Display The upper display can be seen in Fig 10 The grid is 10 holes by 10 holes and is 9 in 228 6mm high and 18 in 457 2mm wide The holes are about the same size as the LEDs since we know exactly where they will be placed The rest of the space should be empty but may contain extra wires or circuitry Most of the upper display is taken up by the LED display and it must be that large because of the size of the electrical components needed for the digital logic The upper display is only about an inch thick on the inside because there are only circuit boards there and they are pretty thin The back of the frame should open up on two sets of hinges One will
36. g the LCD screen the appropriate signals as specified by the manufacturer will be sent to the microcontroller to prepare it to receive signal input To end this portion of the overall process flow a welcome message is passed to the write to LCD function Write Message to Call LCD Write Pass Place Your Ship Process Ship LCD Screen f Function P Placement Write Message to Call LCD Write Fe LCD Screen 4 1606 Pass Hit Enter When Done Wait for enter to p be pressed Write Message to Call LCD Write Pass Are You Sure LCD Screen Function Pass Wait for me to place Write Message to Call LCD Write my ships LCD Screen Function Pass Values to indicate for G te Rand Call y d ship placement enerate Random PER all Random coordinate for ship Number Generator Can the current ship fit down h or to the right without hitting 4 Pa er No another ship or board boundaries Yes Depending on the size of the Place numbers in ships Five ones for ACC selected and four twos for battleship coordinates and three threes for cruiser Store Result in Generate Rando
37. greater detail in following sections There are many points along this flow that require simple yes no decisions which redirect the path accordingly I Algorithm i v Set as Al s tun mq ee Determine If Game Set as User s turn Determine if Game is over is over Give user Display Ship Hold or user 1 nit AG instructions to play lt ___ Rese Upper Locations of lt key to play again Display again Computer and Delay Figure 23 A 8 Jq Game Initialization Variable Initialization Instructions like e ACC 0 y Initialize W O pins Hit_count 0 Declare strings Set specific I O pins to either Initialize LCD screen Screen y Write Message Passed to LCD Call LCD Write Function Enter into Ship Placement Figure 24 output or input based on system needs Send appropriate instructions to set up the LCD screen Pass Welcome to battle ship As can be seen above the Game Initialization portion of the overall process flow is relatively simple It consists of initializing all variables for use in the program such as declaring all ships as not yet sunk and hit counts to 0 Also a key part is initializing all the input output pins on the microcontroller to the appropriate setting for what they are used for When initializin
38. he movement system for many reasons First of all they do not require a controller If the microcontroller tells the motor to go through an arbitrary number of steps it has travelled a known linear distance based on the step angle degree and the size of the pinion on the shaft Other motors require a controller to feedback the position but it is not necessary here Related to this is the error per step With the chosen stepper motor there is a possible 5 error per step Since the shaft aligns with a different electromagnet inside of each stepper motor on each step the error per step is not cumulative If the motor overshoots on step by 3 it corrects itself by step 2 Also stepper motors are very precise We are using a hybrid stepper motor which typically has a step angle of 1 8 or 3 6 which is 200 steps per revolution or 100 steps per revolution respectively The motor we are using has a step angle of nu 1 8 which translates to a linear distance of 0 015 in 0 38mm Finally their size to power output ratio is very low which is very nice when considering space and weight issues The RB Soy 02 Unipolar stepper motor from Robot Shop was chosen for this project Below Table 5 shows the decision matrix used for making the stepper motor choice The motors from the Robot Shop and the motors from Trossen were very similar in appearance and style except the one from the Robot shop was a unipolar stepper motor as opposed to the one fro
39. icrocontrollers we are looking at and relatively simple to use with experience But when looking at character displays the choice was dependent on what was need for the project such as character dimensions and the style of the backlight and font color LCD Decision Matrix Table 2 As you can see we went with this sixteen by two LCD screen that has yellow characters on a dark background Instructions will be sent to it from specific pins from our microcontroller to initialize it to print out characters as we need to The specifications can be found in appendix B Microcontroller For a compact design low cost and convenience of equipment to work with them we decided to go with a PIC processor in a QFP package from Microchip Limiting our options to the equipment we have there are some criteria as to what to choose by the basic pin count sizes that would work for our application Microcontroller Decision Matrix Table 3 As you see we will be using a 64 pin microcontroller for this project due to the fact that we have the equipment to program it and test it via breadboard before hardwiring it into the final system The pin count is a little small causing us to design around it but it is the best solution With the 80 and 100 pin counts there are more than enough I O pins to work with but there is no equipment available for bread boarding them for testing before integrating them within the project When the final program has been instal
40. ins that are important considerations for this project include AHigh tensile strength impact resistance and stiffness AOutstanding fatigue endurance ANatural lubricity Fatigue Properties When materials fail at stress levels below their yield strength because they are subjected to cyclic stresses they experience fatigue failure According to Dupont Delrin acetal resins have extremely high resistance to fatigue failure from I 40 to 82 C 1 40 to 180 F Fatigue resistance data from DupontG website in air for injection molded samples of Delrin acetal resin are shown in Fig 20 below Delrin 100 500 900 105 105 Cycles to Failure Stress MPa Stress 10 psi ASTM D671 Q Figure 20 From Fig 20 it can be seen that for stresses less than 4 000 psi components made out of Derlin have approximately 10 cycles to failure Rack Selection The two main design requirements for selecting a rack are cost and pressure angle The pressure angle 1s determined by the hub style chosen on the gear The pressure angle is a major constraint for the rack selection since the gears manufactured with a set screw have a pressure angle of 20 degrees None of the racks available in the market fulfilled our two main design requirements As a consequence the racks will be custom made using a CNC milling process The material that is going to be used 1s Nylon 101 a polyamide offering rigidity strength and wear resistance It can als
41. ircuit This power supply will pull its power from a standard wall outlet 110 120 VAC It will step this voltage down to 15 VAC using a transformer This transformerG low side voltage will be connected to a bridge rectifier with a load in parallel with a capacitor to filter This rectifier converts the 15 VAC to approximately 15 V DC The rough 15 V DC ss then regulated to 12 V DC and 5 V DC 5 V DC will have a heat sink and a fan on it to help release heat Once the voltage has been regulated to these two voltages the 12 V DC is put through a voltage divider creating 6 V DC and the same from the 5 V DC only it divides the voltage to 1 V DC The 12 V DC will be used to power the electromagnet the 6 V DC and the I V DC will be used by the LCD and the 5 V DC will be used for digital signals in conjunction with 0 V DC Digital Logic Design In Application the SR latch i found has different states so may need to buy a different type of AND gate one with an inversion bubble on the output SR latch cannot support the current draw ofthe diode so in reality Ha kB itwill probably have to be attached to a multiplexers switching the Ui LED to power Key A UIA 5V J2 kh 7408 T re RI R2 100 0 100 0 XY LEDI T SR LATCH K L Figure 2 This is the digital logic behind each LED in the LED array Its purpose is to hold the LEDG state once itG turned on indicating a hit or a miss The switches attached to
42. keypad that will act as an input receiver for the user amp moves and will also have keys for the player to indicate if the computer sunk a ship Also included is an interactive LCD screen that will prompt the user when it is their turn whether they hit or missed the computerG ship and other instructions throughout the gameplay CAPABILITIES e Will have artificial intelligence for the computer to choose locations close to a hit in order to sink the user amp ship Once two hits are found only locations along a straight line should be attempted until a sinking takes place as confirmed by the user via the keypad When the user indicates which ship has been sunk via the keypad the computer will determine if it hit another ship in the process If so the computer will continue selecting coordinates in the area until it sinks that ship Once the computer determines that there are no more known ships in the area it will continue selecting random coordinates of attack e Will be able to be operated and moved by one person e Will acknowledge whether the coordinate selected corresponds to either a hit or a miss by displaying a message in the LCD screen and lighting up the LED in the upper display of the game that corresponds to the coordinate selected by the user If it is a hit the color of the LED will be red and if it is a miss it will be green e Will be able to setup in no more than 5 minutes e Will be able to place balls of different colors to
43. ks drawings There should also be simulations of the electronics and breadboard mockups This has been done and is shown in the appendices As of right now we do not have any real changes to make to the spring semester Since the project is being completed as expected aside from a few minor changes such as the addition of one stepper motor and using a purchased electromagnet as opposed to a hand made one no changes have been necessary for the spring semester After looking over our module designs discussing how things will be built and what order they will be built in it is looking like time may be a bit tight The frame will take a long time to build because some of the components will have to be built into the frame and the frame constructed around them This presents a few issues of certain parts of the frame having to be built before others If construction 1s taking more time than expected other team members can help glue and or cut pieces of Plexiglas As a whole all of the foreseen issues are solvable and should not be insurmountable The project should be fully completed on time with most if not all of the requirements achieved uonqej uawmog 2115113531 0111531 wayu LININPJUASA Lg Huddy uelgd 23101 1 131530 WajsAs SEU Nd puge WON23 35 SHUEY udlsag WEJ 138153 JOSUIK dius usog JOUSCWOIDO F usisag Wa SAS uaWano MAAS UaU1F 4 PE udisag Addn samog UdIS3Q 21607 2 udisag euy 03 U0II3J3 13 01100201211 usad
44. led a schmart board will be used to solder the microcontroller to and integrate it into the final device We have already received and are working with a microcontroller but will upgrade to one with more memory in the final system The spec sheets for that microcontroller can be found in Appendix I anj Mechanical Design Frame Design The overall goal of the frame design was to create a frame that incorporated all of the major components of the classic Battleship game while also allowing us to include our own modifications such as the movement system and the ball placement system which allow the computer amp moves to be automatically placed It needed to be structurally sound while also making it user friendly with ease of access to the major electrical components The current frame design may be seen in Fig 6 The main components of the frame are as follows 1 2 3 4 0 1 8 Material Game Board Sub Game Board Ball Return System Ball Hoppers Upper Display Electrical Component Storage Movement System 1 Material The framing material is Plexiglas It is strong fairly easy to use and compared to other materials relatively inexpensive Table 4 below is a decision matrix showing the criteria and potential options for frame material 8 Table 4 Decision matrix of potential frame materials As you can see from Table 4 Plexiglas was the winner and was chosen as our main building m
45. lier a player was able to purchase prepared paper sheets for the game Since the beginning letters were printed in the outer vertical edges of the sheet and numbers were printed horizontally at the top In 1967 the board game of Battleship was created The pencil and paper were discarded and were replaced with plastic ships pegs and trays Later in 1983 the Milton Bradley Company improved the version and included electronic components and new features such as lights and sound In 2008 the latest version of Battleship called he Tactical Combat6 was introduced and it includes several modifications to the existing version such as the shape of the ships and board The Milton Bradley Company has been the only company to continuously produce a Battleship game for any extended period of time Our motivation is to create a technically challenging semi automated version of the game Battleship in order to promote the interest of future Harding students into the engineering program System Overview Our goal is to create an essentially hands free version of the classic Battleship game The game will be powered through a standard 110 V AC household outlet There will be a keypad that will receive input such as accepting the coordinates of the 7181016 moves Also there will be an LCD screen that will provide feedback to the user and will prompt the user with instructions and notifications such as when to make a move or indicate when the player ha
46. llest number of teeth on a spur pinion and 1 for full depth teeth For a 14 5 degree pressure angle gt 2 sin 14 5 31 90 teeth For a 20 degree pressure angle gt 2 sin 20 17 09 teeth So the number of teeth on the gear with a pressure angle of 14 5 degrees should be 32 or more to avoid interference with a rack And the number of teeth for a gear with a pressure angle of 20 degrees should be greater or equal to 18 The maximum torque that will be transmitted to the gear is the maximum torque that the stepper motor can generate is given by Where is the torque and is the applied force From the stepper motorG data sheet 35 Converting the torque generated into English units 2 1875 0 247 For the gear selected the pitch diameter 0 9580 24 J The maximum force transmitted to the gear is _ 21875 0 479 4 57 19 82 Af a Mechanical Analysis of Movement System From Lewis equation Where is the face width of the gear is the velocity factor is the diametral pitch teeth in is the transmitted load and isthe Lewis Form Factor _ 1200 1200 Where is the pitch line velocity 12 M0 95802100 12 25 0804ft min 0 127 _ 1200 25 0804 1200 1 0209 The resultant bending stress exerted on the gear 1s 1 0209 214 57 124 1340 1 9 24 0 250 10 334 From the tables of material properties for Acetal Derlin Tensile Strength 10 000 68 951 Yield Strength 9 000
47. lon Data Bed UT RR AA AA Appendix V Gear Data Sheet NABA 22 SESE SS NSE AABANGAN Appendix W Requirements Specification Single Player Against Machine BAttleship Game SPAMBAG Requirements Specification Matt Goodhart Timothy Hoffmann Matt Lewis Tatiana Zeledon OVERVIEW Battleship is a classic game that many people play in their childhood Typically it is a two player game where one person plays against another We are recreating this game so that one person can play by themselves against an interactive computer that has a robotic piece placement device This allows a novice player to get a feel for the rules and potentially develop and improve strategies of their own Aside from the inputs from the player on where he she wants to place his her ships and target the computerG ships the game is hands free OPERATIONAL DESCRIPTION Our battleship game will follow all of the standard rules of the classic battleship game There will be a user input interface most likely an interactive LCD screen that will prompt the user with instructions and notifications such as when to make a move or indicate when the player sunk one of the computerG ships There will also be a keypad which will accept the coordinates of the player amp moves Beginning game play will require the player to physically place his her ship pieces on the lower display Once the playerG ships have been placed the game begins a random selection of who player or computer
48. lower the button down to approximately halfway between the height of the board and the height of the ship piece If a ship is present the button will be below the level of the ship and the button will be depressed It will return a high signal telling the microcontroller that a ship is present and the guess is a hit If a ship is not present the button will not be depressed It will continue to return a low signal telling the microcontroller that the guess is a miss Inputs Power OV DC and SV DC and 200mA I for flip flop Power 12V DC and 2 5 A Digital signal from microcontroller 0 or 5V DC and 0 or 25mA 0 to 12V and 0 to 2 5A Functionality Accepts signals from the microcontroller and logically determines the necessary output through a series of multiplexors and latches DA 0 to 12V DC and 0 to 2 5A Outputs Lit LEDs Functionality The LED array is the physical display the user will see that displays the moves that he she has selected Individual LEDs receive power from the power supply that has been directed by the digital logic Inputs Outputs Functionality Power 5 V DC and max of 300mA Digital signal from I O System 1 0 or 5V DC and 0 or 25mA Digital signal from ship sensor 0 or 5V DC and 0 or 25mA Digital signal to I O System 1 O or 5V DC and 0 or 25mA Digital signal to 4 motor system 0 or SV DC and 0 or 25mA Digital signal to electromagnet controller circuit 0 or 5V DC and 0 or 25mA Digital signal
49. m Trossen which was a bipolar stepper motor The unipolar motor is easier to handle The cost for all three motors was about the same so while it was important that stepper motors are inexpensive compared to other types of motors the relative cost of one stepper motor to another was not hugely important Ball Selection The steel balls used in this project were ordered from McMaster Carr There werend a lot of options once a company was located that satisfied all of our needs Requirements of the material were that it was magnetic durable looked nice and came in 2 in diameter After some research E52100 chrome steel was chosen because it is durable will not rust and is moderately magnetic Stainless steel was the original desire but due to the presence of nickel it 1s not magnetic at all The only two suppliers that met the requirements for a reasonable price and quantity were Thompson Ball and McMaster Carr I have ordered from McMaster Carr in the past and have been satisfied with their products Also the project only needs about 120 and they sold them in packs of 100 Thompson sold them for a cheaper price per ball but 600 balls would have to be purchased at a time which would cost almost double 5 5 5 5 6 tb 5 9 5 665 5 5 5 5 5 Bd J get f i F EDR DH NNN S N Ha
50. m and so on whose turn coordinate for ship Call Random Done Placing Number Generator Yes ships No Call LCD Write Function Pass YouN Go First Pass information to select 0 i or 1 for user or computer Write Message to depending on whose_turn p LCD Screen variable Enter Game Play Process Figure 25 si The Ship Placement portion of the overall process flow is more complicated than the Game Initialization portion and requires user interaction at the beginning of this process In our game board we are using physical game pieces for the user ships so that there is no illusion of the game possibly being able to cheat just by looking at the user ships locations in its memory The issue with this is that the game has to have a level of trust in those who play it An example would be that we must trust that the user placed ships and did not leave some pieces off to ensure their victory One solution that can be used to solve possibilities of accidental errors such as hitting enter before placing the game pieces would be to double check every time the user 1s asked to do something This is seen right after the user 1s instructed to place their ships Once the user ship locations are selected it 16 time for the program to place the computer ships A random number generator function will be called to select a position on the game board for the comp
51. o be easily used when meshing with a plastic gear Nylon has an ultimate tensile strength of 11500 psi and yield strength of 15000 psi which will be able to support approximately four times the stresses produced by our movement system At J Note that for a rack and a pinion to mesh it is necessary that both of them have the same Diametral Pitch and the same pressure angle For this specific design DP 24 and 0 20 Decision Matrix Table 7 Since the racks will be custom made using a CNC milling process the SolidWorks models were developed The CNC machining process that will be used for the rack fabrication requires the tooth profile sketch shown in Fig 21 and accurate rack models of the parts to be machined shown in Fig 22 The designed racks have a diametral pitch of 24 teeth in and a pressure angle of 20 degrees For the movement system the length of the rack will be 18 inches 457 mm and for the sensing system the racks will have a length of approximately 3 20 inches 81 mm The minimum thickness of the rack 1s 0 250 inches 6 35 mm and the height approximately 0 5 inches 12 7mm However the thickness of the rack can be increased as long as the bending stress calculations as done with the surface that has the smallest face width 1 in this specific case the gears Figure 21 Figure 22 Gear Calculations To determine the smallest number of teeth on the pinion to avoid interference gt 221 sin 0 Where is the sma
52. of game pieces SolidWorks drawings and mockups Duration 9 13 9 29 9 25 10 16 10 15 11 3 10 15 10 30 10 20 11 3 11 3 11 15 10 22 11 15 10 22 11 15 10 22 11 3 10 15 11 15 11 1 11 15 10 20 11 5 10 20 11 5 11 08 11 15 10 15 11 15 People M M T T M M T T Matt L Tim Matt L Tim Tim Matt L Matt L Matt L M M Tatiana Matt G Matt L Matt L Tatiana Matt G Tatiana Resources Computer Computer Computer Multisim Computer Multisim Computer Computer Computer Multisim Computer Multisim Computer Multisim Computer SolidWorks Computer SolidWorks Physical tests Computer Multisim Computer Computer SolidWorks Task F10 0 F11 0 11 1 11 2 12 0 12 1 12 2 1 2 3 0 Activity Parts Selection System Design amp Project Plan Report Presentation Intermediate Design Review Report Presentation Documentation A3 Status Reports Time Management Work Breakdown Structure Fall 2009 continued Deliverable Description Checkpoints Documentation of ordered parts and data sheets of each part Make final decision as to which parts to use Breakdown of design and build process and detailed scheduling Report and Presentation Write detailed report a Written report
53. s reset pin to high The above model shows an example of a latch for a hit left of LED and a miss right of LED each latch connecting to a different lead Although the design of this component seems complex it simplifies the software working with it LED Array Design Figure 3 This is a layout of the LED array It demonstrates the use of demultiplexers to control which LED is being turned on by isolating a row and a column The demultiplexer on the left side of the diagram is used when the users move was a miss so it is connected to the green leads of the LEDs The demultiplexer on the top of the diagram is used when the user amp move was a hit so it is connected to the red leads of the LEDs It accepts a binary word from the microcontroller represented by the switches between a high and low digital signal because the microcontroller will either send a high or a low signal to establish which row it should send a signal to Then it uses its output through 10 to supply a signal to the proper row These will be row A through J on the upper display The demultiplexer on the bottom of the diagram goes through the same process except that it indicates columns 1 through 10 When an LED is sent a signal from the column and the row demultiplexers it is being turned on In the above diagram each LED has one of the fore mentioned latch circuits behind it controlling it oj Keypad Design 1A i 2B 3C o ato Q o o o o o Ch Key
54. s sunk one of the computerG ships Beginning game play will require the player to physically place his her ship pieces on the lower display board The player then indicates to the computer that this has been done and the game begins a random selection of who player or computer goes first This selection will be indicated on the LCD screen On his her turn the player inputs his her move The microprocessor then discerns if the input was a hit or miss and gives the corresponding output on the upper display Outputs include lighting a red LED hit or a green LED miss On the computerG turn a plunger button system moves and senses whether there is a ship in that coordinate or not and shows its output on the lower display by placing a red hit or green miss ball via the ball manipulator into the selected spot This process is repeated until the computer determines that all the playerG ships have been sunk or all the computerG ships have been sunk Whenever one of these two scenarios takes place the game is over At this point the user will see where the computerG ships were as indicated by red LEDG on the upper display of the board Results will be displayed until the on off switch is pushed Our prototype will be delivered as a fully functional battleship game The top half may be closed and latched so that it may be transported 1 pl Functional Description of Blocks Inputs Functionality Power SV DC and 25mA Keypad Power 5V DC an
55. serG ship the user just started a pursuit on a userG ship only having one hit and finally that the computer is currently in pursuit of a 5010 ship with more than one hit A condition that will also be considered is what must take place if there is a hit on a user ship while during a pursuit while another ship has already been sunk The computer will take into account the difference between total hit count during that pursuit and number of hits on a current ship Pass coordinate XX Example A9 B7 Checks for Call LCD Write Function Write Message to A Ship LCD Determine steps to location for ship sensor Condition While horizontal met steps not me Condition not met Condition not met y Condition met Pass next pattern Pass next pattern to stepper motors to stepper motors for vertical pins for horizontal pins Lower ship sensor Sls Condition sensor steps met not met Condition not met EN Sensor pa for ship sensor 1 for ship O if miss store result in was there a ship variable Reverse ship Pass next pattern sensor back to to stepper motors original position for horizontal pins Return electromagnet housing back to original po
56. sition Enter into Marble Placement Figure 27 This section checks the computer amp move coordinate just generated to determine whether or not there was a hit There are a number of steps for each stepper motor to get the shipG sensor over the correct coordinate The ship sensor is then lowered to determine if there is a ship The results are stored in the appropriate variables and then the process flow moves into marble placement after the ship sensor is moved back to the home position by reversing the stepper motor process ss Ball Placement l Was a ship Write to LCD Screen Call LCD Write Function Move electromagnet over red hopper Pass got a hit Was not a ship Same loop as before for stepper motors Write to LCD Call LCD Write Screen Function Move electromagnet over green hopper Turn on electromagnet to pick up ball Return electromagnet to original position Move electromagnet selected by Generate to coordinate computer move Turn off electromagnet to drop ball in coordinate Return motors to home position Enter into appropriate next bet step Figure 28 Pass You got lucky
57. t What also must be considered is the fact that one of the messages outputted to the screen has too many characters for the LCD that we are using The solution to this problem is to simply split up the message into two parts placing a delay in between the times that they are displayed allowing the user to read it The process flow then moves on to determine whether or not the game is over Check number of 17 is the total number of Determ ine If computer hits possible hits if all ships are Game is Over compared to 17 hit Yes Are they equal No Set Game Over Variable to one y Enter into Set as User s Turn Figure 30 This section is very simple and only sets the Game_Over_Variable to indicate whether or not the game is over yet This only occurs if the computer or user generated a hit in their most recent move Set as User s Turn Coming from miss Coming from hit Y Set Whose_turn to zero indicating user turn Enter into start of Game Play Figure 31 At the end of a turn user or computer the whose turn variable must be changed so that the game will continue to alternate in between playersOturns The above flowchart shows what is seen at the end of the computerG turn but it is identical to what is seen at the end of the user amp turn The only difference is the whos
58. the total was about 35 dollars less than expected due to discounts from the company estreetplastics com These 35 dollars will be used in other places where the budget has gone a little high The movement supplies budget was to take care of the expensive cost of racks and a potential expensive cost of gears but we will make our own racks on a CNC machine and the pinions will be cheaper due to the Delrin that we are using as opposed to steel After reviewing the entire budget and anticipated cost of supplies as of now it looks like we will come out within about 10 of our funds Right now our group has spent 80 percent of the estimated budget of 662 00 Based on the fact that we may get a microcontroller for free and a few other parts have not cost as much as expected the project 1s expected to be completed with approximately 100 to 150 dollars of our funds to spare 3 u Jh Purchase List Push Button for Shi Sensor sm hl Steel Balls 33 77 Motors 96 56 LCD Screen 24 41 LEDs 33 00 Electromagnet 37 21 Movement Rails 14 52 Gears 32 96 Ship Sensor Rails 9 67 PVC Type 1 3 90 Quad SR Latches 47 00 Quad 2 Input NAND Gates 8 92 Push Buttons for Keypad 11 80 Plexiglas 165 22 Binding 2 00 530 09 Table 10 Gantt Charts Schedule Assessment Currently the project is right on schedule According to the timeline by the Final Design Report all module designs should be completed with schematics and or SolidWor
59. this time Calculate steps for vertical and horizontal movement and then move just as before with ship sensor except without offset Depends on hit or miss This portion is very similar to the Checks for Ship portion The only difference is that the electromagnet is moved over to pick up the appropriate colored ball depending on hit or miss before moving to the coordinate Another difference is the amount of steps moved to position the electromagnet over the coordinate instead of the ship sensor In order to minimize the amount of code used an offset will be added to the step count variables used to position the ship sensor above the particular coordinate because the electromagnet must travel farther to be positioned above that same coordinate The process flow then enters into the next step which depends on whether there was a hit or a miss Write message to Call LCD Write on i bo tes Ask User for LCD Function Pass Did sink a ship Info Regarding Hit Y Write message to Call LCD Write Pass Press Enter for Yes LCD Function and Back for No Wait for user Back Pressed input via keypad Enter Pressed y Write message to Call LCD Write Pass Which Ship LCD Function y Pass Press 1 for ACC 2 for bat
60. tleship and so on May have to scroll through all options with multiple write functions Write message to Call LCD Write LCD Function y Wait for input store in ship_sunk variable Write message to LCD Call LCD Write Pass Ship entered not valid Function Enter the correct ship A Check and see if ship they said Fails Validation has not already been sunk or Call Validate Input Pass ship_sunk variable that there are enough hits for Function that ship to be sunk y Passes Validation Compare number Add ship size Mark ship as hit of ships to number Pursuit hits amount in pursuit via ship variable Faral of hits in current greater hit adjustment A pursuit variable Clear all pursuit variables Check and see if pursuit hit adjustment variable is equal to hits in current pursuit Pursuit hits greater y Enter into Determine if Game lt is over Figure 29 fg This portion of the program is essential in the fact that it must determine information based on a hit by the computer to aid in computer move generation for succeeding moves It determines if a ship was sunk or if there is a new pursui
61. to digital logic 1 0 or SV DC and 0 or 25mA The microcontroller will store and run the program for the battleship game This program will keep track of the game progress including storing previous computer and user moves and will calculate future moves for the computer accordingly It will also output signals to the ball manipulator to place balls indicating the computer amp moves and will send signals to the digital logic of the LED system to indicate user moves The microcontroller will also send information to the user via the LCD screen and take in information from the user via the keypad WUaWase Ieg yuge JO 0 PUE AG JO 0 SG jeug erig 10 spurs 50 3172 12 43 3 011233 vugge 0 SUSBLIGJJIDS 30 Ar 100 53137 Josuas diys papunoicy ZH09 YSI IV AQ AJSMOd 31207 pasig al 3ndu Jasn UOP3 37 LULE L SIMIT HEIN UULUIJJOH 10100111 1EYPOOD NEIN 3010 digsapyvg SUIYIEWN JSUIVSY 19 ALT I SUIS Weisel Mog 15 Electrical Design Power Supply Circuit C1 100pF U3 Lr 12 mA 12 volts VOLTAGE 6 volts 5 mA e eu 800 Q Figure 1 The majority of the modules in this project require power in order to operate These modules include the microcontroller the LED array the digital logic the ball movement system the ship sensor the electromagnet the LCD screen and the keypad All of these modules will draw their power from this power supply c
62. troller Circuit Ship Sensor and Game Piece Design Frame Design Work Breakdown Structure Fall 2009 Description Document stating what the project will do in detail Design entire project in detail Communicates between the user and the game Takes input from the user Outputs Information to user Select an appropriate microcontroller that will run the game code Displays the user s moves Determines which LEDs receive power Supplies power to all modules of game Displays computer s moves Moves ball to appropriate coordinates Magnetically picks up and drops ball Allows power to go to the electromagnet Senses the presence of the constructed ships Encases entire game fz Deliverable Checkpoints Basic ideas of project written document Choose best solutions and apply them Schematic of keypad and selection of LCD screen Schematic and sketch of keypad Selection of LCD amp manufacturer s data sheets Selection of microcontroller amp manufacturer s data sheets Schematic of LED circuitry Schematic of digital logic Schematic of power supply circuitry SolidWorks drawings and MotionWorks simulations SolidWorks drawings and MotionWorks simulations Calculations of necessary windings and current amp material size and shape Schematic of electromagnet controller circuitry Selection of push button and idea of how to lower the push button amp design
63. ursuit variables Te 1 follow previous moves 0 Check where to go Check r Pursuit gt one BP 1 pursui ENES JE variable 4 Se right or up lt 4 down from pursuit start Vv 0 y If left check right Check for up Check around and move Else if down move the pursuit_start up move down Jump left right if not location snd soon A good 1 Move up first then Select locations around pursuit start If all hits swap pursuit start and pursuit end and select locations around pursuit start again Down if not able to If no move swap y If not able to move up or down move left if can else move right Set pursuit gt one and store coordinate in pursuit end variables pursuit start and pursuit end and jump back Move Made Change pursuit_end to most recent move v y Enter into Check for Ship Process Figure 26 In the Generate Computer Move portion of the process flow there are three possible conditions that affect the way the computer chooses moves These three conditions are that the computer is not currently in pursuit of a u
64. uterG ships and also to generate a number that indicates either up to down or left to right for the ship direction If currently placing the aircraft carrier a one will be assigned to the coordinate variable for each of the five spots representing the ship if the condition is met that the positions for the ship do not cross over game boundaries or hit any other ships Twos will be placed in the coordinates representing the battleship and threes for the cruiser This continues until all five ships are placed Once the computer is done placing ships it then decides who goes first using the random number generator The result is set in the whose_turn variable and then is output to the user After all this is done the process flow then moves onto game play Generate Computer Move Check up down and left right to make sure there is enough empty coordinates for smallest ship Write Message to a Call LCD Write LCD Function Pass My Turn Call Random Number Generator 0 le Ge a e 1if in pursuit for game board i e if not I 1 Check location to see if a shot was If fail already taken v Check Check 1 p Just hit count B 0 Pursuit w sink th Check around more than one location v i 0 11 a ship has y ee been sunk in Store location in 40 011111 Pursuit Start and set Jasa p p

Download Pdf Manuals

image

Related Search

Related Contents

広 報 広 報 広 報  Y-0646E 1506  Heladera Termoelectrica Manual Del Usuario  GUIDA DELL`UTENTE IN RETE  GE AL5 Installation Guide  Il ou elle a dit  Télécharger la plaquette Gamme DCS800  取扱説明書 日本人独自の感性と精緻をきわめた技術  Magnavox AZ6828/17 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file