Creeper Rover Robot

by 2RACHIT2 in Circuits > Robots

974 Views, 7 Favorites, 0 Comments

Creeper Rover Robot

temp_920017358.jpg
temp_-1864176426.jpg
temp_485411942.jpg
temp_-154769895.jpg
temp_1345676486.jpg
temp_60164728.jpg
temp_705968378.jpg
Hi, guys I'm back with this instructable as I said In my previous instructable about the minecraft challenge

Materials

For this instructable you will need...

1. Cardboard
2. 3 Servos
3. Some wires
4. Arduino Uno board(Or any other)
5. Ultrasonic sensor
6. 9v Battery and connector
7. Some wheels
8. Breadboard
9.Hardwork ;D

Body

temp_-1457038338.jpg
temp_1899429934.jpg
temp_347059323.jpg
temp_1506681796.jpg
temp_-846708524.jpg
temp_1879457370.jpg
temp_-1432013834.jpg
temp_-931924351.jpg
temp_462948757.jpg
temp_-1707743065.jpg
temp_1290568611.jpg
temp_-730887711.jpg
Take your cardboard and cut it according the templates given above.
After cutting it glue the parts and paint the cardboard using a reference pic of a creeper.......

Arduino Schematic

temp_492537609.jpg
This is the arduino schematic I used. I am using 2 continuous servos for the wheels and 1 normal servo for head.

Arduino Sketch

This is the arduino sketch...........

// Creeper Rover Bot
#include  //include Servo library
const int RForward = 0;
const int RBackward = 180;
const int LForward = RBackward;
const int LBackward = RForward;
const int RNeutral = 90;
const int LNeutral = 90; //constants for motor speed
const int pingPin = 7;
const int irPin = 0;  //Sharp infrared sensor pin
const int dangerThresh = 10; //threshold for obstacles (in cm)
int leftDistance, rightDistance; //distances on either side
Servo panMotor; 
Servo leftMotor;
Servo rightMotor; //declare motors
long duration; //time it takes to recieve PING))) signal

void setup()
{
  rightMotor.attach(11);
  leftMotor.attach(10);
  panMotor.attach(6); //attach motors to proper pins
  panMotor.write(90); //set PING))) pan to center
}

void loop()
{
  int distanceFwd = ping();
  if (distanceFwd>dangerThresh) //if path is clear
  {
    leftMotor.write(LForward);
    rightMotor.write(RForward); //move forward
  }
  else //if path is blocked
  {
    leftMotor.write(LNeutral);
    rightMotor.write(RNeutral);
    panMotor.write(0);
    delay(500);
    rightDistance = ping(); //scan to the right
    delay(500);
    panMotor.write(180);
    delay(700);
    leftDistance = ping(); //scan to the left
    delay(500);
    panMotor.write(90); //return to center
    delay(100);
    compareDistance();
  }
}
 
void compareDistance()
{
  if (leftDistance>rightDistance) //if left is less obstructed
  {
    leftMotor.write(LBackward);
    rightMotor.write(RForward); //turn left
    delay(2000);
  }
  else if (rightDistance>leftDistance) //if right is less obstructed
  {
    leftMotor.write(LForward);
    rightMotor.write(RBackward); //turn right
    delay(2000);
  }
   else //if they are equally obstructed
  {
    leftMotor.write(LForward);
    rightMotor.write(RBackward); //turn 180 degrees
    delay(2000);
  }
}

long ping()
{
  // Send out PING))) signal pulse
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);
 
  //Get duration it takes to receive echo
  pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);
 
  //Convert duration into distance
  return duration / 29 / 2;
}

Combine

temp_-1152723388.jpg
Mix up your body and the electronics together and extend the wires of the ultrasonic sensor so it can make up to the face.

Make 2 holes at the eyes of the creepers face for the sensor....
Take the normal servo and glue it on its neck and attach creepers head to the servo shaft.

If you are getting any problem to fit your arduino inside the body you can use an attiny chip or you can prototype the arduino on a protoboard, there are many instructables on "how to prototype an arduino?"

HISSS ......BOOM....

temp_83249999.jpg
temp_1022129705.jpg
Place it down and let it rover around your house...........

Thankings

Thank you for seeing this instructable and if you like it pls pls pls vote it in the Minecraft Challenge.....