January 28, 2014

A Tale of Two Robot Arms

The robot arm is now moving.  I started out by writing simple PID position controllers, and then making the motors do some fast back-and-forths.  Nothing is at all tuned right now, and I imagine my whole control loop will get fancier as I take 2.004 next term and learn how to actually do controls.

The basic control structure of the robot arm is this:  At the highest level, my computer runs some python code.  This code takes XY-space commands and does the inverse kinematics for the robot arm to convert XY to two joint angles, and then sends the joint angles over serial (using pySerial) to one of two mbed microcontrollers.  The mbed keeps one command to itself, and sends the other along to a second mbed over SPI.  Each mbed reads the encoder signals from the motors and uses that plus the commanded positions from my computer to do a PID control loop for each motor.  Finally, the mbed's send PWM and direction signals to a pair of Pololu motor drivers, which actually drive the motors.

For the sake of the robot arm and anything in its plane of motion, early testing was done without the arm attached.  Here's the linkage drive doing a 10 Hz shake:



And the arm's first link moving:



Once I got the core of my python code mostly working, I could send position commands from my computer:



Or so I thought.  Here, the arm was supposed to do a 1 Hz, 10 mm amplitude Y axis sine wave.  And it did, for a bit:


Somehow the arm managed to not crash into its physical limits, so nothing was damaged.  As far as I can tell, the problem was with my serial communication.  I added identification commands to the beginning and end of each block joint angles as a safety feature, so now the robot just stops when the commands go wrong, rather than freaking out as above.  Also, I'm now testing with the motor power supply at 5V rather than 20+, so the max speed and torque are much, much less dangerous.  After incident this I added an emergency stop button.


Which leads perfectly into the story of robot arm number 2.  The e-stop button and panel above came from the silicon wafer handling enclosure for a Stäubli RX60 robot arm.  A while ago MIT professor Seth Teller contacted MITERS looking for a home for this robot.  It turns out the robot arm was not just a robot arm.  It was actually a 100 lbs arm with a 200 lbs controller inside a 2,800 lbs box.  A very, very fancy box for inspecting silicon wafers.

Nancy, Peter and I went to retrieve the arm from its box, which was all stored at a storage warehouse just down the street.


And inside the box:


So shiny....  Everything was paneled in brushed stainless steel.  The e-stop panel I used can be seen in the middle left.


And the exciting part.  6 axes of robot-arm goodness:


Most of the important bits were Mikuvanned back to MITERS.  The robot was screwed to a table for temporary testing.


I pulled a couple of the panels off to see what sort of magic was on the inside:


Those are some fancy servos.  The two largest joints are driven by 200 V, 1 kW(!) servos.  That much power in an arm is kind of terrifying.  I couldn't tell what type of gear system was used, but excepting the rotation at the wrists, the joints are not backdriveable.

No comments:

Post a Comment