final report scara 3dof

Upload: elisamarquezvela

Post on 09-Jan-2016

174 views

Category:

Documents


16 download

DESCRIPTION

This document presents a report of scara robot with 3 degrees of freedom, the control is based on 3 DC motors and PID in frequency time response.

TRANSCRIPT

  • SCARAS ROBOT FINAL REPORT

    AUGUST 18,2015

    TEAM MEMBERS:

    SUBJECTS:

    Kinematic of Robots M.C. Martin Montes Rivera

    Mechatronics Design Prof.Carlos Guillermo Juregui Arvilla

    Digital Control M.C. Luis Ernesto Anaya Tiscareo

    Cynthia Vanessa Contreras Hernndez UP120451

    Luis Fernando Gmez Valds UP120435

    Elisa Maricela Mrquez Vela UP120433

    Alfredo Martnez Negrete UP120470

    Ezequiel Medina Valenzuela UP120439

    MECHATRONICS 8D

    MECHATRONIC 8D

  • 1

    Index Introduction ........................................................................................................................................ 3

    General design process. .................................................................................................................. 5

    Recognition of the need. ................................................................................................................. 6

    Analysis of the problem. ................................................................................................................. 6

    Synthesis of the project ................................................................................................................... 6

    Objective. ............................................................................................................................................ 7

    Objectives of the Project ................................................................................................................. 7

    Theory ................................................................................................................................................. 7

    Position ............................................................................................................................................ 7

    Orientation ...................................................................................................................................... 7

    Rotation Matrixes ............................................................................................................................ 7

    Homogeneous Matrixes .................................................................................................................. 8

    Translation Matrixes ....................................................................................................................... 9

    Order with transformations ............................................................................................................ 9

    Denavit-Hartenberg ...................................................................................................................... 10

    Theory of Control .......................................................................................................................... 11

    Analog Control ........................................................................................................................... 11

    Digital control ............................................................................................................................ 12

    Mechanic design ........................................................................................................................... 13

    Technical characteristics ................................................................................................................... 13

    Motors: .......................................................................................................................................... 13

    Microcontroller ............................................................................................................................. 13

    Extra modules ................................................................................................................................ 14

    HC-05 module Bluetooth ........................................................................................................... 14

    Work sequence or the robot (flow diagram) .................................................................................... 15

    General system representation......................................................................................................... 16

    General characteristics or the project............................................................................................... 16

    Soilworks design ............................................................................................................................ 17

    Assembly developmet ....................................................................................................................... 19

    Assembly Matlab code ...................................................................................................................... 19

    Denavit-Hartenberg .......................................................................................................................... 27

    Mechanic design ............................................................................................................................... 28

  • 2

    Physical pieces ................................................................................................................................ 28

    Physical assembly ................................................................................. Error! Marcador no definido.

    Control System .................................................................................................................................. 30

    Design. ........................................................................................................................................... 30

    Obtaining the transfer function of the DC Motor. ........................................................................ 34

    Potentiometer linearization .......................................................................................................... 41

    Type of Communication ................................................................................................................ 42

    Power Stage............................................................................................................................... 43

    Matlab and Labview manual ............................................................................................................. 44

    Visual Matlab Interface ................................................................................................................. 48

    Matlab - Labview ........................................................................................................................... 52

    Labview control system. ................................................................................................................ 54

  • 3

    Introduction

    Since the very beginnings of civilization

    humans have been fascinated by mechanisms

    which can imitate them, even Greeks had the

    word automaton (machine which imitate the

    movements of a living organism).

    The term robot was first introduced into our

    vocabulary by the Czech playwright Karel

    Capek in his 1920 play Rossums Universal

    Robots, the word robota being the Czech word

    for work. This term could disappear but instead,

    still being used thanks to writers which used to

    define living mechanics similar to humans.

    The real robot machine has a different

    development of its term robot. Real industrial

    robots main backgrounds are ligated to the tele-

    manipulators, which are machines that allow to

    control several dangerous materials.

    The robotics without colloquial robot concept it is the industrial robot, used in

    industrial production during 30 years for substituting humans beings in repetitive or

    dangerous tasks, according to production requirements.

    There are several issues to establish a definition of robot, since several markets and

    countries has its own definition. The most accepted definition is the given by RIA "A

    robot is a reprogrammable, multifunctional manipulator designed to move material,

    parts, tools or specialized devices through variable programmed motions for the

    performance of a variety of tasks."

    The robot morphology depends in the mechanical elements that build the robot as

    Links (Structural elements of the robot.) and Joints (connect the links and allow its

    movement)

    Figure 1 Robot

  • 4

    There are some kinds of robot morphologies as:

    Revolute manipulator

    Parallel manipulator

    Spherical configuration

    SCARA configuration

    Cylindrical configuration

    Cartesian configuration

    Figure 2 Grades of freedom (GOF)

    Figure 3Robots morphologies

  • 5

    Building a robot is a real engineering challenge because it involves a well knowledge

    of areas such as mechanics, electronics, programming and control. To have success

    in this activity, we need to consider all the aspects and make a strategically activities

    plan to be performed.

    A SCARA robot is distinguished by being quick in its movements, so it is used in the

    arrangement of objects, sealed, transportation, etc.

    In addition we need to achieve an adequate control with the use of DC motors,

    forgetting stepper motors or servomotors normally they facilitate this task.

    General design process. We are going to follow the methodology of Bolton, because it is easier than Shigleys

    methodology and we pretend to advance in the SCARA robot step by step in the

    best way.

    This methodology consists in the next diagram showed in Figure 2:

    Figure 4 Methodology diagram

    Recognition of the need

    Problem analysis

    Specification

    Possible solutions

    Selection of a suitable solution

    Production of a detailed

    design

    Production of working drawings

  • 6

    Recognition of the need.

    At school we have a few of projects where our

    knowledge is prove, so we need to find a way to

    build a specific type of robot. So to approve some

    of the subjects we need the construction of a

    specific robot that do a task.

    Analysis of the problem. Actually we have some projects that we

    need to end for the final of the quarter

    so for a project we combine different

    subjects to create only one project. An

    SCARA robot.

    In the Figure 4 we can see the similarity

    between a human arm and a SCARA

    robot. The Joint 1 and the Joint 2 is the

    shoulder, then the Joint 3 works as the

    elbow, finally the Joint 4 is the wrist.

    Knowing how a SCARA robot work, we thought in a robot that works with a conveyor

    in a line production, where our robot can classify a product marking a piece with a

    specific message or code.

    Thanks the velocity of the robot, and the similarity of the robot with an arm, we can

    see that this task is not impossible, and that we can make it.

    Synthesis of the project The Project consist in a SCARA robot that is manipulated with a cellphone through

    Bluetooth and serial communication. This robot can go to a specific position with a

    message sent on an App. Also our robot will have 3DOF.

    Figure 5 Functions of a Scara Robot

    Figure 6 Scara Robot

  • 7

    Objective. Structure a work plan to construct a SCARA robot while this quarter and define the

    activities for each member of the team, the materials that we need and the goals to

    achieve.

    Objectives of the Project

    SCARA robot with 3DOF

    Serial and Bluetooth communication.

    Manipulation through an app.

    Matlab and Labview interface

    Theory

    Position The position in robots is used for determine at

    which point your robot will move after an

    instruction, all the positions can be represented

    in a 3D coordinated system.

    Orientation The orientation in a three dimensional space is given by

    three degrees of freedom, and those ones are linearly

    independents. The orientation is used because its

    necessary know not just the position, also is important to

    know the orientation of the robot, its necessary to create a

    rotation matrix to know or determine how much the robot

    will be positioned in relation with the original position.

    Rotation Matrixes Rotation matrixes are used for indicate how

    much the robot will rotate and in which axis will

    rotate, to make rotations with objects its

    common to assign a new system and then

    study the relations between old a new system.

    See Figure 9 and Figure 10.

    Figure 7 Position in 2D and 3D

    Figure 8 Orientation

    Figure 9 Rotation equations

  • 8

    Figure 10 Rotation matrixes

    Homogeneous Matrixes The homogeneous matrixes are used to represent the position, orientation, scale and

    camera locations of objects in real and virtual spaces. See Figure 11 and Figure 12

    Figure 11 Homogeneous matrixes

    Figure 12 Homogeneous matrixes

  • 9

    Translation Matrixes To move the coordinate system to a desired point its required homogeneous matrix with the

    identity rotation matrix and distances of movement. See Figure 13.

    Figure 13 Transalation matrixes

    Order with transformations It is possible to perform several transformation in one matrix because all information will be

    contained in a homogeneous matrix

    If fixed system is OXYZ and transformed is OUVW are coincident, then transformation matrix

    will be the same as the Figure 14

    Figure 14 Transformation matrix

    If OUVW system is obtained by rotations and translations defined with fixed system OXYZ,

    then transformation multiplications must be performed with previous multiplying, and

    translations always must be in the beginning.

    If system OUVW is defined with itself then transformation multiplications must be performed

    after the previous multiplications of OUVW system.

  • 10

    Denavit-Hartenberg A robotic manipulator is a rigid bodies system that are united by any kind of joint, that bring to the

    manipulator the possibility of movement having a GOF (Grades of Freedom). This robotic

    manipulator is part of a structure that is a Kinematic Open Chain, in where one of the side of the

    structure are fix to a base, and the other side can work with any object in the space.

    For the direct kinematic of the robots, the Denavit-Hartenberg theory propose a transformation

    homogenous matrix that represent the movement of a link (NOTE: Depending on the number of

    the links we will represent a transformation homogenous matrix.)So this matrix is represented by

    the next matrix:

    Figure 15 Homogeneous matrix

    So to analyze how the coordinates, the movements and the turn of the robots are placed we need

    to know that:

    1. We need to considerate the length or the distance that are between the links.

    2. When a joint of the robot turn we need to analyze when the analysis of the robot is easier,

    to make our analysis easy.

    3. To assign where the coordinate systems are going to be, we need to start from the base to

    the end effector.

    4. The base coordinate X needs to point to the end effector.

    5. When our coordinate system is parallel to the end effector the Z coordinate need to point

    it.

    When we have our work draw, and all the specifications are placed we need to fill a table, where

    we can know the displacement and rotations we have in each link.

    i i ai i 0A1 1A2 2A3

    Figure 16 Table to locate the rotations and translations on X and Z

  • 11

    For example the table below has 4 symbols that represent:

    i =Rotation in Z

    i= Displacement in Z

    ai= Displacement in X

    i= Rotation in X

    0A1 , 1A2 , 2A3= Coordinate systems depending in the links.

    With this table we need create a matrix depending the number of links, in base of our translation

    homogenous matrix, and we substitute the values.

    Finally to complete de Denavit-Hartenberg theory we need to multiply all the matrix for example:

    3 = 0

    1 1

    2 2

    3

    0

    2 = 0

    1 1

    2

    0

    3 = 0

    2 2

    3

    0

    With the final equation we need to take a row and the column; so for the X we need to take the first

    Row of the matrix 0A2 and multiply it with the forth column of the 2A3 matrix.

    We repeat this step from Y, only instead the first row from matrix 0A2 , we use the second.

    Finally we repeat the step from Z, but instead we use the third row from the matrix 0A2.

    Theory of Control In specific words, the control is the indirect manipulation of magnitudes on a system through

    another system that is called control system.

    There are two types of control, where we can apply in the Scara Robot they are: Analog Control and

    Digital Control.

    Analog Control Type of control that is able to determine the degree of touch or movement we make about it.

    Figure 17 Conttrol System

  • 12

    We can found an open loop or a closed loop. An open loop is when the process is between an

    input and an output while a closed loop has a feedback (measurement) that will make the system

    stable.

    Figure 18 Open Loop vs. Closed loop

    The Laplace transform is the key of this controller.

    Digital control Its an implementation of control using a programmable logic with the supply of tools as Analog-

    Digital converters, digital controllers and Digital. Analog converters, sampling an analog signal in a

    period of time obtaining a sequence.

    The Z transform is the main feature of this control.

    Figure 19 Digital control system

  • 13

    Mechanic design The mechanical design is to provide one or more solutions to define a product so that meets the

    requirements and restrictions established.

    The stages of the design are:

    1. Conceptualization (ideas)

    2. Synthesis (grouping of elements)

    3. Analysis (finite element)

    4. Evaluation (costs)

    5. Representation (plans)

    Technical characteristics

    Motors: 3 Motoreductor B02 1:220.

    Voltage range: 3- 12Vdc.

    Torque: 3.6 KgF*cm.

    Speed: 38 RPM.

    Current: 75 mA-670mA.

    Weight: 32grams.

    Microcontroller The Arduino Uno is a microcontroller board based on the

    ATmega328. It has 14 digital input/output pins, 6 of them can

    be used as PWM outputs, 6 analog inputs, a 16 MHz ceramic

    resonator, a USB connection, a power jack, and a reset

    button. It contains everything needed to support the

    microcontroller; simply connect it to a computer with a USB

    cable or power it with an AC-to-DC adapter or battery to get

    started.

    Microcontroller Arduino Uno ATmega328

    Operating Voltage 5V

    Input Voltage (recommended) 7-12V

    Figure 20 Motor characteristics

    Figure 21Arduino UNO

  • 14

    Input Voltage (limits) 6-20V

    Digital I/O Pins 14 (of which 6 provide PWM output)

    Analog Input Pins 6

    DC Current per I/O Pin 40 mA

    DC Current for 3.3V Pin 50 mA

    Flash Memory 32 KB (ATmega328) of which 0.5 KB used by boot loader

    SRAM 2 KB (ATmega328)

    EEPROM 1 KB (ATmega328)

    Clock Speed 16 MHz

    Length 68.6 mm

    Width 53.4 mm

    Weight 25 g Figure 22 Arduino UNO characteristics

    Extra modules

    HC-05 module Bluetooth

    Serial port bluetooth, Drop-in replacement for wired serial

    connections, transparent usage. You can use it simply for

    a serial port replacement to establish connection between

    MCU and GPS, PC to your embedded project and etc.

    and now, we provide HC-05 and HC-06. HC-05 could be

    setting to Master or Slave by user. HC-06 has be designed

    Master or Slave when the factory, user couldn't change the

    role.

    Note: HC-06 need you choose Master or Slave (default),

    HC-05 does not matter.

    KEY: according to the data sheet, I need to pull-up this pin while power-on-reset of

    the module to enforce AT mode. I have not been able to verify this yet. I have been

    told that some modules have this pin not connected at all?

    VCC is indicated in the range of 3.6V-6V. The module worked for me both with 3.3V

    and 5V.

    GND: Ground

    TXD: serial output of the module, to be connected to RX of the microcontroller. Note

    that this signal is using 3.3V logic level

    RXD: serial input of the module, to be connected to the TX of the microcontroller.

    Note that this signal is using 3.3V logic levels.

    STATE: connected to LED2 (Pin32) of the module, but no meaning? At least on my

    module the pin was always low, regardless if paired or not.

    Figure 23 HC-05 module Bluetooth

  • 15

    Work sequence or the robot (flow diagram)

    Figure 24 Scara robot: Work sequence

    MyRIO

  • 16

    General system representation

    Figure 25 System representation

    General characteristics or the project.

    Figure 26General characteristics

  • 17

    Material: Aluminium and acrylic

    Weight: 3kg-5kg approximately.

    Size: 425.31cm x 367.65

    Solidworks design

    Figure 27 Scara robot design with measures.

  • 18

    Assembly

    Assembly Matlab code for simulation

    Denavit-Hartenberg

    Mechanic design

    Physical pieces

    Physical assembly

  • 19

    Assembly developmet

    As we know an SCARA robot is a 3 GOF configuration, which

    is composed of a base and 3 links, where 2 of the links

    rotates (revolute) and the last one has a translation in the z

    axis.

    So the software design consist in 4 pieces:

    A base Link 1 Link 2 Plunger

    First as a fixed part we select the base that will be the starting point of the assembly. The

    base has to be a strong part, because it support all the weight of the links, also it will protect

    the connections and the material of the electronic and the control system. A specific request

    of the design is a part where the motor can sheathe whit the link 1.

    Then, the Link 1 has sheathe with the base, so it have to be above of the base, and need to

    have a possibility of rotation (The grades of freedom depends in the kind of task of the robot).

    This description also apply on the Link 2, but this one have to sheathe in the Link 1.

    Finally the plunge have to be at the end of the link to, and has the liberty to translate only in

    the z axis.

    The disadvantages of this design are:

    They cant charge a lot weight. Their movement in the z axis is depends in the height of the robot They only work on specific tasks.

    Assembly Matlab code function cad2matdemo(filename)

    T=mov(-15,-45,-45); %This function make the movement of

    the robot in the position of each join

    Figure 28 Scara robot

  • 20

    b=T(1,1);

    b1=T(1,2);

    b2=T(1,3);

    %**************************PIEZA1******************************

    % Read the CAD data file:

    clf;

    [F, V, C] = rndread('base2.stl');

    p = patch('faces', F, 'vertices' ,V);

    %set(p, 'facec', 'b'); % Set the face color (force it)

    set(p, 'facec', 'r'); % Set the face color flat

    set(p, 'FaceVertexCData', C); % Set the color (from file)

    %set(p, 'facealpha',.4) % Use for transparency

    set(p, 'EdgeColor','none'); % Set the edge color

    %set(p, 'EdgeColor',[1 0 0 ]); % Use to see triangles, if

    needed.

    light % add a default light

    daspect([1 1 1]) % Setting the aspect ratio

    view(3) % Isometric view

    xlabel('X'),ylabel('Y'),zlabel('Z')

    V = V';

    V = [V(1,:); V(2,:); V(3,:); ones(1,length(V))];

    nv=V;

    set(p,'Vertices',nv(1:3,:)')

    drawnow

    %*************PIEZA2***************************************************

    [F2, V2, C2] = rndread('brazo12.stl');

    p2 = patch('faces', F2, 'vertices' ,V2);

  • 21

    %set(p, 'facec', 'b'); % Set the face color (force it)

    set(p2, 'facec', 'b'); % Set the face color flat

    set(p2, 'FaceVertexCData', C2); % Set the color (from file)

    %set(p, 'facealpha',.4) % Use for transparency

    set(p2, 'EdgeColor','none'); % Set the edge color

    %set(p, 'EdgeColor',[1 0 0 ]); % Use to see triangles, if

    needed.

    %light % add a default light

    daspect([1 1 1]) % Setting the aspect ratio

    view(3) % Isometric view

    %xlabel('X'),ylabel('Y'),zlabel('Z')

    %title(['Imported CAD data from ' filename])

    V2 = V2';

    V2 = [V2(1,:); V2(2,:); V2(3,:); ones(1,length(V2))];

    nv2=trasla(25,21,90)*rota('z',b)*V2;

    set(p2,'Vertices',nv2(1:3,:)')

    hold on

    x0=40;

    y0=40;

    z0=40;

    XYZ1=[x0 0 0 0

    0 y0 0 0

    0 0 z0 0

    1 1 1 1];

    R = rota('z',b);

  • 22

    T = trasla(25,21,98);

    XYZ1=T*R*XYZ1;

    plot3([XYZ1(1,4) XYZ1(1,1)],[XYZ1(2,4) XYZ1(2,1)], [XYZ1(3,4)

    XYZ1(3,1)],'r','linewidth',2')

    hold on

    grid on

    plot3([XYZ1(1,4) XYZ1(1,2)],[XYZ1(2,4) XYZ1(2,2)], [XYZ1(3,4)

    XYZ1(3,2)],'g','linewidth',2')

    plot3([XYZ1(1,4) XYZ1(1,3)],[XYZ1(2,4) XYZ1(2,3)], [XYZ1(3,4)

    XYZ1(3,3)],'b','linewidth',2')

    drawnow

    % vsize = 10;%maxv(V);%attempt to determine the maximum xyz

    vertex.

    axis([-200 200 -200 200 -0 150]);

    % % % %

    % %******************Pieza 3*****************************************

    [F3, V3, C3] = rndread('brazo22.stl');

    p3 = patch('faces', F3, 'vertices' ,V3);

    %set(p3, 'facec', 'y'); % Set the face color (force it)

    set(p3, 'facec', 'y'); % Set the face color flat

    set(p3, 'FaceVertexCData', C3); % Set the color (from file)

    %set(p3, 'facealpha',.4) % Use for transparency

    set(p3, 'EdgeColor','none'); % Set the edge color

    %set(p3, 'EdgeColor',[1 0 0 ]); % Use to see triangles, if

    needed.

    light % add a default light

    daspect([1 1 1]) % Setting the aspect ratio

    view(3) % Isometric view

    xlabel('X'),ylabel('Y'),zlabel('Z')

    V3 = V3';

    V3 = [V3(1,:); V3(2,:); V3(3,:); ones(1,length(V3))];

  • 23

    nv3 =trasla(25,21,90)*rota('z',b)*trasla(80,0,8)*rota('z',b1)*V3;

    set(p3,'Vertices',nv3(1:3,:)')

    hold on

    x0=40;

    y0=40;

    z0=40;

    XYZ2=[x0 0 0 0

    0 y0 0 0

    0 0 z0 0

    1 1 1 1];

    XYZ2=trasla(25,21,98)*rota('z',b)*trasla(80,0,8)*rota('z',b1)*XYZ2;

    plot3([XYZ2(1,4) XYZ2(1,1)],[XYZ2(2,4) XYZ2(2,1)], [XYZ2(3,4)

    XYZ2(3,1)],'r','linewidth',2')

    hold on

    plot3([XYZ2(1,4) XYZ2(1,2)],[XYZ2(2,4) XYZ2(2,2)], [XYZ2(3,4)

    XYZ2(3,2)],'g','linewidth',2')

    plot3([XYZ2(1,4) XYZ2(1,3)],[XYZ2(2,4) XYZ2(2,3)], [XYZ2(3,4)

    XYZ2(3,3)],'b','linewidth',2')

    drawnow

    % %vsize = 1000;%maxv(V);%attempt to determine the maximum xyz vertex.

    % %axis([-vsize vsize -vsize vsize -vsize vsize]);

    %

    %*************************PIEZA4*****************************************

    **

    [F4, V4, C4] = rndread('embolo.stl');

    p4 = patch('faces', F4, 'vertices' ,V4);

    %set(p4, 'facec', 'b'); % Set the face color (force it)

    set(p4, 'facec', 'g'); % Set the face color flat

    set(p4, 'FaceVertexCData', C4); % Set the color (from file)

    %set(p4, 'facealpha',.4) % Use for transparency

    set(p4, 'EdgeColor','none'); % Set the edge color

  • 24

    %set(p4, 'EdgeColor',[1 0 0 ]); % Use to see triangles, if

    needed.

    light % add a default light

    daspect([1 1 1]) % Setting the aspect ratio

    view(3) % Isometric view

    xlabel('X'),ylabel('Y'),zlabel('Z')

    title(['ROBOT ASSEMBLY'])

    %drawnow %, axis manual

    V4 = V4';

    V4 = [V4(1,:); V4(2,:); V4(3,:); ones(1,length(V4))];

    nv4 =trasla(25,21,90)*rota('z',b)*trasla(80,0,8)*rota('z',b1)*trasla(76,-

    4,b2)*V4;

    set(p4,'Vertices',nv4(1:3,:)')

    hold on

    x0=40;

    y0=40;

    z0=40;

    XYZ0=[x0 0 0 0

    0 y0 0 0

    0 0 z0 0

    1 1 1 1];

    R = rota('y',180)*rota('z',180);

    XYZ0

    =trasla(25,21,90)*rota('z',b)*trasla(80,0,8)*rota('z',b1)*trasla(76,-

    4,b2)*R*XYZ0;

    plot3([XYZ0(1,4) XYZ0(1,1)],[XYZ0(2,4) XYZ0(2,1)], [XYZ0(3,4)

    XYZ0(3,1)],'r','linewidth',2')

    hold on

    plot3([XYZ0(1,4) XYZ0(1,2)],[XYZ0(2,4) XYZ0(2,2)], [XYZ0(3,4)

    XYZ0(3,2)],'g','linewidth',2')

  • 25

    plot3([XYZ0(1,4) XYZ0(1,3)],[XYZ0(2,4) XYZ0(2,3)], [XYZ0(3,4)

    XYZ0(3,3)],'b','linewidth',2')

    drawnow

    % End of main routine, here are the functions used:

    % Homogeneous manipulation functions follow:

    function T=trasla(a,b,c)

    T=[1 0 0 a

    0 1 0 b

    0 0 1 c

    0 0 0 1];

    % function for the rotation of the robot:

    function T=rota(a,b)

    b=(b*pi)/180;

    if a=='x'

    T=[1 0 0 0;

    0 cos(b) -sin(b) 0;

    0 sin(b) cos(b) 0;

    0 0 0 1];

    End

    if a=='y'

    T=[cos(b) 0 sin(b) 0;

    0 1 0 0;

    -sin(b) 0 cos(b) 0;

  • 26

    0 0 0 1];

    end

    if a=='z'

    T=[cos(b) -sin(b) 0 0;

    sin(b) cos(b) 0 0;

    0 0 1 0;

    0 0 0 1];

    end

    end

    %this function contain each movement of the robot in its join

    function Mov = mov(b,b1,b2)

    Mov=[b b1 b2;0 0 0;0 0 0];

    end

    Figure 29 Robot assembly on Matlab

  • 27

    Denavit-Hartenberg To analyze the SCARA Robot we need to place the coordinate system, rotations and translations.

    Figure 30 SCARA Robot

    Then we localize and fill the table.

    i i ai i 0A1 q1 0 L1 0 1A2 q2 0 L2 180 2A3 0 d3 0 0

    Figure 31 Table when we localize the rotations and translations

    We create and substitute our homogeneous translation matrixes.

    1 =0 [

    1 1 0 111 1 0 110 0 1 00 0 0 1

    ]

    2 =1 [

    2 2 0 222 2 0 220 0 1 00 0 0 1

    ]

    3 =2 [

    1 0 0 00 1 0 00 0 1 30 0 0 1

    ]

    Simplifying the matrixes

  • 28

    3 = 0

    1 1

    2 2

    3

    0

    3 = 1

    2 2

    3

    1

    3 =1 [

    2 2 0 222 2 0 220 0 1 30 0 0 1

    ]

    Obtaining X,Y,Z

    3 = 0

    1 1

    3

    0

    0 1 =

    1 3 =

    = 0 3(1,4) = 212 212 + 11 = 2(1 + 2) + 11

    = 0 3(2,4) = 212 + 212 + 11 = 2(1 + 2) + 11

    = 0 3(3,4) = 3

    = 2(1 + 2) + 11

    = 2(1 + 2) + 11

    = 3

    Mechanic design To create the structure of our robot, we consider that it

    has to fulfill special requirements as size, weight, etc. So

    first, we create a simple design that covers that

    requirements.

    When we chose the material we taught in something

    cheap and useful: Aluminum and Acrylic.

    So, the base is resistant, with a hard material, it has

    5 machined acrylic pieces.

    The links are made of aluminum with acrylic tops, linked by a tube fixed to a sheet containing a

    bearing. The final link contains the end effector that have movement thanks to a rack-pinion.

    The acrylic pieces were done on the CNC Mill machine.

    Other pieces were made in the Mill and the turning, as the joints, the sheets, the links, the end

    effector and the base.

    Figure 32 Scara robot original design

  • 29

    Control

    Control System

    Manual of a Scara Robot: Control

    system

  • 30

    Control System

    Design. Control a DC motor means that some tests are needed to parameterize its operation, because the

    model of a motor includes variables of resistance, viscosity, inertia, inductance and some others.

    J=rotor inertia moment

    K= constant of reverse electromotive force.

    R= armature resistance.

    L= inductance

    V= input voltage

    T= torque

    = acceleration

    = velocity

    = position

    A motor structure operation, also can be

    represented as a closed-loop system as we see at

    the next figure.

    Figure 34 Representation of the motor as a close system

    These variables were obtained through a test, where we require a regulated source, an oscilloscope

    with ends for voltage and current a tachometer (r.p.m speed meter)

    Result transfer function of the system is represented as the next equation:

    The probes made to obtain each parameter was:

    Figure 33 Control in a DC motor

  • 31

    1) Remove the gear box of the motor reducer because its most convenient for the veracity

    of the probes.

    2) Calculate the armature resistance:

    The ohm law said that:

    In this case R=Ra, V=voltage to the motor and I= maximum current that travel throw the

    armature.

    And to reach the maximum current in the armature, was necessary applied a big load to the

    motor, so the shaft of the motor does not rotate.

    Supply the motor with different voltage and measure the maximum current with load and

    then construct a table with the values obtained and the resistance calculus. Finally calculate

    the average of the resistance values obtained to find Ra.

    Figure 35 Table of resistance armature

    3) Determine the armature inductance.

    Connect the oscilloscope and measure the time of establishment of the signal that produces

    the motor with some voltage its applied. This time is named , but in the signal is given

    by 5 , and the inductance is equal to L= *Ra.

    Figure 36 Table with the value of T and then the calculus of L

  • 32

    4) Determine Kb.

    With a value of voltage, in this case was 6 volts, the half of the maximum supported by the

    motor. And different load applied to the motor. Measure the current and the velocity with

    the tachometer.

    *Convert the velocity to rad/seconds too.

    Figure 37 Values obtained of current and velocity at 6V

    Then graph the values of velocity and current respectively. And show the equation and line

    of tendency in the graph, with the equation extract the value of the pendant, because Kb=-

    m*Ra.

    Figure 38 Values obtained of current and velocity at 6V

    So, Kb=-(-6e-5*12.21)

    Figure 39 Value of Kb

    5) Obtain the viscosity constant, B.

    Put some voltage in the motor and measure the velocity with the tachometer without any

    load, also measure the torque, knowing that T=Kb*I.

  • 33

    Figure 40 Table of torque and velocity at different voltage values

    Next, graph torque vs velocity and obtain the pendant.

    Figure 41 Graph of torque vs velocity

    And Kb is equal to the pendant that was 8e-9.

    6) Calculate the inertia moment, J. The equation to obtain the value of J, is:

    And Tm is the time of delay that the motor has for a completely stop after a voltage supply

    is removed.

    So supply the motor with 12V and measure with the oscilloscope the time between 12 and

    0V in the motor.

    The result was: Tm=2.8 seconds.

    Finally:

    Figure 42 Inertia moment value

    In resume, the values obtained with all probes, was:

  • 34

    Figure 43 Data obtained by the probes in the laboratory

    With those values, was possible to calculate the T.F that the motor produces in a close system. The

    calculus was made on a MATLAB code.

    Figure 44 Calculus by hand of the T.F

    Obtaining the transfer function of the DC Motor. Calculating the transfer function of the motor it is performed after the calculations were checked

    by the MATLAB software and adding a converted position in degrees of movement.

  • 35

    Figure 45 Program in MATLAB to obtain the transfer function

    And the results of the code, are the transfer function of each stage until the resultant T.F given in

    degrees position.

  • 36

    Figure 46 Window of commands in MATLAB and the T.F. results in equation and graph.

    Motors T.F represents a third order system, produced by the parameters and with the addition of

    a pole by the integration of velocity to position, therefore the resultant graph is like a ramp that

    doesn't has end.

    Its easy to appreciate the necessity of a control that can establish the system in a certain value and

    also reduce the reaction time.

    First we create a LABVIEW program with the help of a simulation control and design toolkit. This

    toolkit can create the control system, helping to the obtained transfer function so we can introduce

    a reference value with a graphic indicator. Also this control probe is attached to a continuous or

    classical monitoring time.

    Figure 47 Window of commands in MATLAB and the T.F. results in equation and graph.

  • 37

    The results obtained by plotting this simulation without control are:

    Figure 48 Probe of PID continuous (without control).

    With Kp and Ki effect of control, time to establish 0.13 seconds. Ki was inutile for the plant.

    Figure 49 Probe of PID continuous (with PD control).

  • 38

    As we can see, the control effect in the system, affects positively the stabilization time, also it

    removes the oscillations of the system, and allows it to be constantly compared with the sensor and

    any reference level without being affected at critical levels.

    Here is a LabVIEW project that include a VI that are programs that are contained inside the main

    "Main Digital Control", this to facilitate the interface with the user and the final code block is

    reduced.

    It is also observed that the project was created to operate a MyRIO1900.

    Figure 50 Creation of a project in LABVIEW to make the control

    The first a VI is included in the project "Control" that includes buttons that will be used for

    controlling any motor, a PID controller variables.

    The second a VI includes an algorithm developed in the field of digital control which results in a PID

    controller with the advantage of being more effective in operation than the use of PID LABVIEW

    predefined blocks, because they are only a series of sums throughout the program and it can

    discretize the control efficiently.

    Figure 51 Second VI of the project, Make a PID by difference equation.

  • 39

    Figure 52 Second VI of the project, Make a PID by difference equation. (Diagram block).

    Finally the main VI contains the opening of analog input and output channels to read the

    potentiometer and write the value of the output signal of the control in the motor, all this using

    blocks of the MyRIO card, which are included in the toolkit of this card in LabVIEW.

    Figure 53 Second VI of the project, Make a PID by difference equation. (Diagram block).

  • 40

    The block diagram shows that we created a sub-Vi program of the difference equation to reduce the

    code into a main program, also included in the control created to attach the knobs easily on a cluster

    of the control.

    It is observed the conversion of position is observed to voltage .to compare the reference signal

    motion with the voltage obtained in accordance with the position of the potentiometer in the

    required time and that difference is sent to the operation of the discrete control PID of the control

    block that control the analog output signal to the power stage connected to start up the gear motor.

    Figure 54 Main control in LabView. (Block diagram)

    The complete system can be observed from a block diagram in a closed loop, where the first system

    represented by the engine was included in the motor block, which represents the system.

    Furthermore we see that when the digital control retainer in a zero order is needed, to move from

    continuous-time to discrete and others at all stages that are required and finally to perform

    conversions as they were made to have a standardization of parameters as an error signal towards

    the control.

  • 41

    Figure 55 Block System representation

    Potentiometer linearization To facilitate the calculation of a transfer function for the sensor (feedback), you should have a

    system of first order, i.e., linear, is why when we use a commercial potentiometer the necessity of

    linearize occurs, because his response graph is exponential in nature.

    Figure 56 Comparison between a lineal potentiometer vs. logarithmic potentiometer

    To achieve this linearity in the potentiometer, a resistance in series to one end pin and the graphic

    shown in the oscilloscope is adapted, the value of such resistance is varied to observe an almost

    straight line, because the effect will be the exponential curve is offset by a certain value in series

    resistance.

    After testing, it was observed that the indicated resistance was 470 to 10K potentiometer.

  • 42

    Figure 57 Potentiometer circuit with the resistance to linearize the sensor.

    After reaching the straight line, the potentiometer resistance values on a different voltage range

    and using an Excel chart to get the value of the slope of the equation are taken.

    Figure 58 Data and graph of the potentiometer.

    As shown in the graph and its equation, the resulting slope is -1.2131, this value will be entered as

    a gain in the feedback system in general. But thanks to that it prevents the feedback block has a

    second order system and negatively interfere in the complexity of control.

    Type of Communication We are communicating the MyRIO control card with the computer by serial port_ this type of

    communication will only be for the control stage of the motors and for catching the signal of the

    potentiometer sensors, however as we mentioned above the communication between Arduino and

    the stage will be via Bluetooth through a charged cellphone Android OS application, Matlab

    immediately receives signals via serial Arduino and the control goes into action also by the serial

    line.

    The control was implemented in a graphical interface with LabVIEW and the MyRIO that is used to

    operate by interruptions and to optimize the control times in the general robot system because

    Arduino doesnt allow a real-time control as precise as we require longer by the characteristics of

    the card, making to the MyRIO superior from the FPGA embedded system

  • 43

    Power Stage. The analog output transferred to each motor must be amplified in voltage and current that

    guarantee the security of a digital stage, on the MyRIO card, because his maximum operating

    current is 150mA and the motor-peaks current up to 1.2A.

    Figure 59 MYRIO parameters. (National Instrument datasheet)

    Is why a power amplifier that use two transistors is implemented_ this to allow the passage of

    current in both directions and to operate the motor according to the direction that is needed by the

    movement of the rotational or prismatic joints.

    Figure 60 Circuit of the power stage.

  • 44

    Matlab and Labview manual To start the general control of the Scaras robot, you need to follow the next steps. This manual

    contains from Matlab to Labview software.

    For a correct order, all the documents has placed in the same folder, all that will help to search the

    files paths and the data communication in Matlab and Labview.

    Figure 61 Data placed in the same folder: Robot Scara

    First, go to the sub-folder Matlab, where the data PantallaControl and RobotScaraMov will

    be open.

    Figure 62 Sub-folder Matlab with the data highlighted

    In Matlab select the RobotScaraMov programs tab, and search at the final part of the code, the

    path assignment of the save movements: q1, q2 and q3.

  • 45

    Figure 63 Path of the save movements in the code RobotScaraMov

    This path match to the place where the file with a .txt format will be create with each numeric

    movement value the person get into the user interface.

    To check, or to change the path, go into the principal folder RobotScara, then to the sub-folder

    MatlabLabVIEW

    Figure 64 Sub-folder MatlabLabView highlighted

    The three .txt files are placed in this sub-folder, so click the right button of the mouse in each one

    and select the properties option

  • 46

    Figure 65 Selection of the properties option

    On the open window, in the general path, copy the location of the file

    Figure 66 Copy the location of the .txt file.

    The path has to be the same as the RobotScaraMov Matlab code has indicated, from q1 to q3

    respectively.

  • 47

    Figure 67 Checking the path, in each file on the code.

    If a change happen on the location, the path or we modify the RobotScaraMov code, save the file

    with the save icon or pressing Ctrl+S; at once go to the PantallaControl tab and click on the

    button Play or press F5.

    Figure 68 PantallaControl tab, Save and Play icon highlighted.

    When PantallaControl run, Matlab will be on busy mode and a new emergent window will be

    open, this window is the Visual interface of the Scara Robot.

    However, the window will open as the next figure:

  • 48

    Figure 69 Visual Interface window

    Visual Matlab Interface As is shown, the figure of the robot doesnt appear yet, that is because first the Home button

    has to be press, and wait a moment while the program charge the calculus to prepare the

    interface.

    Figure 70 Selection of the Home button while the program prepare the interface

    When the interface is load, it looks like the next figure:

    NOTE: The robots model has been create on Solidworks previously.

    Command

    window

    working

  • 49

    Figure 71 Visual interface of the robot.

    The Home button send the 3 links to the zero position. So, if you are working with and x position

    in the links, you can press this button as reset, and the robot model will appear with a movement

    Q1=0,Q2=0 and Q3=0

    Figure 72 Home button

    The slide stick let the movements of the rotational and prismatic joints of the robot model shown.

    Each coordinate axe has a text box that indicates the position of q, a text box that indicates the

    position of the end effector in that link movement, and the slider that moves the position of the

    robot.

    So when you move the slide (dragging or clicking the up/down arrow ), the Q text box shows the

    value of the movement in grades and the P text box shows the value of the end effector when we

    move the slide to a q position. All this movements are represented in the robot model.

  • 50

    Figure 73 Movement in the coordinate axes

    Robot model

    Slides of

    movement of the

    links

    Text box that shows the

    movement in the link

    Text box that shows the

    position of the end

    effector in the link

    Slide that moves the

    robot model

    Link 1 Link 2 End

    effector

    r

  • 51

    Figure 74 Slides and text boxes.

    In the tag above the Scara model whose name is Scara position has 3 text boxes, each one has a

    name and it operates one of the links. When you write a value inside of the text box (that has the

    name of the link to move, where x is q1, y is q2 and z is q3) the slide, the q-box, the p-box and the

    robot model will move to the insert value. All this happen in the three text boxes.

    Figure 75 Position of the tag to write a value for the links movement

    Figure 76 Tag to write a value for the links movement

    Also the interface allow the user to show in the window the coordinate axes through the Slide

    stick, all that to prove the movement direction or to check the orientation of the links. When the

    slide is dragged or the up/down button is clicked, the axes representation became larger.

    Text box, with write values for

    movement in the axes.

    Tag to edit the link position with

    a write value

  • 52

    Figure 77 Where the slide its located the Ejes slide

    Matlab - Labview Next verify that the Q value of q1, q2 and q3 have been saved on the .txt file that correspond to.

    Figure 79 Checking if the values has been save when we move the interface.

    Tag to show the coordinate axes.

    (It became larger or shorter with

    the movement of the slide)

    Slide that shows the coordinate

    axis.

    Figure 78 Coordnate axis

  • 53

    Notice that the Q values has been save correctly on the notes bloc, when this happen go to

    LabviewProyectoScara folder and open ProyectoScara.Ivproj.

    Figure 80 Opening ProyectoScara.Ivproj

    The projects contains two blocks, My computer and NI-myRIO-SerialNumber, that because some

    values will be write on the MyRIO target to connect it on the computer, but first the save data on

    Matlab form the notes bloc have been transfer to MyComputer, where the VI contains in this

    section (UDPSenderTXTDeMatlab)) that open the communication that is based on the UDP protocol,

    that is the reason of the files name.

    Figure #? Project in LABVIEW, two sections schema.

    Check that the VI UDPSenderTXTDeMatlab acquire the data of the .txt file that contains the

    movement information that the user propose on the Matlab interface, also check that the UDP has

    communication with the MyRIO target, for that in the constant of the block diagram address put

    the IP number of the MyRIO (Find the IP in the initial connection of the target, in the configuration

    window.)

  • 54

    Also is important check the path that contains the diagram block, be the same as the copy one in

    the RobotScaraMov in Matlab, because it will open the .txt to send values.

    Figure 81 Check of the Matlab link.

    Se observa en el diagrama de bloques que se realizaron las conversiones necesarias para

    empaquetar los datos en un solo valor y mandarlo como una palabra de 255 bits, es por ello que en

    la interfaz de usuario aparecen dos qs de cada una, donde en las del lado izquierdo se mostrarn

    valores tal se visualice en la interfaz de Matlab, mientras que en las del lado derecho, irn de 0 a

    255.

    Figure 82 Reception of the qs interface.

    Labview control system. Then, when the MainControlDigital VI opened in the NI-MyRIO that contains the principal changes

    that are made for the PID tuning in the frequency domain i.e. in Z. The propose control for the motor

    only includes only a PD, because the integral action makes the system unstable.

    The next figures shows the EcuacionEnDiferenciasPIDZ VI content, nonetheless the operation is

    not necessary to be open, because it is contained on the MainControlDigital file.

    IP of MyRIo

    Same link of the matlab

  • 55

    Then the principal file on the MyRIO will stay open, in which the output ports that physically will be

    on the target, for that the final interface will appear on LabView and the configuration and

    parameters will breakdown.

    On the ControlUsuario block enter 3 on the sampling time icon, inside the cluster Seleccin

    PID, so the values Kp:0.24, Ki:0 and Kd:0.3.

    MyRIO within the configuration, control "AnalogInputPot" is recommended to select the same port

    for the three analog inputs which sensors "knobs" are connected to facilitate connections and the

    physical cabling and to maintain a proper order.

    For the analog outputs we recommend to the two available in the "C" port, as these directly handle

    a voltage range of 10V, but for the third engine can be chosen any other output port "A" or "B

    "considering that these ports provide a range of 0-5V as analog output and therefore will require a

    physical OFFSET setting to handle positive and negative voltages in the stage goes to the engine

    power and can rotate left or right depending on the movement that you want to apply.

  • 56

    Figure 83 Labview interface

    If the program present an error, it is necessary to analyze the programming from the block

    diagram of the algorithm, to access it pressed ctrl + t, and the program runs with the spotlight

    support, this will identify the error possibly due to poor detection of the card or by omitting the

    correct IP address.

    NOTE: When you restart the program you need to replace the PID sub-VI

    Figure 84 Labview programming

  • 57

    Power Amplifier

    For the physical connection to the engine, you must perform a power amplifier to provide enough

    current to these and to protect the digital card.

    The proposed circuit this is a pair of PNP and NPN transistors respectively configuration and each of

    these increases the amount of current and allow rotation to left or right.

    Figure 85 System model

    Potentiometers also require a series resistor to be linearized, for 10k potentiometer, it is required

    to connect a resistor of 470

    Figure 86 Power stage Scara Motor Control

    Finally a design for printed board made in Proteus Ares for the above circuit is shown.

  • 58

    Figure 87 Proteus Ares model circuit

    Figure 88 Proteus Ares 3D model

  • 59

    Extra application

    Flowchart in communication and data

    processing of a Scara Robot

    MatLab programming:

    ComunicacionArduino Function

  • 60

    Flowchart in communication and data processing of a Scara Robot

    Bluetooth application on Android

    Sends characters of rotations of the motors

    (Q1, Q2, Q3)

    Bluetooth module for Arduino

    Establishes bluetooth communication with the

    application.

    Receives the characters sent from the APP.

    Send characters to the microcontroller

    Arduino

    Receives data from the bluetooth module through serial communication.

    Processed and concatenates the data that will be sent to Matlab

    Matlab program

    The software receives the data that was sent by the microcontroller.

    Transforms the variable to double type to be processed by the equations of the robot

    The simulation shows the robot's movements and sends the data to LabVIEW.

    LabVIEW programming

    Receives the data from Matlab

    Establishes communication with MyRIO via UDP communication; sends data received (movements)

    MyRio

    PID control applied to the motors.

  • 61

    Arduino programming The Arduino, in this project aims to establish communication with the Bluetooth module in order

    to receive the character sent by the android application. This is done by a serial communication

    with the Bluetooth module, with that Arduino communication it receive the positions of the motor

    that will be processed and concatenated to next be send to MatLab

    In this process the variable is stored in a vector called INTEXT type string. As shown below in the

    Arduino code.

  • 62

  • 63

    Figure 89 Arduinos code for Bluetooth module

  • 64

    MatLab programming: ComunicacionArduino Function MatLab has the main role in the movements of the robot, because it receives the values of the

    motors positions and calculates the position of the end effector in the xyz plane; but besides this,

    analyze the vector string to assign each value (q1, q2, q3) and when we send a data with the

    application, the values are stored in a local variable called thetaH, thetaJ and thetaK which is then

    called PantallaControl (figure c) to perform the simulation of the robot movement in its 3 degrees

    of freedom (DOF). The programming communication Via Arduino can be seen in Figure (b)

  • 65

    Figure 90 Communication between Arduino and Matlab

  • 66

  • 67

  • 68

  • 69

  • 70

  • 71

  • 72

    Figure 91 PantallaControl

    Results The robot design changes the design partially, but in essence its

    the same. It has work made on CNC, mill and turning.

    In their functions it works with the extra module, and also 2 of

    the motors works without

    dancing. The PID changes a little,

    and it was the main problem

    during the process.

    The third motor has a lot of

    problems, and the team try to fix

    them changing the motor, the

    potentiometer, changing the structure, the cables, the MyRIO but in

    all the attempts it doesnt works without an error.

    Conclusion Vanessa: To create a project with the magnitude of the robot, help us to join all the abilities that we

    acquire on the career as mechanics, programming, electronics, etc. So create a mechanism with

    specific characteristics make our work hard and give us the idea how us, as mechatronics engineers,

    we can make works with a high level of difficulty. This Robot accomplish all the expectations of it,

    because it is the model, the design, and the idea saw at the beginning.

    Figure 92 Scara robot Cabling

    Figure 93 Scara Robot

  • 73

    Elisa: the development of our Scara robot was a real goal to achieve as a mechatronic Project,

    because each step was important, since the beginning until the end, the plan and methodology to

    act, to buy components, to distribute the work and also to assign task to each member of the team

    in order of increase the individual skills and to reach a nice organization as a team. In programming

    the most difficult stage was the adaptation of the signals and understand completely the

    functionality of a digital control PID in a system that has a 3rd order transfer function equation,

    therefore the results obtained was very good but can be better with more testing in the robot. Also

    the part that required more time was the mechanic, because many things changed in the moment

    to make the joints for example vs the simulation and the design in Solidworks, also was a little

    complicated by the price of the materials, and we need adapt with cheaper ones and using acrylic

    and aluminum. And in resume, the project has bluetooth, serial and UDP communication, a digital

    PID controller for each of the three motor reducer, mechanic design in Solidworks, mechanic parts

    making in CNC machine and in conventional machines, electric design for pcb and distribution of the

    wires through the robot and the devices.

    Alfredo: its possible to observe that for the control are required different values in the PID

    parameters, because at the moment of connect the physical mechanism and the electronic parts as

    the potentiometer and DC motors, change the equation by the additional parameters that involves

    the mechanic part and also the real functionality in comparison with the theory implemented at the

    moment to calculi the parameters or also with the first simulation without the end structure, some

    parameters by example are the viscosity, friction, weight, density, etc. So was important the test did

    with the structure and thinking in a solution to obtain the control modifying the PID values in the

    code of LabView. Finally the application of bluetooth communication with arduino and Matlab add

    the function to transfer data through a cell phone and given an extra type of control.

    Fernando: now a days, projects need a real planning to obtain the results with high quality and in

    time that the customer requires, so for us, it is important understand it and start to make action

    plans in all projects, doesn't matter that will be only a prototype, because the same principles are

    used in the industry in the globalized world. When the plan is ready, the action starts and if the time

    of each task is respected its easy achieve the final goal, in the case of the Scara robot as a completely

    mechatronic design and integrated system, was difficult remember all subjects at the beginning and

    only with the experience, the questions was answered one by one and the problems found a

    solution. Well, the control, mechanic and electrical was put together and also some extra things as

    wire, esthetics, connectivity, administration and a big load of patience and enthusiasm.

    Ezequiel: mechatronic design given me the possibility to develop different philosophies to make a

    complete Project, because here is where I applied all my knowledges acquiring while the major and

    in personal words, it opened my mind in the mechatronic systems design, also I discover that give

    up something is not an option never. The truth is that the goals that you have and plan are possible to reach with dedication and work, is only a process that requires some enthusiasm and

    organization. The Scaras project was a great project although we cant reach all the objectives

    purposes at the beginning, the results was good by the moment and a big advance in the robot, so

    now only we need to continue with the project until we finished it completely.

  • 74

    Conclusions about the control:

    Ezequiel: The control for Scara robot, as we saw in classes previously, was development with the

    PID differential equation in LabView, in general it worked good. And now I can understand that

    modifying the parameters of Ki, Kd and Kp its possible to obtain different type of control and then

    different behavior of the system, in this case in the DC motors. Finally each motor required specific

    values for the PID because mechanic pieces modified the weight that the motor would carry.

    Vanesa: When we create a control system, we analyzed the past, the present and the future to

    create the best option for it. When the control was designed we decided through the interface, what

    kind of system the robot will need, in this case the PD control, to make it faster and stable. I think

    that the propose of the program worked perfectly, but we had some problems on the proves, but

    finally we do it.

    Elisa: the correct parameters of the variables in the digital PID, that is only a differential equation

    with a determined number of samples, was selected in the testing because at the first the values

    was different comparing with the final values, because the mechanic parameters interfered also in

    the function of motors and sensors, for example in the third jig was necessary to use a rack and

    pinion system, elements that add things in the transfer function and also in the close loop of the

    robot. Its important to mention that the method was only observe and tuning, but ever with the

    knowledge learned in the theory, because we know that kp help for increase the response, ki add

    delay to the response and in motors is unnecessary and finally kd help to a quickly and stable signal

    because it avoid the stable state error.

    Alfredo: its possible to observe that the control was fast and efficient when we implement the

    differential equation as a PID, because the code only involves common operations that the

    Computer can process in a short time in comparison with a most complicated code or maybe with

    the block using normally in LabView. In the physical assembly of the joints and jigs, the values of PD

    need modification, but just a little in relation with the initial proposed values, because the structure

    of the robot has a small friction in the rotaries pieces, also help that the structure has a good weigh

    according to the torch supported by the motors. The Kp variable need a high value, to give the

    correct force to move the robot with small changes of degrees. And the Kp to eliminate the stable

    error and to avoid the vibration in the movement.

    Luis Fernando: in conclusion, learned how to make and/or design a control for a motor position or

    a control of any other system or element is very important for me, because with it, its possible to

    do many applications with a nice control and therefore without significant errors. In our robot I

    lernaed that its a key do the modeling of each motor and calculate its transfer function, but at the

    practice moment, the values of Kp, Ki and Kd change by mechanical reasons, also the process will

    be develop through a differential equation and using it, the control will be faster than the

    programmed elements in the software.

  • 75

    References [1] Anaya, M. L. (2015). MODELO MATEMATICO DE MOTORES. DETERMINACIN DE LOS

    PARMETROS DE UN MOTOR DE CD. .pdf.

    [2] Instruments, N. (2015). USER GUIDE AND SPECIFICATIONS. NI myRIO-1900.

    http://www.ni.com/pdf/manuals/376047a.pdf.

    [3] Arduino. (2015). Obtenido de http://www.arduino.cc/en/Main/ArduinoBoardUno

    [4] http://www.elecfreaks.com/store/serial-port-bluetooth-module-hc05hc06-hc05-p-

    168.html#ixzz3cVBe7Zmh [5] http://www.robodacta.mx/index.php?dispatch=products.view&product_id=431

    [6] http://www.st.com/web/en/catalog/sense_power/FM142/CL851/SC1790/SS1555/PF6314

    7

    [7] Montes.M (2015). Position Tansformations. .pdf

    [8] Matlab-PID_1314..pdf

  • 76

    UNIVERSIDAD POLITCNICA DE AGUASCALIENTES

    MECHATRONICS

    8D

    FERNANDO GOMEZ

    CYNTHIA HERNANDEZ

    ELISA MARQUEZ

    ALFREDO MARTINEZ

    EZEQUIEL MEDINA