Friday, 15 March 2019

Sputnik Is Ready For Launch


So - this is the last post before the blogging deadline. No doubt there will be more to come - after the judging has been done - but this post marks the end of the first Pi Wars challenge for us.

We've been quite happy with the blog so far - the main achievement has been to keep it going. We've been trying to publish at least one new post a month detailing progress.

Personally my favourite post is Tears, Cheers and Motor Gears which was written after a very difficult period in the build when I wasn't sure we would keep going.

Thursday, 14 March 2019

Sputnik in Pictures

As we're nearing the blogging deadline, we thought it would be a good idea to show the stages of Sputnik's development in pictures. Development started in September 2018 to make sure we could actually build a controllable robot before applying for Pi Wars 2019.



The first attempt in Lego ran off 4 AA batteries for the motors and a USB Power bank for the Raspberry Pi. An L298N dual HBridge controller handled the motor outputs. A PS3 controller handled the remote control.

Tuesday, 12 March 2019

A Little Hubble Trouble

Once the Pixy 2 camera was fitted I wrote some quick code to implement the Hubble Telescope Nebula Challenge.

I went for a very simple algorithm where the robot looks for the colours, remembers the positions and then attempts to move towards them in the correct order. There's a few backup bits of logic, so if it can't find the next colour after spinning to where it thinks it is it will look for it again.

Using bits of coloured paper in the kitchen We were able to test it out and fix the initial issues. Sometimes it worked - sometimes it didn't. It was difficult to filter out false matches from the background - but in the real test with black walls we were hoping to have less issues.

Also when moving towards the colours, we were using a timing mechanism so that when we reached the zone we reversed for the same time as we moved forward to get back to the centre. This was woefully inaccurate, so we had to come up with a new solution, and decided to use the distance sensors to help out.

Now when the start button is pressed, the robot will record the distance to the wall from the front sensor. Then when it reverses, it uses the front 45 degree mounted sensors to reverse to the same distance. This works extremely well.

Once the code was at least proved, we waited for another trip to Robot Club to try it out on the real thing.

Hubble Telescope Nebula Challenge at Robot Club

Sunday, 3 March 2019

Protecting Earth - With Rubber Balls

A lot has happened in the last few weeks. Sputnik has a new paint job - all silver and sparkly, we've fitted the Pixy2 camera (and got it to work to some extent) and decided to finalise our solution to the Space Invader challenge.

When we applied for Pi Wars back last September, we had planned to use the balls to knock down the target. The idea was to build some kind of ball kicker powered by a solenoid or servo to propel the balls towards the target.

Then - when we went through a couple of iterations of motors, we thought we could use the spare motors to make a Nerf bullet launcher. We built a prototype with lego. Everyone stood back for the first lauch, only to see the bullet struggle through the lego barrel and drop to the floor. Looking at other posts the motors being used are running at something like 1800rpm - so our little micro motors were never going to make it. So that idea was shelved.

We then built a lego kicker - using a small servo motor. The prototype didn't quite have enough power to move the balls in a straight line.

At the time, we were still on the reserves list, so there wasn't a great worry. Then when we got the call to take part, we realised we were going to have to work out something - however primitive.

This is what we came up with:

Sputnik with ball launcher and laser sight

Tuesday, 12 February 2019

Apparently you can talk about robot club!

Had a good time at Brian Corteil's Robot Club at Cambridge Makespace on Saturday, testing out Sputnik and meeting some other Pi Wars contestants. It was great to try out the real straight line speed course. On the Friday night we only had one successful test run using boxes to simulate the sides of the track - all the other times the boxes went flying. But on the real thing it worked a treat. There were only a couple of times it turned left instead of right, but we think that was due to the course not being quite complete and joined together, so our sensors got a bit confused. Brian also gave us some good advice on how we could improve the code to keep our robot in the centre of the track. Our only regret is that we forgot to film it.

The other thing we learned is that the compass in the BBC micro:bit probably isn't reliable in the real world. In the Maze test, the robot turned a nice 90 degree turn on it's own - only for the compass code to try and adjust it by another 20 degrees or so, and pointing the wrong way.

Tuesday, 5 February 2019

micro:bit tells the Pi where to go ...

... but in a nice way.

Not long after applying for Pi Wars, we were thinking about the design of the robot - and one question was how to display visually which mode the robot is currently in. Also - it would be nice to have a physical button on the robot to change the mode - just in case the remote controller can't connect for some reason.

Initially the idea was to have a number of LEDs and a button connected to the Raspberry Pi GPIO pins. The LEDs would show the mode using a binary representation and the button would allow the mode to be changed. However one day I looked across at the Dimm robot from BinaryBots we had built but never quite got round to programming and the answer was there. The BBC micro:bit would be perfect for a simple display and input. And after a few months, we've finally put a lid on the robot and had somewhere to mount it (albeit with some velcro for now - whilst we finalise the position).


micro:bit centre stage on top of Sputnik

We're in ....

It's official - we've been called off the reserves bench to join the action and compete in Pi Wars 2019.

Now the pressure's on. No longer will the phrase 'Never mind - at least we're only a reserve!' be uttered in the Sputnik household. 

Not much notice for the competition - but we've been progressing well and at least we have a robot that is functional - and should be able to compete a fair few of the challenges as it stands. Two of us are off to Brian Corteil's Robot Club meetup at Cambridge Makerspace this Saturday to hopefully try out some of the challenges in a real environment. (One that doesn't involve cardboard boxes for obstacles.).

Things we've learned in the last couple of days:

- Being selected for Pi Wars with less than 2 months to go doesn't help you get a good night's sleep!