Let's Make Robots!

Towers of Hanoi with Picaxe 08M

hanoi4.bas4.31 KB
hanoi.png9.55 KB
hanoi_ser4.bas5.73 KB

 This is the robot I built to solve the Towers of Hanoi puzzle . It uses three rc servos and a Picaxe 08M . This is the first time I've used the picaxe  but I have experience with pics and basic programing .

  The arm is constructed mostly with leftovers from my rc plane hobby . The rotation and elevation are done with two 15 year old worn out servos . They are double sided taped together with the rotation servo output arm screwed to the wooden base . The elevation servo arm has a balsa stick taped to it . The gripper is made from 2 identical gears I salvaged from something . The fingers are balsa hot glued to the gears . Sandpaper glued to the fingers helps grap the disk . A paperclip pushrod pulls on the gears with a wheel collar spring setup to avoid stalling the servo .

  The Picaxe 08M is on a Radio Shack project board . The servo signal lines are driven through 330 ohm resistors by the Picaxe .The programming is done through a Sparkfun FT232RL USB to Serial breakout board . The servos are powered directly from 4 AA batteries . Two1N4001 diodes drop the voltage to about 4.8 volts for the Picaxe .

  The program is adapted from a program in the book "Artificial Intelligence Projects For The Commodore 64" by Timothy J. O'Malley . I Bought the book around 1985 . The program uses 235 of the Picaxe's 256 bytes .

  The arm works better than I thought it would considering the servos are old , weak , and jittery . The arm is short and that causes problems picking the disks up without hitting the posts . I had to do a lot of tweaking to get it to work and it still leaves a disk on top of a post about once in 15 moves .  I will include the picaxe program  if anyone is interested .

Updated 5-15-2011 I have added the program hanoi_ser4.bas to the attached files . This program prints the stacks to the terminal window so you can run it in the simulator or on a picaxe without the servos . It can solve for 3 to 8 disks . I also added a schematic .

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Nice work !  - your going to have to have a much longer video for the 64 piece version :D

Very Nice. But if you share the making description,it will be useful to all....


Thanks for sharing.