loading

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)

This is an Instructable on building an inchworm robot. This particular model was build for Make Course at the University of South Florida. The robot is designed to take small precise steps in a straight direction.

Step 1: Robot Body

First step in building a robot is designing its body. All the parts were designed in Autodesk Inventor and 3D printed. Only 2 parts had to be purchased.

Picture 1: Black Box, provided with the MakeCourse kit

Picture 2: Rear leg, 3D printed. The slit on top allows the leg move up and down in order to keep the body straight.

Picture 3: Front leg, 3D printed. Fully attached to the black box.

Picture 4: Rotator, 3D printed. Features an opening for the servo head to be inserted. This is the rotating part.

Picture 5: Rod, 3D printed. Is attached to the rotator and the rear leg. Delivers the motion to the rear leg.

Picture 6: Wheel, 3D printed. The opening in the middle is for the bearing to be inserted in.

Picture 7: Axle connector, 3D printed. Connect to the steel rod axle, and fits into the bearing to hold wheels.

Step 2: Purchasing Parts

Only 2 parts were purchased: steel rod for the axle, and one way ratchet bearings for the wheels.

The bearing have to rotating in one direction-forward. Therefore, when placing the bearings, make sure they are rotating the right way.

Links for purchase:

Steel Rod

http://www.amazon.com/Polished-Finish-Precision-An...

Bearings

http://www.amazon.com/Bearing-Sprag-Freewheel-Backstop-Clutch/dp/B002BBJCC8?ie=UTF8&psc=1&redirect=true&ref_=oh_aui_detailpage_o01_s00

Step 3: Body Assembly

After all the parts are obtained, assemble the body. Attach the front leg to the box first, then attach the rear leg. Put the axle rods through the openings in the legs, and attach the wheel assembly to the axle. Make sure wheels rotate in the forward direction.

Further, attach the rod to the rear leg, and to the rotator. Attach the servo motor inside the box and attach the rotator to the servo.

Make sure all parts fit nicely, without moving around.

Step 4: Control System Block Diagram

Create a control system block diagram to see how the control of the robot are gonna be done. This robot features proximity sensor, that runs the servo, if an object is placed closer than 10 cm to the proximity sensor. It also uses LED lights to indicate whether or not the robot is moving or standing.

Step 5: Circuit Board

The circuit board was then built. The image shows the completed board, as well as a Fritzing diagram. On the diagram, a infrared proximity sensor is shown, but ultrasound sensor was used for the actual robot.

Step 6: Arduino Sketch

Provided here is the complete Arduino sketch used for the project. After assembling the robot together and uploading the sketch, the robot will move forward when an object is placed within 10 cm of the proximity sensor.

/******************************************
PURPOSE: Inchworm Robot Created by

Mikhail Ivanovsit DATE: 4/13/2016 *******************************************/

#define echoPin 6 // This is the echo pin

#define triggerPin 7 // This is the trigger pin

#include //include proximity sensor library #include //include servo library

Servo myservo;

int pos=0; //define a variable to track the position of the servo

void setup() {

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

pinMode(echoPin, INPUT);//set pinmodes

pinMode(triggerPin, OUTPUT);

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

myservo.write(pos); // sets the initial position of the servo to 0

pinMode(2, OUTPUT);

pinMode(3, OUTPUT);

digitalWrite(3, HIGH); //set the red LED to be on, and the green LED off

digitalWrite(2, LOW); }

/***************************main loop*********************************************************/

float check; //variable to track the distane

void loop() {

Serial.print("The distance is : "); //start serial monitor to track analyze the code

digitalWrite(triggerPin, HIGH); // make a 10usec pulse, use the proximity sensor

delayMicroseconds(10);

digitalWrite(triggerPin, LOW); //turn off the trigger pin

float distance = pulseIn(echoPin,HIGH); //now read the pulse that is sent back by the sensor //pulseIn returns the pulse length in usec

distance= distance/58; //the distance in [cm] is calculated by pulselength[usec]/58

Serial.print(distance,DEC);// send the measurement to the serial monitor

Serial.println(" cm"); //serial monitor is used to keeo track of the data obtained by the proximity sensor

check=11; //assign an initial value to check higher than 10 cm

myservo.write(0); //return servo to position 0 in the beginning of the loop

delay(500); //delay was set to allow the servo to complete the 180 degree motion

check=distance; //assign variable check the value of distance

if (check<10) {

myservo.write(80); //if the distance is less than 10 cm, move the servo to position 180

digitalWrite(3, LOW); //light up green LED, and turn off red LED

digitalWrite(2,HIGH); }

else {

digitalWrite(2, LOW); //if the distance is more than 10cm, then keep the LEDs in initial state digitalWrite(3,HIGH);

}

delay(500);

}

<p>Cool! I would love to see a video of it inching along! :)</p>

About This Instructable

476views

5favorites

License:

More by MikhailI1:InchWorm Robot 
Add instructable to: