Tuesday, 28 August 2012

Robot Insect

I purchased a book called Make: Arduino Bots and Gadgets: Six Embedded Projects with Open Source Hardware and Software (Learning by Discovery) by Tero Karvinen and Kimmo Karvine. One of the projects in there was a simple robot insect which I decided to have a go at creating. The book is quite good with detailed explanations but I didn't follow the instruction exactly and the parts list are for US only. The insect uses two servo motors to move coat hanger wire front and rear legs. I looked for servo motors but most seemed quite expensive (£10 ea or more) but I found UK Arduino specialist oomlout.co.uk sell 'mini' servo motors for £5 each so I ordered a couple.
These are really quite small but appear to do the job. The book suggests using a hot glue gun to glue the two servos together with the front one facing forward and the rear one facing down. I don't have a hot glue gun so I used my old favorite, 'gaffer' tape.
This picture shows the two servos taped together and the rear legs made out of coat hanger wire, and attached to the servo mounting part using thin wire (I also taped a thin strip of gaffer taped over these). For Arduino board itself and the battery I used a small piece of MDF and used cable ties to attach the servos to the MDF. End result looked like this:
Before you attach the legs to the servos you need to center the servos using a very simple sketch. Once the legs are attached you can download the full walking program. I found the some adjustment to the shape of the legs is neeed to get it to walk. I also found it only works on carpet, not on smooth flooring such as laminate or lino as the legs get no grip. I added the wall plug feet to help with the grip, these are not mentioned in the book and some other sort of rubber feet might work better. This video shows it walking:
The sketch required to center the servos is shown below:
This must be uploaded to the Arduino with the servos attached but before the legs are attached to the servos, otherwise the legs may end up mis-aligned.
The sketch that makes the robot walk is as follows:
This basically goes though a loop of raising the front right leg, followed by the back left, then front left leg followed by back right.


1 comment: