Raspberry Pi Robot Arm

arm_main

I said that I would work on controlling my robotic arm with Python/Raspberry Pi, and after a few week’s planning and tinkering, I got it to work. Using a couple of L293 motor drivers (PDF), I hooked up four of the arm’s motors plus the LED and wrote some simple functions to control it all via GPIO. Introducing my Raspberry Pi Robot Arm!

I used this DC motor guide for help with the circuit and the programming. However, I found the batteries didn’t provide enough voltage, so I used a 5v cooling fan power source instead. From there, I pre-programmed a routine in which the arm picks up blocks and stacks them. Here, watch. The RPi Arm picks up the blocks, stacks them, then signals “HEY” in Morse code with the LED:

There was a lot of tedious micro-adjustment of the arm, because identical commands forward and reverse on each motor didn’t translate to equal motions (weight of the arm and blocks, motor reversal issues, etc.). The program is repeatable, but the arm doesn’t always zero out, so I wrote a second program to make tiny adjustments to the motor positions.

Anyway, here’s a few photos of the circuitry:

raspberry_pi_robot_arm_circuit1

raspberry_pi_robot_arm_circuit2

raspberry_pi_robot_arm_circuit3

If you want to try your own, here is the arm, and here are the chips you’ll need. It’s a lot easier than it looks!

It would be cool to continue with this and add a few sensors, such as a pressure sensor to the claw, a proximity sensor so it could find blocks to pick up, or even a digital control panel for the keyboard. Or it would be great if I could figure out how to make it self-calibrate. But for now, I’m pretty excited I got this far. If you have better ideas for sensors or enhancements, I’d love to hear them.

(Thanks to @jegehringer for helping me with some electrical engineering on the Raspberry Pi robot arm).

Leave a Reply

Your email address will not be published. Required fields are marked *