This website has been archived.
See www.seanclark.org and www.interactdigitalarts.uk for information about Sean Clark's current artwork and projects.

Raspberry Pi Robotic Arm Controller

Sat, 04 Jan 2014

Raspberry Pi Robotic Arm Controller

Everybody loves robots don't they? Especially low-cost robots controlled by low-cost computers? The last of my winter holiday projects is a simple way of controlling the low-cost robotic arm from Maplin (£29.99 when on offer) with the similarly low-priced Raspberry Pi computer. As per usual, most of the work getting this project together has been done by someone else, but I have made some additions to the control program that are worth sharing.

First you need to get and build the robotic arm itself. The easiest place to get it from is Maplin, but you can sometimes find it cheaper on Amazon or eBay. The yellow and black look for the arm make it easy to identify unbranded versions of it. It's a moderately complex kit to build, but take your time and I'm sure you'll be fine. No soldering is required. I spread the work for the whole project over an afternoon and an evening.

The kit comes with a USB connection and software for a PC. However, it is just as easy to connect it to a Raspberry Pi. Full instructions on how to do this - which involves downloading the PyUSB software and running a simple Python script - are given on this site. It's very straightforward.

I decided to upgrade the provided Python script so that you can send the robotic arm simple commands via the command line. For example, typing sudo python arm.py sd wd go tells the shoulder motor to do down, then the wrist motor to go down and then the gripper to open. Not particularly fancy, but a decent basis for a more complex project I think.

For the next step I fancy placing my Raspberry Pi camera on top of the arm and writing an image processing script that will get the robotic arm to follow people as they walk around a room!

You can download the Python code here from my BitBucket account. I have also put some pictures and a short video of the project here on Flickr.

Author: Sean Clark