SonikTech Home
Contact Information
RobotArm
I Can't Grow a Third Arm, So I Made One

Overview
Back in high school, I found this robotic arm kicking around one of the hands-on shops (haha, hands). The teacher told me it hasn't been used in years, and no one knows why it doesn't work. Taking it home that day, I peeked around the original (very complex and consisting of many monolithic chips) circuit board. Not knowing what any of the chips did and possessing a very basic knowledge of circuits at the time, I got to work reviving this arm any way I could. Using a 4017 decade counter set to increment by one up to four, and an extremely complex set of redundant wires, it worked. Sort of. I knew I needed a more elegant solution. This sparked my interest in programming my own microcontrollers. First, the hardware (as it is actually simpler than the circuit and software). The old circuit board, power supply, and button array controlling the arm were environmentally disposed (will be used in a later experiment). Left with only the arm supports, wires and motors, I got to work on how to interface these stepper motors. A stepper motor is a rotating shaft attached to a magnet, which is surrounded by many seperate coils of wire. When current runs through one of these coils, a magnetic field is induced in the coil, and the magnet rotates until it is as close as it can be to the coil. Then the next coil in series is energized, and the magnet rotates towards the next coil. This sequence is repeated to obtain rotation of the shaft. The biggest advantage of stepper motors is precision. Each step of these motors rotates the shaft 7.5 degrees. In this type of stepper motor, there are 5 wires coming out; one for power, 4 for control. The only way to determine which wire is which is to grab a 9 volt battery and keep trying combinations until you get a sequence which results in consistent circular motion. For me, the power wire was red, and the sequence of wires was orange, black, yellow, brown. Note that it doesn't matter which one of the control comes first or last, just the sequence. Next, I need a way to switch these coils on and off in sequence quickly. I will definitely need powerful transistors, so I chose TIP120's, as they have built-in protection diodes, and my professor left an entire box of them from a past project. I chose the Arduino again for prototyping, using the ATMega168. There are 6 motors, each with 4 wires to interface, which would require 24 outputs. The ATMega168 has only 20, so I needed a chip in between. An 8-bit shift register would require 3 chips (8 * 3 = 24), but luckily I stumbled upon the 74HC4514, a 4-16 demultiplexer chip. Simply put, a demultiplexer takes a few inputs, and translates it into many outputs. This one takes a 4 bit instruction, and translates that into turning one of 16 pins on. 2 of these chips gave me 32 outputs, which was more than enough. Wiring this up to the transistors on the output side, and the 4 inputs on the Arduino side, very few lines of code are required to get this simple setup to run. I chose to use a Playstation controller to control the arm, as it's comfortable, familiar, and has enough buttons to make any joint move in either direction, plus extra buttons to set speed. The Playstation controller has 12 buttons to drive the 6 motors in each direction, plus another 2 for speed control. Pressing left turns the robot left, right makes it go right, up bends the shoulder, down unbends it, square pinches the hand, triangle releases, circle bends the elbow, X bends it the other way, and the shoulder buttons rotate the wrist. The stepper motors themselves are connected to a series of gears and wires which manipulate the individual parts. This complex assortment of cables is precisely engineered so moving one part of the arm does not disrupt the status of the other parts, if compensated for in the code. The stepper motors themselves are connected to a series of gears and wires which manipulate the individual parts. This complex assortment of cables is precisely engineered so moving one part of the arm does not disrupt the status of the other parts, if compensated for in the code.
Pictures

SonikTech Home
Contact Information
Welcome to my online build logs. All these projects are open-source and free to use for non-commercial purposes. Reach out to me at jarek-at-soniktech[dot]com if you have any questions!

They say great websites are built on the shoulders of giant libraries. Not here. At SonikTech we do all our coding from scratch. No hand holding. Banner font is 'Lato' from Google Fonts. Ad-free since Aught-3!