<<< Back to Eric's Robots

Bug Brain

Picture of BugBrain robot

BugBrain is my first robotics project that started with a kit I purchased off of the Internet. I added the programming and a Infrared object detection sensor. I brought the robot to the Atlanta Hobby Robot Club (AHRC) Robot Rally in May 2004 and won first prize in the Open competition!

Three bug bots: Tim and Ben Klein's robots Spider and Caterpillar (foreground) with BugBrain at the AHRC Robot Rally
2004 Robot Rally Open Competition Award

BugBrain started as a kit purchased from Yost Engineering The kit comes with a processor, development kit, printed circuit board, and most of the electronic and mechanical parts you see on the robot. I added the brown daughter board that sits underneath the front of BugBrain and the eye stalks that give BugBrain vision capabilities. The vision circuit was designed by AHRC member Dale Heatherington. I re-programmed the BX-24 processor from NetMedia to use the vision circuit and arranged the functionality of the robot into different tasks.

What does it do?

Not a lot - keep in mind that BugBrain is my first robotics project. The kit is good for learning, but not of much practical use. The robot can walk on smooth, flat surfaces. It can sense when it bumps into an object with its feelers, play sounds out of its speakers, and blink the LEDs on its circuit board. I added the vision circuit so that it could sense objects and take an action. The vision circuit is currently configured so that objects about 2-3 feet away can be detected. Further than that, and the detection is flaky. By adding more LEDs the range could be increased.

Currently, BugBrain is programmed to wait until an object comes into view and then walk toward it. It senses whether the object is to the left, right, or in front of the robot. The LEDs on the front of the circuit board flash to indicate the output of the vision circuit. A Green LED flashing on one side means the object has been detected on that side. When it feels the object with its bump sensors, it plays a sound, backs up, and turns.

Could I do that myself?

Certainly! To put together the BugBrain kit you need to use a soldering iron. To program the robot you need a PC running Microsoft Windows. It is helpful to have some basic programming skills if you want to change the program. The kit costs about USD $170. There are many other robotics kits out there for all ages, interests, skill levels, and price ranges. You can find them at toy stores, hobby shops, or online stores specializing in hobby robotics.

I have made the source code available for Download if you want to try it out.

How does BugBrain Think?

BugBrain is controlled by a BasicX microprocessor made by NetMedia (www.netmedia.com). The program is arranged into four separate tasks that control and monitor the different subsystems of BugBrain.

Drawing of BugBrain with different subsystems
LED Task Controls the blinking of the LEDs
Vision Task Controls the Infrared sensors and reads the Antenna sensors
Walking Task Moves the legs of BugBrain in any of 8 gaits.
Main Task The main control task. Reads the state of the Vision Task and sets the state of the Walking Task in order to try to find an object and bump into it.

How does BugBrain Walk?

Although BugBrain has 6 legs, only two of them move. BugBrain uses two servo motors to control the two center legs. The program has several different walking gaits programmed as state tables. The walking program chooses a state table based on the currently selected gait, and then moves the legs to different positions based on the values in the state table.

Diagram of BugBrain walk states

The legs have nine positions that the state table walks through. The state table is designed to move the legs through the nine positions in order to move the robot in the desired way (Forward, Reverse, ForwardLeft, ForwardRight, ...)

How does BugBrain See?

BugBrain is equipped with an infrared vision system that can detect objects and tell whether the object is in front, to the left, or to the right of the robot. It can also give some indication of how far away the object is, but it is not terribly reliable because different objects reflect infrared light differently.

Diagram of infrared object detection

The Vision task pulses power to the infrared LEDs in BugBrain's eyes several times a second. The sensor located at the base of the eye stalk reads the amount of infrared light reflected back to the robot. The sensor also takes a reading of the infrared light without any infrared LEDs on to measure the ambient light setting and cancel that out of the calculation.


Home | Contact Us       Copyright 2008 Eric Z. Ayers

FOR TESTING ONLY: Please disregard

GWT Ads Manager

Naked JavaScript Ads Manager