Pages

Tuesday 22 January 2013

Disaster on Robot Arm Two - and recovery

I was getting Robot Arm Two set up, and then the controller stopped responding to my commands over the USB port. So I connected it to a Windows machine and ran the software that came with it - no response. I'm thinking, something has happened to the hardware that translates the USB commands to motor movements. Or, to put it another way, Robot Arm Two is dead.

My first thought (after a few curses) was, maybe I could make a claim under guarantee? But this was a Christmas present from someone,so I don't have a receipt, and I'm thinking she won't either, and anyway it'll be a big hassle. So maybe I could buy a replacement controller board for it? That surely would only be a few pounds. But where would I get it? I doubt if Maplin would have spare parts for this.

And then I had an inspiration. These aren't servos or stepper motors, they're just plain old electric motors, working via a gearbox. All I need to do is switch power on and off, and I can do that with relays.

And then I thought, hmm, it isn't just on and off, I need to run them forwards and backwards, so I need to be able to reverse the polarity. That doesn't sound too difficult, though.

So I got an old envelope, and drew a rather simple circuit in the back. It uses two relays for each motor, so I can go forward or back. The motors want three volts, the relay box wants twelve, but I can do that with a couple of power supplies. There's eight relays on the relay box, which is enough to control four motors (two relays per motor, one for forward, one for back).

To work! I cut eight of the wires leading to the arm's controller board, connected some standard ethernet cable (they have eight cores, just right) to them, wired up the relay box, connected the Arm to it, gave the relay box power, gave the relays power, and connected the relay box's serial port to a computer. And with the usual software I use (minicom) I could talk to the relay box, and switch the relays. And the arm went up, and the arm went down, and I'm a very happy bunny.

So now all I need to do is modify the software I had written to control the arm over the internet (and that'll be a very easy thing to do, I've done it before this way).

One problem, though. I haven't yet gotten a Raspberry Pi to use a serial port without crashing. I've already ordered a couple of things that might do the trick, but meanwhile, I'll get this working using a tower PC.

No comments:

Post a Comment