Group Members: Just me.
The goal was to make a functioning robotic arm with at least two links and two joints using everyday items found in a classroom whose motion is mapped by forward/inverse kinematics in a 2D plane.
The original plan was to create a 3 link and 3 joint robotic arm rested on a base, with the links made from popsicle sticks. The links would be combinations of popsicle sticks of varying length, the 3 lengths being 29cm, 19cm, and 17cm. Each link would be connected to a servo with a 3D printed part that fit into the servo prongs. This part along with the servo would then be attached to a popsicle stick, allowing the servo to control the link. (Also, I don't exactly know why I said I needed an Arduino when I was using VEX parts, but thats besides the point). To arrive at this design, I looked at the materials and constraints. I saw that the robot had to have at least two degrees of freedom, it had to take an input of a 2D coordinate pair, and the materials that were given included popsicle sticks, VEX stuff, a 5V power supply in the from of a battery pack, and servos. I knew for sure that I would use popsicle sticks for the links, and I debated between vex motors and servos as the joints. I would later come to the conclusion of using motors. Finally, I needed to think of a way to connect the popsicle sticks to the joints, and came up with a 3D-printed fitting for the servo that would attact to the joints.
I originally was going to use forward kinematics to program the arm to get to it's final desination using a numerical approach for inverse kinematics, as forward kinematics is used in the numerical approach for inverse kinematics. However, due to finding the analytical inverse kinematics approach much easier to program, I switched to that instead. Still, the forward kinematics apprach was useful to test if my robot arm was functional, as I could just input two angles to get to a final destination.
I used inverse kinematics to actually code the arm to get to the target position. Using the inverse kinematic equations, I was able to input a target position in the XY plane, and the arm would move to the target position. I initially wanted to use the numerical method, but I found out that the analytical method was a lot more efficient to code, so I used that instead.
Image 1: The code runs the inverse kinematics that are required to move the arm to the end effector position that is inputted. Lines 6 and 7 are where the desired end effector position is inputted. Lines 8 and 9 find the values of the angles that the joints need to rotate. Lines 10 and 12 set the motor speed for each joint to 1/8 full power, and lines 11 and 13 tell the motors how long they should be spinning for.
Image 2: Because I decided to use motors, due to their ability to rotate 360 degrees as opposed to the 120 degrees of a VEX servo, I had to do some calculations. The downside of using motors was that I couldn't rotate it to a set position. Instead, I had to figure out the speed at which the motor rotated (100rpm at full power), convert it to seconds per radian (3/(100π)sec), and multiply that by the angle I wanted the motor to rotate (3q1/(100π)sec). Finally, I had to convert it to milliseconds, which ultimately ended up being (3q1/(100π)*1000ms). However, these were the times at full power. To make the rotations more precise, I scaled down the power by a factor of 8, and scaled up the rotation time by a factor of 8. However, due to the motor rotations not being perfect, I decided to increase the time to (28q1/(100π)*1000ms) intead of (24q1/(100π)*1000ms).
Image 3: The finished product consisted of 2 links and 2 joints as opposed to three of each like the design proposal suggested. This is due to lacking time to add the third link and joint. The whole apparatus is attached to a piece of wood, but instead of being put in the table, it is held while operated (mainly my preference, but it also makes the motor rotations more accurate as gravity doesn't play a role in messing with the rotations. Instead of using a 3D printed fitting to attach the popsicle stick to the servo, I simply used an shaft that was made to fit in the vex motor, and I wood glued it to the popsicle stick. I plugged all the motors into the VEX cortex, ran the code, and the arm worked went to the inputted position with little error.
There were many improvements that I had to make while testing. For example, I found out that one popsicle stick per link was very unstable, and they tended to snap quite often, so I had to wood glue multiple together to add structural integrity to the arm. Also, I had to improve the code, as when the motors were running at max speed, the rotations were not consistent, so I slowed the rotation of the motors, and the results imporved tremendously. The testing of the arm allowed me to find places where the arm was inconsistent or broken, which helped make the arm function properly in the end.