Introduction: Cardboard Robotic ARm

Basic 2-axis robotic arm made of cardboard that pivots and turns on and off an LED light

Supplies

List of supplies:

  • Card Board
  • Sheet Metal
  • 2 Servo Motors
  • Arduino MEGA
  • Connecting Wires
  • Super Glue
  • Bread Board
  • Duct Tape
  • LED
  • 22k Resistor
  • Ultrasonic Sensor

Step 1: Cut Out & Glue Cardboard

Cut out and glue pieces of cardboard for the base, arm, claw, and main arm

  • The base is made up of three pieces of cardboard that are 3" x 3", glue these pieces together and wrap them in duct tape to make it weigh more and less likely to fall over.
  • The main arm is made of 4 piece of cardboard that is 1" x 4", glue 2 sets of 2 together
  • The arm is made of 2 pieces of cardboard that are 0.5" x 4" glued together
  • The claw is made of 2 sets of 2 pieces in the shape of an L. The dimensions are 0.25" in width, and 2" in length on both ends

Step 2: Arm Structure

Cut out a 2" x 2" piece of sheet metal and bend both ends at 0.5" to 90 degrees, this should look like a U. Next, glue the 2 pieces of cardboard of the main arm to both ends of the U-shaped sheet metal. Next attach the claw to the arm with super glue as it is in the provided picture.

Step 3: Servo Motors

The servos are then glued to the pieces of cardboard that were just cut out. one servo is glued between the two parts of the main arm. The 2nd servo is glued at the top of the main arm to the sheet of metal that was previously made. connect the servo motor to the base and the other to the arm so that they can move and control the base and arm.

Step 4: Ultrasonic Sensor

Get your 2nd piece of sheet metal and cut it to 16" x 3.5". After that, bend one end to 90 degrees about 1.5" away from the edge. Next place the ultrasonic sensor to the long end and secure it with duct tape and make sure that it's not going to move around easily.

Step 5: Electrical

to connect all of the components together correctly, follow the electrical schematic above to ensure all the electrical components are correct.

Step 6: Code

Using the coding program Arduino IDE, add the following code to the program and download it to the Arduino using a USB.

Code:

#include <Servo.h>


Servo myservo;  // create servo object to control a servo

// twelve servo objects can be created on most boards


int pos = 0;    // variable to store the servo position

int pos2 = 100;

int servo2Pin = 8;

Servo myservo2;

int trigPin = 11;    // TRIG pin

int echoPin = 10;    // ECHO pin


float duration_us, distance_cm;



void setup() {

  myservo.attach(9);  // attaches the servo on pin 9 to the servo object

  myservo2.attach(servo2Pin);

    Serial.begin (9600);


  // configure the trigger pin to output mode

  pinMode(trigPin, OUTPUT);

  // configure the echo pin to input mode

  pinMode(echoPin, INPUT);

  pinMode(13,OUTPUT);

}


void loop() {

  Serial.print(distance_cm);

  for (pos = 0; pos <= 100; pos += 3) { // goes from 0 degrees to 180 degrees

    // in steps of 1 degree

    myservo.write(pos);              // tell servo to go to position in variable 'pos'

    delay(50);                       // waits 15ms for the servo to reach the position

  }

   digitalWrite(trigPin, HIGH);

  delayMicroseconds(1);

  digitalWrite(trigPin, LOW);


  // measure duration of pulse from ECHO pin

  duration_us = pulseIn(echoPin, HIGH);


  // calculate the distance

  distance_cm = 0.017 * duration_us;

for (pos2 = 100; pos2 >= 70; pos2 -= 1) { // goes from 0 degrees to 180 degrees

    // in steps of 1 degree

    myservo2.write(pos2);              // tell servo to go to position in variable 'pos'

    delay(50);                       // waits 15ms for the servo to reach the position

    digitalWrite(13,HIGH);

  }

  // print the value to Serial Monitor

  Serial.print("distance: ");

  Serial.print(distance_cm);

  Serial.println(" cm");


    digitalWrite(13, LOW);


      for (pos = 100; pos >= 0; pos -= 3) { // goes from 0 degrees to 180 degrees

    // in steps of 1 degree

    myservo.write(pos);              // tell servo to go to position in variable 'pos'

    delay(50);                       // waits 15ms for the servo to reach the position

  }

  }