tomroyal.com

Mousebot, Part One: Plans

Over the years I’ve come to know a lot about computers and how to put them together – give me the parts to make a PC and a screwdriver to short the motherboard power header pins and I could get it up and running – or installing Windows, at least – in about five minutes. And, thanks to hours mucking about with website programming and, before that, the Atari ST, I can program a bit – give me a language that works vaguely like either C or Basic and I can bodge together a working program. But there’s one thing I know absolutely nothing about at all: how on earth all this stuff actually, you know, works.

When it comes to the electronics that makes all this stuff tick, I know nothing. I could make a simple circuit to light a bulb, and I remember that V = IR. That’s about it. So, I think it’s probably time to do something about this.

And here’s my plan: I’m going to build a robot. Nothing fancy, but a simple thing that can run around the floor of the flat giving our two cats something amusing to chase and pounce on. Here’s my (very scientific and carefully designed) schematic for the proposed Mousebot Mk 1:

The whole thing needs to fit into a smallish plastic box, and I think it’s best if the drive wheels are largely contained inside (just poking out to touch the floor). With two motors driving two wheels I should be able to manouver the robot like a tank, although I’m not sure what to do with the back – it’ll need either a pivoting wheel, or perhaps just to drag the back on the floor. Two switches on the front will tell the robot if it’s hit something, and two on the top will activate when the cats manage to pounce on it.

In terms of controlling the whole thing, I’m planning to use an Arduino board. These can be programmed from a PC via USB (the language is really, really simple, and a bit like C), and then run independently when powered by a 9v battery. When I was over in San Francisco I picked up a copy of Make magazine that showed how to remote control a lawnmower using an Arduino chip, so I figure it should be easily up to a simple job like this.

The tricky thing is going to be controlling the motors from the Arduino. As I understand it the board can’t handle powering motors directly, so I’ll need to work out some way of controlling power from a separate battery pack to the motors from an Arduino output. I think this might require a transistor or two – figuring out how is, I suppose, the next step.

There’s loads of Arduino information online, but not so much relevant to UK buyers, so my plan is to document the whole thing here (complete with Maplin part codes) in case it’s useful to anyone else. All further instructions, part lists, photos etc can be found here.

All © 2019 Tom Royal. Theme available here.