Читать книгу Electronics All-in-One For Dummies - Lowe Doug, Doug Lowe - Страница 81
Assembling the coin-toss circuit on a solderless breadboard
ОглавлениеThis section presents a complete procedure for assembling the coin-toss circuit on a small solderless breadboard. When you get all your materials together, you should be able to complete this project in about an hour.
All the parts required to build this prototype circuit can be purchased from RadioShack, or you can order them online from any electronic parts supplier. For your convenience, here is a complete list of the parts you’ll need to build this prototype circuit, along with the RadioShack catalog part numbers:
Quantity | Description |
---|---|
1 | Small solderless breadboard |
1 | Solderless breadboard jumper wire kit |
1 | LM555 timer IC |
1 | 1 kΩ, ¼ W resistor (5 per package) |
1 | 10 kΩ, ¼ W resistor (5 per package) |
2 | 470 Ω, ¼ W resistor (5 per package) |
1 | 0.1 μF polyester film capacitor |
1 | Red LED 5 mm |
1 | Green LED 5 mm |
1 | 9 V battery snap connector |
1 | 9 V battery |
You can build this circuit using equivalent parts from any supplier. So if you already have equivalent parts on hand, you don’t need to run out to RadioShack and purchase them just for the sake of spending money.
You won’t need many tools for this project. You can probably assemble it without any tools at all, but you may want to keep your wire cutters, wire strippers, and tweezers handy.
The steps that follow identify specific holes in the terminal strip area of the breadboard using numbers and letters. If you’re using a different breadboard than the one listed in the parts list, you might encounter a different numbering system. If so, you can refer to Figure 6-7 to translate the numbers given in the steps for the breadboard you’re using.
After you have everything you need, follow these steps to assemble the circuit:
Follow these three steps to insert the IC and connect it to power.
1 Insert the 555 timer IC.Take a close look at the 555 timer IC. On the top, notice a small dot in one corner; this dot marks the location of pin 1. Carefully insert the leads of the 555 timer IC into the breadboard near the middle of the board, inserting pin 1 into hole E14 and pin 8 in hole F14. The IC will straddle the groove that runs down the center of the board.
2 Connect pin 1 of the 555 timer IC to the ground bus.Insert one end of a small jumper wire into hole A14 and the other end into the nearest available hole in the bottommost bus strip.
3 Connect pin 8 of the 555 timer IC to the +9 V bus.Insert one end of a small jumper wire into hole J14 and the other end into the nearest available hole in the topmost bus strip.
4 Connect pins 2 and 6 of the 555 timer together.Insert one end of a small jumper wire into hole C15 and the other end in hole H16. The jumper wire will reach over the top of the 555 timer chip.Figure 6-9 shows what the breadboard looks like after these three steps.
The next five steps connect the LEDs and resistors R3 and R4. The LEDs will use the terminal strips in rows 19 and 21.
1 Connect pin 3 of the IC to row 19.Insert one end of a short jumper wire in hole C16 and the other end into hole C19.FIGURE 6-9: The breadboard after the IC has been inserted and connected to the power buses.
2 Connect the two segments of row 19.Insert one end of a short jumper wire into hole E19 and the other end into hole F19. This jumper wire bridges the gap between the two terminal strips in row 19, effectively making them a single terminal strip.
3 Insert the red LED.If you look carefully at the red LED, you’ll see that one lead is a bit shorter than the other. This short lead is called the cathode. The longer lead is called the anode. Insert the cathode (shorter lead) into hole D21. Then, insert the anode (longer lead) into hole D19.
4 Insert the green LED.The green LED also has a short cathode lead and a longer anode lead. Insert the anode (long) lead in hole G21 and the cathode (short) lead in hole G19. Note that the leads of the two LEDs are installed reversed from one another: the red LED’s anode and the green LED’s cathode are inserted into row 19, while the red LED’s cathode and the green LED’s anode are inserted into row 21. There’s a very good reason for this, but I wouldn’t expect you to understand it yet even if I tried to explain it. So for now, take it on faith that you must install the two LEDs reversed like this for the circuit to work. (You learn more about LEDs, cathodes, and anodes in Book 2, Chapter 5.)
5 Insert resistors R3 and R4.Both of these resistors are 470 Ω. You can identify these resistors by looking at the three color strips painted on the resistors — they’re yellow, purple, and brown. Insert one end of the first resistor in hole B21 and the other end in the nearest available hole in the bottommost bus strip (the ground bus). Then, insert one end of the other resistor in hole I21 and the other end in the nearest available hole in the topmost bus strip (the +9 V bus).Figure 6-10 shows what the breadboard looks like after these steps.
FIGURE 6-10: The breadboard after the LEDs have been connected.
The next five steps connect the finger-touch circuit that lets the user activate the coin toss by touching the two metal contacts. For the purposes of this prototype, you connect one end of a pair of jumper wires to the circuit and leave the other ends protruding from the end of the breadboard. Touching the bare ends of these wires with your fingers will simulate touching the metal contacts that you use in the final version of the circuit. The two jumper wires will be inserted into holes in row 9.
1 Insert resistor R1 from pin 7 of the IC to the +9 V bus.Resistor R1 is the 1 kΩ resistor, which should be connected between pin 7 of the IC and the +9 V bus. This resistor has stripes in the following sequence: brown, black, and red. Insert one end of this resistor into hole J15 and the other end into the nearest available hole in the topmost bus strip.
2 Insert capacitor C1 from pin 2 of the IC to the ground bus.Insert one lead of the capacitor (it doesn’t matter which) into hole B15, and then insert the other into the nearest available slot in the bottommost bus strip.
3 Insert resistor R2 from pin 7 of the IC to one of the metal contacts.This resistor is the 10 kΩ. It should be connected between pin 7 of the IC and one of the metal contacts that the user will touch with his finger to activate the coin-toss action. This resistor has the following sequence of color stripes: brown, black, and orange. Insert one end of it into hole H15 and the other end into hole H9.
4 Connect a jumper wire from pin 2 of the IC to the other metal contact.Insert one end of a short jumper wire into hole B15 and the other end into hole B9.
5 Insert the two jumper wires that simulate the metal contacts.Pick out a couple of jumper wires long enough to reach from row 9 and dangle an inch or so over the edge of the breadboard. Insert one end of these wires into holes E9 and F9 and leave the other ends free. Separate the ends of the two jumper wires to make sure that they’re not touching; they should be about ½ inch apart.Figure 6-11 shows what the breadboard looks like after these steps.
FIGURE 6-11: The breadboard after the finger contact jumpers have been connected.
The remaining two steps complete the circuit by connecting the power supply.
1 Connect the battery snap connector.The leads on the battery snap connector use stranded rather than solid wire, so you’ll need to prepare them a bit before you insert them into the breadboard. Use your wire strippers to strip off about ½ inch of insulation from the end of both leads.Use your fingers to twist the leads as tightly as you can, so that no individual strands are protruding from the very tip of the wire.Insert the red lead into the last hole of the topmost row and insert the black lead into the last hole of the bottommost row.
2 Connect the 9 V battery to the snap connector.The red LED should immediately light up. (If not, see the troubleshooting tips in the next section.)
You can now test the circuit by touching both of the two free jumper wires. Pinch them both between your thumb and index finger, but don’t let the wires actually touch each other. The resistance in your skin will conduct enough current to complete the circuit, and the LEDs will start alternately flashing red, green, red, green, and so on. They will continue to flash until you let go of the jumper wires. Then, one or the other will stay lit. When you touch the wires again, the flashing will resume.
Figure 6-12 shows the completed circuit in operation.
FIGURE 6-12: The prototype of the coin tosser in operation.
Notice that if you squeeze the wires tightly, the rate at which the LEDs flash increases. If you squeeze tight enough, the LEDs will flash so fast that both will appear to be solid on. The LEDs are still flashing alternately, but they’re flashing faster than your eye’s ability to discern the difference, so they appear to be on constantly.