Project 1.1.9 Soldering: The Random Number Generator

advertisement
Project 1.1.9 Soldering:
The Random Number Generator (RNG)
Introduction
How 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 kit
Soldering equipment:
o Vise
o Safety glasses
o Solder sucker
o Solder tool
o Diagonal cutters
o Needle nose pliers
o Solder
o Solder wick
o Damp sponge
o Soldering iron
3 – AA batteries
Double stick tape
Procedure
While 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.
© 2014 Project Lead The Way, Inc.
Digital Electronics Project 1.1.9 Soldering: The Random Number Generator (RNG) – Page 1
Fully Assembled Board Game Counter
1. Kit 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.
Reference
Number
R1-R7
R8
R9
R10
L1-L7
C1
C2
C3
S1
S2
Description
180  Resistors
1.2 k Resistor
10 k Resistor
18 k Resistor
Red LEDs
100 f Capacitor
0.47 f Capacitor
0.01 f Capacitor
N.O. Pushbutton
Switch
SPST Slider Switch
Reference
Number
U1
U2
U3
U4
U5
U6
-----
Description
555 Timer
74LS74
74LS74
74LS04
74LS32
74LS08
Printed Circuit Board
14 Pin Sockets
---
8 Pin Sockets
---
Battery Holder
Random Number Generator (RNG) Parts List
© 2014 Project Lead The Way, Inc.
Digital Electronics Project 1.1.9 Soldering: The Random Number Generator (RNG) – Page 2
2. 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).
(a) (b)
(d)
(c)
(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.
3. 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.
4. 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).
(a)
(b)
(c)
© 2014 Project Lead The Way, Inc.
Digital Electronics Project 1.1.9 Soldering: The Random Number Generator (RNG) – Page 3
5. 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)
6. 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)
7. 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-polesingle-through slider switch (S2) into the PCB and solder its three leads from the
backside of the PCB (c & d).
(a)
(b)
(c)
(d)
© 2014 Project Lead The Way, Inc.
Digital Electronics Project 1.1.9 Soldering: The Random Number Generator (RNG) – Page 4
8. 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)
9. Socket for U2-U6: Repeat step #8 for the five 14-pin sockets for ICs U2 through
U6.
10. 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!
Correct
© 2014 Project Lead The Way, Inc.
Digital Electronics Project 1.1.9 Soldering: The Random Number Generator (RNG) – Page 5
11. ICs 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)
12. Batteries: Insert three AA batteries into the battery holder. Your Random Number
Generator is now ready to use.
13. 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.
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.
© 2014 Project Lead The Way, Inc.
Digital Electronics Project 1.1.9 Soldering: The Random Number Generator (RNG) – Page 6
Conclusion
If 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.
Number
Rolled
Tally
Count
Total
Count
Distribution
 Total Count

 100% 

100


1
2
3
4
5
6
1. How 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?
2. 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.
© 2014 Project Lead The Way, Inc.
Digital Electronics Project 1.1.9 Soldering: The Random Number Generator (RNG) – Page 7
Download