Making an Arduino-controlled Delta Robot
November 26, 2011 23 Comments
A delta robot is a parallel robot that’s designed for precise and high speed movement of light payloads. They’re generally used for pick-and-pack operations. I’ve wanted to build a delta robot since I saw this video, so I took a weekend last summer to put something together as a technology demonstration for the high school robotics club that I coach.
A delta robot is composed of three two-segment ‘arms’ mounted at 120 degree intervals. The arms use parallelograms to restrict the motion of the ‘wrist’ and keep it in a static orientation. For a much better description, check out Wikipedia, and for the math geeks there’s an excellent writeup of delta robot kinematics over at Trossen Robotics.
To build my delta robot I started with three HS-645MG servos, and mounted them on some particle board. I fabricated upper arms out of Tetrix beam and used some JB-Weld to attach long standoffs perpendicularly at the ends of the arms. The standoffs hold small ball joints (I used some ball endsthat were intended for RC car suspensions) that will provide the free movement that is required of these joints. The rods that make up the parallel linkage for the second segment of the arms are aluminum. I bored holes in the ends of these on the lathe and pressed small bolts into the holes to create a mounting point for the ‘cap’ portion of the ball ends. The lower triangle is just a quick mock up made of Lego with some more long standoffs zip-tied to it to provide mounting points for the ball ends.
On the software side, there are two components. I modified an excellent Arduino sketch originally created by Bryan at Principia Labs to drive the hardware. The Arduino sketch uses the Servo.h library to control the three servos. It listens over a serial connection for three-byte control commands in the format start_byte, servo_number, desired_position where the start_byteis always 255. Servo number 99 is used as a control channel to enable and disable the servos. Sending a desired position of 180 to servo 99 will turn all the servos on, and sending position 0 to servo 99 will disable all servos and power them off.
To control the robot I wrote some software in the Processing language. I used the really nice ControlP5 GUI library to make text boxes and sliders to control servo positions. The kinematics of converting three servo angles to a position in XYZ axes and vice-versa is..interesting, to say the least! Luckily great minds have gone before and completed this math for me, even including C code. Again, Trossen Robotics forums are your friend.
I’m making all the code for the Arduino sketch and the Processing GUI available for download from my Box.net account (Edit: and on GitHub). The code is well-commented, but I did not originally intend to publish it, so it’s a little rough around the edges. Feel free to ask any questions in the post comments and I’ll try and clear things up if it’s confusing.
I’ll wrap things up with a quick video of the delta robot in action. Enjoy!