Friday, 13 July 2018

Ideas for My First Pi Wars Robot

One of the things I noticed at Pi Wars 2018 was that there were a lot of very similar robot designs as far as the basic chassis, drive and steering are concerned. Four wheel drive, fixed mount wheels on a rectangular chassis, with steering done by reversing the direction of the wheels on one side compared to the other. Clearly a winning formula and very effective on the more challenging terrain of the obstacle course.

A great source of ideas and knowledge are the blogs written by previous entrants (check out the Pi Wars 2018 blogs or others on the 'past years' pages of the website). There were a few rather different entries, many of which really struggled in the challenges. But it was these that I enjoyed watching the most. Some tracked tank like designs worked well and one omni-wheeled robot had some awesome moves.

I am not so much motivated to try to win the competition, as to entertain and inspire. Sure I want to design something that performs well, but not at the expense of individuality. So I came away from the 2018 competition thinking it would be cool to enter something completely different. I had always liked the idea of building a 2 wheeled balancing robot, so my plan was to try and build one capable enough to tackle the challenges at Pi Wars. It turned out I was not alone!

So the learning phase begins. Here are some of the questions I have at the start:

  • What sort of motors are needed for a balancing robot?
  • How do you use an accelerometer sensor?
  • How do you control a pair of motors using the tilt sensor data to keep it balanced?
  • How do you get a balancing robot to move forwards and backwards while the motors are being driven to keep it balanced upright?
  • How big can a 2 wheeled balancing robot be and still qualify for the Pi Wars rules of maximum size?
  • Is this idea completely mad?
I decided to start experimenting with the parts I already had in my boxes of bits I've bought already for robot projects in general. A pair of motors from PiBorg, a SparkFun 9dof sensor breakout board, and some AdaFruit 3.6A motor driver breakout boards. It seems like a good idea to use a dedicated processor to handle the sensor reading, balancing and motor driving aspect of things. I don't want the robot falling over every time the Raspberry Pi is busy doing something else when I start looking at image sensing and autonomous driving challenges. So I started with an Arduino board to attempt to build my first prototype.

This added a couple more questions to my list of things I needed to learn:
  • How do you program an Arduino?
  • How do you communicate between an Arduino and a Raspberry Pi?
This is going to be a very educational journey!

Thursday, 12 July 2018

The Beginning of My Pi Wars Journey

Back in September 2017 as I was starting to engage with people in the Raspberry Pi community on social media, a friend told me I would love Pi Wars and should check it out. A quick Google search brought me to where I learned about this exciting non-destructive robotics competition in Cambridge. Unfortunately the deadline for entries was only about 3 weeks away, and I had only just built my first robot using the CamJam Edukit #3 which started me on these adventures. Looking at the challenges it was clear I had a lot to learn before I could write an entry application. So it would not be for that year. I noted the date of the competition in my calendar and planned to attend.

It was a start, but I was going to need something a bit more sophisticated than this.
Over the next 6 months, I built my first few robots. Mainly as technology demonstrators for kids clubs and workshops I had been volunteering at. As the date of the Pi Wars competition approached, I went to a couple of the excellent meet ups at Cambridge Makespace organised by previous Pi Wars winner Brian Corteil where I got to meet some of the competitors and see some of their robots in development. I registered as a volunteer for the event and when the weekend of the competition came, I did the morning shift judging the obstacle course for the schools entries on the Saturday.

As well as seeing lots of robots over the Pi Wars weekend, I also learned a lot about what went wrong for competitors. Robots which could not grip on slopes, or get over the edge of a piece of plywood. Batteries which came loose and dangled on the ends of their leads as the robots attempted the courses. Controllers which stopped talking to their robots. Robots which stopped when their software crashed each time they took a knock. Robots which arrived at their time slot for a challenge with the wrong version of the code on their SD Card. Operators who struggled with the fine control needed to get their robot to drive where they wanted when they wanted.

Clearly a competition robot needed to be robust, well tested and the driver well practised in operating it. It also helped to have pink unicorn stickers on it (well it should look interesting, not just be functional). I took my kids along on the Sunday to spectate, met a lot of people, bought lots of parts to build bigger and better robots and came away with my daughter saying she wanted to enter, and wanting to have a go myself too.

So now the Pi Wars 2019 dates have been confirmed, and the details of the challenges published. Clearly it is time to start thinking up some ideas!