Drilling and Milling a Candy Container for a Robot’s Body

(article continued from previous page)

The creation of the Monkey Mints line-following robot was inspired by a colorfully silkscreened and stamped steel candy tin. This page describes how the container is machined to include holes for fasteners, wheels, and photosensors.

Unlike most rectangular robots, this one is based on an irregular curvy body. That makes it difficult to calculate the relative positions of the holes. Further complicating matters is that this robot is so small that there isn’t much space to provide buffers between parts to compensate for minor inaccuracies in drilling.

The parts could be placed in the tin and then their mounting holes marked with a pen. That’s not a bad solution, but I wanted to try for computer-assisted accuracy.

Calculating Layout Coordinates from Photographs

The circuit board and micro gear motors are laid out in the container and held in place with sticky-tack adhesive. That’s the blue or white clay-like material that is commonly used to hold up posters.

A ruler is placed beside the parts and a digital photograph is taken.

Drill coordinates based on photo in Visio.

Drill coordinates based on photo in Visio.

The photograph is imported into a computer drawing program, such a Microsoft Visio. The image is resized until the ruler markings match the scale in the drawing software. Now, when points are marked on the image, the drawing program can compute the relative positions.

Well, that was the idea, anyway.

It turns out that there is significant barrel (fisheye) distortion in my camera’s optics when shooting macro photos. When the image size matches the scale on the ruler, the 0.1-inch spaced connectors at the center of the image are computed as being farther away than 0.1 inch.

Eventually, I settled for a compromise that resulted in the ruler being about 5% too small, the center about 5% too large, and everything else somewhere in-between. This was good enough to compute all of the coordinates for machining.

Machining on a Drill/Mill with a Paper Template

The layout template is printed from the computer, cut out, and taped to the Monkey Mints container.

Metal container milling setup with template and wood.

Metal container milling setup with template and wood.

The container is placed in a machining vise. Rectangular blocks of wood protect the paint on the edges, as well as align the container with the back of the vise. The wooden blocks at the back need a gap in the middle, or else the curves on the front and the back of the container would allow it to pivot.

Milling out photosensor openings with a 1/16th-inch diameter end mill.

Milling out photosensor openings with a 1/16th-inch diameter end mill.

The holes are drilled at the points marked on the paper template. This can be done manually by eye or by moving the milling machine’s x-y table to the specified coordinates using an electronic DRO (digital readout) display.

After the holes are drilled, you have a choice to take some extra time to do a reliable setup, or you can “save time” with a riskier setup. As we'll soon see, I chose the riskier setup and preceded to mill away the window slots for the photosensors. Since that seemed to work fine, I pushed my luck even further and began milling the wheel cutouts.

The wheel holes are big enough that I could switch to a 1/8-inch diameter end mill. Thicker end mills are less likely to break during machining. However, they put additional force on the workpiece since more material is being removed.

Milling a diagonal tear in a container that was not secured properly..

Milling a diagonal tear in a container that was not secured properly.

Although metal containers look sturdy, they’re engineered to use only enough material to protect their contents. As such, they can be crushed fairly easily, such as when they’re placed in a machining vise. Cognizant of this fact, I was too gentle when I tightened the vise jaws on the Monkey Mints tin.

When the 1/8-inch diameter end mill grabbed onto the metal, the loosely-held container and wood blocks started slipping to the side. This created a diagonal rip even through only the y-axis was being changed.

Although significant cosmetic damage was done, I was fortunate that the entire assembly wasn’t thrown across the room or into me. I should know better than to break the #1 rule of machining: Always properly secure the workpiece.

As soon as the couple of holes had been drilled, the curvy workpiece should have been removed from the vise. Screws can be fed through the holes to attach the workpiece to a solid square base (a fixture). The fixture can then be bolted to the drill/mill table or placed into the vise, with no risk of slippage.

Alternatively, but still sloppy, I could have at least kept the lid on the container during machining. The lid would have strengthened the container structure, allowing the vise to be tightened further.

Drilling holes in the corners and then milling the slot by eye.

Drilling holes in the corners and then milling the slot by eye.

To recover from this error, I drilled 1/8-inch diameter holes into the corners of the wheel slots. (The downward force of the drill has less of a side-to-side force than milling.) Then, I switched back to the narrower 1/16-inch diameter end mill to cut out the slots by eye.

As you can see above, that approach worked pretty well.

Remove metal spurs from the candy container.

Remove metal spurs from the candy container.

Finally, much like the sheet-metal case on the Flip-Flop robot, this container has a lot of sharp edges and burrs after machining. If it remains as-is, the motors and motherboard won’t sit flat and electrical wires may get cut.

All of the machined holes should be ground flush with a Dremel grinding stone. Then, the edges can be smoothed with a fine-grit impregnated rubber polishing point accessory.

I am slightly concerned about the container rusting now that there is exposed steel. It could be protected with an acrylic spray coating or possibly even clear nail polish.

Accuracy of Results

Despite several problems in imaging and machining the container, the parts actually line up very well inside the finished body. Because the screws pass through the metal, the holes have a little bit of slack that allows for minor adjustments. I’m pleasantly surprised with how it turned out.

There is still a little more machining left to do on this robot. It needs spacers to hold the electrical circuit board away from the metal body. In addition, the motors need wheels.