by Bill Boyers and Ron Brandenburg
21 April 2001
Take two self-employed bikers — one into computers and electronics, the other a machinist, add a machine shop, a Basic Stamp and a trip to Wal-Mart, and this is what you get.
In The Beginning . . .
We originally had no clue as to where we were headed. Rick was working on a robot and asked me to machine some hubs for his wheels. When I was done, I said “what the heck, I’ll build a robot too…” It was downhill from there.
We had a vague idea of where we were headed, so I ordered the motors and battery from Jameco, and paid a visit to Wally World for some scooter wheels. A visit to the local scrap yard yielded a big 0.190″ thick aluminum plate for the chassis.
The original plan was to make a jig with a fixed center to cut a circle out of the aluminum plate using a bandsaw. Just put a hole in the middle of the plate and rotate it into the saw blade to cut a circle. On paper this looked good, but it didn’t really pan out due to the thickness of the metal. We wound up marking a circle on the plate and cutting it by hand to the approximate size on the bandsaw. Using the hole drilled previously, we turned the disk to size on a large lathe.
The wheel hubs were easy. We pressed the bearings out of the wheels and machined a hub to press into the wheel and mount
it to the 1/4″ motor shaft. A thick washer and bolt secure the wheel onto the hub. A large shoulder was left on the motor side of the hub to mount the encoder wheel. A single set screw holds the hub on the motor shaft.
The cutouts for the wheels were done on the bandsaw, drilling a hole in inside the corners to provide a radius rather than a sharp corner. The whole thing was cleaned up on a belt sander. So far so good.
The motor mounts were a bit more difficult, as the drawing for the motor was metric, and the dimensions were very approximate. The position of the shaft and the mounting holes didn’t make it too easy to take measurements either. We opted for some 1 1/2″ x 1 1/2″ x 1/8″ aluminum angle from the hardware store so we could mount the motors as the manufacturer intended. I won’t even mention trying to find 3 millimeter screws and washers, let alone cutting them to length.
Trying to plan ahead, we positioned the offset shafts on the motors to give the least ground clearance. As soon as we started trying to mill some slots in the motor mounts to adjust the position, we discovered the aluminum from the hardware store was very soft — worse to machine than plastic.
At this point we hadn’t looked at casters. We assumed we would find something that would work with what we had already done. Unfortunately, the smaller furniture type swivel casters we found did not swivel very well. We contemplated making our own casters, then decided to use ball casters — I spent considerable time trying to find a source.
When we finally got the ball casters, we found the motor mounts were too low. We made another set and rotated the motors to increase the ground clearance. The ball casters were still too tall, so we had to mount them on the chassis from the top, rather than the bottom. This involved cutting a rather large hole in a thick aluminum plate with a hole saw — not for the timid.
At this point we had a rolling chassis, but had no idea what controller we were going to use or how we were going to mount the encoder optics.
- Next time use thinner material for the chassis.
- Spec out your wheels *and* casters before mounting things.
- Slotted holes allow you to compensate for inaccurate dimensions — both theirs and yours.
- The aluminum they sell at the hardware store is really soft, which makes it hard to machine,
especially when you have to do it twice.
Here are some photos of the robot chassis during early construction.
Step 2 . . .
Once the chassis was done, we mounted the optics for the encoder wheels, and picked a controller and motor controls.
The mounting for the optics came to me in a dream. Actually we figured a nice machined piece would look better than a
bracket, and we could mount it on a slot for easy removal. Here we are again machining this soft aluminum. Hope I don’t
mess up an endmill. Snap! @#&’*!! The optics and the cable also came from the scrap box from work.
Totally clueless about controllers, not wanting to learn C or assembler yet again, and finding a wealth of
information on the Parallax web site, we chose a BS2sx, an Activity Board and a couple of MotorMind B modules. The plan
was to get everything pieced together and figure out how it would work best.
Knowing that I screw up alot of stuff when I make it permanent, I decided to mount the MotorMind B modules on a single
board and make them plug in — that way they could be swapped / replaced easily. We also decided to use screw terminals
for all of the connections so things could be moved and rewired as the robot evolved.
After toying with several options, I decided I would plug the MotorMind B modules into a standard header and hold them
in place by a nylon standoff and a Lexan piece slotted to fit the top of the board. The circuitry related to the encoder
optics was also built onto the board to simplify things.
The next step was to temporarily mount all of the electronics to the robot until we could figure out the battery
situation and final board mounting. The local plastics place packed up and moved to parts unknown shortly before we
stopped by. Figuring they threw out their scraps before they moved, we began contemplating other sources for plastic.
We eventually hit the local dollar store we refer to as “Aladdin’s Cave” in search of material. A $1 cutting
board fit the bill perfectly.
At this point it was also decided a couple of switches to turn off the controller and motors might not be a bad idea,
in the event of a malfunction or fire. We mounted the boards and switches to the cutting board and hooked things up.
Mysteriously, they all worked, although the MotorMind B modules did not always respond to commands or return an acknowledgement.
The cutting board was cut to shape on the band saw using the jig we made for cutting the chassis. At least we knew our idea
would have worked. We mounted the cutting board to the chassis with a long bolt, supported by a large PVC coupler.
The batteries were wedged underneath and we started playing around with the code.
At some point I ran out of ports and decided the Activity Board was not a good choice for a robot. Once I looked more
closely at the schematic, I found half the ports already have things hooked to them, which limits what you can do with
the port externally. This was also the reason the MotorMind B modules did not always respond to the commands that were sent.
Once the robot was “on its feet” we found that the standard scooter wheels did not work well on carpet or a
slick floor. While looking for other wheels, I ran across some off-road scooter wheels and ordered a set — good choice.
I also began pondering another board for the processor. I looked on the Parallax site and decided $50 is kinda steep for a
DB9, a regulator and a piece of perfboard.
- The aluminum from the hardware store is still too soft, which makes it hard to machine.
- When you break your last 1/8″ end mill trying to machine the aluminum from the hardware store,
the supplier will be out of stock on a replacement.
- The Activity Board is good if you want to play with sounds, lights, buttons and stuff, but not a
good choice for a robot.
Here are some photos of Step 2:
Stage 3 . . .
So the robot is finally able to move around under its own control — what next? At this point I spent quite a bit of
time on the Internet looking at different sensors and mounting ideas to determine what to use. At the same time, we
cobbled together a set of whiskers to clamp onto the chassis so we could work on code.
One night, after some long hours in the shop and a few beers, we turned the robot loose in the kitchen and let
it run around. We quickly found it moved faster than it could react to the bump switches, which means it beat the
heck out of the kitchen cabinets. We refined whisker arrangement and code to account for this, and for the most part
the robot navigated without further damage.
We also discovered the robot stalled rather easily, after it failed to push a shoe out of its way. We decided in
the near future to go with slower, more powerful motors, and to press on with replacing the whiskers with some
In the mean time I had scrounged a couple of cheap servos out of a Cox RC plane I crashed several years back. I
started trying to write code to move the servos and had nothing but grief. The servos moved, but had alot of jitter.
I couldn’t find any pulse value that would work properly.
Assuming the servos were the problem, I bought a couple of the Futaba 148 servos, since they seemed to be popular
among the robot crowd. The new servos also exhibited the same issue. I put this project aside and started contemplating
how to use one battery to run everything, since batteries contribute the most weight to a robot.
At this point the motors and Stamp were running off a 12-volt gel-cell, and the MotorMind B’s and servo was
running off 4 C-cells — major weight here. I decided to get rid of the C-cells, so I built a regulator board to
power the motor controllers and servo.
Everything ran OK from one battery, despite what many people have claimed, and miraculously the servo problem
went away. The servo jitter appeared to have been caused by noise generated by the MotorMind B’s, which shared
the batteries with the servo. Apparently using a regulator and filtering suppresses the noise?
The next project was to mount the battery. We had chosen a single 4 Ah gel-cell for power, which is fairly
large. As it turned out, when laid on its side, it just fit in the center of the robot right between the motors
with a little room to spare on each side. No amount of planning replaces dumb luck.
We pondered several mounting schemes and finally decided to make four posts with V’s cut in them to hold the
battery by the corners. A plate on top would secure the battery and provide mounting for later stuff.
After several “sample” parts were made, we finally figured out how to determine where to cut the V
in the post. Two of the posts were further modified to allow clearance for the battery connectors and the posts
were mounted to the chassis. The electronics were remounted to the battery posts and the wiring was tidied up a bit.
After insulting the Jameco catalog again, we ordered and received two more motors of the same type with higher
torque and less speed. After removing the old motors and soldering wires to the new ones, I realized they were
not the same length. The gearboxes were identical in size and shape, but the motor itself was about 1/4″ longer. Oh Crap!
Dumb luck strikes again. The new motors just barely fit. If anyone asks, I’ll say I planned it that way.
- A heavy robot does not stop quick.
- Fast motors do not pull a heavy robot.
- No amount of planning replaces dumb luck.
- Sometimes you actually do have to work things out on paper, rather than pulling them out of you-know-where.
Here are some photos from Stage 3:
Plan B . . .
I finally threw in the towel and built my own Stamp board. I took a look at what I wanted to do, and decided
I would focus on the motor control and sensors to allow the robot to navigate — the servos and goo-gahs would come later.
Radio Shack sells a project board that fit the bill perfectly — plenty of real estate and power and ground tracks all
over the place. Not as good as making your own board, but much quicker. We found some locking connectors and headers in
the Mouser catalog and went to town.
While I was building the new board, I spent some time pondering the board and sensor mounting. The cutting board
thing worked ok, but it was flimsy and looked kinda crappy — not to mention it covered up alot of usable space
on the chassis.
We finished the new board and mounted it on the cutting board to test it out. Worked fine and there were no
problems talking to the MotorMind B modules. While mounting the sensors and tinkering with the code, I kept thinking
about the board mounting. In a moment of inspiration (aka more dumb luck), I discovered the new board just fit on
the front side of the battery — all I had to do was come up with a way to mount it.
This robot project was set aside temporarily while I worked on making a line follower out of a little RC car —
more on that later. I picked things up again at the end of the week and spent a very productive Friday the 13th mounting
the boards and sensors. Friday the 13th has always been a good day for me for some reason.
I machined a couple of flats on two of the battery posts and mounted the board using some 6-32 standoffs. The motor
control board was mounted to a small aluminum plate, which in turn was attached to the rear caster bolts. I had made
some temporary mounts for the sensors while I was testing them, and I figured they would work until I could do better.
All I have to do now is mount the power switch and sort out the battery wiring.
- Everything went too well — my measurements were accurate, the mounting holes lined up and things went
together without a hitch. I’m waiting for the other shoe to drop.
- Machining parts, especially on a mill, is about 95% setup and measurement, and 5% actual work.
Here are some photos from Plan B:
Well, here is the finished product. At this point we are not planning on making any more major changes to the
chassis and electronics. Future upgrades will be for sensors, servos and stuff as needed.
All we have left to is cobble together all of the bits of code we wrote while testing the motors, sensors
and stuff into something useful.