Apr 26th, 2020 | by: ELECTRONOOBS | Views 2205
Views 2205
I wanted to make this project for a long time. Inspired by a projet of HowToMechatronics from a few years ago. This robot is fully 3D printed and is just the first version and is sensorless. In the future I want to add a lot more controls and sensors. This robot has 18 high torque servo motors, runs with an Arduino MEGA and is controlled by Bluetooth with commands from a smartphone. I've made a simple App to control it. See the part list, the 3D printed files, the code and all you need in this tutoprial step by step.
See the video first
PART 1 - What we need

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.


We need:

PART 2 - Schematic

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.

PART 3 - Make the PCB

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.

PART 4.1 - The 3D printed robot

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.

PART 4.2 - Make 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.

PART 4.3 - Make the robot

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.

PART 5 - 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;

PART 6 - Test

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.

1 Comment

  • Max 7553

    about 6 months ago

    Hi, it seems that PART 5 - Code is not complete.

Login or Sign Up to post comments on this tutorial.