1.1.9.P The Random Number Generator



?Project 1.1.9 Soldering: The Random Number Generator (RNG)IntroductionHow many times has this happened to you? It is a rainy Sunday afternoon, there is nothing on TV, and you decide to play a board game with the family. You go to the closet and get out the Monopoly? game only to find that the die is missing (note: die is the singular for dice). Wouldn’t it be great to have a simple electronic device to replace all the dice that have gone missing? Well, after you complete this project, that’s exactly what you will have.In this project you will assemble and test a Random Number Generator kit that randomly displays a number between one and six in the patterns typically seen on a board game die.Equipment Random Number Generator kitSoldering equipment:ViseSafety glassesSolder suckerSolder toolDiagonal cuttersNeedle nose pliersSolderSolder wickDamp spongeSoldering iron3 – AA batteriesDouble stick tapeProcedureWhile assembling the Random Number Generator, it is important that you understand and follow all safety rules and regulations discussed previously in this lesson. If at any time you do not feel comfortable completing a step in the assembly, please ask your instructor for assistance.Fully Assembled Board Game CounterKit Inspection: Inspect the parts kit to ensure that all of the required components have been included and none are damaged. If you need any replacements, see your instructor.ReferenceNumberDescriptionReferenceNumberDescriptionR1-R7180 ResistorsU1555 TimerR81.2 k ResistorU274LS74R910 k ResistorU374LS74 R1018 k ResistorU474LS04L1-L7Red LEDsU574LS32C1100 f CapacitorU674LS08C20.47 f Capacitor---Printed Circuit BoardC30.01 f Capacitor---14 Pin SocketsS1N.O. Pushbutton Switch---8 Pin SocketsS2SPST Slider Switch---Battery HolderRandom Number Generator (RNG) Parts List Resistors R1 – R7: Bend the leads of one 180 resistor (a) and insert it into the printed circuit board where it is marked R1 (b). From the backside of the PCB, solder the two leads in place (c) and then clip the leads flush to the board (d). Repeat this step for the six remaining 180 resistors (R2 – R7) (e). (b)(c) (d)(e)(f)When soldering, make sure that the component remains flush to the board. Use caution when clipping the excess lead lengths. Lead clippings will fly off and have the potential to cause an injury.Resistors R8, R9 & R10: Repeat step #2 for the three resistors R8 (1.2 k), R9 (10 k), and R10 (18 k) (f). Be sure to check the color code of each resistor to ensure the correct placement. Light Emitting Diodes L1 – L7: Examine an LED and determine which lead is the anode and which is the cathode. The cathode can be identified two ways: first, its lead length is shorter than that of the anode and second, a flat spot exists on the cathode side on the LED (a). Insert the LED into the PCB where it is marked L1, ensuring that the cathode lead is in the square pad (b). From the backside of the PCB, solder the two leads in place and then clip the leads flush to the board. Repeat this step for the six remaining LEDs (L2 – L7) (c). (b) (c)Capacitor C1 & C2: Both C1 & C2 are polarized electrolytic capacitors. Therefore, the orientation of their placement in the PCB is important. The lengths identify the positive and negative leads of an electrolytic capacitor. The positive lead is always longer than the negative lead. Insert C1 (100 f) into the PCB with the positive lead in the square pad (a). From the backside of the PCB, solder the two leads in place and then clip the leads flush to the board. Repeat this step for C2 (0.47 f) (b). (a)(b)Capacitor C3: Capacitors C3 is non-polarized, therefore, its orientation in the PCB is not important. Insert C3 (0.01 f) into the PCB (a). From the backside of the PCB, solder the two leads in place and then clip the leads flush to the board (b). (a)(b)Switches S1 & S2: Insert the normally open push button switch (S1) into the PCB and solder its four leads from the backside of the PCB (a & b). Next, insert the single-pole-single-through slider switch (S2) into the PCB and solder its three leads from the backside of the PCB (c & d). (a) (b) (c) (d)Socket for U1: IC sockets have a marking to orientate their placement in the PCB to ensure that corresponding IC are properly socketed. This marking is a half-circle cutout next to pin #1 (a). When inserting the socket into the PCB, be sure that this marking matches the marking on the PCB’s silkscreen. Insert the 8-pin socket into the PCB where it is marked U1. From the backside of the PCB, first solder pin #1 (b), followed by pin #8 (c). Soldering the two corners first will ensure that the socket lays flat to the PCB. Now, solder the remaining pins of the socket (d). (a)(b)(c)(d)Socket for U2-U6: Repeat step #8 for the five 14-pin sockets for ICs U2 through U6.Battery Holder: Unlike the other components that are mounted on the front side of the PCB and soldered on the back, the battery holder is mounted on the backside of the PCB and soldered on the front. After attaching a small piece of double-sided tape, insert and solder the battery holder to the PCB. Clip the two leads flush to the top side of the board. Pay particular attention that you use the correct mounting holes (see insert).Wrong!CorrectWrong!CorrectICs U1-U6: Like their sockets, ICs have the same half-circle cutout next to pin #1 to ensure correct orientate. Starting with the 555 Timer (U1), insert the IC into the corresponding socket. To ensure a tight fit, the pins on an IC are slightly wider than the socket (a). Care must be taken not to bend any IC pins when the IC is being socketed (b). Repeat this process for the 74LS74 (U2 & U3), the 74LS04 (U4), the 74LS32 (U5), and the 74LS08 (U6) (c). (a)(b)(c)Batteries: Insert three AA batteries into the battery holder. Your Random Number Generator is now ready to use.Functional Test: Now that the assembly of the Random Number Generator is complete, test the device to determine if it is working properly. First, switch S2 to the on position. This should cause one or more of the LED to turn on. If the LEDs do not come on, make sure that the batteries are properly installed. If this does not fix the problem, go to step #14.Next, press and hold switch S1. This should cause all of the LEDs to flash. Release S1 and watch as the flashing rate slowly decreases and eventually stops. If everything is working as expected, you have completed the assembly of the Random Number Generator. If the board is not working as expected, go to step #14.Trouble Shooting: Given that the Random Number Generator is a proven design (i.e., we know that it works when assembled correctly), its malfunction can only be caused by a few possible errors. First, one or more components could be improperly installed. Inspect the board from the top-side to make sure that all polarized components (i.e., LED, C1 & C2) have been correctly inserted. Ensure that all of the ICs are oriented correctly and properly seated in their respective sockets. If any problems are identified, make the necessary corrections and retest the board. Second, you could have one or more bad solder joints. Again, inspect the board, but this time from the back-side. Look for any bad solder connections, particularly cold solder joint and solder bridges. If any problems are identified, make the necessary corrections and retest the board. Finally, the board may have a bad component. Though this is not likely, occasionally components do arrive damaged from the manufacturer or can become damaged during assembly. At this point you do not have the skill set necessary to troubleshoot this type of problem. If you suspect the error is due to a bad component, ask your instructor for assistance.ConclusionIf you were to use your Random Number Generator to play Monopoly? during a family game night, you would want the numbers rolled to be random and evenly distributed (i.e., the likelihood of rolling a one is the same as two, is the same as three, etc). How fair is your Random Number Generator? To measure this, use the data table shown below to tally each number displayed as the roll button is pressed one hundred times. After you complete the tally, calculate the total count for each number and its distribution. NumberRolledTallyCountTotalCountDistribution123456How evenly distributed were the numbers for your Random Number Generator? If your game was perfect, then each number should have come up approximately 16.67% of the time. Do you think your Random Number Generator is fair? Why or why not?Another word for troubleshooting is debugging. Do a little research (Google, of course) to determine the origin of the term debug and who was the person to coin the phrase. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download