• ### Arm IK

Time to work out the actual inverse kinematics for the arm. The skeleton design for the arm looks like this:

The arm is made of four bones and four hinges. The bone and hinge on the farthest left cannot be rotated independently; the arm was designed so this will rotate as the arm moves to keep the bone pointing directly down. This leaves three bones and hinges we need to model.

Using the 8BitModule visual editor, the arm IK looks as follows:

Here we have three bones with their given lengths (in mm, although units don't matter as long as they're all the same). The first hinge rotates around the z-axis, the remaining two around their relative y-axes. The relative direction of each bone is along the +ve z-axis (the arm is a straight line).

With this IK configuration we can now set the end of the arm (the effector) to the desired location and read back the generated angles for the hinges.

• ### Inverse Kinematics test

I've added an Inverse Kinematics (IK) module to the 8BitRobots Blockly programming interface. This is described here (https://hackaday.io/project/152729-8bitrobots-module). The goal is to make it simple to use IK without learning all the math. As a quick test of the software I built a simple two-piece robot arm (using the servo brackets from this project https://hackaday.io/project/158800-nabi-a-sideways-walking-robot-8bitrobots) rather than immediately jumping on the IK for the arm described in this project. Here it is in action:

On the right-to-left stroke the tip of the arm (effector) attempts to stay on a straight line (it moves between five points). The code for this looks like this:

The arm consists of two "bones" hinged on the same axis. This code moves it on a path every 8 seconds, with each movement taking a second (so 5 seconds of movement, with a 3 second pause). The IK part is given the point to place the effector, and generates the angles for the two arm servos.