Inside a Robot that Solves Mazes

(article continued from previous page)

The All Right robot was made to compete in a local line-maze robot contest. The semi-transparent lid has a power switch, push buttons, and an LCD display. This page of the article describes what’s underneath the lid.

Guts of a line-maze solving robot with the cover removed.

Guts of a line-maze solving robot with the cover removed.

The robot’s base is made of 3/16-inch thick black ABS plastic. Between the base and the cover are:

Underside of smoke Plexiglas shows wiring with common ground.

Underside of smoke Plexiglas shows a black wire that is common ground.

In the center of this picture is a green circuit board that is the back of the LCD. This is not a PCB that I made myself; it was purchased. It has a standard 14-pin connection and Hitachi-compatible LCD-controller chips.

The acrylic cover has six pieces attached on it. As you can see from the last two pictures, there are many wires going to the lid.

I tried to reduce the number of wires somewhat by using only one ground wire for all of the pushbuttons. The black ground wire comes from the main circuit board and then connects to each of the switches sequentially.

I could have saved a few more wires if I had thought through it more carefully. If the power switch had connected to ground, instead of the positive terminal, then the pushbutton common ground could have come from the power switch. Additionally, the ground wire going to the LCD could have been shared.

Clear shrink-wrap tubing encloses many wires.

Clear shrink-wrap tubing
contains loose wires.

Wiring can quickly overwhelm feature-rich robots. Several techniques were tested in this robot’s design to corral the loose wires. One of those techniques involved bundling discrete wires in a flexible plastic tube.

For example, ten wires connect the LCD to the microcontroller. Before soldering the wires to the connector, the wires were fed through a piece of clear shrink-wrap tubing. Unlike the usual practice, the heat-shrink tubing was not heated, because I wanted it to remain flexible.

This method worked fine for keeping the LCD wires from getting in the way or becoming entangled. However, perhaps the main circuit board should have been attached to the lid so that the buttons and LCD could simply have been soldered directly onto the board.

Another choice would be to use multiple processors and communicate between them with a two-wire serial interface. Although this complicates the programming, it would allow one microcontroller to concentrate on reading the sensors and driving, while the other cared for the buttons and the display.

Homemade Spacer Posts

Here’s a closer look at the posts that hold the cover.

Polycarbonate spacer posts.

Polycarbonate spacer posts.

The spacer posts are 1/2-inch diameter plastic rods with holes drilled in both ends. The holes are then tapped for screw threads.

Interestingly, this robot was built shortly after I finished writing Intermediate Robot Building. The spacer posts (page 401) are just one of many features incorporated in this robot that are described in greater detail in that book. Therefore, I'll continue to reference the book’s page numbers throughout this article.

Microcontroller main circuit board with motor drivers.

Microcontroller’s main circuit board with motor drivers.

All Right’s main board contains:

The serial EEPROM is interesting as it allows the robot to be able to store completed mazes. Thus, the robot can retrieve the maze later on and compute the shortest path to minimize runtime on a subsequent attempt. The ChiBots rules encourage this.

Circuit board stacks showing various spacers and a reflection of underside components.

Circuit board stacks showing various spacers and a reflection of underside components.

Just like Roundabout, this robot has a motherboard and a daughterboard. The circuit boards pass power and signals through a 0.1″-spaced header connector (pages 346-357 IRB). In this case, multiple headers are stacked together so that there is room between the boards for the two brown Molex connections and ribbon cables.

As you can see, various heights of spacers are used throughout the robot. There are short spacers beneath the bottom board to make room for the ends of the soldered leads and to provide space for the surface-mount components hidden down there.

Don’t be fooled by the photographs of the tops of the PCBs into thinking that I don’t use capacitors or resistors. I just find that I can cram more components onto a board if I stick the SMT capacitors and tiny resistors underneath.

So far, we’ve only examined the LCD and microcontroller circuit boards. There are actually seven PCBs on this robot. Let’s pull off the microcontroller board and look under the robot’s base to find the others.