Encoder Front Page
SRS Home | Front Page | Monthly Issue | Index
Search WWW Search seattlerobotics.org

All Your Base Are Autonomous
Autonomous Analog Sumo Robot

The text and schematics of this page are available as a PDF document here.

Purpose: Entrant for OCAD 2002 Sumo Robot Challenge all your base. . .
Controller: Hardwired analog circuit with discreet logic gates
Sensors: 4 x Edge Sensor
4 x Bumper
4 x 38 kHz IR Detector
Locomotion: 2 x Tamyia High Power Gear Box
2 x Tamyia 56 mm Sports Tire
Power Supply: 4 x AA cell = 6 V (logic and sensors)
1 x 6 V lantern cell (motors)
Dimensions: 8.25" x 8.25" x 9.5" (width x depth x height)
Weight: < 2 kg
Status: 2002/05 - competed in OCAD 2002 Sumo Robot Challenge, won Judges' Choice Award
2002/06 - demonstration for Ottawa-area Scouts and Beavers


"All Your Base Are Autonomous" (Basey) was designed for competition in the autonomous class of OCAD's 2002 Sumo Robot Challenge. The rules included the following design restrictions and requirements:

Size: <= 12" x 12" x 12"
Weight: <= 10 kg
IR Beacon: 38 kHz emission over 360o mounted 8" to 10" from the playing surface. See official schematic.

Per general autonomous class sumo rules, the robot, without aid of an operator, must seek and push an opponent robot out of a circular ring; the first robot to leave the ring -- either pushed out by its opponent, or on its own accord -- loses the round. The robots begin each round at opposite sides of the ring, each facing clockwise (ie, not toward each other).


Basey is controlled by a simple circuit to implement the minimum behaviours needed by a sumo robot: seek the opponent robot, sense and approach the opponent, push the opponent, and stay within the ring without falling off.

The functional schematic of Basey can be seen here. Four each of edge, bumper, and infrared (IR) sensors actuate one of two motors in the appropriate direction via an L298 h-bridge, connected according to the L298 datasheet (STMicroelectronics, Jan. 2000, figure 6, where Rs=0).

The motors are powered by DC voltage from a lantern cell. There is no speed control by way of pulse-width-modulation or otherwise. One motor is mounted in the centre of the left and right sides of Basey, providing a differential drive scheme about the robot's centre. Small castor wheels centred at the front and rear of the base balance the platform.

Only the front sensors will be considered in the following behavioural description, as the rear sensor behaviour is symmetrical to the front along the motor axis.

When IR (from the opponent's IR beacon) is detected only to the left, the right motor drives forward, thus turning the robot toward the IR source; likewise, when IR is detected only to the right, the left motor drives forward, again turning Basey toward the IR source. When IR detected on both left and right sides, Basey drives straight ahead to the source.

Simple bumper switches are mounted on the left and right sides of Basey's front. Closing the left switch, via impact with the opponent robot, actuates the left motor forward against the bumped object; likewise, the right switch actuates the right motor forward against the bumped object. The left and right bumpers could be swapped to control the right and left motors, respectively -- based on effectiveness determined experimentally (ie, during competition).

Edge sensors mounted on each corner of Basey monitor the ring surface. Sensing the front left edge actuates the left motor backwards, and sensing the front right edge reverses the right motor.

There is no priority among the sensors. All sensor outputs are either logical one or zero, coupled directly to an associated OR gate for each of left forward, left reverse, right forward, and right reverse motor signals, which are connected to the appropriate h-bridge inputs. Due to the L298 functionality, simultaneous forward and reverse signals to the same motor cause that motor to stop. This inconvenience is accepted in exchange for a simple design requiring only two 4-input OR gates (4072) for controlling each motor.

A monitor circuit implements the "seek" function of the robot. The four motor signals are also connected to another OR gate, the output of which is connected to the reset pin of a 4-bit counter (74393), clocked by an adjustable oscillator (555). The 4th bit of the counter is connected to the trigger input of a one-shot circuit (555), which is connected to the motor signal gates, so as to rotate Basey by an amount determined by the width of the one-shot pulse. The oscillator frequency and one-shot pulse are calibrated such that Basey turns 90o after a few seconds of sensor inactivity.

basey inside
Basey's inner workings


The sensor schematics can be seen here.

The edge sensor comprises a voltage divider where one of the resistors is a photoresistor. A bright LED is positioned such that its light reflects off the playing surface and onto the photoresistor. Thus, when the sensor is positioned away from the surface (ie, over the edge), the LED light is no longer reflected onto the photoresistor and its resistance therefore changes. The resultant voltage change is detected by a comparator which provides the logical edge sensor output. The fixed resistor of the voltage divider should be determined according to the range of resistance of the photoresistor between illuminated (surface) and non-illuminated (edge) states. The potentiometer sets the trigger point (ie, comparison value) for the comparator.

The bumper is simply a normally open switch, the output of which is pulled to ground by a resistor. Closing the switch places a logical high on the output.

A Panasonic PNA4602M optical detector is used for IR detection. The PNA4602M demodulates data on a 38 kHz IR carrier. When no signal is detected, logical high is output, and when an unmodulated 38 kHz signal is detected, logical zero is output. An inverter is thus used so that logical high represents the presence of the IR signal. The PNA4602M is sensitive to circuit noise, so a capacitor is present between the power and ground pins. However, if the 38 kHz oscillator is coupled to the PNA4602M, either through common ground or the same supply, false triggering will occur -- the oscillator and the detector must be powered by separate, unconnected power supplies for reliable detection.

basey bottom
Basey's bottom: edge sensors, motors/wheels, castor wheels

Design Notes and Challenges

A holding stage (using a charged capacitor or one-shot) could be added between the edge sensor outputs and the motor OR gates, such that the robot continues to move back once an edge is detected, or even turn around. However, since the robot has sensors on its front and back, it is not necessary to turn around to seek the opponent, and is thus sufficient to only back away from an edge. In practice, the momentum of the motors result in the robot 'bouncing' away from a detected edge. Contrary, however, momentum may carry the robot right out of the ring if it approaches the edge at full speed.

If a more aggressive "seek" behaviour is desired, a second one-shot could be added to the monitor circuit, triggered by the first one-shot, to move the robot forward after turning. However, the IR sensors were sensitive enough to successfully detect the official IR beacon across the full diameter of the ring, so rotational seeking is all that was needed.

The edge sensors proved very finicky. Alignment of the LEDs and photoresistors to receive LED light reflected from the playing surface was critical for reliable performance of the sensors. The greater the voltage difference between edge and non-edge states that can be achieved, the better, as it aids in proper threshold adjustment of the comparator.

Most of the circuits worked very well independently, but combining all the elements into a working robot was quite challenging, as unforeseen noise and other problems arose, requiring hardware debugging and troubleshooting. If time permits, all the sensor circuits, logic, motor control, and motors should be connected on an experimenters' bread board with the intended power supplies and tested before soldering the ensemble together.


In competition, Basey behaved as designed. After beginning the round facing 90o away from the competitor, as required by the OCAD contest rules, Basey successfully detected and charged ahead toward the opponent, and remained engaged against the opponent. Unfortunately, Basey was overpowered by competitors with larger motors.

However, Basey is "proof of concept" for analog controlled autonomous sumo robots. The factors that handicapped the robot -- sensor misalignment and low-torque motors -- were independent of the control scheme and are problems that could equally affect robots having other control schemes. In terms of behaviour, Basey proved an equal match to its microcontroller-based competitors.

Accordingly, Basey won the Judges Choice Award at OCAD's 2002 Sumo Robot Challenge!

at OCAD 2002 competition
Basey and her makers

basey closeup
Basey after battling the Scouts


Thanks to: Deb Pasternak for project management and body work; Dan for body materials and preparation; Austin for spare parts; and Peter Hiscocks for the Tamyia motor tips.


2002 Andrew O'Malley