Braitenberg "Vehicles", Sensor Programming and original Lego robot designs
Most of the items on this page were developed while working on the main project of the COMP371 - Artificial Intelligence course which focussed on cognitive psychologist Valentino Braitenberg's book "Vehicles" and the thought experiments proposed therein. There, Braitenberg suggests that behaviors resembling living organisms can be manifested in relatively simple robots. Complex behaviors like Love and Fear, according to Braitenberg, become easily observed when the robots exhibit specific reactions to various stimuli.
This project took the thought experiments proposed by Braitenberg and implemented them in Lego with programming in Java. For more details on this fascinating concept, check out the Braitenberg Project.
As the original assigment for COMP371 - Artificial Intelligence only required implementation of the first five Braitenberg Vehicles, a considerable amount of extra work was required in order to implement the additions to project of Vehicle Seven and Eight. This effort is detailed in the Sensor Programming and Lego Robot Designs sections.
Why Lego?

It may seem like an unusual decision to incorporate Lego into a University curriculum. However, this rapid-prototyping hardware system contains a robust microcontroller with many sensor and motor configurations, great third party support for sensor accessories and can be programmed in many common languages, including Java.
The model to the left was used for a fuzzy-logic experiment in navigation and was the prototype for the tricycle steering platform robot, seen below.
Comparison between the Lego RCX and Mars Sojourner
This table compares the major computing and technical differences between the Lego RCX and the on board computer that NASA and JPL used for the Mars Sojourner. The intent of this comparison is to demonstrate that complex autonomous vehicles can be built with simple computers; not to disparage the efforts of the engineers at JPL.
Who wins in this comparison? I'd call it a tie for most things, but I doubt that Lego a Lego robot could survive the 'tumble-landing' that Sojourner could.
| Lego RCX Programmable Brick | Mars Sojourner Rover | |
|---|---|---|
| Original Deployment Date | 1998 | 1997 |
| CPU | Motorola H8/300 | 80C85 (Radiation hardened on custom board) |
| Data Bit Size | 8 bit | 8 bit |
| Address Bit Size | 16 bit | 16 bit |
| Clock Speed | 16 Mhz | 3 Mhz * |
| Instruction Speed | (researching..) | 100 KIPS (or 0.1 MIPS) |
| On-chip ROM | 16 KB | (researching..) |
| On-chip SRAM | 512 B | 0 B |
| Addressable Memory | 64 KB | 64 KB |
| Motor Control System | Pulse-width modulation (7 levels) | "Bang-bang" motor control |
| Optimal Programming Language | C | Assembler |
*Exact details of clock speed were not available and based on estimates.
Braitenberg AI Project
| Principles of a Braitenberg Robot |
|
|---|---|
| Goals of the project | The robot was designed and programmed to exhibit characteristics from three of Braitenberg's vehicles:
|
| Final version of vehicle used in demonstration | Although this model is relatively small, it carries some interesting design principles:
|
| What does this robot actually do? |
|
| Documentation |
Click here for the report that was submitted with this assignment (PDF). |
Original Lego Robot Designs
Tricycle Steering Platform with LiftarmThis model is currently being used as a testing platform for fuzzy logic navigation. The goal of this experiment is to ascertain the applicability of fuzzy logic in steering systems. The results of the experiment will be used for this robot's next role in the Web-controlled Robot application. Features of this robot:
|
||||||
|
Short, but tough This robot was made to be quite robust (as robust as Lego can be) by using beams and arms to reinforce construction. Internally, motors mounted at the rear and drive a worm gear and axle up to the front wheels. Each axle has a coupler on it with irregularities which hit the touch sensor twice per axle revolution. This slideshow has three images. |
|
Popping the hood This image shows the two internal touch sensors that monitor the speed of the drive axles. For those not familiar with Lego robots, the touch sensors are located near the bottom left and bottom right of this picture and are immediately beside the two blue axles. In testing, this system worked very well. However, it made quite a racket when it ran.
|
![]() |
Tricycle Steering Platform Prototype
Much longer than the current version of this robot (above), this robot was made to test some building and motor/sensor implementation designs. In many ways, it is the same as the final version with the exception of being longer, taller, less stable, heavier and doesn't have a rotation sensor on the steering.
Instead, a touch sensor is used to detect when the steering arm is set to dead center (vehicle going straight). The major problem with this is that there is no way to tell exactly how much the steering arm has turned - only through timing can any level accuracy be attained.
Long steering arm The steering arm, which is connected to the smaller wheel, is much too long and was redesigned for the current version. Mounted on top of the steering arm is the light sensor. This allowed the robot to take a scan of the area without moving by simply stopping and sweeping the steering arm back and forth while monitoring the light sensor. However, testing showed that the light sensor returned inconsistent values because of its sweep angle. This slideshow has three images. |
Sensor Programming
Sumo 'bot
Sumo for Robots This robot was built from a kit and was used in a competition of Sumo 'bots at Thompson Rivers University. It uses a fairly simple microcontroller that is not as complex as the Lego system but still can be programmed. There is no Java Virtual Machine for this device as it is not powerful enough, so programming was done in C. Programming principles learned during the Braitenberg project helped program this robot to do some interesting things like using stationary rotations to "scan" for the other Sumo 'bot. The competition was pretty short for this project as it was eliminated in the first round, but at least it won the first heat! The future for this robot is uncertain, but some ideas are being considered. This slideshow has two images.
|

