Trigg

I Robotik 2

calculate three angles (Θ, Θ1, and Θ2) which correspond the angles of each servo.
image.png
Triangle for the forearm, drawn parallel to the plan that the arm is on
The first triangle is a right triangle which exists on the plane that is parallel to the arm. It is important to note that this triangle is not always on the XY plane which is parallel to the paper, but can be affected by the angle of the elbowY servo, however we do not need to know that angle to solve this triangle. Our first input parameter is marked here by X: this is the lateral distance, in cm, from the shoulder servo. From here we need to find the angle Θ and the forearm Y distance (labelled here as Y) which will be used for our next calculations.
Here is the python code I wrote to find these measurements:
forearmYLengthRelative = math.sqrt(ForearmLength**2 - xdis**2) elbowXAngle = math.degrees(math.acos(xdis / ForearmLength))
This is just based off of pythagorean theorem and basic trigonometry. (** is python for exponents, if you aren’t familiar)
This is simple so far, but it gets more complicated when we move to the plane perpendicular to the ground.
image.png
The other angles to solve for
When I first looked at this arm, I saw the initial 2 triangles (labeled 2 and 3 here) and couldn’t figure out how to calculate the angles of the servos. Then I realized there are two more implied triangles here. There is the big triangle, which is a combination of triangles 2, 3 and 4, and the small rectangle in the bottom, then there is the implied triangle 4.
Now that we have visualized the diagrams on the arm, let’s move them to a white background and label the sides and unknown angles to solve for.
image.png
The three triangles the arm makes at any point
Here we have the following known variables: variables B, D, and E, and value Yd. B, D, and E are fixed variables; the bicep length, the distance of the shoulder servo to the ground, and the length of the elbow joint, respectively. Value Yd is an input parameter; the distance in cm from the shoulder servo. Using Yd and D, I could find the hypotenuse of the large triangle, labeled H on the diagram.
hypoteneuseLength = math.sqrt(DrawHeight**2 + ydis**2)
That alone is useless though, until I pull in the calculated forearm Y variable from the first triangle. Adding E and Y, and using B, I can get the angles in triangle 4. Then we can get triangle 4’s Θ1 and Θ2 using the .
additionalTriangleTheta1 = math.degrees(math.acos(((ElbowLength + forearmYLengthRelative)**2 + hypoteneuseLength**2 - BicepLength**2)/(2 * hypoteneuseLength*(ElbowLength + forearmYLengthRelative))))additionalTriangleTheta2 = math.degrees(math.acos((hypoteneuseLength**2 + BicepLength**2 - (ElbowLength + forearmYLengthRelative)**2)/(2 * BicepLength * hypoteneuseLength)))
Now if we get the angles of the big triangle (called bigTheta1 and bigTheta2 in the code), which we also have all the sides for, we can get Θ1 ( shoulderAngle) of triangle 2 by subtracting triangle 4’s Θ2.
bigTheta1 = math.degrees(math.asin(DrawHeight/hypoteneuseLength))bigTheta2 = math.degrees(math.asin(ydis/hypoteneuseLength))shoulderAngle = bigTheta2 - additionalTriangleTheta2
The last angle we need is Θ3 ( elbowYAngle) of triangle 3. This is not one of the 3 angles of the triangle, so to get this we can use the line that extends from B to imagine that triangle 2’s Θ1 exists in triangle 3. Since we know all of the other angles in triangle 3 (one is a right angle, one is Θ2), we can get triangle 3’s Θ3.
elbowYAngle = (90 - (bigTheta1 - additionalTriangleTheta1)) - shoulderAngle
Now we have the equations for the servo angles at any point on the plane.

Restrictions Cut The Plan Short

At this point there were a number of delays that delayed our progress. Our first problem was that designing, printing, and building the bot took more time than expected. We then realized the initial design would cause a fairly limited drawing space so we changed the design and had to re-print and build everything again. Eventually, we had all the final dimensions and design put together.
image.png
The new, improved design
Here are the final fixed dimensions:
Dimensions (in cm)
BicepLength = 9
ElbowHeight = 1.25
ElbowLength = 3.3
ForearmLength = 10
ShoulderHeight = 14.25
hoverHeight = 4.0 (the height that the "hand" will hover above the paper)
Unfortunately, even after the redesign, our system retained some constricting physical limitations. One of our constraints was the arm interacting with the base, and the other was the limited range where our arm would actually make contact with the page. Unfortunately some of our design limitations came from miscommunication, as such is expected in the pandemic era, where our design session were facilitated through video conferencing technologies.
We also were working on a limited budget, using essentially the cheapest materials we had access to, so our servos had a minimum resolution of only 1 degree. Using our hand-measured physical range, our 2d drawing grid had the following resolution:
X Range
0, 145
Y Range
0, 58
This resolution would not be enough for our calligraphy idea. At this point we would just settle for writing legibly.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.