Robot: Bootstrap

Bootstrap is a small, wheeled autonomous robot designed to teach basic maker skills in soldering & electronics, fabrication and assembly, and programming as it is built. it can be easily extended to take a wide variety of low cost sensors.

The complete plans and designs for Bootstrap are available on this site.

This project was completed in 2015, many of the links may be obsolete.

1. OVERVIEW AND DESIGN

Bootstrap is an inexpensive learning tool. It requires soldering. fabrication, and programming. It provides a base for modification and upgrading.

Bootstrap is a small (about 130mm) round, wheeled robot that is designed to operate autonomously. The round design helps to prevent it from getting hung up while turning. The design of Bootstrap makes it suitable for indoor use in most environments. It will struggle on deep pile carpet. Outdoors it should operate on smooth concrete or blacktop, although it will be a bumpy ride. It can handle a moderate number of additional sensors at one time but is not designed for more than a few ounces of additional weight.

The basic model can be built from plans, design files, and instructions on this site for around $50. Bootstrap can be upgraded with better batteries, many additional sensors (pretty much anything that can be controlled by an Arduino) and connectivity options such as Bluetooth.

The micro controller is an Arduino Nano. It also utilizes the following major components in its basic configuration:

DRV8835 dual motor driver (in a Pololu carrier)

5V boost converter/regulator

Protostack small protoyping board

piezo buzzer

N20 gear motors

2 “bump” switches

HC-SR04 Ultrasonic sensor

3xAA Alkaline, 3xAA Nimh, or single cell LiPo battery

3D printed or hand fabricated chassis and structural components.

The whole system runs at 5 volts via the boost converter. This allows a variety of battery sources (3 alkaline or nimh AA batteries or a single cell LiPo pack) and keeps sensor selection simple. All fasteners are m2x12mm screws. Many components can be 3D printed but all components can be purchased from common sources. 3D printing is not required to build Bootstrap.

Prototype 3Prototype 3 bottom

2. Safety Concerns

Bootstrap is designed to teach basic maker skills. Building one is not inherently dangerous, but there are a few general safety items to recognize. Standard maker skills requiring working with hot and sharp tools. Thus Bootstrap does also.

Bootstrap requires soldering. Soldering irons operate around 370 degreed celsius (700 fahrenheit) and are easily capable of giving third degree burns and starting fires. Soldering also produces fumes that are irritants. Look up and review basic safety procedures for soldering before you begin this project.

3D printing components pose few risks. Just don’t ever touch the hot end of the extruder. Using a CNC machine or laser cutter to fabricate a chassis necessitates review of safety for those machines. The chassis can also be cut from wood or other materials with saws and drilled out. Make sure you know the safe operating process for the equipment you are using.

Bootstrap itself runs at 5 volts DC and can generate about an amp of current so it poses no significant risk of shock or fire while running on AA batteries. If you are using a LiPo battery make sure you don’t damage or physically abuse it, as those can catch fire when damaged. About the worst you can do with the power available on board is burn out some of the components, including the USB port of the computer you are programming it with.

The robot is small and light and thus its operation does not pose a significant risk of hurting anyone. If you step on it with bare feet it is going to hurt. If you send it off a flight of stairs it is going to break.

3. Materials, Tools, and Skills

Bootstrap is designed to take a maker from using pre-made or snap together projects to building one from scratch (or at least from the most basic commonly available components). As a result, it does not require many prerequisite skills and only a limited access to tools.

The assembly instructions assume no familiarity with soldering. However there are only limited opportunities for making mistakes so it would be a good idea to have completed a few basic soldering tasks as practice before starting on Bootstrap. You will need access to basic soldering equipment. Fabrication is a matter of 3D printing or cutting/drilling by hand or with machinery. You will need access to the tools to use one of those options. It is easy to start over if you make a mistake building the fabricated parts. Programming the Bootstrap follows standard Arduino practice and some starter programs are provided. You will need a computer with the Arduino software installed, the correct drivers for your Arduino Nano installed, and a mini USB cable to connect the two. Making sure your set up can program your Arduino is a good place to start on this project.

In addition to the soldering and programming gear, the tools and supplies you should have available include:

  • a small phillips screw driver
  • needle nose pliers
  • flush cutters for trimming soldered leads
  • wire strippers (the self adjusting automatic type are highly recommended)
  • a multimeter with an audible continuity test feature
  • masking or other paper tape
  • a small piece of thick double sided tape (hot melt glue is an alternative)
  • a 2mm drill bit (or something very close) and drill to ream out screw holes on the chassis
  • batteries for Bootstrap. The basic option is 3 AA batteries, either alkaline or rechargeable. Other variations are possible but battery input to the voltage converter should range from 3v to 5v.

Materials

Below are all the materials required to build Bootstrap. In the two cases where there is only once source for an item it is identified. In most cases there are many suppliers and ebay is the cheapest source, although not always the fastest or best quality, as discussed in this post.

Cost figures given are for the part only and are often the per item cost when ordering more than one. They do not include shipping costs (which are generally low when not free). Thus they should be used as a guide to getting  good deal and not as a promise of a precise cost.

 3D printed version


If you have access to a 3D printer, print the chassis, bumper, motor mounts, caster mount, and ultrasonic sensor mount.

3D parts

If you do not have access to a 3D printer, see the bottom of this list for additional materials to fabricate or obtain these parts.


An Arduino Nano. About $4.50 if you buy the cheapest type. The cheap ones will often use a CH340 serial chip, which works fine under Linux and Windows (with additional drivers), but requires additional fiddling under OS X Yosemite (search online for instructions). The fully authorized, most expensive versions use a FTDI serial chip that works fine on all platforms. Avoid a cheap version that claims to have a FTDI chip, these are usually counterfeit and may lock up on use. Some ebay sites list Arduino Pro Minis, which do not have an onboard USB connector and serial chip, as Nanos. You need the USB connector.

arduino


A DRV8835 dual motor driver in Pololu’s carrier package. Available from Pololu.com as item 2135 for $4.50.

motor controller


A 5V voltage boost module. You will find these on ebay listed as “DC-DC Converter Step Up Boost Module 2-5V to 5V 1200mA (NO USB)” for about $2 when buying one. Note that the one you need does not have a USB connector mounted.

voltage booster


A Protostack small prototyping board. This only available from protostack,com as item PB-GE-S1. The board is $2.90 in quantity of one. Protostack charges a $9 flat shipping rate, which is a budget buster if you are just buying one item (but great if you buy a bunch of stuff from them). When possible I am giving these boards to Bootstrap builders to help them get started (email me at bill@robot50.org).

protostack


A 3A 250v/6A 125v Mini Toggle Switch. A SPST (single pole single throw) switch is all you need, but they are often mislabeled as SPDT (single pole dual throw), which is fine.  On ebay as cheap as $0.50.

toggle


51 straight male header pins. You can buy these in a single row configuration (they come in strips of 40) or double or triple rows–it doesn’t really matter as long as you end up with 51 total pins. The triple row is easiest to mount to the prototyping board but a little tape will hold any of them in place for soldering. About $0.50 on ebay.

header pins


A battery holder for 3 AA batteries (open, with no cover). About $0.50 on ebay.

battery holder


A 5v piezo buzzer. It’s necessary to get one that has a diameter of no more than 12mm. As cheap as $0.25 on ebay,

buzzer


A 1N5820 Schottky diode. About $0.25 on ebay.

diode


A 20k ohm resistor. 1/4 watt, 5% tolerance is fine. About $0.04 on ebay.

22k


Two 10k ohm resistors. 1/4 watt, 5% tolerance is fine. About $0.02 each on ebay.

10ks


Two N20 micro gear motors. There are a lot of these out there with different gearing and voltages. You want 6 volt rated motors. Motors with a no load rpm of 300 at 6 volts will be the best compromise of speed vs torque. 400 or even 500 rpm motors could be used but the torque will be low and they will struggle on rough surfaces or with additional weight on the robot.  Be careful not to buy very low rpm motors (often 65 rpm) being advertised for robots unless you want something really slow. 200 rpm motors are the slowest I would recommend. The 300 rpm motors run about $4.50 each at the cheapest (ebay or many other suppliers).

motors


Two 42mm x 19mm wheels with 3mm D shafts. The Pololu wheels, part number 1090, are recommended at $7 a pair (copies can sometimes be found elsewhere for around $4). A set of 3D printed substitutes are being made available, however the Pololu wheels have much better traction and allow the use of encoders that Pololu has designed for them.

pololu wheels


Two subminiature lever arm snap switches. These need to have a lever of about 25mm (1″) to fit. Temco model CN0133 is the most commonly available. About $0.70 each on ebay.

switches


An HC-SR04 (or HC-SR05) ultrasonic sensor. Widely available on ebay and elsewhere for as little as $2.

sr04


A minimum of four female to female jumper wires with Dupont connectors. These can be 150mm to 200mm in length. Usually sold in strips of 40 on ebay for as little as $1. Additional wires will be needed if you add options, so a full strip is handy to have.

jumpers


About 2 meters of hook up wire. Almost anything that can handle over an amp of current at 5 volts will work with the electronics (24 awg solid core is used in the instructions). However some types of wire will work better than others: Solid core wire is much easier to work with than stranded wire. The total diameter of the wire, including insulation, should be between 1mm and 2mm to fit in confined spaces. Having at least two colors of wire will be very useful in keeping things straight.

This is a good place to scavenge a part instead of buying one.

wire


25 each of m2 x 12mm philips head screws and nuts. About $5 for both on ebay,

screws


Nylon hex standoffs m2 x 12mm. Nylon is recommended because most of the metal ones do not have a full length thread and cannot be used as a result. You will need four of these for a 3D printed version of Bootstrap and six for the non-3D printed version. Most often sold in packages of 10 on ebay for about $2.

standoffs


A 1/2″ steel ball for bearings (used in the caster mount for Bootstrap). About $1 on ebay.

bearing


 

Additional Materials for Non-3D Printed Version

If you are not using a 3D printer to make Bootstrap you do not need the steel ball listed above. You will need 6 standoffs instead of 4. You will need to fabricate a chassis from a 6mm x 150mm (1/4″ x 6″) piece of plywood, Sintra or other stiff sheet material using the template available on this site.  You will also need to purchase 3 additional items and fabricate a bumper.


A 1/2″ Pololu metal ball caster. This kit is available from Pololu.com as part number 953 for $2.

pololu caster


A pair of micro metal gearmotor extended brackets from Pololu. These are available from pololu.com as part number 1089 for $5 a pair.

pololu brackets


A mount with a wide base for the HC-SR04. A typical mount of this type, made from acrylic, is pictured. The narrow base tall mounts sold for the HC-SR04 are not a good match for Bootstrap. About $3 on ebay.

ultrasonic mount


Finally, you will need to fabricate a front bumper. The best material for this is a scrap of aluminum flashing (used in roofing and available at hardware stores). The finished piece should be 11mm (.43″) tall and 160mm (6.3″) long. Flashing works best because it is extremely thin and light, can be cut with strong scissors, keeps it shape when bent, yet remains flexible. However other materials with similar properties can be used. Keep it as light as possible to avoid ruining the levers on the switches with too much weight. A trimmed piece of flashing is shown. The bumper can be mounted with strong double sided tape or appropriate glue.

flashing

4. Design files

This is the repository for design files and templates to fabricate parts for Bootstrap. It will hold 3D design files (STL format) for 3D printing the parts, 2D files for CNC or laser cutting, and a printable template for hand cutting and drilling.

The 3D files are available this zip file:

boostrap_3D_files

The 3D files should be printed with 3 shells and 25% fill. A layer height of .2mm is adequate. Supports should be used for printing the motor mounts. Supports are not needed for the other parts.

You can copy the source files for these parts and modify them to your heart’s content with an account on Tinkcard.com. Just search on “robot50” to find them.

If you don’t have access to a 3D printer see the “7. Variations and Upgrades” page for files and instructions to cut a chassis using woodworking tools.

5. Assembly Instructions

Before you start, a caution

Building Bootstrap is intended to be a first experience in building something with real consequences (i.e. ruining a part) for mistakes. Read through and contemplate the instructions that follow before you do anything else. It would be a good idea to try a “dry run” of test fitting items in each section without soldering anything before taking it all apart and starting for real. You will have limited opportunities to make mistakes on this project before you have to throw something (or many things) out and start over with a new one.


How to Use these Instructions

The following assembly instructions are for the basic Bootstrap model using 3D printed parts. If you are planning  a variation, such as using a plywood chassis, or an upgrade, such as bluetooth module, consult the Variations and Upgrades page [under development] for alternative instructions in the relevant areas before working through the following.

The instructions are presented as a single long document to make printing and saving easier. Below are internal links to the major sections that will allow you to jump to them quickly if you are building Bootstrap over multiple sessions:

Soldering initial components to the prototyping board

Adding electronics

Adding wiring and the buzzer

Assembling the chassis

Mounting hardware

Motors and bump switches

Final electronics and components


Assembly

Soldering initial components to the prototyping board

Header pin strips

If you are using a 3 row header strip cut 3 pieces from it, one each of 11×3 pins, 4×3 pins and 2×3 pins. The strip is designed to break between rows of pins. Deeply score each cut point with a serrated knife or coping saw, then snap the piece you want from the strip at the cut point. Doing a careful job here is worthwhile because there are some tight tolerances for these pieces when everything is mounted on the prototyping board. If you are using 1 row header strips cut or snap 3 pieces of 11 pins, 3 of 4 pins and 2 of 3 pins.

Insert the pieces of the header strips into the prototyping board at the exact locations and with the board oriented as shown in figure 5.01.

Figure 5.1. Header pins inserted into the proto board.
Figure 5.1. Header pins inserted into the prototyping board.

The short side of the pins goes through the top of the board (which displays the copyright notice). The long side of the pins point upward from the board. The outermost strips of pin align with the +/- rows on the prototyping board. But note how this is not symmetrical on both sides of the board: the outermost pin is in the – row on the left and in the + row on the right. Unless they fit quite snuggly, you will want to temporarily tape these rows of pins in place before turning the board over for soldering (see Figure 5.02).

Figure 5.02. Header pins taped down for soldering from the other side.
Figure 5.02. Header pins taped down for soldering from the other side.

You will now be soldering 51 pins to the backside of the prototyping board (and many more later on). This is a good chance to get some practice with basic soldering. Make absolutely sure you have the header strip pieces in the correct location on the board before you start. De-soldering all those pins if you have made a mistake will be essentially impossible.

Once the board is flipped you should see the tip of each pin standing just above the silver pad. If you don’t, your strip slipped out of place when you flipped the board and you need to reseat and secure it. Start soldering with each group of pins by soldering one pin at diagonal corners. This will hold the strip securely in place as you do the rest. Then systematically go through the rows and columns of each strip to solder the rest of the pins. Do not keep the tip of your iron on a single pad longer than needed to melt solder around it. If you over heat the extremely thin pad it will lift off its backing and that pad will be ruined for good.

With such tightly packed solder points it is also important to keep the tip of your soldering iron precisely in the pad you are working on and not let it wander over to an adjacent a pad because you might accidentally bridge the two pads with solder. Figure 5.03 shows what you do not want to happen.

Figure 5.03. A solder bridge shorting two pins. This needs to be removed!
Figure 5.03. A solder bridge shorting two pins. This needs to be removed!

It also helps to be sparing with the amount of solder you feed in to avoid bridging pads, use just enough to see the solder suck itself down around your pin and avoid building up a large bubble of solder. If you do end up bridging pads you will want to remelt the solder between the pads (which will promptly and frustratingly try to re-establish the bridge) and pull it out with a pick or solder sucker before it resolidifies. You can also try cutting it with your flush cutters when cool, but solidified solder is hard to cut.

Once you have the header strips in place it is a good idea to check to make sure you have successfully made your connections and have not made more than you intended to by using your multimeter. A few minutes verifying your work here can save you hours of scratching your head much later down the road when you can’t figure out why your new sensor is not working with your completed robot. Or why everything is shorting out.

Figure 5.04. Multimeter set to do audible continuity testing.
Figure 5.04. Multimeter set to do audible continuity testing.

To test for bridged pads, set your multimeter to audible continuity. You have it set correctly if touching the tips of the multimeter probes together produces a beep (Figure 5.04).

Now test all the adjacent pairs of pins you just soldered with the probes (Figure 5.05).

Figure 5.05. Testing for continuity between header pins (there should not be any going across the rows of pins).
Figure 5.05. Testing for continuity between header pins (there should not be any going across the rows of pins).

You should not hear any beeps. A beep indicates that you have bridged that set of pins and you need to correct it. It doesn’t matter which probe goes on which pin when testing continuity.

You should also test for cold solder joints—joints that you have soldered but have not made a proper electrical connection. Keep you multimeter in audile continuity mode. Place the tip of one probe into the red (- or negative) column of pads from below the board at an empty pad. Then touch every pin from your header strips soldered into a red column (Figure 5.06).

Figure 5.06. You should get a continuity beep down the "+" and "-" columns. You should also get continuity testing each data pin against the empty pad next to it.
Figure 5.06. You should get a continuity beep down the “+” and “-” columns. You should also get continuity testing each data pin against the empty pad next to it.

This time you should hear a beep each time you test one of your ground pins. Switch over to the white (+ or positive) column and test all of your positive pins. Again you should hear a beep each time. To test the interior rows of pins from your header strips (which will become data lines connected to the Arduino) you will need to insert a probe into an empty pad (from below) connected to the pin you are testing by a white line on the top of the board. If you have a cold solder joint, remelt the solder at both pads you tested and then test again. Although slightly tedious, testing simple solder connections is well worth the few minutes it takes.

The columns and rows on the prototyping board marked “+” and “-”  will be referred to as the power rails in the rest of the instructions.

 


 

Adding electronics

Motor controller board

The motor controller board comes with single row header pins that need to be soldered to both the controller board and the prototyping board. The most reliable way to do this is to:

1. Put the pins in the correct location on the prototyping board (long pins down this time, they will be clipped short later).
2. Insert the motor controller board, with its pad labels facing up on top of the pins.
3. Solder the motor controller to top of the pins from the top of the board.
4. After it cools make sure it is seated all the way down on the board and tape it down to hold in place, flip the board over and solder the bottom of the pins from the bottom of the board. The long pins will make it a bit trickier to solder the bottom connections, but it can be done. Avoid bridging pads by using too much solder and lifting pads by keeping them heated for too long.

Figure 5.07 shows the pins inserted into the proto board.

Figure 5.07. Header pins inserted for the motor controller.
Figure 5.07. Header pins inserted for the motor controller.

They go on either side of the power rails, not in them. Figure 5.08 shows a top view of the motor controller board after soldering from the top.

Figure 5.08. Motor controller soldered to the top of its header pins.
Figure 5.08. Motor controller soldered to the top of its header pins.

Notice that the pin labels on the controller board are facing up and that the GND label points toward the center of the prototyping board. The motor controller pins should not be inserted into any power rail pads.

After the bottom of the controller board is fully soldered test for continuity. You can do this while the board is upside down. Touch one probe to the tip of a pin on the topside and the other to an empty pad next to it on the bottom side. You should get a beep for continuity.

Prepare the Arduino

If your Arduino comes with header pins already soldered to it you can skip this step and move on to “Install the Arduino.” If not, you need to solder them in. Start with the group of 2×3 pins that came with your Arduino. These are inserted into the matching pads from the top of the Arduino (long side of pins sticking up). The best way to solder these is to flip the Arduino Nano board over with the 2×3 pins inserted, prop the other end of the board up on something to make it roughly level, and tape it down to hold it while soldering. This is illustrated in Figure 5.09.

Figure 5.09. Some Nanos do not have their header pins pre-soldered. Preparing to solder the 2x3 pins from the bottom of the Arduino.
Figure 5.09. Some Nanos do not have their header pins pre-soldered. Preparing to solder the 2×3 pins from the bottom of the Arduino.

Solder the short side of the 2×3 pins to the pads on the bottom of the Arduino. Then put the single header pin strips that came with your Arduino into the correct place on the prototyping board as shown in Figure 5.10 and described in the following paragraph. Solder the Arduino to the top of them just like you did for the motor controller board.

Figure 5.10. Inserting the single row header pins for an Arduino that does not have them pre-soldered.
Figure 5.10. Inserting the single row header pins for an Arduino that does not have them pre-soldered.

Install the Arduino

Insert your Arduino board into the top of the prototyping board, as shown in Figure 5.11.

Figure 5.11. Arduino inserted into the protoboard. Do not insert any Arduino pins into the negative power rail.
Figure 5.11. Arduino inserted into the prototyping board. Do not insert any Arduino pins into the negative power rail.

Note that none of the Arduino pins go into pads on the power rails. It may look like the Arduino is electrically connected to the top negative rail in Figure 5.11, but it is not (it just overlaps). The first set of Arduino pins go into the first row of pads below the top negative rail (the same as the header pins on either side of it). Leave a row of two empty pads between the right side of the Arduino board and the two 3 row header strips. You will have a single row of empty pads on the left. These empty pads could be used to hard solder data lines to the Arduino at a future time.

Tape the Arduino in place if needed and then flip the board over and solder all of the Arduino pins. Continuity test each Arduino pin with a neighboring empty pad just like you did with the motor controller.

Now is a good time to clip the excess pin length on the Arduino and motor controller from the bottom of the prototyping board using a flush cutter.

SAFETY NOTE: The pins you are about to cut are semi-sharp, electrically conductive, and light enough to fly everywhere when cut. Wear some sort of eye protection when cutting. Cover your flush cutter with your spare hand before you make each cut. Remember to collect all the cut pieces and dispose of them when you are done. Observing this process will keep these pieces from flying into your eyes or disappearing among other parts, only to be stepped on or to short something out at a later date.

You want to place the flush cutter as tightly to the bottom of the board as you can without cutting your soldering. Figure 5.12 shows a cutter being placed and Figure 5.13 shows it covered with a hand as the cut is being made. Figure 5.14 shows the board after all the pins have been cut.

Figure 5.12. Placing the flush cutter.
Figure 5.12. Placing the flush cutter.
Figure 5.13. For safety's sake cover before you cut!
Figure 5.13. For safety’s sake cover before you cut!
Figure 5.14. Arduino and motor controller soldered into place and pins cut.
Figure 5.14. Arduino and motor controller soldered into place and pins cut.

 


 

Adding wiring and the buzzer

You will now will install the buzzer and start wiring the modules together. Cut a piece of hook up wire that is approximately 40mm (1.5”) and strip about 6mm (1/4”) from one end. Figure 5.15 shows a piece of 24awg solid hook up wire being stripped with a self-adjusting wire stripper (please don’t frustrate yourself with any other kind of wire stripper).

Figure 5.15. Strip wire with a tool worthy of your time.
Figure 5.15. Strip wire with a tool worthy of your time.

Insert the stripped end of the wire into one of the prototyping board holes connected to Arduino pin D10. Align it against the bottom of the 3 pin headers and bend it to fit into the outside hole on the third row of holes (from the top edge) of the prototyping board. Cut the wire so that there is about 6mm (1/4”) beyond that hole and then take the wire out and strip 6mm (1/4”) from the unstripped end. Reinsert the wire and align it so that it matches Figure 5.16. Reach under the board and bend the ends of the wire away from the pads so that the wire will stay in place while you flip the board over and solder the ends of the wire. Solder the ends of the wire and then clip the excess from the stripped ends. You will find that the ends of hook up wire do not fly away as violently as the pins you clipped earlier, but it is still important to do it safely and collect the tiny pieces that you clip off.

Figure 5.16. Note the precise location and shape of the wire for the buzzer.
Figure 5.16. Note the precise location and shape of the wire for the buzzer.

Next insert the buzzer. The wire you just soldered will provide power from Arduino pin D10 and you will ground the buzzer to the negative power rail. The buzzer should have a “+” marked on one side. The pin on that side of the buzzer (probably longer than the other pin) goes into a hole on the row where you soldered the end of the wire farthest from the Arduino. Put the + buzzer pin in a hole next to your wire. The other pin on the buzzer goes into a hole on the negative power rail that is halfway between the two sets of 3 row headers. So the side of the buzzer with a “+” should be on the outside of the prototyping board in the row you wire is soldered to and the other side of the buzzer should be in the negative power rail. It may not be an exact fit. You may need to gently bend the pins of the buzzer toward each other to fit into the prototyping board hole spacing. Push the buzzer in just deep enough that its pins come through the bottom of the board—do not try to force it all the way down as you risk breaking off its pins or crushing your wire. Figure 5.17 shows the buzzer properly inserted. Flip the board over and solder the buzzer pins. Clip the excess off the pins.

Figure 5.17. Buzzer inserted. The positive pin on the buzzer is not directly beneath the "+" sign. It is in the row where the wire is soldered.
Figure 5.17. Buzzer inserted. The positive pin on the buzzer is not directly beneath the “+” sign. It is in the row where the wire is soldered.

You will be adding a series of wires to the prototyping board. If you should make a mistake in making the following connections you can clip the wire out and use one of the adjacent holes in the prototyping board that performs the same function (e.g. a positive power connection or on the same row of data pins). However you will only have room for one do-over per connection for the most part, so strive to get it right the first time.

Next, wire the motor controller board and the Arduino to the power rails. Cut two 45mm (1.75”) wires, strip one end of each and test fit them between GND on the left side of the motor controller board and the right negative power rail for the first one, and between the VIN pin on the motor controller board and the right positive power rail for the second one. This is illustrated in Figure 5.18.

Figure 5.18. Power and ground wires inserted for the motor controller. Tuck these down flush.
Figure 5.18. Power and ground wires inserted for the motor controller. Tuck these down flush.

These wires on the left side provide power and ground to motor power circuitry of the motor controller. Test fit to trim off excess wire, then strip the other end, inert the wires into the rails and solder and clip all four points of contact. It’s a good idea to tuck these wires in the narrow space between the Arduino and motor controller board to keep them out of the way of wires that will come later.

The motor controller right side GND pin and VCC pin also need to be wired to the negative and positive power rails, respectively. The motor controller is designed to switch higher voltages than it is controlled with, but this project runs everything at 5 volts, so it is ok to wire both sides of the controller to the same power rails. Use the same procedure as before, but start with slightly shorter pieces of wire. Figure 5.19 shows the second set of wires in place along with the first. It is worth your time to get these four wires to lay as flat against the prototyping board and as parallel to the rows of holes as you can—you will be running a second set of wires over them.

Figure 5.19. Power and ground wires for the right side of the motor controller. These should also be flush.
Figure 5.19. Power and ground wires for the right side of the motor controller. These should also be flush.

Next connect the Arduino to the power rails. Cut and strip both ends of two 50mm (2”) wires. Connect the pad next to the 5V pin on the left side of the Arduino to the positive rail at the lower left of the prototyping board. Connect the pad next to the GND pin on the left side of the Arduino to the negative rail at the lower left of the prototyping board. These wires should not lie flat against the board but should stand proud of (above) it by about 6mm (1/4″) so that you can work around and under them in the future. You will be sliding the voltage booster under them, for example. Solder and clip the ends of all four connection points. Figure 5.20 shows these wires installed.

Figure 5.20. Power and ground wires for the Arduino added on the left side. Leave enough room under them to fit the voltage converter under them with space to spare.
Figure 5.20. Power and ground wires for the Arduino added on the left side. Leave enough room under them to fit the voltage converter under them with space to spare.

It is time to connect the output pins of the Arduino to the input pins of the motor controller. Cut four wires of about 60mm (2.3”) and strip each end of each wire. These wires will also stand proud of the board when installed so you can move then out of the way as needed. The four wires connect as follows:

Arduino pin D9 to motor controller pin B/IN2EN

Arduino pin D8 to motor controller pin B/IN1PH

Arduino pin D7 to motor controller pin A/IN1PH (note this is out of sequence on the motor controller board)

Arduino pin D6 to motor controller pin A/IN2EN

It’s probably best to connect and solder these wires one at a time instead of connecting them all and then trying to keep them all in place while soldering. Clip the excess ends. Figure 5.21 shows these four wires installed.

Figure 5.21. Wire the Arduino to the motor controller, carefully following the sequence in the instructions. These should not be flush.
Figure 5.21. Wire the Arduino to the motor controller, carefully following the sequence in the instructions. These should not be flush.

Insert the 20k resistor between the MD pin on the motor controller board and the positive power rail, as shown in Figure 5.22. This is a “pull up” resistor that will set the controller to the correct mode. It doesn’t matter which direction resistors are inserted. Solder the resistor in place and clip the excess leads.

Figure 5.22. Pull up resistor added to the motor controller.
Figure 5.22. Pull up resistor added to the motor controller.

This is a good time to check continuity on all of your new wiring. Insert one probe of your multimeter into a positive power rail pad from beneath and touch the other probe to the tops of the following positive power pins one at a time: VIN and VCC on the motor controller board and 5V on the Arduino. Test your grounds by switching the bottom probe to an empty pad on the negative power rail and touching both GND pins on the controller board and GND on the Arduino in turn. Touch your probes to the tops of Arduino Pins D6-D9 and the tops of the controller pins that you soldered to them in turn. You should get a beep on all these connections. It’s also a good time to make sure your Arduino is still fully functional. Plug it into your computer via USB and download the Blink program from the Examples/Basics folder.

If your tests go smoothly take a break and bask the glory what you have accomplished so far. You have built a fully functional robot controller!

 


 

 

Assembling the chassis

Preparation

Before you begin you should gather all the parts, including the 3D printed components. Many 3D printers “squish” the first layer of a print, partially closing holes, or leaving small threads of filament hanging off parts. You should clean out your parts before assembly. Use a 2mm drill bit to clean out all the 2mm holes in your parts. Carefully clean out the hollow in the castor mount for the steel ball—tolerances are very tight in that space. Press the steel ball into the castor until it pops into place. The ball should roll around in the mount with relative ease but not fall out when the mount is shaken vigorously. The circular mounts for the ultrasonic sensor may be overly tight or loose, depending on how precise of a job the printer you used did with them. If they are too tight because of a squished first layer you can sand it smooth or trim it down with a sharp knife by running the blade around the inside of each. If the mount is too loose to hold the sensor in place you can add a bit of tape to the barrels on the sensor.

SAFETY TIP: don’t cut toward yourself with a sharp knife, cut away from your body instead. Be especially careful to cut away from your other hand. Think about where that blade is going to go when it slips under pressure before you cut, and make sure it’s somewhere safe. You don’t want to find out the hard way that it was aimed at your other hand.

The motor mounts should be printed with supports turned on (for the mounting ears). These printer supports need to be snapped off and the ears cleaned up. The holes on the ears should be reamed out with the 2mm drill bit. The rest of the edges of the 3D parts should be cleaned up also, but are not as critical. Figure 5.23 shows the motor mounts fresh off the printer and after cleaning, while Figure 5.24 shows all of the 3D printed parts prepared for assembly.

Figure 5.23. Motor mounts before and after cleaning.
Figure 5.23. Motor mounts before and after cleaning.
Figure 5.24. The 3D printed parts for Bootstrap.
Figure 5.24. The 3D printed parts for Bootstrap.

 


 

Mounting hardware

The screws holding the standoffs for the electronics board need to be added to the chassis first, as two of them will be under the AA battery holder. Insert a m2 x 12mm screw into the chassis from the bottom at one of the mounting holes for the standoff. Tighten a nut onto the screw from the top. The nut should be as tight as you can make it without breaking the plastic on the chassis. Tighten a second nut onto the screw against the first. The second nut helps keep things tight, but more importantly, it spaces the standoff correctly. Add the remaining three screws for the standoffs in the same manner. Add four 12mm standoffs to the protruding threads of the screws. These should also be quite tight but not so tight that you strip the soft threads in the nylon standoffs. Correct installation of the standoffs is illustrated in Figure 5.25

Figure 5.25. Standoffs in place.
Figure 5.25. Standoffs in place.

The AA battery holder and the castor mount and are added next. The 2 screws for the caster mount and the two screws for the battery holder go in from the bottom (so they allow the battery holder to lie flush to the bottom of the chassis) and are secured with one nut each. There is a diagonal ground wire in a slot on the bottom of the battery holder that can be knocked out of place. Make sure it is in its slot before installation so it doesn’t get crushed. Tighten down the battery holder screws before the caster mount. The wires from the battery holder should point toward the slot and hole for the toggle switch. Then secure the caster mount firmly. Installation of these two items in illustrated in Figure 5.26 and Figure 5.27.

Figure 5.26. Caster mount and battery holder secured (bottom view).
Figure 5.26. Caster mount and battery holder secured (bottom view).
Figure 5.27. Top view of screws from caster mount and battery holder.
Figure 5.27. Top view of screws from caster mount and battery holder.

The screws on Bootstrap seem to stay tight enough with a single nut as the soft plastic of 3D printed parts helps hold them in place. If you find that they loosen over time you can add a second nut, use nuts with a locking nylon insert, or add a drop of thread locking compound (don’t use “superglue” or you won’t be able to get it apart again). However if you tighten a single nut firmly on each screw, you are unlikely to need these remedies.

The wiring from the battery holder through the diode and switch should be done next. Error on the side of leaving wires too long. It won’t look as tidy but you can tuck excess wiring under the prototyping board once it’s mounted and it will make modifications easier in the future. The ground (black) wire from the battery holder will be soldered directly to the voltage converter so it can be left unaltered. The positive (red wire) from the battery holder with go through a diode to protect the circuit from incorrectly installed batteries and then through the power switch to the voltage converter.

First, prepare the diode. The leads should be clipped short and bent into a tight hook just large enough to accommodate wires. Figure 5.28 shows an unprepared and prepared diode.

Figure 5.28. Diode before and after preparation.
Figure 5.28. Diode before and after preparation.

Cut the red wire from the battery holder to about 30 mm (1.2″) and strip the end. Insert this into the input side the diode (the one without the white band around it) and firmly solder it into place. Cut a wire of about 40 mm (1.6″) and strip the ends. One end of this wire is soldered to the output side of the diode (the one with the white band around it) and the other end is soldered to the middle post on the bottom of the toggle switch. It’s easiest to do this if you insert the toggle switch into its hole first. Mount the toggle switch by inserting it up through the bottom of the chassis. The toggle switch is secured with a lock washer and nut from the top of the chassis. The switch likely came with an extra tabbed washer and a nut that wont be used in this project. Figure 5.29 shows a finished installation of the polarity protection diode. The diode could be glued or taped against the battery holder (without contacting metal) when you are done, or just tucked under nearby wiring (don’t glue it to the body to so future chassis swaps are easier).

Figure 5.29. Diode installed. Loose wiring can be tucked away.
Figure 5.29. Diode installed. Loose wiring can be tucked away.

One end of a 80 mm (3.1″) length of stripped wire should be soldered to the tab on the bottom of the toggle switch pointing toward the back of the robot. The other end of this wire will eventually be soldered to the input side of the voltage converter.

 


 

 

Motors and bump switches

The motors come next. These motors will have their polarity frequently reversed to drive forwards and backwards, so there really isn’t a positive or negative side on these motors. To drive the robot forward one motor needs to turn in one direction while the other needs to turn in the opposite direction (because they are mirrors of each other on opposite sides of the robot). Putting both of these things together, wiring up motors can be confusing, but it is not a big problem. If the motors are installed incorrectly it is easy to fix in hardware (flipping their sides on the robot) or in software.

However there are a couple things you can do to make things easier to sort out later. Cut and strip four 165 mm (6.5″) lengths of wire (these will be slightly long when installed to allow for future changes). It is best if you use two different colors of wire. Solder one end of the first color of wire to the tab on a motor with a tiny “+” above it, as illustrated by Figure 5.30.

Figure 5.30. A motor showing the "+" symbol.
Figure 5.30. A motor showing the “+” symbol.

If your motor is missing the “+” just pick a tab. Solder the other color of wire to the matching tab on the other motor. For example, if you have a red wire and a blue wire: solder the red wire to the “+” tab on the first motor and the blue wire to the “+” tab on the other motor. Solder the other two wires to the remaining motor tabs. Soldered motors are shown Figure 5.31.

(The build being illustrated from Figure 5.31 on is a different one from the earlier illustrations so the wiring color is different.)

Figure 5.31. Wiring soldered to motors. Using two colors of wire will help keep thing sorted.
Figure 5.31. Wiring soldered to motors. Using two colors of wire will help keep thing sorted.

Press the motors into the motor mounts. They go in with the protruding shaft of the motor pointing away from the ears on the mount. The brass plate on the motor mounts flush against the end of the mount. There are very small gussets in the mount that fit between brass plates. Make sure the motor is in the mount so that they will both lie flat against the bottom of the robot chassis. The mounts go into the chassis with 2 screws each. They should be held firmly and flush to the chassis without pinching the motor case. If the fit is too tight work the 2 mm drill bit around the inside of the holes to loosen things up a bit. Mounted motors are shown in Figures 5.32 and 5.33. Notice how the same color of wire points toward each end of the chassis.

Figure 5.32. Motors in mounts.
Figure 5.32. Motors in mounts.
Figure 5.33. Motors mounted to the bottom of the chassis.
Figure 5.33. Motors mounted to the bottom of the chassis.

Feed the free ends of the wires attached to the motors, the free end of the battery ground wire, and the free end of the wire from the switch up through the slot behind where the switch mounts. All of the wiring should come through the slot behind the switch without getting pinched by it. Tuck the motor wires down along the battery holder on the bottom of the chassis.

Prepare and mount the bump switches. The ends of the levers on the bump switches need to be bent slightly to slide into brackets on the bumper. The levers are thin steel but are not easy to bend. You need to be very careful while bending that you do not put pressure on the base of the lever as it could break right out of the switch. Holding the level by its midpoint, pinching it between your figures as shown in Figure 5.34, bend the outer 8 mm (.3″)of the lever inward toward the switch by about 20 degrees.

Figure 5.34. Gently bending a switch lever inward.
Figure 5.34. Gently bending a switch lever inward.

Cut and strip four 180 mm (7″) lengths of wire. It’s best if you use two colors of wire. Solder one wire each of the same color to the center tab of each bump switch (this will be your ground wire). Solder one wire each of the other color to the tab on the switch closest to the switch mechanism (this will be your power wire). Mount the switches to the chassis with the levers pointing outward. Insert two screws up from the bottom of the chassis (the heads need to go in the counter sunk holes on the bottom for these screws to be long enough) on the outside edges of the switches. Slip the bumper on to the bent ends of the switch levers before you insert the inside screw. You may need to do some adjusting to get the bumper and switches working well. The holes on the switches are oversized for the screws, giving you an easy way to adjust the fit. Start with the switches pushed all the way forward and outward on the chassis. If the bumper doesn’t work smoothly, clicking each switch when pressed on that side, you can adjust the switch within the mounting holes. Once it does, fully tighten the nuts down on the switches. The bumper should stay on the robot and trip at least one switch when it is pressed against the chassis (you will hear the switch click when it is tripped). Figure 5.35 shows the switches and bumper mounted to the chassis.

Figure 5.35. Bump switches and bumper installed on top of chassis.
Figure 5.35. Bump switches and bumper installed on top of chassis.

 


 

Final electronics and components

The prototyping board can be mounted and the final soldering done next. The prototyping board mounts to the top of the standoffs with four screws. To start, just lay it on top so that you can insert wires for soldering from the bottom (you may occasionally want to temporarily hold it down with one screw before final installation). Bring the four wires from the motors up from the front of the board near the motor controller and strip and solder them from the bottom one at a time. The wire from the “+” side of the right-side motor goes into a pad next to the pin marked BO2 on the controller. The other wire from the same motor goes into the pad next to the pin marked BO1. The wire NOT from the “+” side of the left-side motor goes into a pad next the pin marked AO2 and the final wire is assigned to AO1. Motor wires soldered to the controller are shown in Figure 5.36. If you use the pads closest to the controller you will have an empty set of pads or two in case you find that you want to reassign controller pins to motors latter on.

Figure 5.36. Motor wires soldered to output side of motor controller.
Figure 5.36. Motor wires soldered to output side of motor controller.

The wires from the bump switches can lay flat along the top of the chassis on either side of where the ultrasonic sensor will mount. Bring the ends of these wires up over the left side of the prototyping board. The next series of wires should be soldered with their insulation as close as possible to the top of the prototype board to prevent possible short circuits. Two short (30 mm, 1.2″) wires are cut, stripped, and soldered at the second pad in a row of three outside the positive power near the set of 3×4 header pins as shown in Figure 5.37.

Figure 5.37. Beginning the installation of the data wires from the bump switches to the Arduino.
Figure 5.37. Beginning the installation of the data wires from the bump switches to the Arduino.

These will be the inputs to the Arduino indicating that the switches have been pressed. Next, the power wire from each switch (the one from the tab of the switch furthest to the center of the chassis) should be soldered into a positive power rail pad on the board. These wires are shown in place in Figure 5.38. Different power rail pads could be used but this is a very compact installation.

Figure 5.38. The positive wires going to the bump switches installed.
Figure 5.38. The positive wires going to the bump switches installed.

Next, two 10k ohm resistors are soldered to the first pin in the row of three outside the power rail and into ground rail pads, passing over the positive wires without risking electrical contact with then. If use the highly compact arrangement illustrated in Figure 5.39 the resistors will not fully insert into the pads–you don’t want them pressing on wires anyway. You could solder the resistors to different pads in the ground rails, if you prefer.

Figure 5.39. Resistors for the bump switches installed.
Figure 5.39. Resistors for the bump switches installed.

Now it is time to solder the free ends of the two short wires to pads in line with D2 and D3 on the Arduino (the header pins for those pads will become unavailable as long as these input wires are soldered in). The right side switch can be assigned to D3 and the left side assigned to D2. Figure 5.40 shows these wires in place. Finally the two ground wires from the switches are soldered into the outside pads on the rows with the input to the Arduino and the resistors. The final set of wires are in place in Figure 5.40.

Figure 5.40. Ground wires from the switches installed and data wires soldered to pads for the inputs to the Arduino.
Figure 5.40. Ground wires from the switches installed and data wires soldered to pads for the inputs to the Arduino.

The voltage converter is taped to the prototyping board as it has no mounting holes. A thick piece of double-sided tape works best. You do not want to have electrical contact between the bottom of the voltage converter and the top of the prototyping board. Hot melt glue could also be used, but it will be messier than double sided tape and might melt again when soldering. Mount the voltage converter as shown in Figure 5.41, leaving a gap between it and the Arduino. The voltage converter should slip under the wires for power and ground coming from the Arduino.

Figure 5.41. Voltage converter taped into place on prototyping board.
Figure 5.41. Voltage converter taped into place on prototyping board.

Once the voltage converter is mounted solder the output wires from it to the prototyping board. These are very short wires and they need to be soldered to the surface of the pads on the voltage converter. The other ends of the wires need to be soldered into the correct pads on the prototyping board. This is the fiddliest soldering job in the whole project so go slow and be precise. Use two different colors of wire to keep things straight. Start by soldering a wire of one color into a pad on the negative power rail and a wire of a different color into a pad on the positive rail after measuring the wires and striping both ends. Using Figure 5.42 as your guide, bend the free end of the wires so that the striped lead of each lays flat against the correct pad on the voltage converter. These wires cross between the prototyping board and the voltage converter. After you are sure you have them in the right position, solder them down to the voltage converter.

Figure 5.42. Output wires from the voltage converter soldered to power and ground rails on the prototyping board. This has to be done correctly.
Figure 5.42. Output wires from the voltage converter soldered to power and ground rails on the prototyping board. This has to be done correctly.

Don’t bridge the pads on the voltage converter to other components on it with overly long wire ends or a massive gob of solder. Figure 5.42 illustrates the correct placement of the wires. Get the polarity right or you will burn something out when you turn it on.

The positive wire from the toggle switch and the ground wire from the battery pack can be soldered to the other end of the voltage converter, as shown in Figure 5.43. The correct polarity is marked on the voltage converter. The positive side on the input of the voltage converter is the ground side on the output, so don’t be mislead.

Figure 5.43. Input wires soldered to the voltage converter. The converter has markings for power and ground.
Figure 5.43. Input wires soldered to the voltage converter. The converter has markings for power and ground.

You can trim the wires before soldering somewhat, but leave plenty of slack so that you can easily move the electronics of this robot to a new chassis in the future. The wire from the battery pack will be stranded. It is a good idea to put a small amount of solder on the strands after stripping (tinning the wire) and before inserting it into the top of the pad on the voltage converter for soldering.

At this point the prototyping board can be secured. Tighten four nuts all the way down on four screws. Insert the screws through the prototyping board and into the nylon standoffs. Hold the standoffs steady while you tighten the screws. The screws will not tighten all the way down. Once the screws are as far in as they will go, you can tighten the nuts you put on them down to the top of the prototyping board. These screws provide and excellent location to secure accessories to the basic Bootstrap model. A fully mounted prototyping board is shown in Figure 5.44.

Figure 5.44. Prototyping board screwed into the top of the standoffs.
Figure 5.44. Prototyping board screwed into the top of the standoffs.

Lastly, the ultrasonic sensor and wheels can be mounted. If your sensor does not have its pins labeled on the back, you will need to write down their order when looking at the back of the sensor (most likely it will be Gnd, Echo, Trig, Vcc from left to right when viewed from back–but check). The sensor slides into its mount. A set of four jumper wires attach to the leads on the sensor. Two screws (inserted from the bottom of the chassis) and nuts secure the assembly to the chassis. Run the jumper wires under the prototyping board and out the back. These can be looped over and inserted on the left side of the board. The jumper from Trig goes into the header pin closest to D4 on the Arduino (the data pin for D4, not the power or ground rail). The jumper from Echo goes into a header pin closest to D5 on the Arduino. The jumper from Vcc goes into a header pin on the positive power rail and the Gnd jumper goes into a header pin on the ground rail. Get these backwards and you may burn out your Arduino when you power up.

The final assembly task is to add the wheels. The wheels just slide on with the flat in the motor shaft aligned with the flat on the wheel hub. The side of the wheels with the raised teeth (for wheel encoders) goes inward toward the chassis. The wheels should go on as far as possible without rubbing on the mounted motors or the chassis. When they are all the way on they will be difficult to remove. Figure 5.45 shows a completed assembly with the ultrasonic sensor and wheels attached.

Figure 5.45. A completed Bootstrap, with ultrasonic sensor and wheels installed.
Figure 5.45. A completed Bootstrap, with ultrasonic sensor and wheels installed.

Congratulations! You have a fully assembled Bootstrap. Don’t power it up! In the next section there are some simple tests to complete before adding power.

6. Testing and Code

Initial Unpowered Testing

Before powering Bootstrap up for the first time there are a few tests you can do to make sure you are less likely to have a catastrophic short.

  • Check your wiring work against the pictures in the assembly instructions to make sure everything is where it belongs.
  • Examine all of your connections carefully to make sure you don’t have any shorts across uninsulated wiring–two uninuslated wires should never touch. You don’t need to remove the prototyping board to examine the bottom side if you checked that carefully during assembly.
  • Check you polarity assignments one more time, using your multimeter in audible continuity mode. Put one probe on the positive pad of the output of the voltage converter. You should get continuity to any header pin in the positive rail, the 5V pin on the Arduino, the VIN and the VCC pins on the motor controller, the power (inside) wires on the bump switches, and Vcc on the ultrasonic sensor. Switch the probe to the negative output pad on the voltage converter.  Now you should get continuity to any header pin in the ground rail, the GND pin on the Arduino, both GND pins on the motor controller, and Vcc on the ultrasonic sensor.

Now give it some power. Insert a mini USB cable into the arduino on Bootstrap. Insert the other end of the cable into your computer. The power lights on the Arduino and the voltage converter should light up and your computer should recognize that you have plugged in a USB device.

Code Examples

If you have an older version of the Arduino software, it is a good idea to bring it up to date at this time. Bootstrap was developed using versions 1.0.6 and 1.6.1.

In order to download and run the following code examples to Bootstrap you need to first:

  • Install the correct drivers for the version of the Arduino Nano you are using. It’s a good idea to make sure you can communicate with your Arduino before proceeding by downloading an example sketch such as Blink to it.
  • Install the NewTone library, which can be found here. NewTone is required for the buzzer in the code examples on this site.
  • Install the NewPing library, which can be found here. NewPing is required for the ultrasonic sensor in the code examples on this site.

If you have not installed libraries in the Arduino development environment before, it’s quite easy. After you have saved the zip file containing the library to your downloads folder, open the Arduino software. Select Sketch > Import Library > Add Library. Then you just click on the downloaded zip for the library to install it. When you are done the new libraries will show up at the bottom of Sketch > Import Library.

Test program

Next download the bootstrap test program

Bootstrap_test

This is a zip file. Unzip it and open it with File > Open in Arduino. The software will create a folder for it and open it.

Attach your Arduino to your computer via a usb cable and run the test program. You will want to open the serial monitor (under Tools) as soon as the lights stop blinking on the Arduino as the serial monitor displays messages taking you through the test. You will also want to hold Bootstrap in the air by the back of the chassis so it does  not drive off your desk during the motor tests.

The test program will do the following, displaying information and prompts on the serial monitor:

  1. Play two tones on the buzzer
  2. Turn the right motor forward at 1/2 speed
  3. Turn the right motor forward at full speed
  4. Turn the right motor in reverse at full speed
  5. Turn the left motor forward at 1/2 speed
  6. Turn the left motor forward at full speed
  7. Turn the left motor in reverse at full speed
  8. Turn both motors forward at full speed
  9. Test the ultrasonic sensor by having you move your hand toward it
  10. Test the left bump switch
  11. Test the right bump switch

After the testing is complete there is a 5 second delay before the sequence repeats.

If your Bootstrap passes all these tests, try disconnecting it, inserting batteries and switching it on while on a smooth floor to see if it runs through the same tests on under its own power (you will need to remember to trip the ultrasonic sensors and the bump switches after test 8).

If your Bootstrap does not respond properly at any step then you know something is not correctly hooked up at that point in the system.

If both of your motors are turning but in the reverse direction indicated in the tests. the simplest thing to do is to unscrew both of them and flip their sides on the chassis. If you have other problems with the motors you can change the pin assignments in the test program (and all other programs provided on this site) instead of resoldering connections, if you prefer (see line 33 in the test program).

The test program is not meant to be an example of efficient programming–everything is done as transparently as possible with heavy comments for study purposes.

7. Variations

Building Bootstrap without a 3D printer

If you don’t have access to a 3D printer you can still build  Bootstrap. This variant will be illustrated with 6mm (1/4″) plywood for the chassis, but any stiff material of the same thickness that can be easily cut and drilled will work. Be careful with expanded PVC sheet (aka Sintra, PVC foam board). It’s great stuff but it gives off toxic fumes when it reaches its very low melting point. Work it with slow speed tools in a well ventilated area and wear a proper respirator if you are drilling or cutting at high speeds (and especially if you are using a Dremel type tool–which is not recommended because it will melt rather than cut the plastic).

In addition to a 150mm (6″) square blank for the chassis, you will need will need to fabricate a bumper and purchase the extended gear motor brackets and 1/2″ castor ball & mount from Pololu, and a HC-SR04 ultrasonic sensor mount as specified at the bottom of the materials page.

Once you have the materials, download the following .zip file:

Bootstrap_templates

The archive contains two files. The first is a .pdf template which can be printed for hand cutting and drilling. The second is a .svg vector file which you can use if you are cutting your chassis with a CNC machine or laser cutter. For clarity the .svg file does not contain the counter sinks (pocket operations) required for some screws. You can add these in the software for your machine by editing the .svg file before generating your g-code, using the information in the .pdf file as a guide.

If you are cutting the chassis by hand, print the .pdf template file, trim it to fit your chassis blank after making sure your printer produced the outline in the correct dimensions as specified on the template (use “print actual size” not “print to fit page”), and then temporarily attach it to the bottom of your chassis with spray adhesive or a glue stick–anything removable.

It’s your choice as to which side of your chassis blank you use as  the bottom of the robot, depending on if you want the switch to be on the left or right once it is flipped over. A right side switch is shown in the main instructions and a left side switch (which will require longer runs of wire) is shown here. If you choose to put the power switch on the left side assemble the underside components with the wired side of the battery pack and diode on the left (switch) side of the chassis.

To process the chassis blank it’s best to start by drilling the holes with a 2mm (5/64″) drill bit and then drilling the required counter sinks as specified in the .pdf file. It is important to drill these holes very accurately–go slow and use a drill press if you have access to one. Be especially careful with the counter sinks, it is easy to drill all the way through the material, at which point you will have to start over with a new blank. Once you have the holes and counter sinks done, drill a hole for the switch. A 6mm (1/4″) bit will do this. Next saw out the slot around the switch hole and the outline of the robot. A scroll saw with a narrow blade will be fastest, but it can be done by hand with a coping saw. Accuracy on the sawing is not as important as with the drilling. Finally, saw out the rectangular opening in the middle. The best way to do this is to drill the corners first with a bit wide enough to accommodate your saw blade and then insert the blade in one corner go around the rectangle to finish the job. You don’t have to be super accurate but don’t make it overly long if you are planning to add a servo to that slot.

A prepared chassis is illustrated in Figure 7.1. It was cut on a CNC machine from 6mm plywood. The counter sink holes were manually added with a drill.

Figure 7.1 Chassis after drilling, counter sinking, and cutting.
Figure 7.1 Bottom view of chassis after drilling, counter sinking, and cutting.

 

Drilling holes for the ultrasonic sensor mount is next. These mounts vary somewhat among manufacturers so holes are not included in the template. It’s probably easiest to drill holes in your chassis to match those in the mount, although it can be done the other way around. The mount needs to be centered at the front of the rectangular hole in the chassis. There is a tight clearance between the pins for the jumper wires on the back of the sensor and the edge of the prototyping board. Thus it is a good idea to “dry fit” the prototyping board, the mounted ultrasonic sensor and the switches by placing them over their proper mounting holes before drilling. Figure 7.2 shows these components temporarily in place on top of the chassis.

Figure 7.2 Dry fitting the ultrasonic mount.
Figure 7.2 Dry fitting the ultrasonic mount.

 

The Pololu castor wheel with its mounting hardware fits into the narrowly spaced holes at the back of the chassis (where the 3D printed castor mount fits into the widely spaced holes). In addition to the material supplied in the kit from Pololu, you will need two nylon standoffs, two 12mm screws, and 2 nuts for the screws. Figure 7.3 shows the Pololu castor installed in a partially completed Bootstrap. If you find that this arrangement does not allow your Bootstrap to sit level after the wheels are installed, you can try different arrangements of the included spacers and nuts until you are satisfied.

Figure 7.3 Pololu castor mount sequence.
Figure 7.3 Pololu castor mount sequence.

 

The Pololu gear motor brackets are essentially identical to the 3D printed units and mount the same way as described in the primary assembly instructions.

The final component is the front bumper. As discussed at the bottom of the materials page, aluminum flashing works best for this, although other materials can be used. Strong double sided tape is a good method for mounting the bumper to the level switches. Be sure to mount the top edge of the bumper flush with the top edge of the switch levers and no higher or it will interfere with the ultrasonic sensor. If you do find that the sensor is detecting the top of your bumper when finished you can raise the sensor by placing nuts under its mounts, tilting it back a bit in its mount, or possibly by lowering the bumper. A Boostrap mock up with a flashing bumper is pictured in Figure 7.4

Figure 7.4 Bumper and ultrasonic sensor installed
Figure 7.4 Bumper and ultrasonic sensor installed

 

 

Maker Tech Education