Level: Beginner
Hours to Complete: 2
Skills Required: Arduino programming, basic mechanical skills, laser-cutting experience and access (optional)
Authored By: Miguel Rodriguez
In this project you will build a robotic arm controlled via a 2-axis joystick mounted on an Arduino Board of Education Shield. With this nifty gadget you can write your name, doodle objects on paper, and get your feet wet in the world of inverse kinematics.
This is an easy application to build, however it is assumed that you already have laser-cut the three pieces of plastic that make up the body of the arm using the file provided, or have suitable replacement/stand in parts. For those without access to a laser cutter, you can use the Parts Drawings download to create your own parts using a method of your choice:
Once you complete the build and load the code, go ahead and power up the unit. Observe its response. Make sure you're able to bring the arm all the way in, and all the way out by moving the joystick right then left. If you are unable to achieve full motion, adjust the position of the arm by removing the center screw holding each servo horn and placing it in different positions on the servo spline until you achieve the maximum range of motion.
Now you can start experimenting with your robotic servo drawing arm and bring out your inner Picasso!
The joystick in this application is essentially two potentiometers. One for the x axis and one for the y axis. As a you push or pull the joystick in any direction you are essentially changing the resistance value of one or both potentiometers.
When resistance changes the joystick outputs a voltage from each of its axis and feeds the variable voltages into two analog to digital converter pins(A0 ,A1) on the Arduino shield and Arduino Uno.
The Arduino uses it's built in analog to digital converter(ADC) to convert analog data to digital data. This conversion is called quantization. Once the data is converted to digital, the code can then use it to determine what position each servo should be in to achieve a desired motion and/or position. See the code comments for explanation of the code.
This project touches on a topic used extensively in the manufacturing industry called Inverse Kinematics.
Inverse Kinematics is a mathematical technique used to plan the movement of robotic joints in order to achieve a specific motion and/or position. Check out Wikipedia to learn more about it [8].
Links
[1] https://www.parallax.com/product/910-32333
[2] https://www.parallax.com/product/27800
[3] https://www.parallax.com/product/900-00005
[4] https://learn.parallax.com/sites/default/files/Files/Docs/Projects/Robotic-Arm/Robotic-Arm-Laser-Files.zip
[5] https://learn.parallax.com/sites/default/files/Files/Docs/Projects/Robotic-Arm/RoboticArmsParts.pdf
[6] https://learn.parallax.com/sites/default/files/Files/Docs/Projects/Robotic-Arm/Robotic-Arm-Code.zip
[7] http://www.parallax.com/sites/default/files/downloads/35000-BOE-Shield-Documentation-v1.2.pdf
[8] https://en.wikipedia.org/wiki/Inverse_kinematics