Arduino Hexapod (With A Personality)
Arduino Hexapod (With A Personality)
Arduino Hexapod (With A Personality)
Table of Contents
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Intro: Arduino Hexapod (With A Personality)
In this instructable you'll learn how to make your own Hexapod!
The robot I've made is based off of Penny and Stomper...two amazing hexapods!!
The neat thing about this robot is I've made the chassis using mostly scrap...old pen tube refils and old mechanno parts!
Arduino Pro Mini (just about any board should do...I used this one due to its small size.)
3 x 1k resistors
1 X 10k resistor
Female and Male header pins
2 x White LEDs
1 x Blue LED
3 x Turnigy 9g Servos
1 x 100uf Capacitor
1 x 7.4V LiPo
1 x HC SR04 Ultrasonic Sensor
1 x LDR
1 x NPN Transistor
PCB (About 5cm X 5cm)
Chassis :
Misc Tools :
Note : I recommend using this parts list as a reference and to not follow it strictly....the parts I've used may not be available everywhere....so don't be afraid to improvise!!
Step 2: Building The Chassis...
Start off by drawing a rough sketch of where you want to place the servo motors on the hexapod body.This will depend on a lot of factors like where you'll want to place
the electronics,dimensions of the body,etc.
I won't go into specific measurements as each chassis wont be the same but make sure you stick to these basic points :
The servo that tilts the hexapod is located at the centre of mass of the robot.
Make sure you're aware of the weight each servo can carry.
Align the right and left legs properly
Make the legs for the servo in the center a bit shorter than the other legs...this makes it easier to tilt the hexapod.
Start by taking 2 pen refill tubes and make holes through them.This is where the metal wire will go through and hold them together to give a strong support for the legs.
Next twist the wire all the way down to the end of the tubes and cover the legs with black tape.The black tape gives the legs a carbon-fibre look..well kind off.Now its time
to connect the leg to the mechanno piece using hot glue.(The pictures will serve as a better guide :p)
Repeat these steps for all the legs...I've included pictures of all the completed leg pieces.
Once you have all the legs made connect them to the servo horns using some hot glue and screws.
I've also added a blue backlight to the head....makes the robot look a bit more alive!!
There's also an LDR on the top of the head to measure the light intensity of the surroundings...and also a way for the robot to know when its being petted. :D
Image Notes
1. used a piece of straw to make it compact
Step 4: The Electronics...
For controlling the servo's I've used an Arduino pro mini due to its small footprint.
Note : The battery input is given to a 5V regulator and then fed to the servos..DO NOT CONNECT 7.4V TO THE SERVOS!!
Left Servo----->Pin 9
Right Servo----->Pin 11
Center Servo----->Pin 10
The circuit diagrams for the LEDs,LDR and Battery voltage detection circuit are in the pictures.
Image Notes
1. Headlights Ckt
Step 5: Putting Everything Together....
I've mounted the head on a tiny piece of PCB using female headers....this board is then connected to the main controller board via wires....duh :D
The two headlights are hot glued on both sides of the head in the front end.
The main controller board and battery are on the bottom of the chassis.....held together with some double sided tape.
Neatly zip tie all the wires coming out of the main controller board.
It starts off by initializing pins,setting the servos to their center position andtaking ambient light readings from the LDR.
The first thing the main loop does is check the battery level....because no one is going anywhere without battery :p
If the battery is above the minimum value the loop will continue forward...otherwise the hexapod will detach all servos and rapidly flash it's blue LED, indicating a change
of batteries is needed.
It then checks the light reading over the head....to see if the robot is being petted or not.If all's well the robot goes into the obstacle avoider mode and starts walking
around.
If you pet the robot on the head (gently)....its LDR will sense the change in light intensity and the robot will happily wobble under your hand.
File Downloads
hexapod.txt (3 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'hexapod.txt']
Step 7: It's Alive!!!
After uploading the code on to the Arduino....connect the batteries and watch your hexapod take its first steps. (You'll probably have to do a little debugging first though.)
If you've enjoyed this instructable please vote for it!! (Big orange button on the top-right :D)
Cheers!!
Advertisements