Image

Robotic Arm

The goal of this project was to build and program a 2-dimensional robotic arm that could hold a pencil, write over an 8.5”x11” paper area, measure its position, and record and playback input positions.

Challenge 1

Image

The robot is built with the EV3 brick stationary, and the arm constructed out of two motors connected end-to-end. A wheel or ball is positioned under each arm to allow for smooth movement without interference from the weight of the motors. The end effector is a rotary motor with a pencil holder attached: the pencil is kept in place by a rubber band, and the end effector can lift the pencil off the page by rotation.

The robot is placed in the middle of the long side of the paper area, and from here can reach nearly all of the paper. However, due to the motor size, the arm is not able to fold completely, so it cannot reach positions very close to the robot brick. In programming, the motor closest to the end effector is referred to as the radius, and the other motor as the humerus.

Challenge 2

Image

The code for Challenge 2 records a manually input position of the robot arm, and calculates the x and y values of that position in relation to the robot’s position. The robot is placed at the middle of the long side of the paper area, such that the paper area is encompassed by Cartesian quadrants 1 and 4 (all positive x-values and all positive and negative y-values). Since one of the motors is oriented differently from the other, one motor’s positions are multiplied by -1. Once the position has been manually input, the code calculates position using trigonometry, with the known lengths of each linkage as 5 inches. The position is printed as separate x and y coordinates.

Challenge 3

The code for Challenge 3 records 3 manually input positions of the robotic arm, returns to the original position, and then returns to those 3 positions. The robotic arm is positioned 3 times, allowing 5 seconds each time for positioning, and then returns to the original position. Each time, the code records the absolute positions of the motors into two arrays. Afterwards, the robotic arm returns to each of the three positions by returning to the corresponding motor positions in the arrays. A low speed and longer pausing time is used to increase accuracy.

Code

Challenge 2

Image

Challenge 3

Image