I was playing around with the Athena one day and within
about an hour I had built this little bot. I added a few sensors
and put it in the sumo ring as an autonomous bot against my son's remote
control bot. Within 30 seconds it had pushed his bot out of the
ring. After 10 rounds the score was 10 to nothing in favor of the
small Athena bot.
In all fairness to my son I have to say that after he
discovered a few of the weakness' of this bot he was able to win 90% of
the time.
This project is not really designed to be built as-is
but to inspire you to move forward and add your own ideas.
The most expensive part on this bot is the
servos. If you already have a couple you are good to go.
Chassis
Lets start with the chassis.

The chassis consists of the following:
Step 1

Attach the two servos together as shown. Use a
piece of double stick foam tape between the two servos. Make sure
both servos are oriented the same.
Tip: Lie flat on a table surface when you join the
servos.
Step 2

The battery holder I used had double stick foam already
attached so all I had to do is pull the tape off and stick it to the
servos. Note how the servos are oriented.
The main shaft of the servo will become the rear of the
bot. If the battery holder is too far forward it may make it
difficult to add edge sensors later.
You can also use some Velcro with sticky backing to
attach the battery holder. This will allow you to reposition the
holder.
Step 3

Attach the wheels.
Step 4

Use some double stick foam tape or Velcro to attach the
front scoop.
That's one simple chassis. It cant get much
simpler.

As an alternate you can add a small platform and roller
ball. Notice how the bot is flipped. The ways of building a servo bot are endless.
The circuit

Not much to the circuit. I recommend Nicad or NIMH
batteries because they can deliver more current and there is less chance
of voltage drop out.
The Vishay IR is included to allow you to remote control
the bot. Later I will give you a circuit that includes a couple of
sensors.
The programming header will allow you to connect an
EASYRS232 Driver for programming the chip.
Mounting the Electronics
How you mount the electronics will depend on how you
build the circuit. I used a
PCB8 circuit board.


The following program can be used to control the bot
with a Sony remote control. If you have a universal remote you
will need to set it to one of the Sony codes. The volume and
channel buttons will control the direction of the bot.
Program #1 (download
it here)
dim cmd,device,Lservo,Rservo,Lrange,Rrange
PULSEINTIMEOUT = 252
const Lservoport 4
const Rservoport 5
loop:
servo Lservoport,Lservo
servo Rservoport,Rservo
irin 3,cmd,device
lookdown cmd,cmd,0,16,17,18,19
branch cmd,stop,fwd,bkwd,right,left
goto loop
fwd:
gosub servoson
Lservo = 200
Rservo = 100
goto loop
bkwd:
gosub servoson
Lservo = 100
Rservo = 200
goto loop
right:
gosub servoson
Lservo = 200
Rservo = 200
goto loop
left:
gosub servoson
Lservo = 100
Rservo = 100
goto loop
stop:
gosub servosoff
Lservo = 150
Rservo = 150
goto loop
servoson:
output Lservoport
output Rservoport
return
servosoff:
'input Lservoport
'input Rservoport
return
Sensors
The following circuit will add two sensors.
The first is a GP2D120 (or GP2D12). This sensor
will allow the bot to see things in front. You need an AtoD
converter for this as the sensor outputs a voltage based on the
range to the object its detecting.
The Athena's miniad command is perfect for the GP2D12o
sensor. It will return a value between 1 and 15. Any value
over 1 indicates the sensor has detected an object. The closer the
object the higher the number.
The next sensor is a basic opto sensor. This
sensor has two parts. A IR LED and a IR detector. By placing
this sensor close to the surface (flat black) we can detect the
edge of a sumo ring (gloss white).

How you place the two sensors are important. First
the opto sensor should be somewhat shielded from normal light. The
range sensor should not be pointing down or it may pick up the floor
surface.


I created front scoop (rather large) out of 26 gauge
steel. Bent it in a couple of places so it would both act as a
shield and work as a scoop.

The scoop attaches to the servo holes with small angle
brackets.
Program #2 (download
it here)
'Athena servo sumo bot
'Several of the bot movement routines are not called and could
' be removed
dim cmd,device,Lservo,Rservo,range,cyclecount,state
'Edge sensor LED
output 2
high 2
const Lservoport 4
const Rservoport 5
'Wait 5.25 seconds before we start
longpause 250,21
'----------------------------------------------------
'Search
'This will have the bot spin until it sees an object
'It uses a Sharp GP2D120 with the miniad command.
'----------------------------------------------------
dosearch:
gosub right
cyclecount = 0
searchloop:
if cyclecount > 200 then
gosub fwd
endif
'Check edge here
if inp10 = 0 then
gosub edgedetect
goto dosearch
endif
gosub procservos
miniad 0,range
if range > 1 then
goto dodestroy
endif
pause 15
cyclecount = cyclecount + 1
goto searchloop
'----------------------------------------------------
'destroy
'Once the search routine spots an object this routine
'will move the bot forward. If enemy detection is lost
'the search routine will be executed
'----------------------------------------------------
dodestroy:
gosub fwd
cyclecount = 0
destroyloop:
'Check edge here
if inp10 = 0 then
gosub edgedetect
goto dosearch
endif
gosub procservos
miniad 0,range
'here we will wait 20 cycles before checking range
if cyclecount > 20 then
if range = 1 then
goto dosearch
endif
endif
pause 15
cyclecount = cyclecount + 1
goto destroyloop
'---------------------------------------------------
'Edge detect
'---------------------------------------------------
edgedetect:
state = 0
gosub procstate
edgedetectloop:
gosub procservos
pause 15
cyclecount = cyclecount - 1
if cyclecount = 0 then
gosub procstate
if state = 3 then
return
endif
endif
goto edgedetectloop
procstate:
branch state,dostate0,dostate1,dostate2
statecont:
state = state + 1
return
dostate0:
gosub bkwd
cyclecount = 25
goto statecont
dostate1:
gosub left
cyclecount = 35
goto statecont
dostate2:
gosub fwd
cyclecount = 200
goto statecont
'-----------------------------------------------------
'Bot servo routines
'-----------------------------------------------------
procservos:
servo Lservoport,Lservo
servo Rservoport,Rservo
return
fwd:
gosub servoson
Lservo = 200
Rservo = 100
return
bkwd:
gosub servoson
Lservo = 100
Rservo = 200
return
right:
gosub servoson
Lservo = 200
Rservo = 200
return
left:
gosub servoson
Lservo = 100
Rservo = 100
return
stop:
gosub servosoff
Lservo = 150
Rservo = 150
return
servoson:
output Lservoport
output Rservoport
return
servosoff:
input Lservoport
input Rservoport
return
This program is not perfect and there is a lot of room
for improvement. For instance adding a second range sensor to port
1.
Here are a few parts that will help you build your own
bot.
Parts
Easy RS232 Driver
Athena
PCB8
Modified Servo
Servo Wheels (Qty 2)
Battery Holder
IR Module
7.5V AC Adapter
9 Pin Cable
Breadboard and
Wire Kit
Breadboard
Regulator