Robocup Soccer Robot

In May 2009 I built a soccer robot for the Robocup Jr. soccer competition. The competition is a two on two soccer match, with each team having a goalie robot and an offensive robot.In this tutorial, I will detail the design and construction of the offensive soccer robot. This robot uses multiple robotics technologies, such as vision processing, infrared localization, omniwheel drive and obstacle avoidance.

For those who want the final code for the Robocup soccer robot, download it here: Click here to Download Code

Also, the parts list if you plan to build this beast: Click here to download Parts List

First, I designed the soccer robot to-scale in Google Sketchup. Most of the parts were already in my Google Warehouse library, so I really only had to custom sketch the CMU camera and align the plastics property. Click Here to Download CAD

Then I designed a circuit , using photodiodes, to track where the infrared soccer ball was onfield. The circuit itself is rather simple. An LM339 comparator compares the output of the infrared photodiode to a reference voltage which is set with a potentiometer. The outputs from the comparators are fed to the Axon's input pins, pins which have their internal pullup resistors enabled. The Axon then just checks for PORT input , using the bit_is_set(PINA,0); function.

Infrared sensors were placed all around the soccer robot as shown. PING Ultrasonic rangefinders were on each side of the robot, which will provide data on where the walls and/or other robots are.

I used four DC motors arranged at angles of 45 degrees from each other, motors which are wired up to L298 motor controllers. These motor controllers are in turned hooked up to the Axon's PWM and digital outputs.

To get the necessary PWMs that each motor required to move at a certain angle, I programmed an omniwheel robot calculator in Visual Basic 6 to generate the correct pulses given any base. A base of 100 would provide pulses ranging from -100 ( counter clockwise full rotation) to 100 (clockwise full rotation. I used a base of 65535, as thats the maximum speed from a 16 bit timer.

I also made this slideshow of pictures documenting the soccer robot build process.

And here are some videos of the soccer robot in action: