Read an Excerpt
The Bug is a simple, differential-drive robot that was originally built to compete in a MINDSTORMS robot competition. The goal for the competition was to create a two-wheeled vehicle capable of navigating a figure-eight-shaped course. That original Bug was quite different from the one shown here. It didn't have a bumper, and the light sensor was mounted on a spar that extended from the front of the robot. The sensor was used to track a wide black line that ran down the center of the path the robots were to follow. Unfortunately, the Bug was disqualified when the contest director decided to allow only robots with a "bicycle-style" wheel configuration to enter the competition. As is the fate of most LEGO robots, the Bug was disassembled, its pieces returned to the parts bin.
The Bug was reincarnated almost a year later as part of a MINDSTORMS presentation given to generate interest in the FIRST LEGO League (FLL). I had purchased some Robotics Discovery Sets (RDSs) and wanted to use them as part of the demonstration. The RDS includes a blue programmable brick called the Scout. The Scout is programmed using the LCD and four buttons mounted on its faceplate; no external computer is required, and it only takes about five minutes of instruction before children can start writing their own robot control programs for it. A common Scout program for the Bug required it to wander around seeking light or darkness using the Scout's built-in light sensor. I added a forward-facing bumper to help the Bug navigate around obstacles, which you see in this version of the robot.
When doing presentations like the one at the FLL, I usually bring between eight and 10 robots: a variety of two-, four-, andsix-legged walkers, Killough platforms, synchro drives, photo copiers, pick-and-place robots, and so on. But most people zoom right in on the Bug, perhaps because of the combination of its cute appearance, wobbly gait, and unusually inclined wheels. It's very common to hear the question, "Why did you put the wheels on that way?"
A two-wheeled robot like Bug is only stable if its center of gravity (COG) is lower than the axis of rotation of the wheels. If the COG is too high, the robot will tip over. The farther below the axis of rotation the COG is, the more stable the robot. The Bug is unusually stable for a two-wheeled robot. You can tip it more than 45 degrees forward or backward and it will return to an upright position. Adding off-center weight (such as the bumper and light sensor) has little effect on its attitude. It's even capable of climbing a gentle grade, or traversing small obstacles. The secret to the Bug's stability is the extreme camber of its wheels. When you look at the Bug from the side, the wheels appear to be elliptical (oval-shaped) instead of round. The flattened bottom of the ellipse closely matches the curvature of a circle with a much larger radius then that of the Bug's wheels. In fact, the 63 degrees of camber make the axis of rotation higher than that of a robot whose normal-oriented wheels (those oriented perpendicular to the ground) are twice the size of the Bug's wheels.
In addition to the base robot design for the Bug that is shown within the pages of this book, note that two alternative optimizations exist for the Bug: a line-following version and a proximity sensor version. Building instructions and programs for all versions of the bug are available for viewing and for download at the Syngress Solutions Web site (www.syngress.com/solutions).