Controlling a USB robotic arm with a Raspberry Pi

My son was recently given a Maplin robotic arm kit with USB interface by a neighbour of ours who had received it as an unwanted gift. Over the Xmas break I got a chance to help my son build it (it only took a couple of hours, and was reasonably straightforward). Once we’d built it, we tested it out using a laptop booted into Windows with the supplied Windows software. The Windows software is OK for manual control, but the “programming” software is really quite dire… Clearly, what is needed here is a way to drive it from a Python session running on the Raspberry Pi. It turns out to be very easy to do this.

First, get hold of PyUSB (version >= 1.0.0), and note that the version currently in the Raspbian repo is too old. Unpack PyUSB and build it in the usual python way using

sudo python setup.py install

Once you are ready to go, plug in the arm and switch it on. Use

lsusb

to check that the Pi has detected the arm correctly.

I expected to have a bit of hassle figuring out how to drive the arm from python, but it turns out that very clear instructions for this arm are given in the article “Skutter: Part 2” in Issue 3 of the MagPi magazine, so just following those instructions gets the arm up and running in a few minutes. Very cool.

Imag0115

Advertisements

Published by

darrenjw

I am Professor of Stochastic Modelling within the School of Mathematics & Statistics at Newcastle University, UK. I am also a computational systems biologist.

3 thoughts on “Controlling a USB robotic arm with a Raspberry Pi”

  1. Just found your blog and I suspect you are my doppelganger only a) younger b) more dextrous and c) more able. I had to get someone else to build my robot arm. Thanks for all the stuff.

  2. Hi there, I have a RbPi, and the robot arm. I found your tutorial. But am struggling to download PyUSB. Is there any way of not using it? And also when you say “un-pack” I don’t know what that means… Please help. I have been trying for days to get this arm to work, and to connect to the internet, to download this “PyUSB” but my RbPi keeps crashing every time I click on the web browser.
    Please, any kind of help would be very much appreciated!
    J.Hutcheson

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s