circles. One easy option is to carefully press a sharp pencil through the cardboard to make the holes. For cleaner holes, however, we suggest using a 3/16-inch drill bit and power drill to make holes in the cardboard, as in Figure 2-17 . The LEDs are about 5 mm (about 0.197 inches) in diameter. You want the hole to be a nice, tight fit. So, a 3/16-inch hole (0.1875 inches) is perfect for making the fit snug for the LED.
Be careful when completing this step, and make sure to watch where your fingers and hands are relative to the drill bit. You don’t want to drill into yourself! You can also use the drill bit without the drill and manually spin it through the cardboard if you don’t have a drill or aren’t comfortable using one.
FIGURE 2-17: Drilling holes for the LEDs
Once you have the holes drilled, remove the three LEDs from your breadboard and insert them through the back side of the cardboard, as shown in Figure 2-18 . Remember that standard traffic lights are usually ordered red, yellow, and green from the top to the bottom. Pay attention to where the LEDs connect on the board, because we’re going to reconnect them at the end.
FIGURE 2-18: All three LEDs pressed into the cardboard
Next, bend the cardboard along the scored lines, as shown in Figure 2-19 . Bend the vertical sides ➊ toward the interior, and then do the same with the top and bottom sides ➋ and the tabs ➌ . (The sides and tabs are labeled in Figure 2-15 .)
FIGURE 2-19: Prefolding the scored cardboard to form an enclosure for the Stoplight
Position the tabs ➌ inside the vertical sides ➊ , and glue them in place as shown in Figure 2-20 . You can use hot glue, tape, or craft glue—we prefer hot glue because it’s easy to work with, sets quickly, and has a pretty strong bond.
Repeat this for the top and bottom corners. You should end up with a shallow rectangular box with an open back.
FIGURE 2-20: Folding and gluing the cardboard housing
Make the Stoplight Lenses
The Stoplight’s lenses are made from ping-pong balls cut in half, but you can use anything that’s moderately translucent.
If you’re using ping-pong balls or something similar, carefully cut two balls in half. When doing this, place the ball against a cutting mat or thick piece of cardboard and hold it firmly at the sides with your fingertips. Carefully push the knife blade down toward the mat and into the ping-pong ball (making sure the blade isn’t pointing at you or your hand) to make an incision as shown in Figure 2-21 . Rotate the ping-pong ball and repeat until you’ve cut all the way through. Make sure to keep your fingers away from the blade, and always cut on a cutting mat or a piece of cardboard.
FIGURE 2-21: Safely cutting a ping-pong ball
Once you have three ping-pong ball halves (you’ll have four; one’s an extra to use in future projects or as a small hat for your favorite stuffed animal), secure them with a dab of hot glue as shown in Figure 2-22 .
FIGURE 2-22: The enclosure with ping-pong balls as lenses
Make the Shades
Finally, add the shades to the Stoplight. For a nice curve, make a number of parallel scores, about 1/8 inch apart, as shown in Figure 2-23 . There are example score lines in the template, so you can follow those. After making all of your scores, bend each shade into a curve, as shown in Figure 2-24 .
FIGURE 2-23: Scoring a shade
FIGURE 2-24: Bending the shade into a curve
Once you have the shades bent and shaped to your liking, fit them into the housing just above each lens, as shown in Figure 2-25 , and then glue them in place. If you’re going for a more finished or realistic look, you can spray paint the housing black. Make sure you either remove the lenses or cover them with masking tape first so that they don’t get coated in spray paint.
FIGURE 2-25: Fitting a shade into the housing
Mount the LEDs and Arduino
All you have left to do is to connect the LEDs from the new enclosure to your Arduino. First, use two
John McEnroe;James Kaplan
William K. Klingaman, Nicholas P. Klingaman