Vous êtes sur la page 1sur 23

Instituto Tecnolgico Superior de

Lerdo

INGENIERA ELECTRNICA.

Reporte de proyecto integrador.

Control de brazo robtico mediante interfaz GUIDE Matlab

Integrantes:

Jos Eduardo Limn Martnez. N Control 13231262.


Mario Alberto Lozano Martnez. N Control 13231122.
Jess Manuel Silva Hernndez. N Control 13231641.
Ixchel Hayme Vielmas Garca. N Control 13231055.
Carlos de Jess Martnez Romo N Control 13231179.
Jorge Alberto Rivera Jurez N Control 13231176.
Gustavo Moreno Reyes N Control 13231167.
Jess Eduardo Salazar Rocha N Control 13231328.

Profesor: Dr. No Alvarado Tovar.

Lerdo, Dgo. 3 de Junio del 2017


Contenido
ndice de Figuras..........................................................................................................................3
Introduccin.................................................................................................................................4
Resumen......................................................................................................................................5
Abstract....................................................................................................................................5
Objetivo........................................................................................................................................6
Marco Terico..............................................................................................................................7
GUIDE Matlab........................................................................................................................7
Creacin de una GUI de MATLAB de forma interactiva.........................................................7
Creacin de una GUI de MATLAB de forma programtica....................................................7
Interfaz grfica de usuario........................................................................................................8
Brazo robtico..........................................................................................................................9
Mano robtica......................................................................................................................9
Tipos.....................................................................................................................................9
Metodologa...........................................................................................................................11
Desarrollo de interfaz GUIDE en Matlab.............................................................................11
Resultados..................................................................................................................................20
Desarrollo de interfaz GUIDE en Matlab.....................................................................................20
Torre de estacionamiento.......................................................................................................21
Conclusiones..............................................................................................................................22
Bibliografa.................................................................................................................................23
ndice de Figuras
1. Diagrama de flujo para la elaboracin de una interfaz de usuario ... 8
2. Ventana de GUIDE 11
3. Herramienta de panel 12
4. Herramienta de Texto Esttico 13
5. Herramienta de Axes .. 14
6. Interfaz GUIDE finalizada . 20
7. Interfaz GUiDE en funcionamiento .. 20
Introduccin
En este proyecto se elaborar un sistema de estacionamiento mediante la
ayuda de un brazo robtico el cual ser el que tome el vehculo y lo dirija haca
una banda transportadora la cual trasladar el vehculo hasta un punto en
concreto el cual lo estar esperando un pisto hidrulico el cual se encargar de
mover el vehculo hasta un cajn donde se preparar para su destino final.

Para realizar este trabajo como anteriormente se mencion se utilizaron como


herramienta principal un brazo robtico el cual cuenta con 6 grados de libertad
y estar siendo manipulado mediante la ayuda de una tarjeta adquisitoria y
controlado por el software Matlab, este brazo ser el encargado de seleccionar
el vehculo anteriormente colocado en el estacionamiento para su traspaso
haca la banda transportadora, la cual ser manipulada con la ayuda de un
PLC(Controlador Lgico Programable) en el cual sern colocado un par de
sensores de proximidad los cuales sern lo que detecten si el vehculo ya fue
colocado en la banda para que esta misma sea activada y empiece a
transportar a el vehculo hasta el punto final donde estar colocado el ultimo
sensor que detectara si ya paso el vehculo y empezara un conteo de 5
segundos para activar el pisto y colocar el vehculo a su destino final.
Resumen
En este proyecto se elaborar un sistema de estacionamiento mediante la
ayuda de un brazo robtico el cual ser manipulado mediante una interfaz en el
software Matlab y este mismo brazo ser el que tome el vehculo y lo dirija
haca una banda transportadora la cual, ser manipulada mediante la ayuda de
un PLC(Controlador Lgico Programable) y este mismo trasladar el vehculo
hasta un punto en concreto todo esto siendo detectados por unos sensores de
proximidad, y al final de su trayectoria lo estar esperando un pisto hidrulico el
cual se encargar de mover el vehculo hasta un cajn donde se preparar
para su destino final.

Abstract
In this project a parking system will be developed with the help of a robotic arm
which will be manipulated through an interface in Matlab software and this same
arm will be the one that takes the vehicle and directs it to a conveyor belt which
will be manipulated through The help of a PLC (Programmable Logic Controller)
and it will move the vehicle to a point in particular this being detected by
proximity sensors, and at the end of its path will be waiting for a hydraulic piston
which will be responsible for moving the Vehicle to a drawer where it will be
prepared for its final destination.
Objetivo
En este proyecto se realizara un sistema de estacionamiento autnomo el cual
tendr el objetivo de dirigir los vehculos estacionados haca una banda
transportadora la cual mover el auto del punto A al punto B donde un pistn se
accionar para colocar el vehculo en un cajn donde llegar a su destino final.

Para poder realizar este proyecto se elaborar un brazo robtico el cual ser el
encargado de sacar el vehculo del estacionamiento, en esta ocasin ya se
contaba con un brazo robtico por lo cual se omiti este paso, este brazo
deber ser controlado por una interfaz la cual deber ser elaborar con el
software Matlab en la cual se presentar cada uno de los cajones que contiene
el estacionamiento y si este est ocupado o est vaco de esta forma se podr
sacar el vehculo deseado, todo esta informacin ser precargada a una tarjeta
adquisitoria Arduino, todo este proceso se llevar para colar el vehculo en una
banda transportadora la cual ser controlada por un par de sensores en el
punto de inicio se tendr un sensor de proximidad el cual detectar cuando el
vehculo sea colocado para que de esta forma la banda empiece a funcionar,
cuando el vehculo llegue a su destino ser detectado por el ultimo sensor de
proximidad y segundos despus la banda transportadora se detendr para dar
la ltima seal al pistn el cual arrojar el vehculo a su cajn de destino, toda
esta operacin ser controlada por un PLC de marca Siemens en el cual
utilizamos contactores y temporizadores para el funcionamiento de cada
dispositivo antes mencionados, y con todas esta herramientas desarrollar el
estacionamiento autnomo.
Marco Terico
GUIDE Matlab
Las GUI (tambin conocidas como interfaces grficas de usuario o interfaces
de usuario) permiten un control sencillo (con uso de ratn) de las aplicaciones
de software, lo cual elimina la necesidad de aprender un lenguaje y escribir
comandos a fin de ejecutar una aplicacin.

Las apps de MATLAB son programas autnomos de MATLAB con un frontal


grfico de usuario GUI que automatizan una tarea o un clculo. Por lo general,
la GUI incluye controles tales como mens, barras de herramientas, botones y
controles deslizantes. Muchos productos de MATLAB, como Curve Fitting
Toolbox, Signal Processing Toolbox y Control System Toolbox, incluyen apps
con interfaces de usuario personalizadas. Tambin es posible crear apps
personalizadas propias, incluidas las interfaces de usuario correspondientes,
para que otras personas las utilicen.

Creacin de una GUI de MATLAB de forma interactiva


GUIDE (entorno de desarrollo de GUI) proporciona herramientas para disear
interfaces de usuario para Apps personalizadas. Mediante el editor de diseo
de GUIDE, es posible disear grficamente la interfaz de usuario. GUIDE
genera entonces de manera automtica el cdigo de MATLAB para construir la
interfaz, el cual se puede modificar para programar el comportamiento de la
app.

Creacin de una GUI de MATLAB de forma


programtica
A fin de ejercer un mayor control sobre el diseo y el desarrollo, tambin se
puede crear cdigo de MATLAB que defina las propiedades y los
comportamientos de todos los componentes. MATLAB contiene funcionalidad
integrada que le ayudar a crear la GUI para su app de forma programtica.
Cabe la posibilidad de agregar cuadros de dilogo, controles de interfaz de
usuario (como botones y controles deslizantes) y contenedores (como paneles
y grupos de botones).
Interfaz grfica de usuario
La interfaz grfica de usuario, conocida tambin como GUI (del ingls graphical
user interface), es un
programa informtico que
acta de interfaz de usuario,
utilizando un conjunto de
imgenes y objetos grficos
para representar la
informacin y acciones
disponibles en la interfaz. Su
principal uso, consiste en
proporcionar un entorno
visual sencillo para permitir la
comunicacin con el sistema
operativo de una mquina o computador.

Habitualmente las acciones se realizan mediante manipulacin directa, para


facilitar la interaccin del usuario con la computadora. Surge como evolucin de
las interfaces de lnea de comandos que se usaban para operar los primeros
sistemas operativos y es pieza fundamental en un entorno grfico. Como
ejemplos de interfaz grfica de usuario, cabe citar los entornos de escritorio
Windows, el X-Window de GNU/Linux o el de Mac OS X, Aqua.

En el contexto del proceso de interaccin persona-computadora, la interfaz


grfica de usuario es el artefacto tecnolgico de un sistema interactivo que
posibilita, a travs del uso y la representacin del lenguaje visual, una
interaccin amigable con un sistema informtico.
Brazo robtico
Un brazo robtico es un tipo de brazo mecnico, normalmente programable,
con funciones parecidas a las de un brazo humano; este puede ser la suma
total del mecanismo o puede ser parte de un robot ms complejo. Las partes de
estos manipuladores o brazos son interconectadas a travs de articulaciones
que permiten, tanto un movimiento rotacional (tales como los de un robot
articulado), como un movimiento traslacional o desplazamiento lineal.

Mano robtica
El efector final, o mano robtica, se cre para realizar cualquier tarea que se
desee como puede ser soldar, sujetar, girar, etc., dependiendo de la aplicacin.
Por ejemplo los brazos robticos en las lneas de ensamblado de la industria
automovilstica realizan una variedad de tareas tales como soldar y colocar las
distintas partes durante el ensamblaje. En algunas circunstancias, lo que se
busca es una simulacin de la mano humana, como en los robots usados en
tareas de desactivacin de explosivos.

Tipos
Robot cartesiano: Usado para trabajos de pick and place (tomar y
colocar), aplicacin de impermeabilizantes, operaciones de ensamblado,
manipulacin de mquinas herramientas y soldadura por arco. Es un
robot cuyo brazo tiene tres articulaciones prismticas, cuyos ejes son
coincidentes con los ejes cartesianos.
Robot cilndrico: Usado para operaciones de ensamblaje, manipulacin
de mquinas herramientas, soldadura por punto, y manipulacin en
mquinas de fundicin a presin. Es un robot cuyos ejes forman un
sistema de coordenadas cilndricas.
Robot esfrico / Robot polar, tal como el Unimate: Usados en la
manipulacin en mquinas herramientas, soldadura por punto, fundicin
a presin, mquinas de desbarbado, soldadura por gas y por arco. Es un
robot cuyos ejes forman un sistema polar de coordenadas.
Robot SCARA: Usado para trabajos de pick and place (tomar y
colocar), aplicacin de impermeabilizantes, operaciones de ensamblado
y manipulacin de mquinas herramientas. Es un robot que tiene dos
articulaciones rotatorias paralelas para proporcionar elasticidad en un
plano.
Robot articulado: Usado para operaciones de ensamblaje, fundicin a
presin, mquinas de desbarbado, soldadura a gas, soldadura por arco,
y pintado en spray. Es un robot cuyo brazo tiene como mnimo tres
articulaciones rotatorias.
Robot paralelo: Uno de los usos es la plataforma mvil que manipula las
cabinas de los simuladores de vuelo. Es un robot cuyos brazos tienen
articulaciones prismticas o rotatorias concurrentes.
Robot Antropomrfico: Similar a la mano robtica de Luke Skywalker que
se le coloca al final de The Empire Strikes Back. Se le da forma para que
pueda sustituir a una mano humana, p.e. con dedos independientes
incluido el pulgar.
Metodologa
Desarrollo de interfaz GUIDE en Matlab.
1.- Ingresamos al software de Matlab, dentro del software pasamos a escribir la
palabra GUIDE en el cuadro de comandos, de esta forma llamamos a la
herramienta GUIDE.

Ilustracin 2 Ventana de GUIDE.


2.- Como herramienta principal utilizamos la de panel de esta forma le
podemos dar un aspecto ms formal a nuestra interfaz y no dejarlo con un
aspecto menos cutre y tambin esta herramienta nos da muchas opciones ya
que podemos modificarla a nuestro gusto, como puede ser el color.

Ilustracin 3 Herramienta de panel.


3.- Como segunda herramienta utilizamos las de texto esttico y de esta forma
dar a entender al usuario cual es el propsito de esa interfaz y de esta forma
hacerla entendible para el usuario.

Ilustracin 4 Herramienta de Texto Esttico.


4.- Como ultima herramienta utilizamos la Axes ya que con esta herramienta
podemos agregar imgenes y de esta forma hacer la interfaz ms intuitiva.

Ilustracin 5 Herramienta de Axes.


5. Ya con la interfaz elaborada se pas a darle la funcionalidad mediante
cdigo el cual es programado en la interfaz de Matlab para que esto funcionara
se tuvo que instalar una libreras de Arduino para que la comunicacin fuera
exitosa.
function varargout = integrador(varargin) % This function has no output args, see
% INTEGRADOR MATLAB code for integrador.fig OutputFcn.
% INTEGRADOR, by itself, creates a new % hObject handle to figure
INTEGRADOR or raises the existing % eventdata reserved - to be defined in a
% singleton*. future version of MATLAB
% % handles structure with handles and user
% H = INTEGRADOR returns the handle to a data (see GUIDATA)
new INTEGRADOR or the handle to % varargin command line arguments to
% the existing singleton*. integrador (see VARARGIN)
% % Choose default command line output for
% integrador
INTEGRADOR('CALLBACK',hObject,eventData,handle handles.output = hObject;
s,...) calls the local % Update handles structure
% function named CALLBACK in INTEGRADOR.M guidata(hObject, handles);
with the given input arguments. % UIWAIT makes integrador wait for user
% response (see UIRESUME)
% INTEGRADOR('Property','Value',...) % uiwait(handles.figure1);
creates a new INTEGRADOR or raises the % --- Outputs from this function are returned
% existing singleton*. Starting from the to the command line.
left, property value pairs are function varargout =
% applied to the GUI before integrador_OutputFcn(hObject, eventdata,
integrador_OpeningFcn gets called. An handles)
% unrecognized property name or invalid % varargout cell array for returning output
value makes property application args (see VARARGOUT);
% stop. All inputs are passed to % hObject handle to figure
integrador_OpeningFcn via varargin. % eventdata reserved - to be defined in a
% future version of MATLAB
% *See GUI Options on GUIDE's Tools menu. % handles structure with handles and user
Choose "GUI allows only one data (see GUIDATA)
% instance to run (singleton)". % Get default command line output from handles
% structure
% See also: GUIDE, GUIDATA, GUIHANDLES varargout{1} = handles.output;
axes(handles.axes1);
imshow('tecportada.jpg');
% Edit the above text to modify the response axes(handles.axes2);
to help integrador imshow('robot.jpg');
axes(handles.axes3);
% Last Modified by GUIDE v2.5 26-May-2017 imshow('iniciales.JPG');
03:12:36 axes(handles.axes4);
imshow('flecha.JPG');
c1=imread('carro1.JPG');
% Begin initialization code - DO NOT EDIT set(handles.pushbutton1,'CData',c1)
gui_Singleton = 1; c2=imread('carro2.JPG');
gui_State = struct('gui_Name', set(handles.pushbutton2,'CData',c2)
mfilename, ... c3=imread('carro3.JPG');
'gui_Singleton', set(handles.pushbutton3,'CData',c3)
gui_Singleton, ... c4=imread('carro4.JPG');
'gui_OpeningFcn', set(handles.pushbutton4,'CData',c4)
@integrador_OpeningFcn, ... c5=imread('espera.PNG');
'gui_OutputFcn', set(handles.pushbutton5,'CData',c5)
@integrador_OutputFcn, ... global a
'gui_LayoutFcn', [] , ... a=arduino('COM8');
'gui_Callback', []); % --- Executes during object creation, after
if nargin && ischar(varargin{1}) setting all properties.
gui_State.gui_Callback = function axes1_CreateFcn(hObject, eventdata,
str2func(varargin{1}); handles)
end % hObject handle to axes1 (see GCBO)
if nargout % eventdata reserved - to be defined in a
[varargout{1:nargout}] = future version of MATLAB
gui_mainfcn(gui_State, varargin{:}); % handles empty - handles not created until
else after all CreateFcns called
gui_mainfcn(gui_State, varargin{:}); % Hint: place code in OpeningFcn to populate
end axes1
% End initialization code - DO NOT EDIT % --- Executes during object creation, after
setting all properties.
function axes2_CreateFcn(hObject, eventdata,
handles)
% hObject handle to axes2 (see GCBO)
% --- Executes just before integrador is made
% eventdata reserved - to be defined in a
visible.
future version of MATLAB
function integrador_OpeningFcn(hObject,
% handles empty - handles not created until
eventdata, handles, varargin)
after all CreateFcns called
% Hint: place code in OpeningFcn to populate set(handles.text9,'String',
axes2 (readPosition(motor5)*180));
% --- Executes on button press in pushbutton1. pause(0.01);
function pushbutton1_Callback(hObject, end
eventdata, handles) pause(1);
global a; for angulo=0.39:-0.01:.09
motor6 = servo(a,'D11'); writePosition(motor4,angulo);
set(handles.text8,'String',
(readPosition(motor4)*180));
for angulo=0.5:-0.01:.46 pause(0.01);
writePosition(motor6,angulo); end
set(handles.text10,'String', pause(1);
(readPosition(motor6)*180)); for angulo=0.41:0.01: 0.53
pause(0.01); writePosition(motor5,angulo);
end set(handles.text9,'String',
pause(1); (readPosition(motor5)*180));
motor3=servo(a,'D6'); pause(0.01);
for angulo=0.5:0.01: 1 end
writePosition(motor3,angulo); pause(1);
set(handles.text7,'String', for angulo=0.94:-0.01:.71
(readPosition(motor3)*180)); writePosition(motor3,angulo);
pause(0.01); set(handles.text7,'String',
end (readPosition(motor3)*180));
pause(1); pause(0.01);
motor4 = servo(a,'D9'); end
for angulo=0.5:-0.01: 0.27 pause(1);
writePosition(motor4,angulo); for angulo=0.09:-0.01:.0
set(handles.text8,'String', writePosition(motor4,angulo);
(readPosition(motor4)*180)); set(handles.text8,'String',
pause(0.01); (readPosition(motor4)*180));
end pause(0.01);
pause(1); end
motor5 = servo(a,'D10'); pause(3);
for angulo=0.5:0.01:.69 %reposo---------------------------------------
writePosition(motor5,angulo); ----------------------
set(handles.text9,'String', writePosition(motor1,.18);
(readPosition(motor5)*180)); set(handles.text5,'String',
pause(0.01); (readPosition(motor1)*180));
end motor2 = servo(a,'D5');
pause(1); writePosition(motor2,.79);
for angulo=0.27:0.01: 0.39 set(handles.text6,'String',
writePosition(motor4,angulo); (readPosition(motor2)*180));
set(handles.text8,'String', writePosition(motor3,.5);
(readPosition(motor4)*180)); set(handles.text7,'String',
pause(0.01); (readPosition(motor3)*180));
end writePosition(motor4,.5);
pause(1); set(handles.text8,'String',
for angulo=0.69:0.01:.76 (readPosition(motor4)*180));
writePosition(motor5,angulo); writePosition(motor5,.5);
set(handles.text9,'String', set(handles.text9,'String',
(readPosition(motor5)*180)); (readPosition(motor5)*180));
pause(0.01); writePosition(motor6,.5);
end set(handles.text10,'String',
pause(1); (readPosition(motor6)*180));
for angulo=1:-0.01: 0.94 pause(3);
writePosition(motor3,angulo); c2=imread('carro1.JPG');
set(handles.text7,'String', set(handles.pushbutton1,'CData',c2)
(readPosition(motor3)*180)); % hObject handle to pushbutton1 (see GCBO)
pause(0.01); % eventdata reserved - to be defined in a
end future version of MATLAB
pause(1); % handles structure with handles and user
motor1 = servo(a,'D3'); data (see GUIDATA)
writePosition(motor1,1); % --- Executes on button press in pushbutton2.
set(handles.text5,'String', function pushbutton2_Callback(hObject,
(readPosition(motor1)*180)); eventdata, handles)
c1=imread('azul.JPG'); global a;
set(handles.pushbutton1,'CData',c1) motor6 = servo(a,'D11');
for angulo=0.5:-0.01:.34
pause(3); writePosition(motor6,angulo);
%salida--------------------------------------- set(handles.text10,'String',
----------------------- (readPosition(motor6)*180));
for angulo=0.76:-0.01:.67 pause(0.01);
writePosition(motor5,angulo); end
set(handles.text9,'String', pause(1);
(readPosition(motor5)*180)); motor3=servo(a,'D6');
pause(0.01); for angulo=0.5:0.01: 1
end writePosition(motor3,angulo);
pause(1); set(handles.text7,'String',
for angulo=0.46:0.01: 0.93 (readPosition(motor3)*180));
writePosition(motor6,angulo); pause(0.01);
set(handles.text10,'String', end
(readPosition(motor6)*180)); pause(1);
pause(0.01); motor4 = servo(a,'D9');
end
pause(1); for angulo=0.5:-0.01: 0.27
for angulo=0.67:-0.01: 0.41 writePosition(motor4,angulo);
writePosition(motor5,angulo);
set(handles.text8,'String', writePosition(motor4,angulo);
(readPosition(motor4)*180)); set(handles.text8,'String',
pause(0.01); (readPosition(motor4)*180));
end pause(0.01);
pause(1); end
motor5 = servo(a,'D10'); pause(1);
for angulo=0.5:0.01:.69 writePosition(motor1,0);
writePosition(motor5,angulo); set(handles.text5,'String',
set(handles.text9,'String', (readPosition(motor1)*180));
(readPosition(motor5)*180)); pause(3);
pause(0.01); %reposo---------------------------------------
end ----------------------
pause(1); writePosition(motor1,.18);
for angulo=0.27:0.01: 0.39 set(handles.text5,'String',
writePosition(motor4,angulo); (readPosition(motor1)*180));
set(handles.text8,'String', motor2 = servo(a,'D5');
(readPosition(motor4)*180)); writePosition(motor2,.79);
pause(0.01); set(handles.text6,'String',
end (readPosition(motor2)*180));
pause(1); writePosition(motor3,.5);
for angulo=0.69:0.01:.75 set(handles.text7,'String',
writePosition(motor5,angulo); (readPosition(motor3)*180));
set(handles.text9,'String', writePosition(motor4,.5);
(readPosition(motor5)*180)); set(handles.text8,'String',
pause(0.01); (readPosition(motor4)*180));
end writePosition(motor5,.5);
pause(1); set(handles.text9,'String',
(readPosition(motor5)*180));
writePosition(motor6,.5);
for angulo=1:-0.01: 0.92 set(handles.text10,'String',
writePosition(motor3,angulo); (readPosition(motor6)*180));
set(handles.text7,'String', pause(3);
(readPosition(motor3)*180)); c2=imread('carro2.JPG');
pause(0.01); set(handles.pushbutton2,'CData',c2)
end % hObject handle to pushbutton2 (see GCBO)
pause(1); % eventdata reserved - to be defined in a
motor1 = servo(a,'D3'); future version of MATLAB
writePosition(motor1,1); % handles structure with handles and user
set(handles.text5,'String', data (see GUIDATA)
(readPosition(motor1)*180)); % --- Executes on button press in pushbutton3.
c1=imread('azul.JPG'); function pushbutton3_Callback(hObject,
set(handles.pushbutton2,'CData',c1) eventdata, handles)
pause(3); global a;
%salida--------------------------------------- motor6 = servo(a,'D11');
----------------------- for angulo=0.5:-0.01:.455
for angulo=0.78:-0.01:.67 writePosition(motor6,angulo);
writePosition(motor5,angulo); set(handles.text10,'String',
set(handles.text9,'String', (readPosition(motor6)*180));
(readPosition(motor5)*180)); pause(0.01);
pause(0.01); end
end pause(1);
pause(1); motor3=servo(a,'D6');
for angulo=0.34:0.01: 0.93 for angulo=0.5:0.01: 1
writePosition(motor6,angulo); writePosition(motor3,angulo);
set(handles.text10,'String', set(handles.text7,'String',
(readPosition(motor6)*180)); (readPosition(motor3)*180));
pause(0.01); pause(0.01);
end end
pause(1); pause(1);
for angulo=0.67:-0.01: 0.41 motor5 = servo(a,'D10');
writePosition(motor5,angulo); for angulo=0.5:0.01:.67
set(handles.text9,'String', writePosition(motor5,angulo);
(readPosition(motor5)*180)); set(handles.text9,'String',
pause(0.01); (readPosition(motor5)*180));
end pause(0.01);
pause(1); end
for angulo=0.39:-0.01:.09 pause(1);
writePosition(motor4,angulo); motor4 = servo(a,'D9');
set(handles.text8,'String', for angulo=0.5:-0.01: 0.11
(readPosition(motor4)*180)); writePosition(motor4,angulo);
pause(0.01); set(handles.text8,'String',
end (readPosition(motor4)*180));
pause(1); pause(0.01);
for angulo=0.41:0.01: 0.53 end
writePosition(motor5,angulo); pause(1);
set(handles.text9,'String', for angulo=0.67:0.01:.76
(readPosition(motor5)*180)); writePosition(motor5,angulo);
pause(0.01); set(handles.text9,'String',
end (readPosition(motor5)*180));
pause(1); pause(0.01);
for angulo=0.92:-0.01:.71 end
writePosition(motor3,angulo); pause(1);
set(handles.text7,'String', motor1 = servo(a,'D3');
(readPosition(motor3)*180)); writePosition(motor1,1);
pause(0.01); set(handles.text5,'String',
end (readPosition(motor1)*180))
pause(1); c1=imread('azul.JPG');
for angulo=0.09:-0.01:.0 set(handles.pushbutton3,'CData',c1)
pause(3); set(handles.text9,'String',
%salida--------------------------------------- (readPosition(motor5)*180));
--------------------- writePosition(motor6,.5);
for angulo=0.76:-0.01:.62 set(handles.text10,'String',
writePosition(motor5,angulo); (readPosition(motor6)*180));
set(handles.text9,'String', pause(3);
(readPosition(motor5)*180)); c2=imread('carro3.JPG');
pause(0.01); set(handles.pushbutton3,'CData',c2)
end % hObject handle to pushbutton3 (see GCBO)
pause(1); % eventdata reserved - to be defined in a
for angulo=1:-0.01:0.85 future version of MATLAB
writePosition(motor3,angulo); % handles structure with handles and user
set(handles.text7,'String', data (see GUIDATA)
(readPosition(motor3)*180)); % --- Executes on button press in pushbutton4.
pause(0.01); function pushbutton4_Callback(hObject,
end eventdata, handles)
pause(1); global a;
for angulo=0.62:-0.01:.42 motor6 = servo(a,'D11');
writePosition(motor5,angulo); for angulo=0.5:-0.01:.34
set(handles.text9,'String', writePosition(motor6,angulo);
(readPosition(motor5)*180)); set(handles.text10,'String',
pause(0.01); (readPosition(motor6)*180));
end pause(0.01);
pause(1); end
for angulo=0.46:0.01: 0.93 pause(1);
writePosition(motor6,angulo); motor3=servo(a,'D6');
set(handles.text10,'String', for angulo=0.5:0.01: 1
(readPosition(motor6)*180)); writePosition(motor3,angulo);
pause(0.01); set(handles.text7,'String',
end (readPosition(motor3)*180));
pause(0.01);
end
pause(1); pause(1);
for angulo=0.42:-0.01: 0.41 motor5 = servo(a,'D10');
writePosition(motor5,angulo); for angulo=0.5:0.01:.67
set(handles.text9,'String', writePosition(motor5,angulo);
(readPosition(motor5)*180)); set(handles.text9,'String',
pause(0.01); (readPosition(motor5)*180));
end pause(0.01);
pause(1); end
for angulo=0.11:-0.01:.09 pause(1);
writePosition(motor4,angulo); motor4 = servo(a,'D9');
set(handles.text8,'String', for angulo=0.5:-0.01: 0.11
(readPosition(motor4)*180)); writePosition(motor4,angulo);
pause(0.01); set(handles.text8,'String',
end (readPosition(motor4)*180));
pause(1); pause(0.01);
for angulo=0.41:0.01: 0.53 end
writePosition(motor5,angulo); pause(1);
set(handles.text9,'String', for angulo=0.67:0.01:.76
(readPosition(motor5)*180)); writePosition(motor5,angulo);
pause(0.01); set(handles.text9,'String',
end (readPosition(motor5)*180));
pause(1); pause(0.01);
for angulo=0.85:-0.01:.71 end
writePosition(motor3,angulo); pause(1);
set(handles.text7,'String', motor1 = servo(a,'D3');
(readPosition(motor3)*180)); writePosition(motor1,1);
pause(0.01); set(handles.text5,'String',
end (readPosition(motor1)*180));
pause(1); c1=imread('azul.JPG');
for angulo=0.09:-0.01:.0 set(handles.pushbutton4,'CData',c1)
writePosition(motor4,angulo); pause(3);
set(handles.text8,'String', %salida---------------------------------------
(readPosition(motor4)*180)); --------------
pause(0.01); for angulo=0.76:-0.01:.62
end writePosition(motor5,angulo);
pause(1); set(handles.text9,'String',
writePosition(motor1,0); (readPosition(motor5)*180));
set(handles.text5,'String', pause(0.01);
(readPosition(motor1)*180)); end
pause(3); pause(1);
%reposo--------------------------------------- for angulo=1:-0.01:0.85
---------------------- writePosition(motor3,angulo);
writePosition(motor1,.18); set(handles.text7,'String',
set(handles.text5,'String', (readPosition(motor3)*180));
(readPosition(motor1)*180)); pause(0.01);
motor2 = servo(a,'D5'); end
writePosition(motor2,.79); pause(1);
set(handles.text6,'String', for angulo=0.62:-0.01:.42
(readPosition(motor2)*180)); writePosition(motor5,angulo);
writePosition(motor3,.5); set(handles.text9,'String',
set(handles.text7,'String', (readPosition(motor5)*180));
(readPosition(motor3)*180)); pause(0.01);
writePosition(motor4,.5); end
set(handles.text8,'String', pause(1);
(readPosition(motor4)*180)); for angulo=0.34:0.01: 0.93
writePosition(motor5,.5); writePosition(motor6,angulo);
set(handles.text10,'String', writePosition(motor3,.5);
(readPosition(motor6)*180)); set(handles.text7,'String',
pause(0.01); (readPosition(motor3)*180));
end writePosition(motor4,.5);
set(handles.text8,'String',
(readPosition(motor4)*180));
pause(1); writePosition(motor5,.5);
for angulo=0.42:-0.01: 0.41 set(handles.text9,'String',
writePosition(motor5,angulo); (readPosition(motor5)*180));
set(handles.text9,'String', writePosition(motor6,.5);
(readPosition(motor5)*180)); set(handles.text10,'String',
pause(0.01); (readPosition(motor6)*180));
end pause(3);
pause(1); c2=imread('carro4.JPG');
for angulo=0.11:-0.01:.09 set(handles.pushbutton4,'CData',c2)
writePosition(motor4,angulo); % hObject handle to pushbutton4 (see GCBO)
set(handles.text8,'String', % eventdata reserved - to be defined in a
(readPosition(motor4)*180)); future version of MATLAB
pause(0.01); % handles structure with handles and user
end data (see GUIDATA)
pause(1); % --- Executes on button press in pushbutton5.
for angulo=0.41:0.01: 0.53 function pushbutton5_Callback(hObject,
writePosition(motor5,angulo); eventdata, handles)
set(handles.text9,'String', global a;
(readPosition(motor5)*180)); motor1 = servo(a,'D3');
pause(0.01); writePosition(motor1,.18);
end set(handles.text5,'String',
pause(1); (readPosition(motor1)*180));
for angulo=0.85:-0.01:.71
writePosition(motor3,angulo);
set(handles.text7,'String', motor2 = servo(a,'D5');
(readPosition(motor3)*180)); writePosition(motor2,.79);
pause(0.01); set(handles.text6,'String',
end (readPosition(motor2)*180));
pause(1); motor3 = servo(a,'D6');
for angulo=0.09:-0.01:.0 writePosition(motor3,.5);
writePosition(motor4,angulo); set(handles.text7,'String',
set(handles.text8,'String', (readPosition(motor3)*180));
(readPosition(motor4)*180)); motor4 = servo(a,'D9');
pause(0.01); writePosition(motor4,.5);
end set(handles.text8,'String',
pause(1); (readPosition(motor4)*180));
writePosition(motor1,0); motor5 = servo(a,'D10');
set(handles.text5,'String', writePosition(motor5,.5);
(readPosition(motor1)*180)); set(handles.text9,'String',
pause(3); (readPosition(motor5)*180));
%reposo--------------------------------------- motor6 = servo(a,'D11');
---------------------- writePosition(motor6,.5);
writePosition(motor1,.18); set(handles.text10,'String',
set(handles.text5,'String', (readPosition(motor6)*180));
(readPosition(motor1)*180)); % hObject handle to pushbutton5 (see GCBO)
motor2 = servo(a,'D5'); % eventdata reserved - to be defined in a
writePosition(motor2,.79); future version of MATLAB
set(handles.text6,'String', % handles structure with handles and user
(readPosition(motor2)*180)); data (see GUIDATA)
Resultados
Desarrollo de interfaz GUIDE en Matlab.

1.- Interfaz finalizada con la ayuda de herramientas de Panel, texto esttico y el


de Axel.

Ilustracin 6 Interfaz GUIDE finalizada.


2.- Interfaz de usuario finalizada y en funcionamiento.

Ilustracin 7 Interfaz GUiDE en funcionamiento.

Torre de estacionamiento
Conclusiones
Para realizacin de este proyecto integrador se tiene como punto principal el
utilizar el conocimiento adquirido de cada una de las materias, las cuales se
cursaron en este semestre, por ende dependiendo de las materias cursadas es
el proyecto que se realizar, en esta ocasin se pas a realizar una torre de
estacionamiento donde los elementos que se utilizaran ser un brazo robtico,
una banda transportadora, sensores de proximidad y un pisto hidrulico.

El utilizar primordialmente un brazo robtico es por el hecho de que este


semestre llevamos la materia de control de brazos manipuladores, el principal
objetivo era crear el brazo nosotros mismo pero por falta de dinero y tiempo por
lo cual se opt por adquirir uno, este brazo fue manipulado por una interfaz de
GUIDE elaborada en el software Matlab mediante la ayuda de una tarjeta
adquisitoria Arduino, y de esta forma manipular el brazo de una forma intuitiva,
como paso siguiente el brazo mover el vehculo haca una banda
transportadora la cual cuenta con dos sensores de proximidad y un pistn
todos estos elementos siendo manipulados mediante la ayuda de un PLC de la
marca Siemens utilizando el software Tia Portal, utilizamos este dispositivo ya
que en el curso del semestre llevamos la materia controladores lgicos
programables por lo cual era indispensable utilizar este dispositivo, este mismo
iba a ser el encargado de encender la banda transportadora cuando el primero
sensor detectara que el vehculo fuera colocado por el brazo, el vehculo iba a
ser trasladado hasta el ltimo sensor el cual al detectar el vehculo realizara
una cuenta de 5 segundo en lo que el vehculo se dirigiera hasta el pisto el cual
se accionara para empujar el auto a su destino final.

De esta forma pudimos abarcar muchas de las materias que llevamos en este
semestre ya sea en control del brazo robtico como en la programacin del
PLC y de esta forma poder realizar el proyecto integrados con xito.

Bibliografa
Brazo Robtico.

https://es.wikipedia.org/wiki/Brazo_rob%C3%B3tico

Interfaz de Usuario.

https://es.wikipedia.org/wiki/Interfaz_gr%C3%A1fica_de_usuario

GUIDE de Matlab.

https://es.mathworks.com/discovery/matlab-gui.html

Vous aimerez peut-être aussi