Can’t believe it’s been almost a year…
Can’t believe it’s Pi Wars in 3 weeks…..
Can’t believe how much I still have left to do…….
Life is rather full on right now. And so is preparation for Pi Wars 2018. A completely new job and change of direction, a move to a new city and about 6 weeks of travelling all in the last year has meant that preparations for Pi Wars have taken longer than hoped (when do they ever not!) I was equally pleased and somewhat mortified to have been selected to compete again this time round, competition for a place was fierce, with 76 teams eventually lucky enough to make the start line.
After last year’s fairly disastrous outing, managing to compete in only 3 events, I wanted to start early and eradicate the source of my frustrations – power issues and controller issues. I also wanted to address the problems with the ultra-cool but ultra-slidey mecanum wheels. And the motor controller issues. And the sensor issues. And the wiring issues. Ummmm.
So, whilst it may look fairly similar, X-Bot has indeed undergone a significant transformation in terms of what’s under the hood. Pretty much *everything* has either been replaced, rewired or removed! This is hopefully going to be obvious not only in terms of reliability but also controllability.
Ok…. so last’s year’s wiring ‘loom’ was more of a wiring nest – as several folks kindly pointed out (I’m looking at you, Brian)….
I wanted to clean up the power supply and all of the wiring and start again from scratch. I looked at Li-Po but the investment cost to get started was fairly eye- watering. I also wanted to ditch the 5v buck converter I’d been using as I am suspicious of the reliability of these devices to say the least (see earlier blog post for full details) I’ve successfully used the ‘powerbank’ type USB battery packs to run Pi projects (including my first Pi Wars bot) and never had an issue so, in this case, the mantra became stick with what you know.
Horrible buck converter, horrible wobbly wiring!….
The transformation process begins….. (That’s just a little bit neater!)
I genuinely couldn’t believe the amount of wiring I was actually able to remove and still have a fully functioning bot when it was all put back together. I’ve now repeatedly tested this new setup and had literally zero power issues or reboots etc. I am using the ZeroBorg controller to power the four motors (which have also been upgraded) and a Rock Candy controller to replace the PS3 one from last year – another source of potential issues gone!
I’ve also mounted a Pi camera for the autonomous challenges, currently on a temporary lego / blutac mount until I can get time to design and 3D print a proper one. With upgraded motors, cleaned up wiring, reliable power supply and controller I am hopeful that the renewed and revamped X-Bot will at least be reliable enough to compete on the day.
Behold… the scrubbed up X-Bot.
Let’s get grippy….
One of the other things sorely lacking on the original X-Bot was a degree of controllability. Whilst the mecanum wheels are incredibly effective in terms of movement, they actually had very little grip which meant manual challenges were… challenging, and autonomous tasks were made significantly harder.
The original rollers. After hours of trials with different coverings, these proved the most long lasting and effective – wrapped in self-amalgamating plumber’s tape..
I have a confession. My new role at the Open University comes with distinct perks. One of these is access to the awesomely equipped ‘fab lab’ with a range of mouth-watering maker / engineering kit. One particular delight is an industrial strength 3D that can print in a range of materials. At the same time :-O
I will be forever indebted to Kevin, the chap who runs the lab, as he printed some uber-grippy new rollers for me. They have a solid ABS core and a rubber ‘tyre’ surround. They have a load more traction than the previous rollers which really aids both manual and autonomous driving.
Such grip. Many rollers….
Introducing…. X-Bot 360!
One of the other things previously missing was something that I am sorely lacking myself, a sense of direction (just ask my wife – she has literally stopped me walking off a cliff whilst reading a map, boldly declaring that this was, of course, the correct way back to car.) To that end I looked into the scarily mathematical world of the IMU. These incredibly tiny devices combine magnetometer, gyroscope and accelerometer into one board. Combining the outputs of these three readings, and using some incredibly complex mathematics and things called ‘kalman filters’, these boards can give a bot a guide to where it’s pointing with some degree of accuracy. I’d done some experimenting a while ago with a board called a BerryIMU but had not had a lot of success getting reliable readings from it. Whether this was me or the supplied Python library, I am still not sure. I then found the superbly geekily titled BNO055 from the ever reliable Adafruit (but seriously – who uses ‘o’s and ‘0’s in the same product ID?!)
Do you know the way to Pi Wars? – this little thing does!
It’s taken a fair while and a lot of tweaking to tune the motors to start and stop effectively in time with the readings from the IMU, something that’s critical for exact 90 and 180 degree turns. I’m really pleased with the results thus far, thankfully as the board was probably one of the most expensive individual parts at around £35.00
One the main structure of the bot was complete, I started planning the add-ons for the new challenges and also getting OpenCV installed for the Rainbow challenge – but that, as they say, is another story.
Next time – new challenges… new add-ons.. and *$%&*#ing OpenCV!