P21 was prepared for the 2021 PiWars@Home competition.

Our design philosophy was to build a general purpose, agile robot. 

Agility comes from four independent motors mounted in a skid steer chassis (that can turn about it’s own centre).  Heavy items (such as motors and battery) are mounted low and the chassis has even weight distribution to aid stability.

The back axle articulates to keep all wheels planted on uneven terrain.

The robot incorporates an inertial measurement unit (IMU) to measure the robot’s position in the World; this is primarily used to calibrate turns (yaw), although it can also measure pitch and roll. 

P21’s main drive motors have magnetic encoders coupled to PID controllers to provide accurate control and moves based on odometry counters.  12v motors are used (although they are “over-volted” since a 4S LiPo is used).  Drive is via a 34:1 gearbox yielding an output shaft speed of 350rpm.  With 66mm wheels we have a theoretical top speed of 1.2ms-1

An Arduino compatible microcontroller (a Teensy 4) takes care of all the low level (time critical) interfaces and connects to the Raspberry Pi via the UART port on the Pi header.  For most autonomous games we use the Pi camera as the primary guidance system and this architecture allows the Pi to process images without concern for low level timing constraints.

The primary navigation system for autonomous games uses the front mounted Raspberry Pi camera which connects to the Rapsberry Pi camera interface.

Three time-of-flight (ToF) sensors are mounted on the robot’s “face” to measure the distance to obstructions or targets to the left, right and in front of the robot.

The robot can be fitted with small diameter (66mm) wheels for games requiring autonomous control, larger (102mm) balloon tyres for obstacle clearance and mecanum wheels which permit sideways (crab-like) moves.  With large wheels fitted the robot can manage steps of up to 70mm high.

66mm wheels for autonomous operation
Balloon tyres for obstacle traversal
Mecanum wheels for sideways moves

For radio control we use an FRSky Taranis X9D transmitter and X6R receiver; this is perhaps not an obvious choice.  However, we used the same system for the 2019 games and achieved excellent results when other teams seemed to have trouble with WiFi and Bluetooth based systems.  Besides, we had these devices back in 2018 for drones when we started designing P19.  The X6R is actually quite large (48 x 24 x 15mm); if there’s to be a redesigned robot in the future it will probably use a much smaller XSR-M receiver instead.

P21 is designed to be general purpose.  By this we mean that it does not include any parts which are designed for a particular game.  Instead, the robot has a flat deck on top, with mounting holes and captive nuts built in.  This allows game specific implements to be attached to the top of the robot very quickly.  It has a similar system underneath too.  An electrical interface provides implements with a serial link to the Pi via the robot microcontroller along with various supply voltages that are available.

See Challenge Configurations to see what we’ve built for the various PiWars games.

P21’s Software

P21’s software is largely lifted from P20.  Differences are:

  • New game strategies have been added for Feed the Fish and Tidy Up the Toys.
  • The line follower code has been re-written to allow it to interpret junctions.
%d bloggers like this: