Control Dirección y PWM Motor DC NI
Control Dirección y PWM Motor DC NI
Worldwide Offices
Andean and Caribbean +58 212 503-5310, Argentina 0800 666 0037, Australia 1800 300 800, Austria 43 662 45 79 90 0, Belgium 32
0 2 757 00 20, Brazil 55 11 3262 3599, Canada 800 433 3488, Chile 800 532 951, China 86 21 5050 9800, Czech Republic/Slovakia
420 224 235 774, Denmark 45 45 76 26 00, Finland 358 0 9 725 725 11, France 33 0 1 48 14 24 24, Germany 49 89 741 31 30,
Hungary 36 23 501 580, India 1 800 425 7070, Ireland 353 0 1867 4374, Israel 972 3 6393737, Italy 39 02 413091, Japan 81 3 5472
2970, Korea 82 02 3451 3400, Lebanon 961 0 1 33 28 28, Malaysia 1800 887710, Mexico 01 800 010 0793, Netherlands 31 0 348 433
466, New Zealand 0800 553 322, Norway 47 0 66 90 76 60, Poland 48 22 3390150, Portugal 351 210 311 210, Russia 7 495 783 68
51, Singapore 1800 226 5886, Slovenia/Croatia, Bosnia/Herzegovina, Serbia/Montenegro, Macedonia 386 3 425 42 00, South Africa
27 0 11 805 8197, Spain 34 91 640 0085, Sweden 46 0 8 587 895 00, Switzerland 41 56 200 51 51, Taiwan 886 2 2377 2222,
Thailand 662 278 6777, Turkey 90 212 279 3031, U.K. 44 0 1635 523545, Uruguay 0004 055 114
To comment on National Instruments documentation, refer to the National Instruments Web site at ni.com/info and enter the
info code feedback.
2013 National Instruments Corporation. All rights reserved.
Important Information
Warranty
The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and
workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair
or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period.
National Instruments does not warrant that the operation of the software shall be uninterrupted or error free. A Return Material Authorization (RMA) number
must be obtained from the factory and clearly marked on the outside of the package before any equipment will be accepted for warranty work. National
Instruments will pay the shipping costs of returning to the owner parts which are covered by warranty. National Instruments believes that the information in
this document is accurate. The document has been carefully reviewed for technical accuracy. In the event that technical or typographical errors exist,
National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition. The reader
should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to this
document or the information contained in it. EXCEPT AS SPECIFIED HEREIN, NATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND
SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. CUSTOMERS RIGHT TO RECOVER DAMAGES CAUSED
BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE
CUSTOMER. NATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS,
OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. This limitation of the liability of National
Instruments will apply regardless of the form of action, whether in contract or tort, including negligence. Any action against National Instruments must be
brought
within one year after the cause of action accrues. National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable
control. The warranty provided herein does not cover damages, defects, malfunctions, or service failures caused by owners failure to follow the National
Instruments installation, operation, or maintenance instructions; owners modification of the product; owners abuse, misuse, or negligent acts; and power
failure or surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.
Copyright
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording,
storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation. National
Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual
property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce
materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction. BSIM3 and BSIM4 are developed by the
Device Research Group of the Department of Electrical Engineering and Computer Science, University of California, Berkeley, and copyrighted by the University
of California.
Trademarks
CompactDAQ, CompactRIO, LabVIEW, National Instruments, and NI, ni.com are trademarks of National Instruments Corporation. Refer to the Terms of Use
section on ni.com/legal for more information about National Instruments trademarks. Other product and company names mentioned herein are trademarks or
trade names of their respective companies.
Patents
Contenido
Requerimientos ..................................................................................................... 4
Software ...................................................................................................... 4
Hardware ..................................................................................................... 4
Control direccin y PWM Motor DC .............................................................................. 5
Ejercicio 1. Controlar direccin de un motor DC ....................................................... 5
Ejercicio 2. Controlar direccin de un motor DC y Potencia suministrada por PWM.............. 12
Referencias ........................................................................................................ 21
Requerimientos
Software
NI LabVIEW 2013
NI Real Time Module (Required Software DVD 1 )
Hardware
NI myRIO 1
Fuente de alimentacin ( incluido con myRIO )
Fuente de alimentacin 12V 2A
Cable USB ( incluido con myRIO )
Motor DC 12V (incluido con Juego de Accesorios para Mecatrnica de NI myRIO) 2
Circuito puente H PmodHB5 (incluido con Juego de Accesorios para Mecatrnica de NI
myRIO)
Cables
Introduccin
Un motor elctrico DC es una mquina elctrica que nos transformar energa
elctrica en energa mecnica. Cuando se opera un motor elctrico DC por armadura, a ste
se le aplicar un voltaje entre sus dos terminales, el cual dependiendo de su polaridad nos
dar el sentido de giro del motor.
Para poder invertir la polaridad de nuestra seal de voltaje se utiliza comnmente un
circuito llamado Puente H, el cual consiste en un arreglo de 4 switches que comnmente son
relevadores o transistores. En la Figura 1 podemos observar que si cerramos los switches S1 y
S4, nuestro motor ser alimentado por Vin. En el otro caso, si cerramos los switches S3 y S2,
nuestro motor ser alimentado con Vin, invirtiendo la polaridad de este, ocasionando un
cambio de sentido de giro de nuestro motor.
Desarrollo
1. Conecte su NI myRIO a la fuente de alimentacin y a su vez a la toma elctrica. El
indicador POWER se debe de encender.
En este caso, trabajaremos con el myRIO conectado va USB. Sin embargo, puede configurar su myRIO
para trabajar de manera inalmbrica va WiFi.
10. Presione click derecho y seleccione myRIO >> Digital Output para agregar un Express
VI dentro del ciclo while que permitir habilitar uno de los puertos como salida digital.
13. En el Panel Frontal agregar los siguientes elementos con ayuda de la opcin Quick
Drop, con la secuencia de botones Ctrl+Space bar y asignarles los siguientes
nombres respectivamente y el tamao.
Horizontal Toggle Switch Direccin de Giro
Square LED - Habilitar
10
15. A continuacin realizar las siguientes conexiones de su Motor DC, Puente H y su tarjeta
NI myRIO como se muestra en la Figura 14.
11
Introduccin
El PWM (Pulse Width Modulation) es una tcnica que consiste en variar el ancho de
pulso de una seal de voltaje cuadrada. Con esto se controla la cantidad de potencia
administrada a dispositivos electrnicos, especialmente aquellos con cargas inerciales como
los motores.
El NI myRIO tiene la habilidad de generar seales de pulso moduladas para controlar la
cantidad de potencia suministrada a dispositivos elctricos o electrnicos.
El circuito Puente H que estamos utilizando en esta prctica tiene un puerto que nos
permite habilitar y deshabilitar el suministro de energa del motor. A este puerto se le
suministrar la seal PWM generada por nuestro NI myRIO.
12
Desarrollo
17. Conecte su NI myRIO a la fuente de alimentacin y a su vez a la toma elctrica. El
indicador POWER se debe de encender.
En este caso, trabajaremos con el myRIO conectado va USB. Sin embargo, puede configurar su myRIO
para trabajar de manera inalmbrica va WiFi.
14
15
26. Presione click derecho y seleccione myRIO >> Digital Output para agregar un Express
VI dentro del ciclo while que permitir habilitar uno de los puertos como salida digital.
16
29. De nuevo sobre el diagrama de bloques presione click derecho y seleccione myRIO >>
PWM para agregar un Express VI dentro del ciclo while que permitir habilitar uno de
los puertos como un pulso modulado.
32. En el Panel Frontal agregar los siguientes elementos con ayuda de la opcin Quick
Drop, con la secuencia de botones Ctrl+Space bar y asignarles los siguientes
nombres respectivamente y el tamao.
Horizontal Pointer Slide Potencia (%)
18
36. Una vez las conexiones estn listas corra el VI. Vare el valor del Slider, y observe
como va variando la potencia aplicada al motor, en un rango de aproximadamente-40%
hasta 40% el motor no se mover, ya que no tiene la potencia suficiente para arrancar.
FIN DEL EJERCICIO 2.
20
Referencias
1. Hoja de datos NI myRIO
http://www.ni.com/pdf/manuals/376047a.pdf
2. Hoja de datos del Circuito Puente H utilizado
http://www.digilentinc.com/Data/Products/PMOD-HB5/PmodHB5_RevD_rm.pdf
21