I built this two link serial arm with two classmates as a project for my systems and controls class. The goal was to have the pen on the end draw a shape on a piece of paper given input coordinates. We were given two DC motors with encoders and an arduino to create a closed loop control system.

On the right is the input shape to draw with the blue lines representing the robot arms. On the left are the desired angles of each of the two motors calculated using inverse kinematics

My main responsibility in the project was writing the PID control algorithm to control the position of the DC motors using the Arduino analog out pins. The main challenges included:

  • Understanding and implementing the methods for interfacing the Arduino with Matlab
  • Adjusting the gains of the of the PID algorithm to optimize positional accuracy
  • Making the physical system as sturdy as possible without significantly adding to the weight

I gained experience in PID control and creating closed loop systems using microcontrollers. If I were to improve on the project, I would work on making the physical structure more robust as its flexibility caused it to be extremely difficult to control, and the lines it drew were far from the straight paths we anticipated.