Humanoid Robot

by Scientist Ansh Mishra in Circuits > Arduino

511 Views, 2 Favorites, 0 Comments

Humanoid Robot

83268936_185713399171840_2769139404856360960_n.jpg

I have made a robot which is a humanoid robot it is made using Arduino Uno, sensors and motors.

It can walk, move in different directions, it also has a robotic hand that can grip anything.

The biggest quality of this robot is that it is controlled by voice commands.

It has an ultrasonic sensor as an eye.

Gathering the Materials

download.jpg
download (3).jpg
download (2).jpg
download (4).jpg
download (5).jpg
download (5).jpg

For this project, we need many things.

Things we need are:-

1. Chasis or robot body

2. 2 gear motors with wheels

3. 1 Arduino Uno+Cable

4. 1 L293D motor driver shield for Arduino Uno

5. 1 HC-05 Bluetooth Module

6. 1 Ultrasonic sensor

7. 1 9v battery

8. Some Battery connector

9. 1 Robotic Hand (optional)

You can buy it from Fly Robo in cheap.

Adding Motors and Wheels to Robot Leg.

WIN_20200128_23_51_23_Pro.jpg
WIN_20200128_23_53_26_Pro.jpg

In this step, we are going to add wheels to the robot's leg.

For this, we need to add wires to the gear motors and put them in the leg of the robot.

Then fix the motor in the robot leg as shown in picture

Making the Robot Stand Still.

WIN_20200129_00_04_20_Pro.jpg
WIN_20200129_00_04_51_Pro.jpg
WIN_20200129_00_05_14_Pro.jpg

For making the robot standstill we need to add 2 more wheels.

For this cut a PVC pipe and make a hole in a corner as shown in the picture.

Now add the wheels in this PVC pipe.

Making Robot Standstill Part 2.

WIN_20200129_00_10_40_Pro.jpg
WIN_20200129_00_12_07_Pro.jpg

Fix the wheels as shown in pictures.

Add Robot Hand Gripper.

WIN_20200129_00_22_39_Pro.jpg
WIN_20200129_00_22_32_Pro.jpg
WIN_20200129_00_21_22_Pro.jpg

I have already made a robot hand but if you want to make it then you can easily make it using a dc motor or servo

motor. I already have so I am going to install it.

Making the Circuit.

ROBOT CIRCUIT.jpg
83470871_196015258433243_8693367596445073408_o.jpg

Make the circuit as shown in the picture.

Upload Codes to Arduino.

download.png

The codes are below you only have to just copy it, paste it and upload it.

#include //Adafruit Motor Shield Library.
First you must download and install AFMotor library

#include //Servo library. This is standard library. (Sketch -> Include Library -> Servo)

String voice;

AF_DCMotor motor1 (1, MOTOR12_1KHZ); //create motor #1 using M1 output on Motor Drive Shield, set to 1kHz PWM frequency

AF_DCMotor motor2 (2, MOTOR12_1KHZ); //create motor #2 using M2 output on Motor Drive Shield, set to 1kHz PWM frequency

Servo myServo; //define servo name

int LED1 = A0; //define LED 1 pin

int LED2 = A1; //define LED 2 pin

int buzzerPin = A2; //define buzzer pin

void setup()

{

Serial.begin(9600); //start serial communication

myServo.attach(10); //define our servo pin (the motor shield servo1 input = digital pin 10)

myServo.write(90); //servo position is 90 degrees

pinMode(LED1, OUTPUT); //A0 is output pin

pinMode(LED2, OUTPUT); //A1 is output pin

pinMode(buzzerPin, OUTPUT); //A2 is output pin

}

void loop()

{

while (Serial.available()){ //Check if there is an available byte to read

delay(10); //Delay added to make thing stable

char c = Serial.read(); //Conduct a serial read

if (c == '#') {break;} //Exit the loop when the # is detected after the word

voice += c; //Shorthand for voice = voice + c

}

if (voice.length() > 0){

if(voice == "*go ahead"){

forward_car();

}

else if(voice == "*go back"){

back_car();

}

else if(voice == "*turn right") {

right_car();

}

else if(voice == "*turn left") {

left_car();

}

else if(voice == "*turn on light") {

LED_on();

}

else if(voice == "*turn off light") {

LED_off();

}

else if(voice == "*buzzer") {

buzzer_on();

}

else if(voice == "*stop") {

stop_car();

}

voice=""; //Reset the variable after initiating

}

}

void forward_car()

{

motor1.run(FORWARD);

motor1.setSpeed(170);

motor2.run(FORWARD);

motor2.setSpeed(170);

delay(2000);

motor1.run(RELEASE);

motor2.run(RELEASE);

}

void back_car()

{

motor1.run(BACKWARD);

motor1.setSpeed(170);

motor2.run(BACKWARD);

motor2.setSpeed(170);

delay(2000);

motor1.run(RELEASE);

motor2.run(RELEASE);

}

void right_car()

{

myServo.write(0);

delay(1000);

myServo.write(90);

delay(1000);

motor1.run(FORWARD);

motor1.setSpeed(170);

motor2.run(BACKWARD);

motor2.setSpeed(170);

delay(1000);

motor1.run(RELEASE);

motor2.run(RELEASE);

}

void left_car()

{

myServo.write(180);

delay(1000);

myServo.write(90);

delay(1000);

motor1.run(BACKWARD);

motor1.setSpeed(170);

motor2.run(FORWARD);

motor2.setSpeed(170);

delay(1000);

motor1.run(RELEASE);

motor2.run(RELEASE);

}

void LED_on ()

{

digitalWrite(LED1, HIGH);

digitalWrite(LED2, HIGH);

}

void LED_off ()

{

digitalWrite(LED1, LOW);

digitalWrite(LED2, LOW);

}

void buzzer_on ()

{

tone(buzzerPin, 100);

delay(800);

noTone(buzzerPin);

}

void stop_car ()

{

motor1.run(RELEASE);

motor2.run(RELEASE);

}

Install a Software to Control the Robot in Your Smart Phone.

download (8).jpg
download (7).jpg

To control the robot we need to install the software named "AMR voice" or "Arduino Meets Robot" which you can download from the given link:-

https://amr-voice.en.aptoide.com/

After installing open it and connect it to the robot.

After connecting tap the mic and give commands to Robot.

Robot Is Completed.

I had made this robot you can also make it.

WRITTEN BY:-

SCIENTIST ANSH MISHRA