I designed this robot arm in SolidWorks and 3D printed the parts. It uses 1/8th microstepped NEMA17 stepper motors with A4988 stepper drivers for the joint actuators. These are controlled by Arduino microcontrollers.
The spring at the base of the robot is a spring counterweight to reduce static loading on the arm. This leaves more motor torque available for dynamic loading and payload.
The code maps the angle of the controller arm's potentiometers to the corresponding number of steps from the home position for each respective joint. I used the Accelstepper library to handle the motor accelerations.
Since stepper motors do not have absolute encoding, I used limit switches on each joint to define the home position. The arm then runs a homing function on each startup. The limit switches combined with the incremental encoding from counting motor steps is sufficient to know the arm's position.
The first and third joints use a 5 : 1 timing belt gearbox, and the second (shoulder) joint uses a 1 : 45 worm gear reduction since it experiences the highest loads.
The gripper uses a flexure hinge combined with a pushbutton as a force sensor to apply the same gripping force to objects of different size and protect the servo from stalling (see last three photos in video).