It’s only been a week or so since my first devblog for my Pi Wars robot, but since so much has been happening I thought I’d share an update. Despite being two weeks into the build I still don’t have a moving robot or even any code running yet. I’m taking it slow, doing it right, but I’ve mostly just been waiting for parts!
In Devblog #1 I shared my ambitions for the competition, as well as some of the kit I’m starting out with. I also talked about how I wanted to re-use as much kit as possible and keep costs down…
…but all that has changed!
Let’s take you through my week with the AverageBot…
My original plan was to make use of my GoPiGo‘s PCB to control the motors and other moving parts. After looking at this in a bit more detail, it was clear that re-using a robot kit PCB just wasn’t going to work for me.
The main reason was the fact that the GoPiGo PCB uses one power source for both the Pi and the motors. This works really well for a simple robot kit as it keeps it simple and affordable, however I wanted to use separate power supplies to avoid any potential issues with power spikes from the motors.
After looking at the different motor controllers on the market, I opted for a 4Tronix PiRoCon. There are a number of reasons I chose this particular board, here are just some of them:
- It fits on top of the Pi via GPIO – no additional wires or mounting separate parts
- It allows separate power supplies for the Pi and motors
- It has a switching regulator for the Pi’s power source (much more efficient I’m told)
- It has an input ready for an ultrasonic distance sensor (a little convenience I suppose)
- I’d found some decent examples of its use (link removed – site no longer operating)
- It has extremely good documentation and support
The last point there was the kicker. Gareth from 4Tronix has a reputation of being very helpful to his customers and the Pi scene in general. After a few messages on Twitter, Gareth had answered all of my ‘average’ questions and I was happy that the board was the perfect fit for my project.
I also shot a quick n’ dirty video of the controller, but be warned, I haven’t worked it all out yet!
Remember the packs of AA batteries I bought? Turns out they’re no good after some very poor multimeter test results. Turns out zinc-carbons are the chocolate teapot of the battery world!
So, now that my new motor controller was here, it was time I looked at some decent power options. After all, I would now require two power sources – one for the Pi and one for the motors.
Shortly after I published my first devblog I remembered that I had an old Tamiya TL-01 radio controlled car in my cupboard…and what do RC cars have? Big ass batteries that’s what!
Here’s what I found:
The battery pack is an Orion Sport 7.2V 4500 mAh NiMH. On paper that sounds ideal for AverageBot!
This kind of juice would work for either the Pi or the motors, although I wasn’t keen on the weight of the pack (385g) or the awkward shape. It’s ok for a backup option, if it still works, however I might just save it for an Arduino robot project later in the year.
You’ll also see in the image above that I have an RC battery charging unit – a Vector NX85. It’s actually reasonably new and has the benefit of being able to set the charge rate, ideal for different battery sizes.
One battery wasn’t going to get AverageBot anywhere, and I still don’t know how well that old Orion pack is going to work, so I started researching other options for power and received a lot of advice from the community on Twitter.
This steered me towards two options – standard AA rechargeable batteries or other RC power packs.
The benefit of using simple AA batteries is the ease of changing them and the slightly lower cost. However, I don’t have an AA battery charger, so I decided it would make more sense for me to look at RC battery packs.
After a lot of searching on RC websites, I remembered that stores like RS Components sell pretty much everything to do with electronics. A quick look on their site and I found what I ‘think’ is the perfect power source for my robot:
These are 7.2V 2000mAh NiMH rechargable battery packs. They’re perfect for the Pi as the PiRoCon controller needs a little headroom for voltage regulation, and the wee Raspberry will appreciate 2 amps of current. They’re also perfect for my motors as they like voltage to be around the 6V mark.
Weight-wise, at 164g a piece, using two of these will still be lighter than using the single Orion pack (57g lighter overall). They’re not massive so I’ll have to keep an eye on how long they last, but the form factor means I can get two of these on my robot chassis easily, as they slide in nicely between my chassis layers.
Big thanks to Pete and the guys over at RS DesignSpark for their help and advice with this. They’ve got a cool section for the Raspberry Pi with tutorials, forums and blogs – definitely worth checking out: http://www.designspark.com/raspberrypi.
With all this new stuff, one thing was missing…wires!
Considering I already have a half-decent RC charging unit, I decided to order some Tamiya connectors. This will allow me to quickly and safely disconnect batteries to swap them out for charging. All I need to do is solder these on to the battery terminals and I’m good to go.
Whilst we’re talking about wiring, I also ordered a plastic covered terminal block to help me connect things together. Using this means I don’t have to solder any wires together (messy), I don’t have to try to push the huge 14AWG Tamiya connector wires into the PiRoCon terminals, and also allows me to disconnect and replace any part on my build. Sorted.
I’ve made a few minor changes to my chassis this week, mostly in preparation for the new parts.
The first inevitable change was the addition of a second layer, as there was no way I was going to mount a pi, two batteries and everything else on the single 150×127 plywood panel!
I salvaged some spacers from the robot kits I had, and got busy with my drill. I’ll probably change the location of spacers as the build develops, but that’s the beauty of using thin plywood – it’s so easy to work with. I have around 10 of these panels spare so there’s endless expansion potential as well.
I think a third layer will be in need…but I may get something special laser cut for that. Watch this space…
As I was abusing my credit card anyway, I quickly popped over to PiBorg’s website and ordered one of their tasty stainless steel distance sensor mounting kits. I did have a spare acrylic mount I could use, but this is much nicer!
I made another quick video which will show you what it’s all about:
I’ve already got a couple of SR-04 distance sensors, so I’ll fit this after I get the basic motor control mastered. This kind of sensor will be good for the proximity alert challenge. Brian Corteil, a fellow Pi Wars competitor, has written a really good blog post on the different proximity sensor options.
Whilst Brian clearly points out some of the issues with Sr-04 style sensors, they do have the benefit of being really well documented across the internet, so I’m opting for the easy life!
I also ordered three lines sensor modules in my order with 4Tronix. I have a feeling this will be the hardest part to code and refine, so it’ll probably be one of the last things I work on! I’ll look to fit these next week.
AverageBot originally had a Model B Raspberry Pi as the brains of the operation. After realising how precious battery life is in a robot, I started looking at how much power the different parts would be using.
I found an excellent article over at RasPi.TV that gave me a good idea on the power usage of the different models of Raspberry Pi. It showed that my Model A would use around 220mA less current than the Model B I had originally chosen for the robot.
Easy decision – the Model A was promoted! I may have to consider the newer Pi models later on if I need more processing power, but for now this is a quick win.
Oh and I ordered one of these too…shh…
Pi Wars Sponsorship
Another thing I did this week was sponsor Pi Wars. I’ve donated ProtoCam+ kits to go towards the prizes for the day. Hmm…maybe I’ll win one back?!
Before the next Devblog I have a giveaway competition! I’ve got some cracking Raspberry Pi cases up for grabs from an up and coming case maker, and as usual if you’re subscribed you’re automatically entered.
So, a busy week for the AverageBot. Still no code yet, but we’re laying some good foundations and getting the basics right. Maybe next week we’ll have the motors turning.
Until next time…
A big thanks to Twitter friends @@4Tronix @ByeEd2 @PiTutorials @boeeerb @winkleink @thebasebot @ @ryanteck and @mypifi for all their help and advice this week!