+ All Categories
Home > Documents > csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike...

csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike...

Date post: 24-Jan-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
24
1 TECHNICAL PROJECT INTERIM REPORT FOR ET 494 SENIOR DESIGN II Industrializing the Robotic Arm Southeastern Louisiana University Department of Computer Sciences and Industrial Technology BY: Michael Hernandez, Peter DiMarco, Jordan Martin ET 494 SENIOR DESIGN II-INTERIM REPORT Spring 2018 Instructor: Dr. Cris Koutsougeras Advisor: Dr. Mohammad Saadeh
Transcript
Page 1: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

1

TECHNICAL PROJECT INTERIM REPORT FOR ET 494 SENIOR DESIGN II

Industrializing the Robotic Arm

Southeastern Louisiana University

Department of Computer Sciences and Industrial Technology

BY: Michael Hernandez, Peter DiMarco, Jordan Martin

ET 494 SENIOR DESIGN II-INTERIM REPORT

Spring 2018

Instructor: Dr. Cris Koutsougeras

Advisor: Dr. Mohammad Saadeh

Page 2: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

2

ABSTRACT:

This project is a continuation of our previous senior project under the supervision of Dr.

Saadeh and Dr. Koutsougeras. The goal of this project is to improve our current system by

having it mimic a PLC based system by using a microcontroller. Unlike microcontrollers, PLC

based systems are capable of following ladder logic and be able to multitask as setup.

Microcontrollers do not have the capability to multitask because the way they function is by

reading line by line of code. We plan on having a microcontroller system to be able to

accomplish what PLC’s can. The way this process is done is by having servo motors control the

motion of robotic arms that grip a certain object and move it to a new location. The plan is to

have it run in parallel so the system is multitasking instead of going line by line of code. By

simply creating a code which allows the system to divide the time of the jobs in sections, the

system can be made to operate in parallel. Our project will mimic a conveyor belts system, one

much like the ones used in industries in several jobs like packaging and order picking.

UserSELU, 03/29/18,
Very weak argument, here you convince audience about your idea, it needs to be stronger
Michael Hernandez, 03/29/18,
Michael Hernandez, 03/29/18,
Fixed.
Page 3: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

3

INTRODUCTION:

In almost every manufacturing process in an industry, the typical workforce includes

robotics. The most common type is the articulated robotic arm which includes rotation at the

joints and is usually arranged in a chain to reach into difficult places. Robots are essential for

smooth and efficient operation in a specific process. They are mostly controlled by PLC which

allow for ladder logic programming or microcontrollers that can be programmed for certain

tasks. A microcontroller is a small computer on a single integrated circuit that can provide

control to a robotic arm or any other manufacturing equipment with appropriate coding. Some

examples of applications that use microcontrollers are: instrumentation, high-precision assembly,

sensing, order picking, and many more. For this project, we needed to scale down the size of the

system and we went with a microcontroller because it can provide us with a simple way of

programming with a powerful processor while having a decreased cost and small footprint.

Page 4: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

4

SETUP:

The design of the project is like a typical industry pick and place manufacturing system.

Mainly, we want to have all functions running at the same time using a single code that can scale

the movements for all components in the system to make seem like they work simultaneously

(Figure 1).

Figure 1- Process Flow Chart

It begins by placing a block on the nearest conveyor belt and the belt will move it

towards the first robotic arm. The block will land on the rotating platform and move towards the

robotic arm. The first robotic arm will be at its home position awaiting an instruction to move to

the block on the rotating platform. It will then move towards the block, pick it up, and move to a

Page 5: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

5

second position by the farther conveyor belt and place it in the tray. The second conveyor belt

will then move the block to the second robotic arm. That arm will move from its home position

to the position at the tray and pick up the block from the tray. It will move to a position by the

first conveyor belt and then place the block on it and return to its home position. This series of

events will mimic a simple pick and place system that is seen in a manufacturing plant, but a

scaled down version that will run on a single microcontroller (Figure 2).

Figure 2- Current Design

UserSELU, 03/29/18,
Below figure
Page 6: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

6

MATERIALS:

The project includes two robotic arms, two conveyor belts, and a rotating platform, all

controlled by a C/C++ code written in the open source Arduino IDE. The code is uploaded into

the Arduino Mega that is used to control every aspect of motion. The robotic arms will work in

conjunction with two conveyor belts and a rotating platform to move objects from one belt to

another, mimicking a simple pick and place manufacturing system. The robotic arms (Figure 3

and 4) are constructed using aluminum c-channels, pattern brackets, servo gearboxes, and linear

actuators that are controlled using the Arduino PWM output pins.

Figure 3- Robotic Arm 1

Page 7: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

7

Figure 4- Robotic Arm 2

The servos (Figure 5) used to control the robotic arms are the Hitec HS785-HB. This type

of servos offers high torque for stability while moving It also provides multiple rotations which

allows us to have freedom of movement for each arm.

Page 8: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

8

Figure 5- Hitec HS785-HB Servo

The rotating platform (Figure 6) utilizes a basic DC servo motor (Figure 7) including an

on-board encoder that will send/receive position signals to/from the Arduino.

The conveyor belts used in the project were adopted from previous projects and

are controlled using stepper motors. Stepper motors are brushless DC motors that separate their

rotation into steps. Calculating the number of steps needed for an amount of rotations is very

Figure 6- Rotating Platform Figure 7- DC Servo Motor

Page 9: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

9

beneficial because it can deliver precise positioning and speed control of the motor. The first

conveyor belt (Figure 8) is powered by a NEMA 17 stepper motor (Figure 9).

This stepper motor will drive the conveyor belt at a low speed but high torque which can

allow for heavier objects to be transported on the belt if needed. The second conveyor belt

(Figure 10) was adopted from a previous senior design project and uses a larger and more

powerful stepper motor.

Figure 8- Conveyor Belt 1 ` Figure 9- NEMA 17 Stepper Motor

Page 10: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

10

The NEMA 34 stepper motor (Figure 11) is used for this conveyor belt and offers a

generous amount of torque and can be adjusted for motor current and steps per revolution. These

adjustments can make the motor operate in a smoother motion while still offering enough power

which is beneficial for our project as we will most likely not use the full power of this stepper

motor.

Figure 10- Conveyor Belt 2

Page 11: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

11

Stepper

motors need plenty of power to operate and any microcontroller that will be used to program a

stepper motor must be protected and well shielded . The stepper driver is a messenger that

receives a signal from the Arduino and drives the stepper based on the pulse signal that is

received. The driver also protects the low voltage Arduino from back electromotive voltage

coming from the stepper motor that can cause critical damage to the Arduino. A wiring

schematic (Figure 12 and 13) shows how we wired each servo for the two robotic arms.

Figure 11- NEMA 34 Stepper Motor

Page 12: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

12

DELIVERABLES:

Date Objective Who

Jan.-Mar.

90%

Re-code the Arduino to

control the two arms

Michael, Jordan, Peter

Mar.-Apr.

20%

Introduce the stepper motor

and platform to the code

Michael, Peter

Apr.

10%

Combine the arms, conveyor

belt, and platform to one code

Michael, Jordan, Peter

Figure 12- Robotic Arm Wiring Figure 13- Robotic Arm Schematic

UserSELU, 03/29/18,
There is no May
Page 13: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

13

REMAINING TIMELINE:

Date Objective

Early AprilCode the robotic arms for smooth operation

and incorporate conveyor belts and rotating

platform

Late AprilFinalize code and check for accuracy in

conveyor belt and arm positions

Early May Test for a smooth pick and place operation and

functionality

COST:

The cost for this semester will be at minimum because most of the materials are

accounted for and already purchased. Changes in the design forced a new problem with the

microcontroller and how it will handle every PWM signal. The previous microcontroller used

was an Arduino UNO which had a total of 13 digital pins, 6 of those pins are assigned a PWM

output. The project uses a total of 8 servo motors and would not be able to run on the UNO

because of the lack of pins needed. The next viable option would be purchasing a microcontroller

with more PWM output, and the Arduino Mega was a clear winner for the project. The Mega has

more flash memory allowing it to store more code and it has 9 more digital PWM output pins

which was more than enough for the design. The Mega was purchased for around $40 and is the

only expense for this semester.

Page 14: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

14

ISSUES & PROGRESS:

This project has come with many different obstacles to work through. The initial obstacle

occurred when we determined a set amount of positions the servos needed to begin and end

simultaneously. Since each servo and position came with unique angles the differences had to be

evaluated to increment specific amount of degrees per loop. However, once the arms functioned

in unison the motions began to be affected. The arms would improperly cycle to designated angle

sets/positions which, came with its own set of obstacles to maneuver. We then change the loop to

run through an array set where each position has 8 values between them. From each position to

the next is a total of 10 angles, so that each arm will increment 10 times and stop at the same

time. The arrays below in the code shows each servo positions and how the values are

incremented (Figure 14).

Figure 14

We then found that the true values of the servo were not scaled from 0 to 360 so we had

to map the servos so that we will be able to assign the servo values based on 0 to 360 degrees.

We currently have the arm moving in a correct sequence of positions and having the correct

degree vales based on each position from the map function (Figure 15).

UserSELU, 03/29/18,
New line
Page 15: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

15

Figure 15

The map function will adjust each servo degree to a 0-360 degree that can be found in the array

for each position. The for loop below goes through the array values and writes them to the servo

based on the map function and the next position values (Figure 16).

Figure 16

At this moment, our next issue will be determining how to constrain the motions to move

the shortest distance to arrive at its next position. For example: if our angle is currently at 10

degrees and we tell it to move to 330 degrees the simplest action would be to move back towards

0 and move to -30 degrees. However, the servo will not accept a negative value and currently

moves the 320-degree difference, which is a long travel time in respect to only having to move

the shorter distance. A way of solving this issue is writing a 180-degree value to the servo and

manually move the arm gear to the home position so that the home position is 180 instead of

360. This allows the servo to move to the right and left the shortest distance instead of making a

Page 16: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

16

full rotation to the position. Once this issue is resolved, it will just be a matter of including the

second arm using the same logic as the first arm, then adding the stepper motors and rotating

platform to the program. The main priority will be controlling the whole system, arms, conveyor

belts, and rotating disc functionally and communication with each other. If the objectives have

been completed with additional time to work on the project, reducing parts will be attempted to

reduce costs and improve the coding of the system.

RAW CODE:

#include <Servo.h>Servo servo1;Servo servo2;

int pb1=0;int new_servoArray1;int new_servoArray2;int array_length=3;int check1=0;int last1=0;int last2=0;int i=0;int inc;int flag=0;int dir = 1;int del = 1;int PBPIN = 22;int val1;int val2;int a;int b;

int servoArray1[][10]={{0,0,0,0,0,0,0,0,0,0}, {0,1,1,2,2,3,3,4,4,5}, {5,41,77,113,149,185,221,257,293,330}, {330,293,256,219,182,145,108,71,34,0}};

int servoArray2[][10]={{0,0,0,0,0,0,0,0,0,0}, {0,32,64,96,128,160,192,224,256,290}, {290,265,240,215,190,165,140,115,90,65}, {65,58,51,44,37,30,23,16,9,0}};

Page 17: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

17

void setup() {

Serial.begin(9600);servo1.attach(3);servo2.attach(5);val1 = map(a,0,360,600,1755);val2 = map(b,0,360,600,1740);

}

void loop() {

pb1=digitalRead(PBPIN);

if((pb1==1||check1==1)&& flag==0){delay(20);}

pb1=digitalRead(PBPIN); if((pb1==1||check1==1)&& flag==0){ check1=pb1; }

if(check1==1){ i=i+del; flag = 1; }

if (i>=0 && i<=3 && flag==1 ){for(inc=0;inc<10;inc++){new_servoArray1 = servoArray1[i][inc];new_servoArray2 = servoArray2[i][inc];val1 = map(new_servoArray1,0,360,600,1755);val2 = map(new_servoArray2,0,360,600,1740);servo1.write(val1);servo2.write(val2);Serial.println("servo1: ");Serial.println(new_servoArray1);Serial.println("servo2: ");Serial.println(new_servoArray2);delay(50);

}

if (i==3){del = -2*dir;}else if (i==1)

Page 18: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

18

{del = dir;}

flag = 0;check1 = 0;

}

Serial.println("i = ");Serial.println(i);Serial.println("inc = ");Serial.println(inc);

}

Page 19: csit.selu.educsit.selu.edu/~csit/seniorprojects/SeniorProjects2018/... · Web viewUnlike microcontrollers, PLC based systems are capable of following ladder logic and be able to multitask

19


Recommended