To make this project we need a lot of 3D printed parts and a few more components but a lot of manual work. The electronics list is very small, the rest are just plastic parts, screws, glue, ect. See the full part list below with what I've used. The battery I'ver used was 7.4V but is better a 11.1V one. We must use an Arduino MEGA becuse it has more pins and memory. The STL files are ready to be printed and need no support.
- 1 x Arduino MEGA: LINK eBay
- 1 x HC06 Bluetooth module: LINK eBay
- 18 x MG995 servo motor: LINK eBay
- 1 x 2S or 3S LiPo battery: LINK eBay
- 1 x 150W 12A Buck Converter: LINK eBay
- 6 x 608zz Bearings: LINK eBay
- M3 Brass Insertions: LINK eBay
- M3 Screws 2cm: LINK eBay
- 1 x Toggle switch LINK eBay
- 1 x LED: LINK eBay
- 2 x 2K resistor: LINK eBay
- 2 x 1K resistor: LINK eBay
- 1 x 150R resistor: LINK eBay
- 1 x PCB terminal: LINK eBay
- 1 x 7x10cm prototyping PCB: LINK eBay
- 1 x male pins: LINK eBay
- 1 x female pins: LINK eBay
- Thin wire: LINK eBay
The connections are very simple but we have a lot. First connect positive pin of the battery to the swithc. From the swithc and battery we connect to the buck converter input. Set the converter to 7.2V. This 7.2V will then be connected to all servo motors and to the Vin pin of the Arduino MEGA. Share GND. Connect the Bluetooth module and remember to add a voltage divider to the RX pin to lower the voltage to 3.3V. Connect the PWM pins from the MEGA to each servo motor as below. Also add the battery indicator LED and the battery read voltage divider and connec it to analog input A1.
You can start with the PCB if you want. Make all connections as in the scheamtic above to the prototyping PCB. I've used those thin wires for all PWM connections but I've used thicker wires and add a lot of solder to the PCB for the power tracks of 7.2V and GND from the buck converter. All 18 motors will use a lod of current so we need thick wires. Add the PCB conenctor as well for the 7.2V input. Solder the LED and male and female pins. The male pins must fit on the Arduino MEGA female pins so test that before you solder the pins. Add male pins for all servo motors and have in mind each motor needs GND, 5V and PWM signal. GND and 5V can be soldered with one common wire each, but for PWMs you will need a separated conenction so we have a lot of wires.
We start making the robot by making the legs. We need 6 legs (hexapod daaah). Each leg needs 7 3D printed parts as you can see below. Get all STL files from this link or from the step above and print the parts using PLA material. I've used a 0.4mm nozzle, 0.3mm layer height and 20% infill. We need no support and all parts are already oriented and ready for print. So, get the 7 parts for one leg.
You should end with a leg like below. use the brass insertions as nuts for the screws. Add the servos on each 3D printed part. Better see video for all details. Make sure the servos are in their middle position more or less. Screw everythign in place and then do the same for 6 legs.
Add a bearing on each leg. Then place the legs on the bottom part of the robot. Add the head and tail with M3 screws adn those brass insertions. Place the Arduino with the PCB in the middle and on side of the Arduino palce the buck converter. The Lipo battery will go below the bottom part of the robot (on the belly) because we don't have enough space. Add the swithc button from the battery to the regulator. make all conenctions. Connect the servos to the PCB we have made before and close the robot with the top part. Use the palstic hooks and screws from the servos to close the robot. Ad extra screws if needed. That's it. Is time to upload the code.
Get the code from below. Arduino IDE should have all those libraries. Just compile and uplaod it to the Arduino MEGA. Select MEGA board and the COM. Then connect the App and thest the robot. You might need to change the home position values for each servo so make some tests and change tose valeus in the code as you can see below.
#include // We use software serial on pins D12 and D8 for HC06
SoftwareSerial Bluetooth(12, 9); // Arduino RX 12 and TX 9 -> HC-06 Bluetooth TX RX
#include //We will use servo library
/*/////////////////Initial home position in degrees//////////////////
The first leg is the front left leg as seen from the front
Thew first motor of each leg is the one closer to the robot body*/
int home_Leg1_Mot1 = 75;
int home_Leg1_Mot2 = 90;
int home_Leg1_Mot3 = 100;
int home_Leg2_Mot1 = 70;
int home_Leg2_Mot2 = 90;
int home_Leg2_Mot3 = 115;
int home_Leg3_Mot1 = 70;
int home_Leg3_Mot2 = 90;
int home_Leg3_Mot3 = 100;
int home_Leg4_Mot1 = 105;
int home_Leg4_Mot2 = 90;
int home_Leg4_Mot3 = 110;
int home_Leg5_Mot1 = 75;
int home_Leg5_Mot2 = 90;
int home_Leg5_Mot3 = 90;
int home_Leg6_Mot1 = 110;
int home_Leg6_Mot2 = 100;
int home_Leg6_Mot3 = 115;
Open the App. Firstr pait to the HC06 so start the robot. Conenct using 1234 or 0000 password. In teh app click the Blutooth icon and select the HC06. Then start controlling the robot. I hope you like this project. Consider supporting my work on PATREON or support me via PayPal. Thank you.