The Arduino Inventor's Guide (32 page)

Advertising Download Read Online

1.
Use the pliers to straighten the paper clip out, leaving all but the small hook on one end.

2.
Trim the paper clip down so that it is about 2 inches long from one end to the other.

3.
Bend the straight end of the paper clip away from the hook at about 1 1/2 inches from the hooked end.

4.
Add the final bend to create another hook about 3/8 inches deep. When complete, the servo linkage should be about 1 1/2 inches long (
Figure 6-32
). This length is perfect given the geometry of our template. If you’re designing your own enclosure, you might have to play around with this length a bit to get the servo horn connected to the beam properly.

FIGURE 6-32:
Final bend in the paper clip linkage

Final Assembly

Now for the final assembly! First, glue together the two base pieces. Glue two of the square tabs together, starting with the side opposite the servo motor (
Figures 6-33
and
6-34
). This will give you room to get your hands in there and connect the servo horn linkage.

FIGURE 6-33:
The best way to adhere two pieces together is to use a snake or S-shaped pattern with the glue.

FIGURE 6-34:
Secure the far side of the base first.

With the servo side open, take the original hooked end of the bent paper clip linkage and hook it through the last hole on the servo horn, as shown in
Figure 6-35
.

FIGURE 6-35:
Hooking the paper clip through the last hole in the servo horn

FOUR-BAR LINKAGES AND CONNECTING SERVOS TO DO COOL THINGS

The mechanism used to turn the rotational movement of the servo horn into the up-and-down movement of the balance beam is called a
four-bar linkage
. We designed this template so that the length of the linkage should be about 1 1/2 inches, and it assumes that the servo horn is 1/2 inch long. We used these measurements to calculate the movements of the servo and beam. If you’re picturing circles, arcs, pivot points, and a lot of crazy geometry, don’t worry: we’ve done all the hard stuff already. The following figure shows a four-bar linkage in action, with the linkage itself and the pivot of the beam highlighted.

Four-bar linkages are an amazing way of converting the rotation of an object (like the servo) into a different motion (like the up-and-down motion of the beam). Engineers and roboticists use these kinds of mechanisms and linkages all the time to make things move.

Hook the other end of the linkage through the hole in the armature mount, as shown in
Figure 6-36
.

FIGURE 6-36:
Hooking the other end of the paper clip linkage to the armature mount

Now, insert the axle through one side of the base, carefully line up the second side, insert the axle through the matching hole, and glue the tabs at the other end of the base together (
Figures 6-37
and
6-38
).

FIGURE 6-37:
Mounting the balance beam to the base

FIGURE 6-38:
Completed Balance Beam project

Finally, connect the servo motor back to the breadboard circuit (
Figure 6-39
). Power up your Arduino, and the servo motor should move into place. Turn the potentiometer and test to make sure that the linkage and the pivot points all move as expected. If they don’t, check that everything is still in place and nothing has fallen out.

As a final step, we suggest an extra rectangular base support piece. The base should measure about 2 × 3.75 inches. Insert this piece at the base of your enclosure to add extra support.

FIGURE 6-39:
Reconnecting the servo motor to the breadboard circuit

With that, your project is complete! Now, find a ping-pong ball or marble and test your skills of control and precision. You now have a game to play when you should be doing something a little more productive. How many times can you roll the ball back and forth before dropping it? Challenge a friend, and see who’s better!

GOING FURTHER

This project is a great introduction to the world of servos and libraries in Arduino. There’s a lot of potential here, so we would like to share some launching points for you to play with servos.

Hack

Swap out the potentiometer with the light sensor circuit from
Project 5
. You’ll have to include a 10 kΩ resistor and adjust the scaling values you use. Now, move your hand up and down above the light sensor to control the ball. Go challenge a friend! Are you better with the light sensor or the potentiometer?

Modify

You can add an “autopilot” mode for your Balance Beam that will balance the ball on its own. To do this, you’re going to add a switch to your circuit. As you saw in
Project 5
, a switch is similar to a push button in that it makes or breaks a connection in a circuit, but in a switch the connection stays in place until it is switched again. The switch you’ll use is called a
single-pole, double-throw (SPDT)
switch, shown in
Figure 6-40
. This is a fancy way of saying there’s a single common pin and two options that it can be connected to. When the switch is in the leftmost position, it connects the center pin and the left pin. When the switch is in the rightmost position, it connects the center pin and the right pin.

Other books
Behind a Lady's Smile by Jane Goodger
Darke London by Coleen Kwan
Cowboy for Keeps by Cathy McDavid
The Rembrandt Secret by Alex Connor
Bred in the Bone by Christopher Brookmyre
Together is All We Need by Michael Phillips
Under Budapest by Ailsa Kay