"Towers of Hanoi" is a well-known mathmatical puzzle. The aim of this puzzle is to move a tower, which consists of different disk, from the left to the right stack. At any time, you must only pick a single disk. You must beware that there mustn't be a bigger disk above a smaller disk. Finally, there is a third support stack.
3-Axis RobotFrom my point of view, the solution algorithm is not challenging enough. Consequently, I decided to build a 3-axis robotic arm that simulates the calculations of the algorithm. Check out the video below, it demonstrates the machine's kinematics and shows how the puzzle is solved.
The robot predominantely consist of fischertechnik parts. There is a rotary axis and there are two linear axis; hence the end-effector can reach any point in a three-dimensional cartesian coordinate system. All axes are driven by fischertechnik DC motors. Thanks to a pneumatic gripper, the machine can pick up the yellow disk. All motions are processed by an Arduino microcontroller.
AlgorithmDesite the fact that the robot makes many moves, the key-algorithm is pretty simple as it can be recursively implemented. Thus, there has to be only one method which makes the robotic arm move an element
void solve(int start, int goal, int support, int n)
{
if (n > 0)
{
move(start, goal); // move
solve(support, goal, start, n - 1);
}
}
The left stack is called start
, the stack in the middle is called support
, and the very right stack is called goal
. The method solve()
is called recursively until the height n
is zero.
The microcontroller could be a project on its own as it is a plug-and-play controller with integrated motor drivers. It focuses on controlling fischertechnik hardware, such as DC motors and a variety of different sensors.
Comments
Please log in or sign up to comment.