AverageBot Devblog 2 – Power & Controllers

AverageBot Devblog 2AverageBot gains a lot of new parts this week

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…

Motor Controller

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.

4Tronix PiRoCon Motor Controller

The 4Tronix PiRoCon motor controller + iBoost64 add-on

I also shot a quick n’ dirty video of the controller, but be warned, I haven’t worked it all out yet!

Power Options

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:

RC parts

My old RC hobby wasn’t such a waste of money after all!

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.

More Power!

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:

RS 7.2V Battery Pack

The perfect size, voltage and amperage for AverageBot

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.

Wiring Solutions

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.

Tamiya Connectors

Lots of Tamiya connectors for compatibility with my RC charger

Chassis Changes

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.

Drilling Chassis Plates

To take this shot, I had to hold the drill with my teeth. True story…

I think a third layer will be in need…but I may get something special laser cut for that. Watch this space…


Ultrasonic Sensors

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!

Line Sensors

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.

Line sensors

I’m not looking forward to coding these. Headaches imminent!

Pi Change

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.

Model A setup

A quick serial USB log in and I had the promoted Model A set up with WiFi and the PiRoCon libraries.


Oh and I ordered one of these too…shh…

Laser module

ONE MILLION DOLLARS! (Name that film?)

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?!

Next Blog…

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 @DesignSparkRS, @RSComponents, @4Tronix @ByeEd2 @PiTutorials @boeeerb @winkleink @thebasebot @seeourfamilytra @ryanteck and @mypifi for all their help and advice this week!

2 Comments on "AverageBot Devblog 2 – Power & Controllers"

  1. Great to see you progressing. My tips (from experience with Metabot last year):
    * Put a fuse in the battery line – we blew up 2 motor controllers before we learnt that lesson. ISTR that NiCad RC battery packs can deliver enough current (momentarily) to spot weld…
    * Line sensors – we had trouble getting them close enough together to reliably detect small deviations from the line. If you’ve got 3, you want one in the middle of the line, then the outer 2 *just* off the line on either side so that you spot *quickly* that you’re starting to go off track. Little adjustments will be faster.
    * We had good luck using those line sensors for the proximity alert – put one on each corner of the robot, but facing forwards. Adjust the potentiometer to change the stop distance. You’ll need to tune this on the day (ask the judge for a practice run before the day’s events start). We managed to tune ours down to 1 or 2 mm last year. We’d have come in the top few in that event if Metabot hadn’t got bored and decided to wander off for one of the runs!

    • Thanks Lance.

      I must admit there’s going to be a lot of trial and error with this! Line sensors I’m really not looking forward to – I can see my getting bored/frustrated quickly if they don’t play nice, so will have to see how that goes.

      Re the fuse, this has caused me quite a bit of confusion. Do I apply a fuse to protect the battery or the controller – both are important of course. Then there’s the rating – the batteries only offer 2000mAh, so maybe a 2amp fuse or a bit higher? I’m not sure how the motor controller handles these kind of currents either, maybe it’ll be fine? Lots of unknowns!

Leave a comment

Your email address will not be published.


This website uses cookies. Please visit our privacy policy page for more information. Privacy policy

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.