CHAPTER 24

image

Body Building

A robot’s body provides a framework to which you can attach various components and circuit boards. The body protects the robot’s innards against battering damage as well as environmental harm. The body can make a robot convenient to carry and straightforward to store. Often overlooked as a consideration, the robot’s body strikingly affects the way humans perceive the robot.

This chapter begins with some common approaches to developing robot bodies. The rest of the chapter explains how you can create a body like Sandwich’s for your line-following robot.

Approaching Robot Bodies

Sometimes you’ll run across a wonderful enclosure, container, or case that you feel you must build a robot around. In that case, you’re done with body selection! However, most of the time you’ll perform a careful, deliberate body-selection process. Often, form follows function.

Ethereal Drafting—Thinking About the Robot

When beginning a project, you’ll probably have a basic idea of what you want the robot to accomplish. The work to be performed by the robot dictates the approximate quantity and complexity of the sensors, circuits, and motors.

At first, body designs are explored mentally. With infinitely strong, inexpensive, and moldable material, what would be the ultimate shell for the robot you have in mind? After many iterations of shapes are considered and discarded by the brain, the rough body figure (including width and height) and variety of the materials (metal and plastic) are subsequently constrained.

Sometimes rough sketches on napkins or on the reverse side of boring meeting agendas further focus the potential benefits or pitfalls of conceptual designs.

Vision Revision—Accepting Constraints Based on Available Parts

At some point, cold reality sets in. It’s time to peruse the home-laboratory stockroom (junk pile) and read through catalogs to determine which parts are realistically attainable.

Available motors, wheels, and batteries tend to have the largest reductive impact on potential robot bodies. It’s helpful to physically lay out all of the major parts, including candidate breadboards, and to rearrange them like puzzle pieces until a harmonious configuration emerges.

The width and mass of the motors play a significant role in the robot’s shape. The selected motors specify the minimum battery voltage and current. The total mass and sizes of the motors and batteries combined suggest whether metal or plastic is required.

When you have a sense of the weight requirements and dimensions, the robot body’s characteristics are clear enough that you can begin selecting materials and shapes that are likely to be sufficient. At this point, you can either build a custom body that approaches your particular vision or you can select from existing mass-produced bodies (whether designed for robots or not).

Designing Custom Bodies

The overriding philosophy of building a custom robot body is that the body is made to fit the robot, rather than the robot fitting the body. If you’re a skilled or patient artisan with the proper tools and materials, a proud and capable robot will result.

Plastic Prototyping—Constructing Models with LEGO Bricks

LEGO bricks are Scandinavia’s gift to robot builders. Honestly, they’re serious prototyping tools. Don’t let a loved one knock you for playing with your LEGOs.

With LEGO bricks, robot designs can be invented, altered, refined, discarded, recovered, and ultimately born. LEGO bricks hold together well under light to moderate loads. They’re readily available in a huge variety of shapes, colors, and sizes. Although moderately expensive, their reusability and time-saving qualities make them a worthwhile investment.

When first designing a robot for this book, I began with a pair of elegant Maxon motors and a pair of homemade aluminum couplers (like the ones described a couple of chapters ago). With a box of LEGO Technic bricks, gears, and tires, the basic frame was established (see Figure 24-1).

9781484213605_Fig24-01.jpg

Figure 24-1. Prototype for Wavy, designed with LEGO bricks

Material Substitution—Transitioning Out LEGO Parts

Although LEGO frames can be instantly glued together with cyanoacrylate adhesive (super glue, aka “kragle”), it’s more cost-effective to use materials other than LEGO bricks. Metals provide greater strength and give the robot a rugged look.

With a marking pen, I traced the LEGO frame onto a stock piece of aluminum. I then cut out the aluminum, sanded the edges, and drilled some screw holes (see Figure 24-2). This reduced the quantity of LEGO blocks to two side bars for wheel and gear alignment.

9781484213605_Fig24-02.jpg

Figure 24-2. Preparing an aluminum base to replace much of the LEGO Technic frame

Origami Helper—Bending Paper Before Bending Metal

Here’s a trick that works well for brackets, cowls, or other parts that you can form by bending a flat material. Begin by folding and cutting the piece out of paper. Paper is cheap, plentiful, and easy to cut and bend.

Wavy’s motors needed to be firmly attached to the base; otherwise, the motors would spin in place instead of spinning the wheels. I cut and folded several test brackets out of paper until the shape was exactly what I needed (see Figure 24-3).

9781484213605_Fig24-03.jpg

Figure 24-3. Design with folded paper before cutting complex metal shapes

Then, I flattened the paper and traced the outline onto a thin piece of aluminum. Because it takes a lot of time and effort to cut, drill, sand, and bend aluminum, it was reassuring to know that the approximate outcome had already been tested.

Printing in 3D

A revolutionary way of hobbyist prototyping is to design a robot body in a 3D CAD (three-dimensional computer-aided design) program and output the result to a physical material using a 3D printer. You may still want to start designing with LEGO bricks or folded paper, but the 3D printer can create more complex and permanent bodies – without the need for a machine shop.

See Appendix B to learn more about the 3D process and to see models specifically designed for the Sandwich robot.

Embracing Prefabricated Platforms

Entirely custom bodies, built from the ground up, take a lot of work. You may not want to devote that much to the body of every robot you build. Sometimes it’s more fun to concentrate on the electronics, software, assembly, or tweaking. There are reasonable alternatives to making your own body from scratch.

Commercially Available Robot Platforms

A variety of base platforms are readily available for robots. Some commercial platforms are made from metal and some from plastic. Most have plenty of screw holes, brackets, and wire passages built in. Some platforms come with motors and wheels; others are designed with compartments and spaces ready for those parts to be installed.

You can find ready-made robot platforms at most web sites that carry robot parts. Lynxmotion, ServoCity, and Pololu are good sources.

Converting and Recycling Everyday Items for Robot Bodies

Other sources for ready-made robot bodies are the toy store, hardware store, grocery store, and the recycling bin. You’ll never look at packaging the same way again.

I purchased a couple sets of inexpensive plastic containers (see Figure 24-4) to store my mid-project robot parts away from curious little human hands (you know who you are). Late at night, it’s easier to toss unfinished piles of electronics into a container rather than return every component to the organizers.

9781484213605_Fig24-04.jpg

Figure 24-4. Various reusable/disposable containers

At some point, the motors and sensors for Wavy were serendipitously sitting almost in perfect robot position in the plastic container. It occurred to me that the container made a more protective, cheaper, more easily obtained, and less difficult-to-customize robot body than the aluminum body I had already constructed for Wavy.

And that’s how a Ziploc container came to become Sandwich, the line-following robot.

Transforming the Sandwich Container

The following instructions are based on the out-of-production Ziploc 591 ml (2.5 cup, 20 fluid ounce) square reusable/disposable plastic container with lid. However, there are so many similar products that you may choose another container and still find the instructions applicable.

Creating Motor Holes

Let’s begin by making the screw and shaft holes for the motors.

Marking and Determining Space Required By the Circuit Board

  1. Lightly tape the breadboard or PCB you’ve chosen to the inside of the container. Make sure to place the board flat against the bottom of the container and as far forward against the front of the container as it will go (see Figure 24-5).

    9781484213605_Fig24-05.jpg

    Figure 24-5. Breadboard taped inside the container to mark drill points and determine the amount of space it needs

    Image Note  At this point in the instructions, you may be a little irritated with me if you finished soldering your only board in the last chapter. It’s difficult to tape a board full of parts against the plastic. But, you can still measure the locations of the holes with a ruler and then mark them on the container that way.

  2. Mark the location of the screw holes on the outside of the container.

    Notice the amount of space taken up by the breadboard. The motors are going to be placed to the rear of the breadboard. The reason for inserting and marking the location of the breadboard before the motors is that the breadboard determines the proper location for the motor holes.

Creating a Template Sticker for the Motor Holes

You can measure the dimensions and placement of the screw holes and motor shaft of the gearhead motors by hand with a ruler and calipers. Or you could read them from the manufacturer’s datasheets.

Figure 24-6 illustrates the dimensions of the motor shaft cap and screw holes for the Hsiang Neng motor described several chapters ago. The two screw holes are 2.6 mm in diameter. The cap around the motor shaft is 7.6 mm in diameter. The centers of the screw holes are 22 mm apart, 4 mm above the center of the motor shaft.

9781484213605_Fig24-06.jpg

Figure 24-6. Outlines and center points of the holes needed for the Hsiang Neng motors

3.    Create the exact motor profile in a drawing program. Or, use the Hsiang Neng motor label drawings, which are available at http://www.robotroom.com/SandwichStuff.html.

4.    Print a pair of the drawings onto a sheet of address labels stickers. Use a ruler on the printout to double-check that the software and printer didn’t resize the dimensions.

Positioning the Template Stickers on the Container’s Sides

  1. Cut the labels and closely trim the edge on the side nearest the motor shaft cap circle (see the side below the largest circle in Figure 24-7).

    9781484213605_Fig24-07.jpg

    Figure 24-7. Outlines printed on a sticker and placed on the container. Push pin being inserted into each center dot to create pilot holes

  2. Place one label on each side of the container. The motor shaft cap circle should be far enough toward the rear of the container to allow the breadboard to fit toward the front. Also be sure that the larger circle is placed directly against the inner edge of the container lip (again, see Figure 24-7). For Sandwich, the center of the motor shaft ended up about 4.5 cm from the rear lip of the container.

    Place the motor shaft against the inner edge of the side lip to get the motor shaft as low to the ground as possible, without damaging the container lip or obstructing the lid. This is important as it determines the minimum diameter of wheels that you can install. If the motor shaft were higher in the body, larger wheels would be required, causing the robot to move faster (possibly too fast).

    The location of the motors must provide enough space in the front for the line-following circuit board and enough space in the rear for switches and a 9 V battery.

  3. After attaching the stickers, manually position the motors, breadboard, and 9 V battery in the container. This is to make sure everything fits with the location you’ve chosen for the motor holes.

Making Pilot Holes and Drilling Screw Holes

  1. Insert and remove a pushpin into the center of each circle on the sticker (again, see Figure 24-7). This creates tiny pilot holes that guide the drill into the centers.

    Image Note  The plastic container is slippery. Without a pilot hole, the drill slides around, marring the surface and causing the hole to be drilled in an inaccurate location.

  2. Remove the circuit board, motors, pushpin, and any other parts from the container. Leave the stickers in place.
  3. Insert a 2.6 mm (or 7/64-inch) drill bit into a variable-speed rotary tool.
  4. Using the pilot holes and stickers as guides, drill the screw holes and the center of the motor shaft circle. Even though the motor shaft circle will eventually be made larger, it helps to start small.

    The stickers may come off at some point during drilling, but that isn’t a problem since you have already indicated the centers of the holes with the pushpins.

    The plastic bends easily, making it difficult to drill. It also tends to grab and twist rather than drill out cleanly. If necessary, place a piece of scrap wood behind the container wall to firm up the location for drilling.

  5. Drill the holes for the circuit board that you marked way back in step 2.

I use #4-40 screws to hold the circuit board, so at step 12, I swap down to a 1/8-inch drill bit.

You can roughly determine the desired drill-bit size for the screws you’ve chosen by holding different bits against the screws and comparing diameters by eye. If you want the screws to twist in and hold firmly against the plastic, use a slightly smaller drill bit (my preference). If you want the screws to drop straight in for easier insertion, use a bit the same diameter as the screw plus threads.

Introducing the Grinding Stone Accessory

A tiny drill bit rotating at high speed produces acceptable holes on plastic. However, larger bits walk all over the piece and become entangled in the hole. Fortunately, there’s an easier way.

Obtain an aluminum-oxide grinding-stone accessory for your variable-speed rotary tool (see Figure 24-8). Get a stone that has a tapered tip. They’re available at hardware stores, hobby shops, and online.

9781484213605_Fig24-08.jpg

Figure 24-8. Aluminum-oxide grinding-stone accessory for variable-speed rotary tool

You’ll be amazed at how cleanly and quickly you can remove and shape thin plastic with a grinding stone! This is the secret to making medium and large holes in thin plastic (see Figure 24-9).

9781484213605_Fig24-09.jpg

Figure 24-9. Nearly perfect motor holes in container after drilling and grinding

  1. Grind out the motor shaft cap holes on each side of the robot body to the desired size. Centering the grinding-stone accessory in the motor shaft cap target area is made easier by the screw-size hole you drilled in its center, back in step 11.

    The golden rule of drilling and grinding: If you’re at all unsure, drill the hole smaller than you think you need. It’s easy to drill and grind out additional material, but impossible to restore material if you removed too much.

    Don’t select drill speeds that are so fast that the plastic melts. Just work the stone through the piece at low to medium speeds, at a moderate pace.

  2. Insert the motor to test the alignment of the holes and to make sure the motor presses completely against the plastic container’s wall. (There is a raised section on the gearbox cap around the motor shaft. Upon inserting the motor into the holes, the raised section of the cap should stick out of the container; otherwise, the remainder of the motor cap won’t screw flat against the plastic.)

Mounting the Motors

There are a number of ways to attach motors to a robot. Some people use double-sided foam mounting tape. Also not unheard of are hook-and-loop fasteners, cable ties, duct tape, and hot glue. Usually the best solution is to mount the motors in the manner in which they were designed: using the mounting screw holes.

Obtaining Metric Screws

The Hsiang Neng motors have two screw holes for M2.6 ISO metric screws. It would almost seem that an American standard, UNC (Unified National Course) #3-48 screw size would be acceptable. But, metric threads and UNC threads are not interchangeable.

Metric screws are standard outside of the United States. Most American hardware stores have at least one drawer with miniature metric screws (see Figure 24-10).

9781484213605_Fig24-10.jpg

Figure 24-10. Hardware-store display case (#341) of Hillman Miniature Metric Machine Screws

Purchase four M2.6 x 6 mm screws. Unfortunately, all I could find in the Hillman case were M2.5 x

8 mm screws, which are satisfactory when washers are added. Micro Fasteners sells M2.6 x 6 mm screws (see Figure 24-11), part #MSPPS2606, $2.75 for 50 pieces. McMaster sells 100 for $5.26 (#90353A112).

9781484213605_Fig24-11.jpg

Figure 24-11. Four M2.6 x 8 mm screws with three nylon washers each

Needing Washers

You could drive the screw until the screw head is completely pressed against the container wall. But then, all of the forces acting on the motor and wheel would be exerted on a tiny, thin area of plastic. After the robot has a couple of solid hits against a wall or chair leg, one or more screw heads may rip through the plastic wall, ruining the robot body.

Washers are flat discs with holes in the center (see Figure 24-11). By inserting a washer between the screw head and the container wall, the forces are spread out across the surface covered by the washer. In this way, washers provide added strength to the location under the most stress.

Because of the thin plastic throughout the container, all screws on Sandwich have nylon washers added to them. You can purchase 100 nylon #4 screw size flat washers for $5.50 from Digi-Key (part #3158K). These washers are 0.047-inch thick.

  1. Add one washer to each screw if you obtained 6-mm long screws. If you’re using 8-mm long screws, add three washers to each screw (see Figure 24-12) since the motor holes aren’t deep enough to drive the 8 mm screws in all the way.

    9781484213605_Fig24-12.jpg

    Figure 24-12. Test fit of motor with screws and washers

  2. Test both motors to see that they fit in the container holes and that the screws and washers hold the motors firmly in position. (Don’t forget to remove the motors before drilling any more holes in the container.)

Creating the Motor Tube

Because each heavy motor is attached on only one side with two screws, the motors droop down on the unsupported side. It isn’t a huge deal, although it causes the bottom of the wheels to tilt a bit outward (negative camber). You can overcome this by adding a center tube to support the mass across the entire motor’s body, which keeps the motors straight and level.

Obtaining the Motor Tube

This is by far the most delicious part in the whole book.

  1. Purchase a mini M&M’s candy tube. Not the short package, but the “mega” variety, 55 g (see top of Figure 24-13).

    9781484213605_Fig24-13.jpg

    Figure 24-13. Unopened mini M&M’s candy mega tube (top) and finished tube (bottom)

    There are a wide variety of M&M’s candy tube colors to choose from: red, pink, orange, yellow, green, and blue. Select the color you prefer.

  2. Consume all of the candy eagerly.
  3. Rip off the plastic label.

Cutting the Motor Tube

  1. With a hacksaw or rotary tool cut-off wheel accessory, cut off the lid and rim (see Figure 24-14).

    9781484213605_Fig24-14.jpg

    Figure 24-14. Lid and rim cut off from the top of the tube

    Take a closer look at the diameter of the tube. Oh, no! The top diameter of the M&M’s candy tube is slightly wider than the bottom diameter. The gearbox cover of the motor can slide completely into the top of the tube but not into the middle or the bottom of the tube. Oh, well.

    This means that one contiguous tube can’t envelop both gearbox covers across the width of the robot. So, for symmetrical aesthetic reasons, you’ll want to cut the tube down so that only the motor portions (not the gearhead cover portions) are contained within the tube. Notice the finished tube at the bottom of Figure 24-13 is much shorter than the original tube, and that the finished tube consists of the wider end of the original tube.

  2. From the top of the tube after the lid is removed, measure 9.5 cm and cut. Retain the 9.5 cm piece (the one with the larger diameter) and discard the smaller end.
  3. Midway across the tube, use the grinding-stone accessory to grind a 1-cm diameter or slightly larger hole (see the bottom of Figure 24-13). This is where the connectors for the motors will pass through to the circuit board. If you discover later on that the connectors and wires are difficult to insert in this hole, feel free to make the hole larger.

Sanding the Motor Tube

The cutting process creates burrs on the ends of the tubes. Additionally, you may not have made the cut evenly straight across.

  1. With a circular motion, sand the ends of the tube with medium to fine sandpaper to level the cut (see Figure 24-15).

    9781484213605_Fig24-15.jpg

    Figure 24-15. Removing burrs and shaping ends with a circular motion on sanding paper

  2. Switch to extra-fine sandpaper to remove the burrs and smooth the edges of the ends of the tube.

Removing the Label Residue

Some adhesive likely remains on the tube after removing the label.

  1. Use a dab of acetone (nail polish remover) or Goo Gone on a cloth to quickly wipe away the label adhesive residue (see Figure 24-16).

9781484213605_Fig24-16.jpg

Figure 24-16. Removing sticker adhesive residue with acetone

Be aware that acetone can destroy some types of plastics, but the M&M’s candy tube is unaffected because it is made out of polypropylene thermoplastic, as you can see from the recycling symbol on the bottom (see Figure 24-17). Polypropylene is very resistant to chemicals. So, acetone doesn’t harm the tube.

9781484213605_Fig24-17.jpg

Figure 24-17. Recycling symbol indicates tube is polypropylene

The LEGO cross axles, the M&M’s candy tube, and the Ziploc container are all polypropylene. By the way, the chemical resistance of polypropylene means it is nearly impossible to paint or permanently attach stickers to those portions of the robot’s body.

Standard LEGO bricks are made of ABS (acrylonitrile butadiene styrene) thermoplastic. Don’t try cleaning your LEGO bricks with acetone; they’ll decompose (see Figure 24-18). Also unlike polypropylene products, LEGO bricks are not dishwasher safe; they’ll melt.

9781484213605_Fig24-18.jpg

Figure 24-18. Acetone destroying a standard LEGO brick

Widening the Motor Diameters

To reduce vibration and tilt, the motors should be made to fit snuggly in the tube by wrapping them with masking tape (see Figure 24-19).

9781484213605_Fig24-19.jpg

Figure 24-19. Masking tape enlarging motor ends to fit snugly in the tube

A negative consequence of the tape is that it is a thermal insulator, meaning it will be more difficult for the motors to dissipate heat. That’s not an issue for this robot because the metal gearboxes remain exposed and the motors aren’t being run at excess voltages or extreme loads. But, think carefully before adding tape to the motors of other robots.

  1. Obtain a roll of low-adhesion masking tape, 1-inch (2.5 cm) wide. Scotch-brand Long Mask #2090 works well.
  2. Wrap approximately 68 cm of tape around the motor portion of one of the gearhead motors.
  3. Try inserting the motor into the larger end of the tube to see how it fits. Although it should now be snug, the motor should still be able to be completely inserted (including the gearhead) into the larger end of the tube. After testing, remove or add tape as necessary.

    You don’t want to use double-sided tape or anything that causes the motors to stick to the inside of the tube. You are only using the tape as padding and to widen the diameter for a cushioned fit.

  4. Wrap approximately 39 cm of tape around the motor portion of the other gearhead motor.
  5. Try inserting the motor into the smaller end of the tube to see how it fits. The motor should be able to be inserted, but the gearhead won’t fit. After testing, remove or add tape as necessary.

Installing the Motors and Tube

  1. Feed the Molex connector of the 39 cm taped motor through the smaller end of the tube and out the center hole (see Figure 24-20).

    9781484213605_Fig24-20.jpg

    Figure 24-20. Motor’s Molex connector emerging from hole in middle of tube

  2. If you’re going to include LEDs in the tube, insert them now into the other end of the tube and feed their Molex connector out the center hole.
  3. Feed the Molex connector of the 68 cm taped motor through the wider end of the tube and out the center hole.

At this point, there should be one motor on each end of the tube with the LEDs inside the middle of the tube. All three connectors should be popping out in the center hole.

Insert the motors and tube into the robot’s container body and test the fit. To aid insertion, you can push the motor on the wider end in all the way. Either add the washers and screws to hold the motors and tube in place, or remove the motors and tube and wait until you have drilled the holes for other parts in the container.

Adding the Switches and Battery Holder

Using the grinding stone accessory, grind suitably sized holes at the rear of the container for the power switch and line-following switch (see Figure 24-21). Be sure to leave enough room between the switches to install a 9 V battery and battery clip.

9781484213605_Fig24-21.jpg

Figure 24-21. Large hole ground out for power switch (upper left) and small hole ground out for line-following switch (upper right)

The diameters for the holes for the switches depend on the sizes of the switches you choose. To avoid removing too much plastic, drill smaller holes than you think are necessary and then test the fit of the switches. It would be lousy to have to be gentle with your switches because you’re afraid they might fall in due to holes that are too large.

Installing the Power Switch

Attach your power switch to the robot’s body.

I really like the shape and feel of the rocker switch. The faceplate on the outside complements the large nut that steadfastly holds the power switch to the robot’s body (see Figure 24-22).

9781484213605_Fig24-22.jpg

Figure 24-22. Locking nut being screwed onto rear of power switch

Installing the Line-Following Switch

Threaded-bushing toggle switches usually come with four circular pieces: two nuts, a keyway washer, and a lock washer (see Figure 24-23). Sometimes the pieces ship pre-installed on the switch’s bushing (the neck).

9781484213605_Fig24-23.jpg

Figure 24-23. Power switch with nut installed on bushing (far left), keyway washer (left), internal-tooth lock washer (right), and nut (far right)

Screw one nut onto the switch’s bushing to a point that allows the desired amount of the bushing to stick out of the robot’s body. Too little bushing doesn’t leave enough room for all the other pieces to be screwed on. Too much bushing looks gangly.

Then, place the keyway washer (also called a “locking ring”) against the positioning nut. The keyway washer has a tiny internal tab that fits in a groove (called a “keyway”) on the switch’s bushing. The keyway washer also has a larger, external tab that presses against the container wall. When securely fastened, the tabs on the keyway washer prevent the toggle switch from twisting and rotating when the user switches the actuator back and forth.

On the outside of the container are the lock washer and another nut (see Figure 24-24). The lock washer helps prevent the nut from loosening and coming undone.

9781484213605_Fig24-24.jpg

Figure 24-24. Line-following switch installed. Inside the container: switch body, nut, keyway washer. Outside the container: lock washer, nut, and switch toggle actuator

Don’t forget that one of the most significant benefits of all washers is to spread the forces and load across more of the surface. Appropriately, the switch has two washers (keyway washer and lock washer) sandwiching the plastic container between two nuts.

Installing the 9 V Battery Holder

Sandwich holds its battery with a preformed metal clip (Mouser 534-080 or 534-095). Add some masking tape to the ends of the clip to prevent the sharp metal edges from scratching the battery.

With a washer on the outside, install the battery clip inside the robot’s body between the power switch and line-following switch (see Figure 24-25). You’ll need to drill a hole for the screw.

9781484213605_Fig24-25.jpg

Figure 24-25. 9 V bracket battery holder with taped tips

Adding the Circuit Board

On the recommended breadboard, there are four holes to attach the line-following circuit board to the robot’s body. At the beginning of this chapter, you marked and drilled holes for the mounting screws.

Circuit Board Mounting Hardware

To hold the circuit board onto the robot’s body, you’ll need:

  • Four #4-40 1½-inch long machine screws (available at local hardware store)
  • Four #4-40 nuts with built-in lock washers (available at local hardware store). Plain #4-40 nuts with separate lock washers are also acceptable
  • Eight #4 screw-size nylon flat washers (same washers as used on the motors)
  • Four 1-inch long spacers

See Figure 24-26 to get a look at them all.

9781484213605_Fig24-26.jpg

Figure 24-26. Four #4-40 1½-inch machine screws with two #4 washers each (top), four hex threaded standoffs (middle), four #4-40 nuts with integrated external-tooth lock washers (bottom)

Selecting and Obtaining Spacers

Spacers position the line-following circuit board away from the container so that the Molex connectors can fit in the space in between. Additionally, the spacers position the circuit board about 20 cm from the floor, giving the sensors ample, nearby views of the line to follow.

Shorter-length spacers are commonly used on computers, stereos, and other products with circuit boards to allow airflow on both sides of the board for heat dissipation.

Hex (six-sided) threaded spacers, like those shown in Figure 24-26, have holes with screw threads that grip the #4-40 screw. These types of spacers, with threads or integrated screws, are often called standoffs. The thread’s grip on the screw reduces rattle and permits the circuit board to be removed without the screws and standoffs falling out. Unfortunately, some of the longer threaded spacers are not threaded all the way through in the very center, which must be laboriously corrected with a tap.

Round thru-hole spacers are also available. Sometimes they’re called “clear” spacers or “non-threaded.” Not only are they less expensive than the threaded variety, but also they have the advantage of simply slipping onto the screw without all the effort of turning them (no threads). But, of course, they fall off just as easily when the nuts and circuit board are removed.

To compromise, you could select two ½-inch spacers, one threaded and the other thru hole. Put the thru-hole spacers on first and then add the threaded spacers to the ends to keep everything in place.

Aluminum, nickel-plated brass, and ceramic spacers are common. But nylon is cheaper and lighter. Table 24-1 lists suppliers of various lengths of nylon spacers.

Table 24-1. Suppliers of Spacers

Tab1

Installing the Circuit Board

When installation is complete, the mounting hardware for the circuit board looks like Figure 24-27.

9781484213605_Fig24-27.jpg

Figure 24-27. Mounting hardware installed. Top to bottom: screw head, washer, container, washer, spacer, circuit board, lock washer, nut, end of screw

Here are the steps for installation:

  1. Place a nylon washer on the 1½-inch long #4-40 screw. This washer prevents the screw head from ripping through the thin plastic of the container.
  2. Insert the screw into one of the holes previously drilled in the container for the circuit board.
  3. Place a nylon washer on the other side of the screw so that the thin plastic of the container is sandwiched between nylon washers on the screw.
  4. Add a 1-inch long spacer or two ½-inch spacers.
  5. Complete steps 1 through 4 for the other screws.
  6. Attach all of the switches, motors, and other parts to the circuit board via the Molex connectors.
  7. Place the circuit board into the body, nudging and positioning so that all four of the screws pass through their corresponding holes on the circuit board.
  8. Place the nuts with integrated lock washers onto the screws. The lock washers should be against the surface of the circuit board.
  9. There are a number of options for tightening the nuts onto the screws. You can use needle-nose pliers, your fingers, a small crescent wrench, or a nutdriver (see Figure 24-28).

9781484213605_Fig24-28.jpg

Figure 24-28. Nutdriver tightening nuts onto standoff screws

A nutdriver looks like a screwdriver, except a nutdriver’s center is hollow and the tip is shaped to fit around a nut. Simply place the nutdriver over the nut and twist to tighten or loosen the nut (see Figure 24-29). Nutdrivers are inexpensive and available at local hardware stores. Because of the head-on accessibility of the nuts on this robot, I prefer a #4 nutdriver to a wrench or pliers.

9781484213605_Fig24-29.jpg

Figure 24-29. Close-up of nutdriver tip

Be sure to firmly tighten down each nut. When the robot is turned over to follow lines, the nuts are facing the ground. Therefore, if a nut is loose, it’ll eventually fall off. If desired, you can purchase anti-vibration nuts with built-in nylon centers, such as McMaster #90715A005. Or, you can install an additional nut on top of the first nut. These are called jam locknuts.

Drilling Holes for the Trimpots

The final line-following circuit has two trimpots, one for headlight brightness and the other for balancing the left and right pairs of sensors. With the circuit board in place, drill the necessary holes to be able to adjust the trimpots with a small screwdriver (see Figure 24-30).

9781484213605_Fig24-30.jpg

Figure 24-30. Tiny holes drilled into container front to allow a small screwdriver access to the headlight brightness and sensor-balancing trimpots

Carving Out a Window in the Container Lid

The Ziploc container comes with a blue lid. Technically, the robot works fine without the lid. However, the lid looks nice, adds structural stability, raises the sensors up a bit for a better view, and catches any robot parts that fall out during operation (*gasp*).

Using the grinding-stone accessory on a variable-speed rotary tool, carve out a window in the lid for the sensors to be able to see the floor (see top of Figure 24-31). The robot can run without the window, but not as well since only blue light will pass through the lid.

9781484213605_Fig24-31.jpg

Figure 24-31. Window ground out of front of container lid

It might be beneficial to attach some clear plastic, like a piece of an overhead transparency, into the window so that dirt, small objects, and fingers don’t bend or soil the sensors when the lid is in place on the robot. Unfortunately, polypropylene’s amazing chemical resistance characteristics and the lid’s flexibility make it difficult to glue anything in place. Furthermore, even clear plastic might reflect some of the light back into the sensors, reducing the robot’s line-following vision.

Finishing Touches

Add any remaining parts, like the couplers and wheels, to the robot. Install a 9 V battery and put the lid on.

Now’s a good time to add stickers, a nameplate, pipe cleaners, or funny eyes. Perhaps stick an army man to the top to lead the way, or a racecar driver to steer. There’s also enough room on the inside to toss in some knick-knacks.

Ready to Roll

In this chapter, you’ve seen one option for a robot body for the line-following robot. By all means, experiment with other fun and interesting robot body materials.

Although it may seem that the robot is now finished, there’s still some effort you need to invest in testing and tweaking. In the next chapter, you’ll enter the final, critical stage of robot building.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.216.59