3-Axis Robot Solves 'Towers of Hanoi' © MIT

If you do not struggle solving 'Towers of Hanoi' just build your own Arduino-powered 3-axis-robot.

  • 1 comment
  • 48 respects

Components and supplies

Ph a000067 iso (1) wzec989qrf
Arduino Mega 2560
DC motor (generic)

Necessary tools and machines

3D Printer (generic)

Apps and online services

About this project

"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 Robot

From 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.

3-axis robot solves 'Towers of Hanoi'

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.


Desite 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.

Plug-and-play microcontroller for fischertechnik hardware


Similar projects you might like

Amazing 6WD Off-Road Robot | Arduino RC Robot

Project tutorial by Jithin Sanal

  • 1 comment
  • 82 respects

Scriba Robot - A Printing Robot

Project in progress by RobinB

  • 1 comment
  • 18 respects

SimAr The Humanoid Robot

Project showcase by TECHEONICS and Gaurav Kumar

  • 11 respects

Gesture Controlled Trainable Arduino Robot Arm via Bluetooth

Project tutorial by KureBas Robotics

  • 236 respects

Robot Arm Controlled Through Ethernet

Project tutorial by Balázs Simon

  • 66 respects
Add projectSign up / Login