As part of a team project for my graduate robotics course, we built a 5-degree-of-freedom robot arm that autonomously writes a 3-letter word on a physical whiteboard. My own contribution was 3D-printing the arm's links and writing the MATLAB and Arduino code for its kinematics, trajectory planning, and motor tuning. For our final grade, our professor chose the word live, on the spot; after a joint-jitter fix, the arm wrote it legibly.
Writing legibly with a multi-joint arm takes more than solving the kinematics once. Our arm's 5 joints, 2 heavier Dynamixel MX-64A motors and 3 lighter AX-12A motors at different distances from the base, don't cover the same angular distance for a given pen stroke. Command every joint to move at the same speed and they arrive at each waypoint staggered instead of together, which warps the pen path mid-stroke. Getting a legible letter out the other end meant solving that synchronization problem, not just the forward and inverse kinematics.
Write a 3-letter word on a physical whiteboard, using only the letters A through F. The three letters had to sit right next to each other, forming one continuous word. For the graded final test, our professor chose the word live, on the spot.
I implemented forward and inverse kinematics using the product-of-exponentials formulation from the Modern Robotics library, building a home configuration matrix and a screw-axis list for the arm's 5 joints rather than a per-joint Denavit-Hartenberg chain. On top of that I built the path pipeline: letters became stroke templates, chained into pen-down and pen-up segments in the whiteboard's own coordinate frame, then densified from sparse waypoints into a smooth trajectory.
The synchronization problem is what the velocity kinematics solved. I scaled each joint's commanded speed to how far that joint had to travel for a given move, so joints covering very different angular distances still started and finished each waypoint-to-waypoint segment together instead of arriving staggered. I streamed the resulting time-based command sequence to the arm's Dynamixel motors over Arduino. I also 3D-printed all of the arm's structural links.
I validated the kinematics by scoring the pen tip's position against the intended path at every waypoint, holding pen-down strokes to a tighter tolerance than pen-up transitions so I could use the error to diagnose the solver and tune trajectory density, rather than as a simple pass or fail gate. Most waypoints landed within about 1 cm of target, with two real outliers spiking to roughly 5 cm and 9 cm that I didn't smooth over. An early practice run writing "CAB" came out shaky and barely legible; later runs came out visibly cleaner, if still a bit wobbly, consistent with those error spikes. For the graded final test, our professor picked the word live, "DAC," and the arm wrote it legibly, still a bit shaky but clean enough that the professor asked to keep the arm afterward to show it off at an event.
The as-built arm was jittery at joints 2 and 3, and fixing it took a mechanical change and a control change together, not either alone. We added a spring at the elbow to offload gravitational torque from the motor. On the control side, I retuned both joints: joint 2 (an MX-64A with built-in PID) went from an oscillatory Kp = 32 to Kp = 205, Ki = 65, Kd = 0 for a fast response with minimal overshoot; joint 3 (an AX-12A, which uses compliance margin/slope instead of true PID) went to a compliance margin of 2 and compliance slopes of 56 clockwise / 26 counterclockwise to eliminate the same ringing.
Letters near the board's center, in line with the arm's home position, consistently came out cleaner than letters to the left or right. The cause traced to joint geometry: writing off-center forced joint 1 to rotate away from home, so the downstream joints had to reach further, which drove the same joint 2/3 jitter — worst at the board's edges, least in the middle letter.
A separate issue came from the pen mechanism: my original trajectories used upward strokes, but the spring-loaded pen compressed against the board as it wrote, and mechanical slop in the links let that compression build into upward tension that board friction held in place mid-stroke. When the arm lifted the pen at the end of an upward stroke, that tension released all at once and the pen shot upward, leaving curly artifacts in the letters. I fixed it by rewriting the trajectory planner to prefer downward strokes, which avoided building up the tension and cleaned up legibility.
Forward and inverse kinematics (product-of-exponentials, Modern Robotics library), velocity kinematics for multi-joint synchronization, trajectory planning and time-parameterization, MATLAB, Dynamixel servo control (MX-64A, AX-12A) and PID/compliance tuning, Arduino, mechanical and control co-design for vibration mitigation, quantitative trajectory-error validation, 3D-printed mechanical design, configuration-dependent error root-cause diagnosis, end-effector-aware trajectory redesign for mechanical-slop artifacts.