Autonomous Soccer Robot
Introduction: An autonomous robot built for competition
From 2013 until 2020, our team developed several fully autonomous robots for various soccer and robotics challenges within RoboCupJunior – an educational robotics competition where student teams design, build, and program robots to play soccer or complete obstacle courses entirely on their own. The robot we built for the soccer competition in our final year, 2020, is the one I describe here. The soccer challenge required the robot to detect the ball, orient itself, dribble, and score goals while competing under standardized rules and strict size and weight constraints.
This updated version of our robot represented a complete redesign and was a significant improvement over previous prototypes. Every component – from the mechanical frame to the printed circuit boards – was custom-designed, built, and assembled by our team. The goal was to combine omnidirectional mobility, robust perception, and precise control in a compact, reliable, and competition-ready system.
Competition context and design constraints
RoboCupJunior Soccer imposes strict physical and functional limitations. Robots must fit within a specific cylinder, operate without external communication, and navigate on a green playing field marked with boundary lines and goals [2]. The ball is an orange-colored sphere. The competition field may be unevenly illuminated, and robots must detect the ball and stay within the playing area – all autonomously.
These requirements strongly influenced our design choices. The robot had to move holonomically in any direction without turning first, recognize and localize the ball and boundaries reliably under varying light conditions, and execute precise maneuvers in tight spaces. Stability, modularity, and maintainability were equally important, since mechanical or electrical failures during matches could cost valuable points.

Robot design

Mechanical design and actuation
The robot’s drivetrain was based on a three-wheel omnidirectional platform, allowing movement in all directions and rotation around its center. Each of the three omniwheels was powered by a 12 V DC motor, mounted at 120° intervals on a CNC-milled aluminum main plate. This configuration enabled the robot to accelerate quickly and change direction seamlessly, which is crucial for soccer-style maneuvers such as approaching, circling, or intercepting the ball.
For ball handling, we implemented a dribbler system driven by a dedicated DC motor. The dribbler consisted of a rotating adhesive roll designed to grip the ball and maintain contact during motion. Controlling the roll speed allowed fine-tuning of ball stability and retention, a key factor during fast translational movements.
Shooting was realized using a solenoid-based kicker, capable of delivering short, high-energy impulses to the ball. The solenoid was powered through a capacitor buffer and switched by a MOSFET to generate consistent strikes. Current sensing and safety interlocks were added to protect components and comply with competition safety requirements.

The mechanical frame was modeled entirely in Autodesk Fusion 360, ensuring precise alignment of all subsystems. The main plate and motor brackets were CNC-milled for accuracy, while the outer shell was 3D-printed to reduce weight and allow rapid iteration. This combination of aluminum and printed components resulted in a robust yet lightweight chassis capable of absorbing impact during matches.
Perception and sensing system
The robot’s perception system combined visual, infrared, and optical sensing to achieve full environmental awareness.
At its core was a Raspberry Pi camera pointed at a parabolic mirror, forming a catadioptric vision system capable of capturing a complete 360° view of the surroundings. This setup offered omnidirectional perception using only a single camera, simplifying hardware integration and calibration.

A Tinker Board single-board computer handled all computer vision tasks. The camera’s circular image was unwarped into a panoramic projection, and OpenCV-based image processing – implemented in Python – was used to detect the ball. The vision algorithm extracted the orange color of the ball from the RGB channels, filtered noise, and computed the ball’s angular bearing relative to the robot. Temporal smoothing of detections improved stability, especially when the ball moved quickly or was partially occluded by other objects.
Complementary sensing was achieved through four Time-of-Flight (ToF) sensors, placed around the chassis to measure distances to nearby walls and obstacles. These sensors helped the robot estimate its position relative to the field boundaries. In addition, 32 photoresistors were arranged around the robot’s base, each paired with an RGB LED. This array illuminated the field directly below the robot and measured the reflected light intensity to detect the white boundary lines on the ground.

Embedded electronics and control
The control architecture was divided across two Teensy 3.6 microcontrollers, each handling a specific part of the robot’s functionality.
The first Teensy was responsible for sensor data acquisition. It read analog signals from the 32 photoresistors, processed ToF measurements, and monitored other analog and digital inputs. Data was filtered, normalized, and forwarded to the second Teensy for higher-level decision-making.
The second Teensy managed motion control, PID regulation, and actuation. It received processed sensor data and the ball’s direction from the Tinker Board. Using this information, it computed the robot’s translational and rotational velocities, converted them into wheel speeds using inverse kinematics, and applied PID control to each motor for precise movement.
The PID controller followed the classic form
\[ u(t) = K_p e(t) + K_i \int e(t) dt + K_d \frac{de(t)}{dt}, \]where \( e(t) \) represents the error between the desired and measured wheel velocity. Parameters \( K_p, K_i, K_d \) were tuned experimentally through step-response testing to achieve stable and responsive control.
All inter-board communication was realized through a serial protocol with CRC error checking, ensuring minimal latency and robust data transfer. The communication loop between the Tinker Board and the Teensy controllers maintained a round-trip time below 20 ms, allowing the robot to react in real time to the ball’s movements.
Electronic circuits and PCBs were designed in Autodesk Eagle. These included custom motor driver boards with MOSFET H-bridges, a solenoid driver module with high-current protection, and regulated power supplies providing 12 V, 5 V, and 3.3 V rails. Particular attention was given to thermal design, power stability, and modular connector layouts, enabling quick maintenance during competition.
Software development and integration
The software stack was distributed across different platforms and languages, depending on the performance requirements.
On the Tinker Board, Python and OpenCV were used for real-time image acquisition, pre-processing, and ball detection. The algorithm pipeline involved catadioptric image unwarping, adaptive thresholding, and contour detection. Once the ball was identified, its angular position relative to the robot’s orientation was calculated and transmitted to the control microcontroller.
On the Teensy microcontrollers, control firmware was written in C/C++ using the Arduino framework. Each microcontroller handled specific timing-critical loops for sensor sampling and control, running at fixed intervals with interrupt-driven updates. Safety mechanisms, such as watchdog timers and motor current limits, ensured reliability during prolonged operation.
Mechanical and electronic integration was supported by Autodesk Fusion 360 and Eagle, which enabled consistent 3D alignment between mechanical and electrical components. Toolpaths for CNC milling and 3D printing were generated directly from the CAD models, ensuring precise fit and consistent manufacturing results.
Final Thoughts
Challenges and lessons learned
During testing and competition, several practical challenges emerged. Minimizing latency between vision and actuation was essential, as even small delays affected dribbling precision and ball interception. Our team optimized image processing pipelines and reduced serial transmission overhead to keep the total delay below perceptible thresholds.
Another major challenge was tuning the dribbler. The adhesive roll had to maintain consistent grip on the ball without causing unwanted bouncing. Through iterative testing, optimal surface materials and motor speeds were identified.
The kicker system required careful energy management to deliver reproducible impulses. Capacitor sizing and coil calibration were refined to achieve consistent ball velocities without overheating or overloading the power system.
Lighting variability posed an additional issue for the photoresistor boundary detection. By introducing dynamic calibration and adaptive LED brightness, the system remained reliable under both bright and dim lighting. Mechanically, the combination of CNC-milled structural components and 3D-printed covers provided sufficient rigidity and allowed quick part replacement during field repairs.
Educational value and competition relevance

The robot reflects the educational focus of RoboCupJunior, where the emphasis lies not only on winning matches but also on learning the principles of robotics, control, and system integration. Through the project, the team gained experience in CAD design, embedded programming, real-time control, electronics, and applied computer vision.
The robot performed very well at the first local competition, successfully qualifying for the German championship in Kassel, which unfortunately was canceled due to COVID-19 restrictions. Nonetheless, it remained a valuable learning experience and a great team achievement.
List of Abbreviations
| Abbreviation | Meaning |
|---|---|
| SBC | Single Board Computer (e.g., Tinker Board) |
| ToF | Time of Flight |
| PWM | Pulse Width Modulation |
| PID | Proportional-Integral-Derivative controller |
| CAD | Computer-Aided Design |
| CNC | Computer Numerical Control |
| PCB | Printed Circuit Board |
References
[1] RoboCupJunior – official site: overview and educational goals. RoboCupJunior. Available: https://junior.robocup.org/.
[2] RoboCupJunior Soccer – competition description and league pages; rules and league information. RoboCupJunior Soccer. Available: https://junior.robocup.org/soccer/.