Читать книгу Electronics All-in-One For Dummies - Lowe Doug, Doug Lowe - Страница 90

Mounting the coin-toss circuit in a box

Оглавление

In this section, you finish the coin-toss project by mounting its circuit board in a plastic project box along with a 9 V battery, a power button, and the two metal contacts that the user can touch to toss the coin.

All the parts you need for this project can be purchased at most RadioShack stores — with the exception of the standoffs, which I got at a local hardware store. In addition to the circuit board assembled earlier in this chapter, you’ll need the following materials:

Quantity Description
1 Project enclosure 5 x 2½ x 2 inches
1 9 V battery holder
8 ½-inch 6-32 standoff male-to-female
6 6-32 nuts (to fit standoffs)
4 6-32¼-inch inch bolts (to fit standoffs)

When you’ve collected your parts, here’s the procedure for putting the project together:

1 Drill the required mounting holes in the lid.You need to drill a total of eight holes in the lid. Four are for mounting the circuit board, two are for the LEDs, and two are for the metal finger contacts.Figure 6-18 provides a template you can use. The smaller holes are inch, the two larger holes are ¼ inch. Note: The distance between the four holes at the top of the lid must be exactly 1⅜ inches so that they line up with the mounting holes in the circuit board. The measurements for the other holes don’t need to be as precise.

2 Drill a -inch hole for the push button near the top of the left side of the box.The exact location isn’t that important. I suggest you hold the box in the palm of your left hand to determine the best location to drill, where your thumb will be able to easily reach the button.

3 Mount the push button in the box.Remove the nut from the neck of the push button, pass the neck through the hole you drilled in the preceding step from the inside of the box, and then thread the nut onto the neck from the outside of the box and tighten it down with pliers.

4 Use Epoxy or hot glue to glue the 9 V battery holder to the base of the box.Position the holder near the top of the box, adjacent to the hole you drilled for the switch.

5 Mount the circuit board standoffs.Mount four of the ½-inch standoffs on the underside of the lid by inserting the threaded end of the standoff through the appropriate hole and attaching a 6-32 nut on the other side. See the left side of Figure 6-19 for guidance on how to attach these four standoffs.FIGURE 6-18: Location for drilling holes in the lid of the project box.

6 Mount the finger touch contacts on the lid.To make the metal contacts that the user can touch to toss the coin, first insert the threaded end of one of the standoffs through the hole from the top side of the lid, and then screw a second standoff into it from the bottom of the lid. Then attach a 6-32 nut to the threaded end of the standoff that’s beneath the lid. See the right side of Figure 6-19 for guidance on installing these standoffs.Figure 6-20 shows how the box should appear at this point. In this figure, you can see the battery holder and push button already installed in the box, and you can see the standoffs on the underside of the lid.FIGURE 6-19: Installing the standoffs.FIGURE 6-20: The box with the push button, battery holder, and standoffs installed.

7 Mount the circuit board to the standoffs.To complete this step, you must first bend the LEDs around so that they wrap over the edge of the circuit card and then face straight down. Be very careful when you bend the LEDs so that you don’t break the leads or damage any of the solder joints. Figure 6-21 shows what the circuit board looks like when the LEDs are properly turned around.When the LEDs are ready, position the circuit board over the four standoffs. The LEDs should slide right into the two -inch holes you drilled for them in Step 1. If they don’t, just nudge them a bit to make them fit. When everything is in place, secure the circuit board to the standoffs using the 6-32 bolts.FIGURE 6-21: The circuit board with the LEDs turned around.

8 Connect the finger contacts.Attach the free ends of the two jumper wires that are connected to the circuit board to the two finger contacts. To connect each wire, wrap the stripped end of the wire tightly around the threaded part of the standoff. Then, attach a 6-32 nut to the standoff and tighten it with pliers.Figure 6-22 shows what the project looks like with the circuit board installed into the lid and the jumpers connected to the finger contacts.

9 Install the battery.Insert the battery into the holder, and then connect the snap adapter to the battery.

10 Attach the lid to the box.Carefully flip the lid over and secure it to the box using the screws that came with the project box.FIGURE 6-22: The circuit board attached to the lid and the finger contacts connected.

11 Turn it on and toss a coin!You’re finally ready to use the coin-tosser project to help you make decisions. Hold the project box in your left hand and depress the push button with your thumb. Then, touch the index finger of your right hand to the two finger contacts, and watch the LEDs alternate. When you’re ready, let go and see whether the red or green light stays lit.Figure 6-23 shows the finished project.


FIGURE 6-23: The completed coin-toss project.

Electronics All-in-One For Dummies

Подняться наверх