Introduction: DogBot

Hi
This instructable is about how to make a fourlegged robot dog, which I call dogBot.
This robot is powered by eight geared motors of 20 rotations per minute.
This robot is controlled with Bluetooth via an android phone.
Each of the leg of the robot has 2 motors one for the leg and one for the
knee joint. The motors are controlled by Motor driver L239D.

Step 1: Parts

ELECTRONICS
- Arduino uno -1
- L239D motor drivers- 2
- dc geared motors not more than three volts because above that it will start straining the ic
- bread board
- bread board wires
- jumper wires
-Bluetooth module HC05
- android phone with blueterm app
Hardware
-PVC casing about a meter
- MDF board 4 mm thickness
- anything suitable for making the head and tail of the robot
- Screws or a adhesive
- small wooden blocks 5*1*1 cm - four of them

Step 2: Making the Body

To make the body cut 2 pieces of MDF 5 by 3 inches
Drill holes in the wooden blocks as shown in the picture
Now paste them to a board in each corner as shown in the pictures
After pasting let it to dry and then screw the motors
Drill holes in each corners of the both the boards of MDF, this is to cover the electronics
This is the main body.

Step 3: Legs and Knees

-To make legs take pvc casing 8 cm in lenght
-Open it
-Take deeper end and drill holes according to your motor dimensions
-Now screw the motor
- on the upper end with a motor connector fix the leg to the motors of the body
- repeat this 3 more times to make four legs
Making knees
-Cut pvc casing 6 cm
- make a hole on the upper side and fix it to the motor of the leg
- for more support a piece of MDF can attached on the base of the foot
Repeat this 3 more times

Step 4: Connecting L239d's

Connecting first l239d (all knee joints)
- 1,8,16,9 to positive terminal of battery
- 4,5,12,13 to ground
- 2 to pin 3 Arduino
- 7 to pin 4 Arduino
-15 to pin 8 Arduino
- 10 to pin 9 Arduino
- 3,6,11, 14 to four motors

Connecting second l239d (all leg joints)
- 1,8,16,9 to positive terminal of battery
- 4,5,12,13 to ground
- 2 to pin 6 Arduino
- 7 to pin 7 Arduino
-15 to pin 10 Arduino
- 10 to pin 11 Arduino
- 3,6,11, 14 to four motors

Step 5: Connecting Bluetooth Module

-Tx of Bluetooth to Rx of Arduino
- Rx of Bluetooth to Tx of Arduino
- 5v to 3v3 Arduino
- ground to ground Arduino
NOTE: connect Tx to Rx and Rx to Tx
and remove the pins before uploading the code.

Step 6: Coding Arduino

int legs1=3;
int legs2=4;
int knees1=6;
int knees2=7;
int legs3=8;
int legs4=9;
int knees3=10;
int knees4=11;
int state;

int flag=0;

void setup() {

pinMode(legs1, OUTPUT); //leg 1 3
pinMode(legs2, OUTPUT); // leg 13
pinMode(knees1, OUTPUT); //knee 1 3
pinMode(knees2, OUTPUT);// knee 1 3

pinMode(legs3, OUTPUT);// leg 2 4
pinMode(legs4, OUTPUT);// leg 2 4
pinMode(knees3,OUTPUT);// knee 2 4
pinMode(knees4,OUTPUT);// knee 2 4


Serial.begin(9600);
}

void loop() {

if(Serial.available() > 0){
state = Serial.read();
flag=0;
}

if (state == '0') { // motor off
digitalWrite(legs1, LOW);
digitalWrite(legs2, LOW);
digitalWrite(knees1,LOW);
digitalWrite(knees2,LOW);
digitalWrite(legs3,LOW);
digitalWrite(legs4,LOW);
digitalWrite(knees3,LOW);
digitalWrite(knees4,LOW);
if(flag == 0){
Serial.println("Motor: off");
flag=1;
}
}
// if the state is '1' the motor will turn right
else if (state == '1') {
digitalWrite(knees1,HIGH);
digitalWrite(knees2,LOW);
delay(100);
digitalWrite(knees1,LOW);
digitalWrite(knees2,LOW);
delay(400);

digitalWrite(legs1, LOW);
digitalWrite(legs2, HIGH);
delay(300);
digitalWrite(legs1, LOW);
digitalWrite(legs2, LOW);
delay(400);

digitalWrite(knees1,LOW);
digitalWrite(knees2,HIGH);
delay(100);
digitalWrite(knees1,LOW);
digitalWrite(knees2,LOW);
delay(400);

digitalWrite(legs1, HIGH);
digitalWrite(legs2, LOW);
delay(300);
digitalWrite(legs1, LOW);
digitalWrite(legs2, LOW);
delay(400);

digitalWrite(knees3,HIGH);
digitalWrite(knees4,LOW);
delay(100);
digitalWrite(knees3,LOW);
digitalWrite(knees4,LOW);
delay(400);
digitalWrite(legs3,LOW);
digitalWrite(legs4,HIGH);
delay(300);
digitalWrite(legs3,LOW);
digitalWrite(legs4,LOW);
delay(400);
digitalWrite(knees3,LOW);
digitalWrite(knees4,HIGH);
delay(100);
digitalWrite(knees3,LOW);
digitalWrite(knees4,LOW);
delay(400);
digitalWrite(legs3,HIGH);
digitalWrite(legs4,LOW);
delay(300);
digitalWrite(legs3,LOW);
digitalWrite(legs4,LOW);
delay(400);
if(flag == 0){
Serial.println("Motor: forward");
flag=1;
}
}

}

Step 7: Controlling

To control the robot the blue term app has to be downloaded in an android phone.
I have used Galaxy ace but I think any will work
Press '0' to stop
And '1' to start

Tech Contest

Participated in the
Tech Contest

Robotics Contest

Participated in the
Robotics Contest