Path Clearing Wall-E

This instructable is about making a robot that looks like Wall-E

and clears its path if it finds an obstacle.

The things you will need are:

  • 6 square metal or plastic sheets in your choice of size (I used 7 by 7 centimeter ones)
  • an arduino(I used anNG clone)
  • paper
  • cardboard
  • an ultrasonic sensor(I used the HC-SR04)
  • a micro servo
  • 4 'L' joints
  • a caster
  • 2 'BO' or DC motors(I used the BO motors cause they came with wheels to match)
  • various stationary items
  • tape
  • zip ties
  • 2 9v batteries
  • a hobby knife
  • wires
  • a soldering iron(only if your motors dont have wires soldered to them already)
  • sponge
  • a screw driver set
  • a motor bridge(I used an L293 motor driver)
  • and a hot glue gun

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Making a Head

The head, I decided to make the place to put the ultrasonic sensor. So for that I made a cardboard 'head' for my wall-e .

Now since were mounting the sensor in a 'head' you should write down (on the head itself) the pin names and the wire colors used so you know which wire is supposed to go where then put on a cardboard neck and test the sensor .

Step 2: The Frame

This part needs some proper thought over design dicisions ,and I'm saying this out of experience with this project.

The plates need holes drilled in them if you are using metal and the 'L' joints need to fit perfectly(something I didnt pay attention to thus the awkward finish) .

First I drilled the holes for the motors shafts to go through, once they were put through the sheet I screwed on their wheels and taped the motors to the sheet then connected the motors to the motor driver.

After that I bolted the top plate to the back one and the bottom one to the resulting structure and taped on the paper decals of wall-e I drew earlier and added the head assembly.

Then I used zip ties to join the side plates with the motors on them onto the frame (this is why I said drill the holes and take precise measurement I could'nt use the 'L' joints)

On the frame I then taped the 'head'

Step 3: The Wiring and Adding Hands

Now since I used a metal frame the arduino needed padding so I screwed on some sponge insulation.

Under the robot I hot glued on a caster to support the robot.

On one side I cut a groove for fitting a servo to move the hands .

Then I put the motor controller in the space between the two motors.

After that I made a hand assembly from cardboard and put sponge padding to keep it in shape, on one end of that I taped the servo and wired that to the arduino.

And hot glued the servo in place and scerwed the other end to the frame.

Step 4: The Code

const int left1 = 11;// left motor pin 1
const int left2 = 10;// left motor pin 2
const int right1 = 13; //right motor pin 1
const int right2 = 12;//right motor 2
Servo handServo;
const int Trig = 4;// the HC-SR04 ultrasonic sensor's trigger pin
const int Echo = 3;// and it's read pin
void setup() {
  // set the motor pins as output
  pinMode(left1, OUTPUT);
  pinMode(left2, OUTPUT);
  pinMode(right1, OUTPUT);
  pinMode(right2, OUTPUT);
  pinMode(Echo, INPUT);
  pinMode(Trig, OUTPUT);
  handServo.attach(5);// connect the servo to pin 5
void loop() {
  long duration, cm;// set variable for duration of ping and the distance units
  //make  the motors rotate in sync(robot goes forward)
  handServo.write(60);//initialize the hand position
  digitalWrite(left1, HIGH);
  digitalWrite(left2, LOW);
  digitalWrite(right1, HIGH);
  digitalWrite(right2, LOW);
  digitalWrite(left2, HIGH);
  digitalWrite(left1, LOW);
  digitalWrite(right1, HIGH);
  digitalWrite(right2, LOW);
  digitalWrite(left1, HIGH);
  digitalWrite(left2, LOW);
  digitalWrite(right1, HIGH);
  digitalWrite(right2, LOW);
  //look to see if theres anything in front
  digitalWrite(Trig,LOW);//give a low on the trigger for a clean high
  digitalWrite(Trig,HIGH);//now send a high pulse
  digitalWrite(Trig,LOW);//and low again
  duration = pulseIn(Echo,HIGH);//read the echo pin for a high 
  //the ultrasonic sensor I used (the HC-SR04) has 4 pins two for power and ground, 
  //one for sending a pulse and the last one for reading the pulse sent
  //you calculate the distance an object is at by calculating the time
  //difference between the pulse sent and when it was read.
  cm = microsecondsToCentimeters(duration);
  //if pulse read was below a certain limit move the servos 
  if (cm < 18)  {
    handServo.write(60);//hands go back up
long microsecondsToCentimeters(long microseconds) 
  //sounds speed is 29 microseconds per centimeter.
  //the pulse makes a round trip, so the distance is divided by 2
  return microseconds/ 29 / 2;
Robotics Contest

Participated in the
Robotics Contest

Tech Contest

Participated in the
Tech Contest

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    10 Discussions


    3 years ago

    Awesome !! I made it it's so easy and nice!!!!!