Introduction: RC Simple 3 Servos Hexapod Walker
This project has been inspired by Pololu Simple Hexapod Walker.
https://www.pololu.com/docs/0J42/1
Please visit their website, they have amazing things on sale, if you are passionate about robotics.
Instead of making a robot (using the Micro Maestro Controller), I plugged the 3 servos to my Arduino Nano and after connecting the 6 channel FS-R6B receiver, I've been able to control the hexapod remotely, using my FlySky FS-T6.
For this instructable you need:
3x Long paperclips (total length 16cm)
1x 6 Channel Receiver
https://www.banggood.com/Wholesale-FS-R6B-FlySky-2...
4x Servo (1 spare just in case something goes wrong)
https://www.banggood.com/4-X-TowerPro-SG90-Mini-Ge...
1x Arduino Nano
https://www.banggood.com/ATmega328P-Arduino-Compat...
2x 7.4V Lipo Batteries*
*(Please use all the precautions when you are handling this battery, especially when you charge those.)
https://www.banggood.com/Giant-Power-7_4V-300mAh-3...
2x Voltage Regulator (7.4V to 5V) + 2 Heatsinks
https://uk.rs-online.com/web/p/products/2988508/?g...
1x Transmitter (I've used for all my projects my super-trusty Flysky FS-T6)
https://www.banggood.com/Flysky-FS-T6-V2-2_4GHz-6C...
1x Mini Breadboard
https://www.banggood.com/Mini-Solderless-Prototype...
2x 3mm LEDs
a pair of small pliers
UHU Por (fantastic for nearly any project)
thick double sided sell-o-tape
6x 1.5mm Rubber Prop Adapter
Step 1: Bend the Paperclips Aka Making the Legs of the Hexapod
Using a small pair of pliers, bend the paper clips as in the pictures.
You basically will have 2 legs with an upside down V shape and one with a M shape.
The 2 paperclips with the V shape will be bent every 4cm.
The paperclip with the M shape will be bent 3cm from the edges and in the centre at 45 degrees.
Step 2: Connect the Servos and Test That Everything Works
I've connected 4 channels of my receiver to the Arduino (I always use the bigger Uno for my tests), and the 3 signals (orange/yellow/white cable) of the servos.
After, I've connected Vcc and Ground of the receiver, to 5V and GND of the Arduino.
It's better to power the servos with an external battery, therefore I've plugged all the Vcc and Ground of the servos themselves to the mini breadboard.
Please note that during the test I haven't used/plugged the 5V voltage regulator.
Step 3: Migration to Arduino Nano... and Further Tests
The previous step was ok, therefore I've migrated everything to an Arduino Nano.
After this operation. I've done a few more tests.
Step 4: Attaching the Servos
Basically you need to attach the 3 servos, like I did in the pictures.
You can glue them together, having the servo placed at the centre that as his horns pointed forward and the 2 other ones placed aside, with the horns pointed up.
Step 5: Attach the Legs/Paperclips to the Servo Horns
You can use the servo horns shaped as a cross for the 2 servo positioned aside and the straight one for the central servo.
You have to attach the legs/paperclips with the V shape to the servos aside and the leg with the shape of a M to the central one.
I glued all the paperclips, but to make the connection less wobbly (this hexapod is a bit heavy) I've added 2 pieces of black heatshrink, to both sides of the servo horns.
Step 6: Putting Everything Together
The breadboard with the Arduino Nano attached, will be placed behind the servos.
On top of it, using some double sided sell-o-tape I've sat the 6 channel receiver.
All the cables are hidden under the body of the hexapod.
As I've mentioned at the beginning of this project, I've added 2 voltage regulators to power the Arduino and the servos with 5 Volts. I've also added 2 heatsinks because the Mosfets become a bit hot.
Please do not touch the voltage regulator/heatsinks when you are using the hexapod.
It's possible to power the Arduino Nano directly to the Vin (up to 12V according to the data sheet), but that pin is connected to a voltage regulator on the Arduino board. If during the tests you plug/unplug the Arduino Nano a few times, you can burn it... as it has happened to me. :-(
Last but not least, the batteries are placed on top of each other and attached to the 6 channel receiver.
Step 7: Make the Body of the Hexapod With the LEDs
I've basically used the same technique of another of my Instructables (25, so far).
Please take a look at it.
https://www.instructables.com/id/Cool-Canopy-With-...
When you have done this process, you can plug the 2 wires to the 3.3V of your Arduino Nano.
In this way your hexapod will become "alive".
Step 8: Done!
Congratulations!
Now you can control your hexapod using your transmitter.
It can go forward, backward, left and right.
As a final touch you can use some black (or brown) heatshrinks, to cover the metal paperclips.
In this way the legs of the hexapod, will look much better.

Participated in the
Wireless Contest
5 Comments
5 years ago
Great Instructible! Do you have the code for the Arduino nano?
Reply 5 years ago
Of course, here it is!
Please follow me on Instructables and kindly subscribe to my youtube channel. There are a lot Arduino projects!
www.youtube.com/rcloversan
#include <Servo.h>
Servo middleServo;
Servo leftServo;
Servo rightServo;
int ch1; // Here's where we'll keep our channel values
int ch2;
int ch3;
int ch4;
int Servo; // Forward/Back/Left/Right
int move1;
int move2;
int move3;
int move4;
void setup() {
Serial.begin(9600); // Pour a bowl of Serial (for debugging)
middleServo.attach(8);
leftServo.attach(6);
rightServo.attach(9);
}
void loop() {
ch2 = pulseIn(5, HIGH, 25000);
move1 = map(ch2,1500,1971, -500, 500); //center over zero
move1 = constrain(move1, -50, 50); //only pass values whose absolutes are
//valid pwm values
if(move1>20){
ch1 = pulseIn(4, LOW, 25000);
ch3 = pulseIn(3, LOW, 25000);
ch4 = pulseIn(10, LOW, 25000);
middleServo.write(120); //97
leftServo.write(60);
rightServo.write(60);
delay(200);
middleServo.write(83);
leftServo.write(120);
rightServo.write(120);
delay(200);
middleServo.writeMicroseconds(1500);
leftServo.writeMicroseconds(1500);
rightServo.writeMicroseconds(1500);
Serial.print("move1:"); //Serial debugging stuff
Serial.println(move1);
if(move1=0){
middleServo.writeMicroseconds(1500);
leftServo.writeMicroseconds(1500);
rightServo.writeMicroseconds(1500);
}
}
ch3 = pulseIn(3, HIGH, 25000);
move3 = map(ch3,1000,1985, -500, 500); //center over zero
move3 = constrain(move3, -50, 50); //only pass values whose absolutes are
//valid pwm values
if(move3>0){
ch1 = pulseIn(4, LOW, 25000);
ch2 = pulseIn(5, LOW, 25000);
ch4 = pulseIn(10, LOW, 25000);
middleServo.write(83); //97
leftServo.write(60);
rightServo.write(60);
delay(200);
middleServo.write(120);
leftServo.write(120);
rightServo.write(120);
delay(200);
middleServo.writeMicroseconds(1500);
leftServo.writeMicroseconds(1500);
rightServo.writeMicroseconds(1500);
Serial.print("move3:"); //Serial debugging stuff
Serial.println(move3);
if(move3=0){
middleServo.writeMicroseconds(1500);
leftServo.writeMicroseconds(1500);
rightServo.writeMicroseconds(1500);
}
}
ch4 = pulseIn(10, HIGH, 25000);
move4 = map(ch4,1100,1985, -500, 500); //center over zero
move4 = constrain(move4, -50, 50); //only pass values whose absolutes are
//valid pwm values
if(move4>0){
ch1 = pulseIn(4, LOW, 25000);
ch3 = pulseIn(3, LOW, 25000);
ch2 = pulseIn(5, LOW, 25000);
middleServo.write(83); //97
leftServo.write(60);
rightServo.write(120);
delay(200);
middleServo.write(120);
leftServo.write(120);
rightServo.write(60);
delay(200);
middleServo.writeMicroseconds(1500);
leftServo.writeMicroseconds(1500);
rightServo.writeMicroseconds(1500);
Serial.print("move4:"); //Serial debugging stuff
Serial.println(move4);
if(move4=0){
middleServo.writeMicroseconds(1500);
leftServo.writeMicroseconds(1500);
rightServo.writeMicroseconds(1500);
}
}
ch1 = pulseIn(4, HIGH, 25000);
move2 = map(ch1,1100,1984, -500, 500); //center over zero
move2 = constrain(move2, -50, 50); //only pass values whose absolutes are
//valid pwm values
if(move2>0){
ch4 = pulseIn(10, LOW, 25000);
ch3 = pulseIn(3, LOW, 25000);
ch2 = pulseIn(5, LOW, 25000);
middleServo.write(120); //97
leftServo.write(60);
rightServo.write(120);
delay(200);
middleServo.write(97);
leftServo.write(120);
rightServo.write(60);
delay(200);
middleServo.writeMicroseconds(1500);
leftServo.writeMicroseconds(1500);
rightServo.writeMicroseconds(1500);
Serial.print("move2:"); //Serial debugging stuff
Serial.println(move2);
if(move2=0){
middleServo.writeMicroseconds(1500);
leftServo.writeMicroseconds(1500);
rightServo.writeMicroseconds(1500);
}
}
}
Reply 5 years ago
Also, do you have a diagram for the wiring?
Reply 5 years ago
I'm afraid I do not have the wiring diagram for this project, but if you follow my code, it shouldn't be difficult to figure out how to do that.
Basically you have the 4 signal pins of the receiver (ch1, ch2, ch3 and ch4 - aka last pins on the right, facing the receiver itself), connected to the digital pins of your Arduino Nano. Do the same thing for the signals of the 3 servos (yellow/white cable).
The "eyes/red LEDs" provided with 2 resistors are connected to 5V (anode) and GRD (cathode).
The only tricky thing is the fact that when you power the servos using an external Lipo battery and a 5V voltage regulator, the ground of the battery has to be connected to the GRD pin of your Arduino.
Reply 5 years ago
thanks I will