Making Robots With The Arduino part 2.pdf

(647 KB) Pobierz
Servo 2010-12.pdf
worldmags
Making Robots
With The
A RDUINO
Part 2
By Gordon McComb
The ArdBot is a low-cost, 7” diameter servo-driven robot base, ready for
expansion. It’s called ArdBot because it’s based on the popular and
inexpensive Arduino microcontroller board. The ArdBot costs under $80 to
build; even less if you already have some of the components, like the
breadboard, jumper wires, and battery holder.
its central Arduino brain. This month, we’ll continue
the discussion with full construction plans for the
ArdBot. I built the reference design using 1/4”
expanded PVC plastic, but you can use wood, acrylic, foam
board, picture frame mat, or most anything else that is rigid
enough for the components.
is the practical minimum and 3” the maximum.
While it’s a bit more challenging to cut circles to make
a robot base, it’s the best overall shape for navigating tight
places like mazes or the corner of a living room. The
concept of the ArdBot is flexibility, however. There’s no
reason your version must be circular. You can make a
square bot if you’d like, or cut off the corners of the square
to make an octagon.
If you don’t want to construct the mechanical pieces of
the ArdBot at all, you can get them precut with all the
hardware; see the SOURCES box. ArdBot is designed for
expandability. If the twin decks do not provide enough
space for all your experiments, you can add more decks. I
don’t recommend any more than three decks total, as any
more may pose a weight problem for the drive system.
The brain of the ArdBot is an Arduino Uno — the latest
of the all-in-one core designs of the Arduino. If you already
own an earlier version of the board — a Diecimila or
Duemilanove — those will work, too. The only requirement
is that you have version 0017 or later of the Arduino
programming environment. The ArdBot project was created
and tested using version 0019 — the latest as of this
writing. Complementing the Arduino microcontroller board
is a mini solderless breadboard. It has 170 tie points —
ArdBot Basic Design
The ArdBot uses two “decks” for mounting a pair of
servo motors, batteries, microcontroller, small prototyping
board, and other components you’d like to experiment
with. The bottom deck is basically a 7” diameter circle with
cutouts for the wheels. The top deck is the same 7”
diameter circle with the side lobes cut off.
The decks are separated by a set of four 1-3/4” long
standoffs. The actual length of the standoffs is not really
important. You can make them shorter or longer — 1-1/2”
In preparing Part 1 of this series, I made a last-minute
change to include the new Ardunio board that's just been
released. Only I got the name wrong — in several places in
the article, I referred to the new board as the Duo. The
correct name for the board is the Uno.
52 SERVO 12.2010
worldmags
I n the last installment, we introduced the ArdBot and
527809041.017.png 527809041.018.png
worldmags
www.servomagazine.com/index.php?/magazine/article/december2010_McComb
enough for the basic experiments we’ll be doing in this
series of articles. Don’t let the small size of the breadboard
limit you. The ArdBot is large enough for bigger
breadboards, even multiple boards, should you need them.
You might want to start with the mini breadboard, then as
you use the ArdBot for further experiments you can add
more prototyping space.
optional, and are for attaching sensors and other
accessories.
• Pair of servo mounts (see Figure 4 ) for attaching the
servos to the bottom deck. You can make these
Table 1. Mechanical Parts.
About the Servo Drive
Qty
Description
7” diameter bottom deck with wheel well cutouts
for the drive wheels.
The ArdBot uses differential steering where the base is
propelled by two motors and wheels on opposite sides. To
keep costs down and minimize construction complexity, the
robot uses a pair of skids placed in the front and rear to
provide balance. With this arrangement, the ArdBot is able
to move forward and back, turn left and right, and spin in
place. The skids are smooth and polished metal, so they
present little drag on whatever surface the robot is rolling
over. Even so, the ArdBot is best suited for travel on hard
surfaces or carpet with a short nap.
The two drive motors run off their own battery supply
which is a set of four AA rechargeable or non-rechargeable
cells. The motors are standard size radio control airplane
servos that have been modified for continuous rotation.
The ArdBot reference design uses servos that come
from the factory already modified so you don’t have to
hack them. I used a pair of GWS S-35 servos, but there are
others available (see Sources ) for under $15 each. I won’t
provide instructions here on how to modify a servo for
continuous rotation. That subject has been tackled in past
issues of SERVO and Nuts & Volts , so I’ll leave it at that.
1
1
7” × 5” top deck.
2
Servo mounts.
4
90° plastic L brackets for attaching the servo
mounts to the bottom deck. These brackets
measure 3/4” × 3/4” with hole centers at 3/8, and
are made to work with the two servo mounts.
16
4-40 x 1/2” machine screws and nuts for attaching
the servos and servo mounts to the bottom deck.
4
Deck risers consisting of: (4) 1-3/4” aluminum
(or plastic) risers with 4-40 threads; (4) 4-40 × 1/2”
pan head machine screws; and (4) 4-40 × 1/2”
flat head machine screws.
2
Skids consisting of: (2) 8-32 × 3/4” machine screws;
(2) 8-32 hex nuts; and (2) 8-32 acorn (cap) nuts.
Sets of mounting hardware for Arduino Uno,
consisting of (3) 4-40 × 1/2” machine screws;
(3) 4-40 nuts; and (3) plastic washers.
* For your convenience, all mechanical pieces — including
precut decks and servo mounts — at are available through
Budget Robotics. See the Sources box for details.
Table 2. Motors and Wheels.
Making the ArdBot Base
Qty
Description
The ArdBot is constructed with four body pieces held
together with hardware fasteners. Table 1 provides a full
list of mechanical parts. Tables 2 through 5 specify the
other components to complete the ArdBot.
All body pieces assume 1/4” thick material. For your
reference, Figure 1 shows a completed ArdBot, ready to be
programmed and played with. The body pieces include:
2
Standard size R/C servo motors, modified
for continuous rotation.
2
2-1/2” or 2-5/8 diameter wheels with hubs
to attach to the servo motors.
• Bottom deck measuring 7” diameter with cutouts for
the wheels (see Figure 2 ). The deck includes a
number of holes, of which only six are required. Any
other holes are up to you. I’ve included several
additional holes at the front and back of the deck for
mounting bumper switches and other sensors. The
wheel cutouts measure 2-5/8” x 7-5/8”; sized for
commonly available 2-1/2” or 2-5/8” diameter robotic
wheels for R/C servo motors.
• Top deck measuring 7” x 5” (see Figure 3 ). Only four
of its holes are critical; these mate with matching
holes in the bottom deck using a set of four
standoffs. A 1/2” diameter hole in the center (or
thereabouts) provides a throughway for wires from
the bottom deck. The other holes as shown are
FIGURE 1. The completed ArdBot with Arduino microcontroller
board, solderless breadboard, servos, wheels, and all body parts.
SERVO 12.2010 53
worldmags
3
527809041.019.png 527809041.020.png 527809041.001.png 527809041.002.png
worldmags
worldmags
FIGURE 2. Layout pattern for cutting and drilling the bottom
deck of the ArdBot. The only truly critical dimensions are the
cutouts for the wheels and the placement of the two sets of holes
immediately beside the wheel cutouts. These holes are for the
servo mounts. See Figure 5 for a description of all holes.
FIGURE 3.
Layout
pattern for
cutting and
drilling the
top deck of
the ArdBot.
Critical holes
are the four
small ones
nearest the
center. These
must match
the four
servo
mounting
holes in the
bottom
deck.
yourself or, if you choose, purchase them separately.
If you make the mounts, be aware that sizing is
critical. The two holes on either side of the mount
must be spaced 3” apart to accommodate the same
hole spacing in the bottom deck.
circles when using these materials. If you don’t own a
circular jig yourself, see if the local picture frame store will
make the cuts for you. When using picture mat material,
cut two of everything, and double-up the pieces for extra
stiffness. Except for the large center hole in the top deck,
all holes are drilled with a 9/64” bit.
The base parts may be cut from stock measuring 12”
x 12” which is a common size for expanded PVC or other
plastic purchased through mail order. A motorized scroll
saw is the perfect tool for cutting out the ArdBot base
components, but if you don’t have one handy, a coping
saw also works. Use a wood blade; it’ll work whether
you’re making the base with aircraft-grade plywood
(available at the hobby store), PVC, or other plastic.
If using foam board or picture mat, you can cut the
pieces using a sharp hobby knife or mat cutter. The usual
safety precautions apply. A circle cutting jig makes perfect
Assembling the ArdBot
With the body pieces constructed (or purchased) and
all other parts in hand, you’re ready to build your ArdBot.
Here’s how.
Step 0
Before assembly, you may want to use 150 grit
sandpaper to smooth the edges of the base parts. Orient
the bottom deck so that the holes are aligned as shown in
Figure 5 . Note that the holes for each servo are not
symmetrically placed on the deck. This is to accommodate
Table 3. Electronic Parts.
Qty
Description
Table 4. Power.
Qty
Description
1
Arduino Uno (or compatible) microcontroller
board with USB programming cable.
4
AA alkaline or nickel metal hybride
rechargable batteries.
1
Mini solderless breadboard; 170 tie points.
1
Nine volt battery.
1
Set of solderless breadboard wire jumpers
(or make your own using 22 gauge solid
conductor wire).
Table 5.
Optional (but nice to have) Parts.
Qty
1
AA x four battery holder, with female header
connector; see text.
Description
1
Nine volt battery clip, with 2.1 mm polarized
barrel plug; see text.
1
Nine volt metal or plastic battery holder.
Hook-and-loop (Velcro) strips for mounting
battery holders and solderless breadboard;
small pieces of double-sided foam tape.
1
Length of 12 (or more) breakaway 0.100” male
header pins, double-sided (long) pins; see text.
1
54 SERVO 12.2010
worldmags
527809041.003.png 527809041.004.png 527809041.005.png 527809041.006.png 527809041.007.png
worldmags
the offset of the servo drive shaft. While there is
technically no “front” or “rear” of the ArdBot, for
the purposes of assembly, the top of the
illustration in Figure 5 is the front and the
bottom is the rear.
Step 1
Insert a servo into a servo mount by sliding it
back-end first through the mount. The fit may be
tight, depending on the make and model of the
servo. (As necessary, enlarge the rectangle for the
servo using a file or coarse sandpaper.) Do not
force the servo into the mount or the mount may
be damaged.
Secure the servo to the mount with 4-40 x
1/2” screws and hex nuts ( Figure 6 ). You can use
four screws for each servo, or only two. When
using two screws position them on opposite
corners of the servo mounting flange, as shown.
Repeat for the opposite servo and mount. Be sure to
construct the second servo and mount in a mirror image to
the first! Refer to Figure 9 in Step 3 to see how the motors
should be inserted into the mounts. For reference, also see
Figure 12 for an aerial view of the ArdBot and its
completed bottom deck.
FIGURE4. Layout pattern for cutting and drilling the servo mount. You’ll
need two of these. If cutting the inside rectangle proves difficult, you can
instead make the mounts by cutting through at the dotted line.
The mount will be a little more fragile, so handle it carefully.
Use all four screws to secure the servo in the mount, rather than just two.
Insert the machine screws through the L bracket, then
through the servo mount. Secure on the other end with a
nut. Before tightening, be sure the bottom of the L bracket
is flush with the bottom edge of the servo mount.
Step 3
Attach the left mount assembly to the bottom deck
using two 4-40 x 1/2” screws and standoffs. The screws
should come up from the underside of the deck, through
Step 2
Using 4-40 x 1/2” machine screws and nuts, attach
two plastic L brackets to each of the servo mounts ( Figure
7 ). You’ll be make a “left” and a “right” mount assembly.
For the left mount assembly, the motor shaft should
face to the left and toward the “top” of the deck (as
referenced in Figure 5 ). Attach the L brackets to the right
side of the mount. For the right mount assembly, the motor
shaft should face to the right, also toward the top of the
deck. Attach the L brackets to the left side of the mount.
FIGURE6. Servo motor secured into one of the servo mounts.
You need two of these.
FIGURE5. Only four holes are critical for the bottom deck: the two
sets marked Holes for servo mounting, and the front and rear Skid.
The rest are optional for sensors and other
accessories you may want to add later.
SERVO 12.2010 55
worldmags
527809041.008.png 527809041.009.png 527809041.010.png 527809041.011.png
worldmags
FIGURE7. Attach two L brackets to the servo mount. The L
brackets should be flush with the bottom of the servo mount.
the L bracket, and then into the standoff as shown in
Figure 8 . When orienting the mount assembly, be sure that
the servo shaft is centered in the wheel well cutout. Align
the assembly so they are parallel with the wheel well
cutout, then tighten all the screws. Figure 9 shows how
the completed servo, mount, and standoffs should look.
Repeat the same procedure for the right mount assembly.
FIGURE8. Secure the servo mounts to the bottom deck using
machine screws and threaded standoffs.
The standoffs serve to separate the decks.
1 . Using a screwdriver, thread a machine screw into the
hole at the front and back of the deck (refer to
Figure 5 for the location of these holes). The screw
is inserted from the top of the deck (the side with
the servos). The holes for the skids are undersized
for 8-32 machine screws. When using a soft material
like wood or PVC plastic, the fastener will tap the
hole as you screw it in. Continue threading the screw
into the hole until the head is about 1/4” from the
deck, as indicated in the picture.
Step 4
Attach the front and rear skids as shown in Figure 10 .
Each skid uses an 8-32” machine screw, hex nut, and acorn
(cap) nut.
2 . Put the hex nut onto the screw, followed by the
acorn nut. Tighten the acorn nut against the hex
nut.
Repeat these steps for the other skid. You may adjust
the height of the skid by loosening or tightening the
machine screw in the hole. If you need greater height
adjustment or the hole for the skid is too large to self-tap,
FIGURE9. Here’s how the completed servo mount should look
with standoffs in place.
FIGURE10. ArdBot uses static skids (made with 8-32 metal
fasteners) for front and back balance. You can adjust the height
of each skid to compensate for the diameter of wheels you use.
56 SERVO 12.2010
worldmags
527809041.012.png 527809041.013.png 527809041.014.png 527809041.015.png 527809041.016.png
Zgłoś jeśli naruszono regulamin