PiWars and Small Robots at Calderdale College

PiWars and Small Robots at Calderdale College


Before the end of the summer term in 2020 an introductory microcontroller session was ran using tinkercad to simulate basic electronics with a micro:bit. As this sparked an interest in the students I decided to enter a college team into to 2021 PiWars competition.

As we had two groups within the 2nd year group, the initial idea was to build two robots and have each group battle for the right to represent the college at PiWars and also to put into practice the skills they were learning on the course.

As the students were, generally, inexperienced in hardware building and having to fit the project work in around normal coursework each group would start with identical base hardware to allow them to concentrate on the software aspects and any adaptations required for the challenge.

After being accepted for the competition we were faced, unfortunately, with another period of covid lockdown causing disruption to teaching and the project was temporarily suspended although the search for a suitable hardware base for the robots continued.

Back in issue 32 of Hackspace Magazine a robot design was featured in the magazine. This design, name MTV Bot, created by Jo Hinchcliffe (@concreted0g) and with the rough price guide of around £25 for some parts and some 3D printing it looked like it would be ideal for the project.


The first bot was built during October. The chassis came as a kit requiring some assembly. First thing was to solder the power wires to the motors before mounting them to the chassis. As it was not actually specified in the original article, it was was found that 16AWG wire was both pliable enough to route through the holes in the body and, more importantly, the correct diameter size to fit snugly into the terminals on the L298N motor controller.


Once all this was done fitting the tracks to the motor drive wheel and spindles was next. This is best done with a sense of humour as it is a bit of a fiddly job and it was found that the tracks, on our chassis kits, were 2 or three links too long. Shorting the tracks requires driving out a track pin or two and then reconnecting at the correct length. This is explained in detail within Jo's article.


The bottom printed body part was then mounted onto the chassis using the M4 bars and nuts. Once secured the top layer was mounted onto the bars using nuts to form a support and the L298N mount was connected. Using spring washers helped here as they stopped the nuts from vibrating loose when the bot was in use.


At this point the bot was ready for testing. After a visual and multimeter check on the wiring for any shorts a Raspberry Pi was connected up. At this point the Pi was powered from a separate USB battery whilst the motor controller was supplied direct from the LiPO battery. Each motor was tested for function both as a pair and independently.

Eventually our 1st year group took up the mantle from the 2nd year groups and started to experiment with the bot. One thing that was quickly realised was that the extra battery for the Pi was starting to interfere with robot operations. Removing this extra battery and powering the Pi from the same supply as the motors would be a better overall solution and also that it would probably be a good idea to be able to isolate the motors.

A potential solution to this was found on Dr Footleg's (@drfootleg) Mars Rover robot design. Here he had powered the entire system from a single LiPo battery with this design. The supply from the LiPo was split into two paths, one to supply the motor controller and the other to power the electronics via a UBEC module to drop the supplied voltage to a 5v supply. After testing to check everything still worked a switch was fitted on the wire connecting the LiPo to the motor supply input on the L298N.


After these modifications had been successfully implemented, further development was handed over to the students to solve the PiWars challenges. One of the first tasks they figured out quickly was to bring the bot under control via a console style controller.


Ultimately the team came 5th out of a beginners class containing 15 teams and also came first in 'Up the garden path' challenge by controlling the bot by with voice control.