Está en la página 1de 123

UNIVERSIDAD POLITÉCNICA

DE CARTAGENA

Escuela Técnica Superior de Ingeniería


Industrial

AUTOMATIZACIÓN DE
ENVASADORA DE LÍQUIDOS
CON INTERFAZ HTML

TRABAJO FIN DE GRADO

GRADO EN TECNOLOGÍAS INDUSTRIALES

Autor: Marín Miñano, Jaime


Director: Torres Sánchez, Roque

Cartagena, Septiembre 2018


AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Índice
Resumen ........................................................................................................................................ 3
Abstract ......................................................................................................................................... 4
1. Introducción .............................................................................................................................. 5
2. Objeto del trabajo ...................................................................................................................... 6
3. Motivación ................................................................................................................................ 7
4. Metodología .............................................................................................................................. 7
4.1. Asesoramiento ................................................................................................................... 7
4.2. Trabajos a realizar ............................................................................................................. 7
4.3. Consideraciones previas .................................................................................................... 8
4.4. Documentación.................................................................................................................. 9
5. Componentes del sistema .......................................................................................................... 9
5.1. Sensores Switch de posición ............................................................................................. 9
5.2. Motor paso a paso ........................................................................................................... 10
5.2.1. Requisitos .......................................................................................................................... 11
5.2.2. Selección del motor ........................................................................................................... 11
5.2.3. Posicionamiento ................................................................................................................ 12
5.3. Driver para control de motor de paso .............................................................................. 13
5.3.1. Requisitos .......................................................................................................................... 13
5.3.2. Selección del driver ........................................................................................................... 14
5.4. Elección de hardware controlador ................................................................................... 14
5.5. Módulo para conexión Smartphone-Arduino .................................................................. 15
5.5.1. Requisitos .......................................................................................................................... 15
5.5.2. Selección del módulo ........................................................................................................ 15
5.6. Relación de engranajes para unir motor y tornillo .......................................................... 16
5.6.1. Requisitos .......................................................................................................................... 16
5.6.2. Selección de los engranajes ............................................................................................... 16
5.6.3. Posicionamiento ................................................................................................................ 17
5.7. Mangas de llenado y válvulas antirretorno...................................................................... 17
6. Estudio, cálculo y programación de los movimientos del motor ............................................ 18
6.1. Sentido de giro ................................................................................................................ 18
6.2. Pasos por vuelta y relación distancia switch/giro motor. ................................................ 19
6.3. Programación .................................................................................................................. 20
7. Resultados experimentales ...................................................................................................... 21
7.1. Experimentación con autómata ....................................................................................... 21
7.2. Experimentación con nuevo sistema integrado ............................................................... 22
7.2.1. Control de motor paso a paso ............................................................................................ 22
7.2.2. Cambio de formatos preestablecidos................................................................................. 23
7.2.3. App Formatos Envasadora ................................................................................................ 23
8. Conclusiones ........................................................................................................................... 24
Referencias .................................................................................................................................. 25
ANEXOS..................................................................................................................................... 25

1
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Índice de Figuras
Figura 1. Esquema de la llenadora. (Empakando, 2018)............................................................... 5
Figura 2. Esquema industria 4.0 (Larraioz, 2018) ......................................................................... 6
Figura 3. Esquema gráfico del funcionamiento de la envasadora. (Elaborada por autor) ............ 7
Figura 4. Cilindro de doble efecto con sensores magnéticos (Velázquez, 2012) .......................... 8
Figura 5. Sensor Switch Modelo CS1-U. (RS Componentes, 2018)............................................. 9
Figura 6. Sensores Switch instalados en la llenadora. (Elaborada por autor) ............................. 10
Figura 7. Clasificación de motores eléctricos (Área Tecnología, 2012) .................................... 10
Figura 8. Encoder óptico para contar vueltas del motor (Suppress, 2008) ................................. 11
Figura 9. Motor de paso unipolar de imán permanente (RS Components, 2018) ....................... 12
Figura 10. Diseño de la instalación del motor en la envasadora. (Elaborada por autor) . ........... 13
Figura 11. Tipos de drivers de control para motores eléctricos. (Elaborada por autor) . ............ 13
Figura 12. Módulo Pololu A4988 para motores de paso. (ElectroCrea 2018) . .......................... 14
Figura 13. Arduino modelo UNO. (Arduino, 2012).................................................................... 15
Figura 14. Módulo Bluetooth HC-06. (Prometec, 2017) ............................................................ 16
Figura 15. Engranajes para el motor y para la varilla roscada. (RS Components, 2018) ............ 17
Figura 16. Diseño de la instalación de los engranajes. (Elaborada por autor) ............................ 17
Figura 17. Mangas y válvulas de la llenadora. (Elaborada por autor) ......................................... 18
Figura 18. Esquema de conexiones entre Arduino, A4988 y motor de paso (RobotStore)......... 18
Figura 19. Líneas de código con condiciones if () ...................................................................... 20
Figura 20. Líneas de código con bucle for () .............................................................................. 21
Figura 21. Llamada a la librería de Bluetooth ............................................................................. 21
Figura 22. Interfaz App Control Motor de Paso (Elaborada por autor) ...................................... 22
Figura 23. Interfaz App Cambio de Formatos Preestablecidos (Elaborada por autor)............... 23
Figura 24. Interfaz App Envasadora (Elaborada por autor) ........................................................ 24

Índice de Tablas
Tabla 1. Tipos de envasadoras. (Cortés, 2010) ........................... ¡Error! Marcador no definido.
Tabla 2. Distancia recorrida en función de las vueltas de la varilla ............................................ 19
Tabla 3. Volúmenes y distancias de llenado .............................................................................. 20
Tabla 4. Relación entre volumen y pasos del motor ................................................................... 19

Anexos
Anexo A. Programa en Ladder de control con autómata.
Anexo B. Datasheet sensores Switch del pistón.
Anexo C. Datasheet Motor de Paso.
Anexo D. Datasheet Driver A4988.
Anexo E. Datasheet Arduino UNO.
Anexo F. Datasheet Módulo Bluetooth HC-06.
Anexo G. Datasheet Engranaje eje motor.
Anexo H. Datasheet Engranaje varilla roscada.
Anexo I. Programa Arduino.
Anexo J. Programa bloques App.

2
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Resumen
En la actualidad en cualquier tipo de industria se busca la automatización de la mayor parte
de los componentes y máquinas, ya que de este modo se consiguen mejores resultados en cuanto
a producción, costes económicos y esperas que conlleven pérdidas. Por otro lado, el hecho de
tener automatizado un proceso brinda al fabricante más información (y en tiempo real) de qué
está sucediendo en una línea de fábrica.

En concreto, las industrias que trabajan envasando líquidos requieren de una gran red de
sensores y autómatas, los cuales se encargarán junto con el personal de planta, de evitar problemas
que puedan provocar derrames, contaminación, incluso la rotura por cortocircuito de equipos
eléctricos y electrónicos.

El objetivo de este proyecto es automatizar una llenadora de botellas de varios formatos, la


cual está compuesta por un depósito horizontal con dos válvulas antirretorno (una en cada
sentido), que se llena y vacía a través del movimiento de un cilindro neumático de doble efecto.
Lo que se realizará para automatizar esta máquina es instalar un motor de paso en el tornillo sin
fin que desplaza el switch para el pistón extendido, y con la ayuda de un Arduino y una App para
smartphones se podrá controlar el volumen de depósito que se llena, y por lo tanto el tamaño de
botellas que se utilizará.

La fase experimental del trabajo se ha dividido en 4 etapas: Control del sistema con autómata,
instrumentación de la plataforma, selección de hardware (Arduino) y programación del sistema.
El control del sistema con autómata se ha realizado con un PLC Siemens S7-1200 a través del
programa TIA Portal. La instrumentación de la plataforma se ha completado añadiendo a los
componentes de serie de la máquina un motor de paso, un Arduino UNO con un módulo Bluetooth
HC-06 y un driver A4988 y unos engranajes para optimizar el uso del par de giro del motor. Como
se ha mencionado, el hardware es el modelo UNO de Arduino, el cual será controlado con su
propio programa, y la aplicación móvil será programada a través del MIT APP Inventor 2 para
Android.

La solución más óptima para el problema que se plantea con esta envasadora ha sido asignar
en la aplicación botones que controlan el sentido de giro del motor, así como varias velocidades
de giro, para poder situar el Switch de posición en el lugar deseado para llenar botellas de un
volumen u otro. De este modo la regulación de la máquina es mucho más rápida que de forma
manual. Sin duda hay hardwares más robustos que Arduino, con los cuales se puede obtener un
sistema más fiable respecto a salpicaduras y ruido electrónico, pero con éste es suficiente para
obtener el funcionamiento deseado.

3
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Abstract
Nowadays, in any type of industry, the automation of most of the components and machines
is required, in this way, better results are achieved in terms of production, economic costs and
waiting times that lead to losses. On the other hand, having an automated process gives the
manufacturer more information (in real time) about what is happening on a production line.

In particular, the industries that work with liquid packaging require a large network of sensors
and automatons, which together with the plant personnel will be in charge of avoiding problems
that may cause spillage, contamination, or even breakage due to short-circuit of electrical and
electronic equipment.

The aim of this project is to automate a bottle filler of various formats, which consists of a
horizontal deposit with two non-return valves (one in each direction), which is filled and emptied
through the movement of a double-acting pneumatic cylinder. What will be done to automate this
machine is to install a stepper motor in the worm screw that moves the switch for the extended
piston, and with the help of an Arduino and an App for smartphones it will be possible to control
the volume of the tank to be filled, and therefore the size of the bottles to be used.

The experimental phase of the project is divided into 4 stages: System control with PLC,
platform instrumentation, hardware selection (Arduino) and system programming. The control of
the system with PLC has been carried out with a Siemens S7-1200 PLC through the TIA Portal
program. The platform's instrumentation has been completed by adding a stepper motor, an
Arduino UNO with a Bluetooth HC-06 module and an A4988 driver and gears to the machine's
standard components to optimize the use of the engine's torque. As mentioned, the hardware is
Arduino's UNO model, which will be controlled with its own program, and the mobile application
will be programmed through MIT APP Inventor 2 for Android.

The most optimal solution to the problem with this machine has been to assign buttons in the
application that control the direction of rotation of the motor, as well as several speeds of rotation,
to be able to place the position switch in the desired place to fill bottles of one volume or another.
This makes machine adjustment much faster than manual adjustment. There are certainly more
robust hardware than Arduino, with which you can obtain a more reliable system with respect to
splashes and electronic noise, but with this one is enough to obtain the desired operation.

4
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

1. Introducción
Una envasadora de líquidos es aquella máquina que se encarga de extraer una cantidad de
fluido de un tanque para introducirlo en un recipiente o envase de menor tamaño, en función de
cómo se realice este movimiento del líquido, existen varios tipos. Partimos de que todas ellas
pueden ser manuales, semiautomáticas, o automáticas.
Por gravedad Sin ayuda para realizar el llenado
Por bomba El líquido se bombea desde el
tanque a los recipientes. Fluidos
densos.
Por pistón Un pistón o pistones se encargan
de absorber y verter el líquido en
los envases (nuestro caso)
Por medición de caudal De alta precisión, un caudalímetro
mide el líquido exacto que fluye
Por presión o vacío Se controla por soplado o aspirado
la presión interna del envase
Tabla 1. Tipos de envasadoras. (Cortés, 2010)

Este trabajo va a realizarse sobre una llenadora por pistón, la cual absorbe el fluido del tanque
cuando el pistón se retrae, y lo suelta hacia el envase cuando el pistón vuelve a salir por
accionamiento neumático. La composición original de la máquina, sin tener todavía añadidos el
motor, engranajes, Arduino, etc. es la que vemos en la figura 1.

Figura 1. Esquema de la llenadora (Empakando, 2018)

Este tipo de llenadoras se utilizan para líquidos generalmente densos, como pueden ser geles
y champús, así como otros productos de higiene (cremas, suavizantes…), por otro lado en el
ámbito de la alimentación se emplean para trabajar con masas, o salsas ligeramente densas, es por
ello por lo que se emplea un pistón neumático con un gran empuje para mover los fluidos.

5
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

2. Objeto del trabajo


El objetivo principal de este proyecto es la automatización de una máquina envasadora de
líquido que funciona mediante el movimiento de un pistón neumático. De esta manera, se podrá
optimizar su uso y acelerar el trabajo que realiza normalmente, dotando de unas ventajas a la
máquina que antes no tenía. Con ello el trabajo de los operarios de planta se verá reducido, y por
lo tanto podrán emplear este tiempo en otras tareas.

Hoy en día se está implantando en gran cantidad de factorías lo que se conoce como Industria
4.0, la cual consiste en tener los procesos automatizados, información de los sensores en tiempo
real, grandes bases de datos almacenados para conocer como evoluciona el trabajo, etc. Como
puede contemplarse es necesario tener todo relacionado y ligado a través de dispositivos
conectados a una red interna, y así poder controlar y medir lo que está sucediendo desde cualquier
punto de la fábrica.

Figura 2. Esquema Industria 4.0 (Larraioz, 2018)

Para lograr este objetivo se seguirá un procedimiento que se divide en 3 etapas: entender y
conseguir el funcionamiento de la llenadora con ayuda de un autómata o PLC, tras esto, añadir
un sistema físico para situar el sensor del émbolo y más adelante será programada una App (apk
de MIT App Inventor 2) para smartphones y tablets (Sistema operativo Android) con la cual se
controlarán ciertas funciones de un Arduino UNO, que dará las ordenes propias al motor que será
instalado en la máquina original, con esto podrá seleccionarse un formato u otro con el que
trabajará la llenadora.
En la figura 3 puede verse un esquema gráfico del funcionamiento del sistema una vez
terminado, en el cual aparecen los principales componentes de la máquina (los cuales serán
explicados más adelante) y señalados con colores los flujos de líquido que se dan en el proceso.

6
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 3. Esquema gráfico del funcionamiento de la envasadora. (Elaborada por autor)

3. Motivación
El hecho de poder tener un control en tiempo real de un proceso en una línea de llenado facilita
el trabajo por parte de los operarios de fábrica, y da a conocer a los encargados o supervisores
aquello que está pasando en todo momento, incluidos los posibles fallos o problemas que puedan
darse en la maquinaria. Todo esto implica un ahorro económico notable y un rendimiento de
producción más elevado.

4. Metodología
4.1. Asesoramiento
En primer lugar, el asesoramiento ha sido por parte del Departamento de Ingeniería de
Sistemas y Automática, cuyos docentes han sido de gran ayuda en la toma de decisiones sobre los
montajes y la instalación eléctrica. Por otro lado, el departamento de Electrónica también ha sido
de ayuda para la programación de Arduino con ciertos componentes como la fuente de tensión o
el driver del motor de paso. En tercer lugar, cabe mencionar a la empresa Inquivisa S.L. Una
empresa de productos químicos con numerosas envasadoras/llenadoras de distintos modelos y
totalmente automatizadas, que sirven de apoyo para visualizar el funcionamiento y la posición de
sensores y actuadores.

4.2. Trabajos a realizar


Los trabajos a realizar durante la ejecución de este proyecto son diversos, puesto que son varias
las etapas del proceso. En primer lugar, se centrarán las labores en entender el funcionamiento de
la máquina, para ello se conectarán todos los sensores y actuadores a un autómata, con el cual se
observará el correcto movimiento de todas las partes (Véase anexo A con la programación en
Ladder del PLC). A continuación, serán estudiadas máquinas similares y automatizadas para

7
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

contemplar soluciones al problema al cual nos enfrentamos. Más adelante será diseñada e
implantada la solución mecánica al sistema, y tras esto, se efectuará una búsqueda meticulosa de
los componentes más adecuados para cumplimentar dicha solución (compra de motor, engranajes,
fuente de tensión, módulos electrónicos…), solamente quedará diseñar la aplicación y comprobar
el correcto funcionamiento del bloque depurando el programa y haciéndolo lo más robusto
posible.

4.3. Consideraciones previas


Como punto de partida para la ejecución de las diversas fases se tomarán unas consideraciones
o bases del proyecto. Dichas premisas serán de carácter físico, mecánico e informático, y se
enumeran a continuación:

➢ Localización del émbolo: el pistón dispone de dos sensores Switch de posición que
detectan el lugar donde se encuentra el émbolo (extendido o recogido), y el sensor de
cilindro estirado será el que podrá ser desplazado y con el que trabajaremos.
➢ Reducción de engranajes: para transformar el giro del motor de paso en movimiento
longitudinal del sensor ya comentado, será necesaria una reducción de engranajes que
permitan ligar las partes y transformar el movimiento.
➢ Modificaciones físicas: la máquina no podrá ver afectado el bloque sobre el que se
encuentra montada, por lo que se buscará una forma de instalar el motor que no afecte
a la solidez y diseño del conjunto, por lo que se montará externamente.
➢ Consideraciones mecánicas de los componentes: son numerosos los tipos de motores
que existen en el mercado, así como optoacopladores, módulos de control, drivers y
hardwares para automatizar sistemas, etc. Por ello se debe realizar una búsqueda
meticulosa y consultando con el director del proyecto cual es la elección más óptima.
➢ Coste económico: ya que se efectuará alguna compra en la realización del trabajo,
tendrá que contemplarse y compararse entre proveedores el precio de cada uno de los
elementos que vayan a ser comprados.
Se parte de la idea principal de que se desea que el cambio de posición del sensor de la
llenadora sea más rápido que girando el tornillo sin fin manualmente, lo cual implica un gran
gasto de tiempo, y es el problema básico que queremos solventar.

Figura 4. Cilindro de doble efecto con sensores magnéticos. (Velázquez, 2012)

La flecha roja de la figura 4 indica el sensor que se puede desplazar sobre el tornillo sin fin,
con el cual se modificará el volumen de llenado que envasa nuestro sistema.

8
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

4.4. Documentación
Para documentarse respecto al proyecto que se trata se ha acudido a diversas webs y empresas
que trabajan con máquinas similares y automatizadas, para asimilar el funcionamiento y poder
llevar esos conocimientos a nuestro caso.
En primer lugar, ha servido de gran apoyo la maquinaria de la empresa Inquivisa S.L. con
hasta 10 líneas de llenado de productos químicos, y entre las llenadoras, 2 muy similares a la
envasadora por pistón que se trata en el proyecto. Dichas llenadoras son automatizadas por medio
de autómatas, estos aparatos funcionan de una manera parecida al hardware que vamos a utilizar,
pero la solución que se ha planteado debe realizarse con una plataforma como es Arduino.
Por otro lado, se ha contactado con proveedores de componentes eléctricos y electrónicos con
conocimientos en el campo de llenadoras de líquidos y sistemas automáticos, algunas de las
empresas con las que se ha intercambiado información para implantar la mejor solución en
dispositivos y materiales son: Sumymaq, Electromain S.L., RS España.
De cara a la programación para el control del motor de paso unipolar se ha recurrido a la web
E-Elektronic.com, con numerosos ejemplos de programas para controlar motores con y sin
optoacoplador por medio de Arduino y un driver A4988 como el que se instalará en la máquina.

5. Componentes del sistema


En este apartado de la memoria se van a explicar y a definir meticulosamente las distintas
partes o componentes que se unen para completar la máquina y permiten que el funcionamiento
sea el deseado, se encuentran aquí los sensores, las mangas de llenado, los pistones, el motor, etc.

5.1. Sensores Switch de posición


Se trata de dos sensores magnéticos normalmente abiertos (CS1-U) que se encargan de
localizar o ubicar la posición del vástago del cilindro neumático (retraído o extendido). Se
encuentran instalados sobre la bancada y junto al cuerpo del cilindro. El sensor que se activa
cuando el cilindro ha terminado de llenar el depósito (es decir, está recogido) es fijo, de modo que
es un parámetro que no variará.

Figura 5. Sensor Switch Modelo CS1-U. (RS Componentes, 2018)

Por otro lado, el switch que se cierra cuando el pistón sale es móvil, lo cual significa que con
ayuda de un tornillo sin fin puede ser desplazado en dirección longitudinal en ambos sentidos
para aumentar o reducir el volumen de llenado del aparato. Esto es lo que va a dar juego a la
máquina y el parámetro que se va a automatizar, en la figura 6 se contempla la instalación.
9
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 6. Sensores Switch instalados en la llenadora. (Elaborada por autor)

En el anexo B se encuentran detalladas las características de estos sensores con su hoja de


datos y especificaciones (AirTAC).

5.2. Motor paso a paso


El mercado de motores eléctricos se puede considerar prácticamente infinito, incluyéndose
todos los tipos y combinaciones de máquinas eléctricas. Las partes que componen un motor de
estas características (no los de combustión) son las siguientes:

• Estátor: parte fija del motor.


• Rotor: parte móvil, que gira en el interior del estátor.
• Devanado inductor: se trata del conjunto de bobinas que generan un campo
electromagnético para convertir la energía eléctrica en mecánica.
• Devanado inducido: aquellas bobinas que provocan el movimiento gracias al campo
inducido.
• Eje: se trata de la salida mecánica del motor, desde el que se toma por medio de
chavetas y reductoras de engranajes la potencia mecánica.
• Carcasa: es el cuerpo donde se incluyen todos los elementos explicados.

Figura 7. Clasificación de motores eléctricos (Área Tecnología, 2012)

10
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Como puede contemplarse en la clasificación de la figura 7, son numerosas las posibilidades


de motores que pueden escogerse para mover el tornillo sin fin de nuestra máquina, es por esto
por lo que se va a realizar una deducción precisa de qué se necesita y cuál es la mejor opción.

5.2.1. Requisitos
Se precisa un motor con una velocidad nominal alta, pero no demasiado para no llegar a
descontrolarse cuando esté en funcionamiento. La función del motor será, a través de una cadena
de engranajes, girar la varilla o tornillo sin fin donde se encuentra alojado el switch del vástago
extendido. Con ello, el par de dicho motor tampoco necesita ser muy elevado, ya que como puede
experimentarse en la máquina, el giro del tornillo es muy suave.
Respecto a la alimentación, los motores de alterna suelen tener aplicaciones más industriales
y normalmente tienen características que sobrepasan nuestro caso, a la vez que tienen precios
mayores. Por lo tanto, se busca un motor de continua y una fuente de tensión CC para poder
utilizarlo, obviamente.
La instalación del motor será sobre un sistema o estructura con placas metálicas de un grosor
de 2 mm, así que el peso no debe ser muy notable (los motores tienen incluidos electroimanes con
grandes devanados y esto aumenta su peso) para no doblar ni provocar vibraciones en el conjunto.
Por último, algo que se debe poder hacer con el motor es controlar su movimiento y contar las
vueltas que da para situar de la mejor manera posible el sensor en su posición.

5.2.2. Selección del motor


Con todo lo desarrollado anteriormente y buscando/contactando con diversos proveedores se
llega a la conclusión de que los motores que trabajan con tensiones de 12-24 Vdc cumplen (la
gran mayoría) los requisitos de tamaño, velocidad y par de giro. El problema surge cuando
buscamos contar las vueltas que gira. Una de las posibilidades es instalar un encoder óptico junto
al motor, o comprar un conjunto motor-encoder para contar las vueltas que gira como se observa
en la figura 8.

Figura 8. Encoder óptico para contar vueltas del motor (Suppress, 2008)

11
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

El problema de esta solución es que los ejes de los motores a los que se le puede conseguir un
encoder son demasiado pequeños, sumándose a esto que las combinaciones se ven reducidas y se
complica la búsqueda del conjunto notablemente.

Puesto que el motor-encoder queda descartado, se optará por buscar entre los motores de paso
a paso, los cuales tienen un sistema formado por varios bobinados que nos permiten (con una
serie de cables) contar o medir los pasos que gira el motor. Con ello se cubren todos los requisitos
buscados. Entre los motores de paso existen los bipolares y los unipolares, la diferencia está en
las salidas que contienen (4 los bipolares, 6 u 8 los unipolares), pero independientemente de esto
el funcionamiento y la conexión es muy similar. El modelo escogido es un motor paso a paso,
7.5° de giro por paso, bobinado unipolar, tipo imán permanente, 6 Cables, Par 0.24Nm, 12,7 Vdc,
del fabricante Crouzet, con referencia nº 82940003. Toda la información técnica del motor está
recogida en el anexo C (RS Components).

Figura 9. Motor de paso unipolar de imán permanente (RS Components, 2018)

5.2.3. Posicionamiento
El posicionamiento del motor se realizará en una placa metálica de 2 mm de grosor, la cual se
atornillará en el lateral de la bancada de la llenadora original. Dicha placa soportará al motor de
forma horizontal, de modo que un engranaje en el eje del mismo interactúe con otro colocado en
el tornillo sin fin del sensor switch. En la figura 10 puede verse un diseño o simulación de cómo
quedará el motor instalado sobre el sistema.

12
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 10. Diseño de la instalación del motor en la envasadora. (Elaborada por autor)

5.3. Driver para control de motor de paso


Una vez se conoce el motor que se va a utilizar, existen drivers o módulos que sirven para
controlar estos actuadores. Dichos dispositivos son también numerosos para cada hardware y tipo
de conexión, se seleccionará en función de:

• La tensión e intensidad con la que trabaja el actuador


• La tensión e intensidad del controlador
• El número de salidas/entradas del propio motor

Figura 11. Diferentes tipos de drivers de control para motores eléctricos. (Elaborada por autor)

5.3.1. Requisitos
Para el motor que se ha seleccionado, se requiere que el driver pueda controlar un dispositivo
que trabajará con unos 12 voltios de continua, por lo tanto, a la salida del driver será esto lo que
se contemple. Por otro lado, el stepper tiene 6 salidas (de las cuales utilizaremos 4, ya que 2 son

13
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

comunes que no es necesario conectar) así que se busca un driver para motores de paso de 12 Vdc
y 4 entradas.

Respecto al controlador, la gran mayoría de estos “cerebros” electrónicos dan una tensión de
salida de 5 Vdc, la cual va a recibir el driver y por lo tanto ya se conoce cómo van a ser la entrada
y salida del aparato.

5.3.2. Selección del driver


Con lo desarrollado en el punto anterior se acota lo suficiente la búsqueda de drivers, y en las
diferentes webs de componentes y electrónica se declara como candidato único al Pololu A4988,
representado en la figura 12, se trata de un módulo para control de motores de paso unipolares al
que se puede conectar una fuente de tensión continua de 12 a 24 V para transmitir la energía al
motor a través de los 4 cables. Su datasheet se muestra en el Anexo D.

Figura 12. Módulo Pololu A4988 para motores de paso. (ElectroCrea 2018)

5.4. Elección de hardware controlador


De cara a la elección de este dispositivo son también numerosas las plataformas que nos
ofrecen posibilidades: Arduino, Pycom, ESP, etc. Entre estas la opción más factible es Arduino,
ya que a lo largo del grado se utiliza el modelo UNO en un par de asignaturas de electrónica, lo
cual facilita el trabajo en cierta medida al alumno. Dicho modelo es suficiente para el número de
entradas y salidas con las que se procederá, y tiene una capacidad óptima para las órdenes que
debe dar y los parámetros que va a administrar. La hoja de datos y especificaciones de este modelo
queda adjunta en el anexo E (Arduino LLC).

14
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 13. Arduino modelo UNO. (Arduino, 2012)

5.5. Módulo para conexión Smartphone-Arduino


Para conectar teléfonos móviles o tabletas con el Arduino y así poder controlarlo mediante una
aplicación existen varias vías. Puede utilizarse un cable USB, y también puede realizarse una
conexión inalámbrica mediante una red Wifi o Bluetooth.

5.5.1. Requisitos
Los requisitos de esta conexión son bastante básicos, debe realizarse de manera inalámbrica,
lo cual evite al operario estar junto a la máquina cuando esté controlándola y permitirle estar a
cierta distancia (una red wifi local de la empresa permitiría el control desde cualquier punto de la
fábrica).

5.5.2. Selección del módulo


Entre los módulos wifi y bluetooth la elección ha sido este último, ya que se conoce mejor su
funcionamiento al haberlo utilizado durante la carrera, aparte de que cumpliendo el requisito de
poder trabajar a cierta distancia se ha visto más óptimo que el trabajador vea la máquina cuando
esté cambiando un parámetro, restando sentido a la idea de controlar con wifi la llenadora desde
el otro extremo de la factoría. El instrumento elegido es el módulo HC-06 para Arduino, mostrado
en la figura 14. La datasheet de dicho dispositivo puede verse en el Anexo F.

15
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 14. Módulo Bluetooth HC-06. (Prometec, 2017)

5.6. Relación de engranajes para unir motor y tornillo


Una vez se conoce el motor que se va a utilizar y cómo va a estar dispuesto en el sistema tan
solo es necesario un sistema de reducción de engranajes para trasladar el giro del motor al del
tornillo sin fin que sostiene el sensor switch del pistón. Contemplando la distancia a la que queda
el motor de la varilla se ha estimado que lo más conveniente en cuanto a complejidad de montaje
es la instalación de 2 engranajes: uno en el eje del motor de menor tamaño, y otro en el tornillo
roscado que se busca girar.

5.6.1. Requisitos
Estos engranajes van a sufrir valores de par relativamente bajos, por lo tanto, la resistencia
mecánica del material del que estén constituidos no tiene por qué ser muy elevado. En cuanto a
requisitos físicos, el engranaje en el que se aloja el motor debe tener un diámetro de acoplamiento
de 6 milímetros, y el de la varilla del sensor, de 8 milímetros.

Se conoce por la teoría de engranajes de mecánica de máquinas que para que dos engranajes
engranen deben tener un mismo módulo, así que se buscará una pareja de engranajes de distintas
características fijas, pero con un mismo módulo o relación dientes-diámetro primitivo.

𝑑𝑖á𝑚𝑒𝑡𝑟𝑜 𝑝𝑟𝑖𝑚𝑖𝑡𝑖𝑣𝑜
𝑚ó𝑑𝑢𝑙𝑜 =
𝑛º 𝑑𝑖𝑒𝑛𝑡𝑒𝑠

5.6.2. Selección de los engranajes


Teniendo en cuenta los requisitos mencionados y buscando entre proveedores se llega a la
conclusión de que el material de los engranajes en relación utilidad-precio es el Copolímero
Acetal. Para el eje del motor se ha escogido un engranaje con bulón de 32 dientes y módulo 1,
con su correspondiente datasheet en el anexo G. Para el eje de la varilla el engranaje es del mismo
módulo como ya hemos explicado más arriba, y de 50 dientes en este caso (ambos fabricados por
RS Pro, con referencias 521-7556 y 521-7629 respectivamente), su hoja de datos correspondiente
está en el anexo H. Dichos componentes son los mostrados en la figura 15.

16
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 15. Engranajes para el motor (izquierda) y para la varilla roscada (derecha). (RS Components, 2018)

5.6.3. Posicionamiento
El posicionamiento de los engranajes va a realizarse mediante adhesivos en ambos ejes, y la
localización exacta es la que puede observarse en la figura 16, donde se ha realizado una
simulación mediante el programa Solidworks con la que se puede ver la instalación al completo.

Figura 16. Diseño de la instalación de los engranajes. (Elaborada por autor)

5.7. Mangas de llenado y válvulas antirretorno


Estas mangas de llenado y válvulas son las que permiten el flujo de líquido dentro y fuera del
depósito horizontal de la llenadora. En primer lugar, cuando el cilindro neumático absorbe fluido,
a través de la manguera más gruesa se introduce la materia en el tanque (mientras esto ocurre, la
válvula antirretorno que dirige el líquido a las botellas permanece cerrada) hasta llenarlo al
completo. A la hora de insuflar el material hacia el recipiente el proceso es inverso, se tapona la
manga más ancha y la válvula del tubo estrecho permite el flujo y llenar el envase. Esta instalación
es original de la máquina y queda representada en la figura 17.

17
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 17. Mangas y válvulas de la llenadora. (Elaborada por autor)

6. Estudio, cálculo y programación de los


movimientos del motor
6.1. Sentido de giro
Los motores de paso, al igual que otros tipos de motores eléctricos pueden girar en ambos
sentidos, cambiando la polaridad, o lo que es igual, cambiando el sentido de la corriente que
circula por los bobinados internos. Para conseguir este fenómeno es de esperar que no van a
cambiarse constantemente los cuatro cables de posición, pues va a conocerse una de las grandes
utilidades del driver para el control de motores paso a paso. La conexión realizada entre Arduino,
motor y driver A4988 queda representada en la figura 18.

Figura 18. Esquema de conexiones entre Arduino, A4988 y motor de paso unipolar (RobotStore, 2016)

18
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Puede observarse claramente en la parte inferior izquierda del driver, que una patilla de
dirección va conectada al microcontrolador (Arduino UNO en nuestro caso). Dicha entrada va a
valer unos 5 Voltios (medida realizada con el polímetro en el laboratorio) cuando el programa le
mande un estado HIGH (alto, excitado), y unos 0 Voltios cuando reciba un estado LOW (bajo,
sin excitación). Esto se traduce directamente en el movimiento del motor, el cual girará en un
sentido u otro en función del programa de Arduino. Esto nos hace posible indicar en la aplicación
hacia dónde debe moverse el switch según se haya seleccionado un formato.

6.2. Pasos por vuelta y relación distancia switch/giro motor.


En cuanto al número de pasos por vuelta que debe dar el motor para completar los giros
deseados, cada modelo unipolar o bipolar de paso a paso tiene un ángulo de paso determinado.
Nuestro componente tiene un ángulo por paso de 7.5º (Anexo C), lo que significa que para
completar una vuelta completa (360º) se necesita completar 48 pasos. Para obtener el número de
vueltas que se necesitan para mover el sensor switch que se encuentra sobre el tornillo sin fin se
va a proceder a medir diferentes distancias contando el número de vueltas que se dan, los datos
se recogen en la tabla 2.

Vueltas Distancia (cm)


7 1
14 2.1
21 3.15

Tabla 2. Distancia recorrida en función de las vueltas de la varilla.

Puede verse la tendencia de la relación de forma clara, con esto ya se tendría una primera línea
de cálculo para llegar a saber cuántas veces debe girar el motor para pasar de un formato de envase
a otro. Lo siguiente que se va a obtener es la relación de reducción de los engranajes, recordando
que el mayor de los dos va acoplado a la varilla del switch.

𝑉𝑢𝑒𝑙𝑡𝑎𝑠𝑔𝑟𝑎𝑛𝑑𝑒 𝑁𝑝𝑒𝑞𝑢𝑒ñ𝑜 1 · 50
= ; 𝑉𝑢𝑒𝑙𝑡𝑎𝑠𝑝𝑒𝑞𝑢𝑒ñ𝑜 = = 1.5625
𝑉𝑢𝑒𝑙𝑡𝑎𝑠𝑝𝑒𝑞𝑢𝑒ñ𝑜 𝑁𝑔𝑟𝑎𝑛𝑑𝑒 32

Con la anterior relación se conoce que, para dar una vuelta completa al tornillo sin fin, el eje
del motor debe completar 1.5625 vueltas. Por último, el cálculo restante es la relación que existe
entre la posición del switch con el volumen de líquido que a envasar. Esto se logra conocidas las
medidas del tanque de llenado y la fórmula del volumen de un cilindro.

𝑉(𝑐𝑚3 )
𝑉 = 𝜋 · 𝑅2 · 𝐿 ; 𝐿(𝑐𝑚) =
𝐷(𝑐𝑚)2
𝜋· 4

Se extrae de aquí la tabla 3 con diferentes formatos y la longitud de depósito que debe
recorrerse para completar el envasado.

19
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Volumen (L) Longitud (cm)


5 28.29
2 11.32
1.5 8.5

Tabla 3. Volúmenes y distancias de llenado.

Con todos estos valores numéricos conjuntos puede realizarse la tabla 4, más sencilla, que
representa los pasos que debe dar el motor para que el sensor recorra cierta distancia y así
programar el Arduino con variables utilizadas como contadores. Cabe señalar que en la aplicación
final (presentada más adelante) se parte de una referencia inicial de un litro, y de ahí se mueve el
motor en una u otra dirección.

Volumen (L) Pasos del motor


0.5 1536
1 3072
1.5 4608
2 6144
3 9316
4 12288

Tabla 4. Relación entre volumen y pasos del motor.

6.3. Programación
Programación de Arduino: Se trata del lenguaje de programación conocido como C++. La
estructura del programa está basada en sentencias condicionales del tipo if () else () y de bucles
for (). Estos comandos son unos de los pilares fundamentales de la programación estructurada.

En el caso de las sentencias de condición if () else (), están basadas en ejecutar una línea de
programa si se cumple una premisa descrita en el programa, o de lo contrario no ejecutar dicha
línea de código y saltar a la sentencia else ().

Figura 19. Líneas de código con condiciones if ()

Los bucles for () son, como su propio nombre indica, “circuitos” cerrados de código que se
repiten para la condición dada por el programador, mientras dicha premisa se cumpla el programa
estará ejecutándose repetidas veces.

20
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 20. Líneas de código con bucle for ()

En la figura 21 se añade también la sección de código en la que se activa la librería de control


para el módulo bluetooth.

Figura 21. Llamada a la librería de Bluetooth.

Para tratar los diferentes casos o formatos que pueden ser seleccionados en la aplicación, lo
que se hace es situar el switch inicialmente en una referencia (equivalente a 1 litro), y de ahí se
van contabilizando los pasos que da el motor e introduciéndolos en una variable. Con dicho valor
pueden estudiarse todas y cada una de las condiciones que deben darse para ir de uno a otro de
los formatos. Los condicionales que provienen del módulo bluetooth se identifican como
caracteres, y es que cada una de las teclas de la aplicación se traduce en letras o números que el
propio Arduino identifica y compara para conocer hacia dónde ha de girar el motor (véanse anexos
I y J).

7. Resultados experimentales
En este apartado se procederá a explicar el funcionamiento conseguido con cada una de las
pruebas realizadas en la máquina. Asimismo, se desarrollarán las diferentes etapas y la evolución
del diseño de la aplicación para smartphones finalmente obtenida.

7.1. Experimentación con autómata


En la implantación del uso del autómata para el control de la envasadora se comienza
trasladando el problema a un diagrama grafcet, tal y como se realizó numerosas veces en la
asignatura de Automatización Industrial. De ahí será más sencillo pasar a un programa Ladder
con el cual se puedan controlar los pulsadores y sensores que componen la máquina. A
continuación, queda por escrito lo que sería una explicación del funcionamiento con el autómata,
el cual está asociado directamente al programa de TIA Portal presentado en el Anexo A.
Una vez encendida la máquina (S0), el pistón C1 permanece extendido (H1 hasta S6),
dispuesto para absorber líquido. El pistón C2 permanece extendido (H3) para impedir la succión
de líquido por la manguera llenadora.
Una vez activo el funcionamiento manual (Pedaling) (S1) de la llenadora: Mientras el pedal
esté pisado (S4) la máquina estará en funcionamiento. El cilindro C1 se encogerá (H2),
introduciendo el líquido en el depósito horizontal para proceder al llenado. Cuando el pistón C1
haya llegado al switch de posición (S5) que indique que está listo para impulsar el fluido, el pistón
C2 se recogerá (H4) y cuando lo haya hecho, el pistón C1 será extendido (H1), introduciendo el

21
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

líquido en el envase a través de la tobera de salida. El pedal debe ser pulsado hasta que el fluido
termine de salir hacia la botella en cuestión.

7.2. Experimentación con nuevo sistema integrado


Este apartado se va a dividir en tres, el número de pruebas que se han realizado o aplicaciones
que han sido probadas para ir mejorando el funcionamiento, llegando a la finalidad deseada desde
un principio con este proyecto. Cabe señalar que todas ellas han sido diseñadas con el entorno
MIT App Inventor de Google para Android, y con ayuda de ciertas webs que más adelante serán
mencionadas se ha realizado toda la programación de bloques para poder comunicar el dispositivo
Android con Arduino a través del módulo Bluetooth.

7.2.1. Control de motor paso a paso


Esta es básicamente una toma de contacto con la creación de app’s para el control de motores
paso a paso, se trata de un ejemplo simple el cual ayuda a conocer la manera de trabajar del driver
A4988 con el motor, haciéndolo girar en ambos sentidos y a diferentes velocidades. Esta
aplicación queda lejos de la solución final adoptada, ya que implica que el operario que está
variando el volumen esté presente para ubicar exactamente el switch en el punto exacto. Como
puede observarse en la figura 22, la interfaz se compone de 3 teclas de velocidad, las cuales tienen
asignadas un retraso temporal diferente entre pasos del motor para conseguir mover los engranajes
de forma más rápida o más lenta y precisa. Aparte componen también esta app dos teclas que
indican el sentido de giro y una última para parar completamente el motor, obviando el pulsador
para conectar el móvil o Tablet al Arduino mediante Bluetooth.

Figura 22. Interfaz App Control Motor de Paso (Elaborada por autor)
22
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

7.2.2. Cambio de formatos preestablecidos


En esta segunda aplicación puede verse ya un acercamiento a la solución buscada inicialmente
para el funcionamiento. Como se contempla en la figura 23 se habilitan 3 formatos diferentes de
1.5 litros, 2 litros y 4 litros, y con los distintos botones se permite pasar de uno a otro para cambiar
el volumen de llenado. Se incluyen también unas teclas de ajuste fino en cada uno de los sentidos,
para poder salvar así pequeños desajustes que puedan producirse, como derrames o falta de fluido
en los envases.

Figura 23. Interfaz App Cambio de Formatos Preestablecidos (Elaborada por autor)

Dicha app podría servir de solución al problema que nos atañe, pero aún así se debe conseguir
una cierta “inteligencia” por parte del programa que permita conocer al microcontrolador hacia
donde moverse en función del lugar en el que se encuentra en cada momento. Es decir, si estamos
llenando botellas de dos litros, y quiero pasar a llenar un litro o tres litros con tan solo pulsar un
botón, el sistema debe saber cuántos pasos debe girar el motor y en qué dirección.

7.2.3. App Formatos Envasadora


Finalmente queda presentada en la figura 24 la interfaz de la aplicación definitiva para el
control de la llenadora. Como puede observarse, se ha añadido una tecla desplegable (“seleccione
otro:”) con la cual es posible que el operario seleccione otros formatos no predispuestos en la
aplicación.

23
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Figura 24. Interfaz App Envasadora (Elaborada por autor)

La programación que hay tras esta última aplicación puede verse reflejada en los anexos I
(Arduino) y J (App Inventor).

8. Conclusiones
En este último apartado del proyecto se van a exponer las conclusiones que han sido obtenidas
tras la realización del trabajo. En un primer lugar se debe señalar que la complejidad fundamental
del proyecto se ha encontrado en la manera de hallar la solución mecánica y en la programación
del sistema. En cuanto dicha solución mecánica, eran numerosas las posibilidades de compra de
los diversos componentes, como ya se ha visto en este documento, hay cantidad de tipos de
motores eléctricos, materiales, controladores, etc. Por lo que llevó varias semanas el proceso de
elección y compra de los dispositivos una vez diseñado el montaje. En lo que respecta a la
programación, son numerosas las webs que existen relacionadas con Arduino y con la creación
de aplicaciones, pero de nuevo son muy diversos los ejemplos y combinaciones de elementos de
cara a escribir un código para nuestro caso.
Para continuar, se debe remarcar que la solución aportada es la óptima con los materiales y
recursos disponibles. Siendo un sistema de bajo coste y que suele dar problemas con ruido
electromagnético y debilidad operando en ciertas situaciones, el Arduino UNO ha cumplido las
expectativas y ha permitido resolver el trabajo sin mayor complicación. Es cierto que con un
autómata programable y un sistema más robusto podría dotarse a la máquina de una fiabilidad
aún mayor, pero obviamente más caro y sin llegar a permitir más desarrollo o simplicidad en la
operación.

24
AUTOMATIZACIÓN DE ENVASADORA DE LÍQUIDOS CON INTERFAZ HTML
Jaime Marín Miñano

Por último, es preciso señalar que el trabajo ha sido completo, tocando temas de diferentes
ámbitos que han sido estudiados a lo largo del grado como son la automatización, la electrónica,
el diseño de máquinas, el diseño industrial, etc. Se ha desarrollado continuamente la capacidad de
resolución de problemas y de mejora, ya que han sido numerosos los contratiempos a la hora de
realizar el montaje físico, la programación de la aplicación o el montaje eléctrico para las pruebas
con el autómata.

Referencias
RS Components. (Julio de 2018). RS COMPONENTS WEBSITE. Obtenido de
https://es.rsonline. com/web/
Motores paso a paso con Arduino y driver A4988. (Junio de 2017). Luis Llamas. Ingeniería,
informática y diseño. Obtenido de https://www.luisllamas.es/motores-paso-paso-arduino-driver-
a4988-drv8825/
Formas de envasado de productos líquidos. (2011). Elección de maquinaria para el envasado de
productos líquidos. Miguel Cortés, MAQUIENVAS S.L.
Llenadora manual de pistón LP-ACT (2016). EMPAKANDO S.L. www.empakando.com
Farnell. (Julio de 2018). FARNELL ELEMENTS. Obtenido de https://es.farnell.com/
Motor con reductora y encoder. (Julio 2018). BRICOGREEK https://tienda.bricogeek.com/

ANEXOS

25
Anexo A. Programa
del Autómata
Totally Integrated
Automation Portal

Llenadora envasadora / PLC_1 [CPU 1214C AC/DC/Rly] / Bloques de programa


Main [OB1]
Main Propiedades
General
Nombre Main Número 1 Tipo OB Idioma KOP
Numeración automática
Información
Título "Main Program Sweep (Cy‐ Autor Comentario Familia
cle)"
Versión 0.1 ID personaliza‐
da

Main
Nombre Tipo de datos Valor predet. Comentario
Input
Initial_Call Bool Initial call of this OB
Remanence Bool =True, if remanent data are available
Temp
Constant

Segmento 1: Modo manual


Totally Integrated
Automation Portal

%M0.0
"M0"
S

%M0.0 %I0.6 %M0.1


"M0" "S6.C1 Extendido" "M1"
S

%M0.0
"M0"
R

%I0.1
%M0.1 "S1.Modo %M0.2
"M1" Manual" "M2"
S

%M0.1
"M1"
R

%M0.2 %I0.4 %M0.3


"M2" "S4.Pedal" "M3"
S

%M0.2
"M2"
R

%M0.3 %I0.4 %M1.0


"M3" "S4.Pedal" "M8"
S

%M0.3
"M3"
R

%M0.3 %I0.4 %I0.5 %M0.4


"M3" "S4.Pedal" "S5.C1 Recogido" "M4"
S

%M0.3
"M3"
R

%M0.4 %I0.6 %I0.4 %M0.3


"M4" "S6.C1 Extendido" "S4.Pedal" "M3"
S

%M0.4
"M4"
R

%M0.4 %I0.4 %M0.7


"M4" "S4.Pedal" "M7"
S

%M0.4
"M4"
R

%M0.7 %I0.4 %I0.6 %M0.3


"M7" "S4.Pedal" "S6.C1 Extendido" "M3"
S

%M0.7
"M7"
R

%M1.0 %I0.5 %I0.4 %M0.4


"M8" "S5.C1 Recogido" "S4.Pedal" "M4"
S

%M1.0
"M8"
R

Símbolo Dirección Tipo Comentario


"M0" %M0.0 Bool
"M1" %M0.1 Bool
"M2" %M0.2 Bool
"M3" %M0.3 Bool
"M4" %M0.4 Bool
"M7" %M0.7 Bool
"M8" %M1.0 Bool
"S1.Modo Manual" %I0.1 Bool
"S4.Pedal" %I0.4 Bool
"S5.C1 Recogido" %I0.5 Bool
"S6.C1 Extendido" %I0.6 Bool

Segmento 2: Parada Emergencia Manual


Totally Integrated
Automation Portal

%I0.3
%M0.3 "S3.Parada %M0.1
"M3" Emer." "M1"
S

%M0.3
"M3"
R

%I0.3
%M0.4 "S3.Parada %M0.1
"M4" Emer." "M1"
S

%M0.4
"M4"
R

Símbolo Dirección Tipo Comentario


"M1" %M0.1 Bool
"M3" %M0.3 Bool
"M4" %M0.4 Bool
"S3.Parada Emer." %I0.3 Bool

Segmento 3: Actuadores

%M0.7 %Q0.0
"M7" "H1.C1 sale"

%M0.0
"M0"

%M0.4
"M4"

%M0.6
"M6"

%M0.3 %Q0.1
"M3" "H2.C1 recoge"

%M0.5
"M5"

%M1.0
"M8"

Símbolo Dirección Tipo Comentario


"H1.C1 sale" %Q0.0 Bool
"H2.C1 recoge" %Q0.1 Bool
"M0" %M0.0 Bool
"M3" %M0.3 Bool
"M4" %M0.4 Bool
"M5" %M0.5 Bool
"M6" %M0.6 Bool
"M7" %M0.7 Bool
"M8" %M1.0 Bool

Segmento 4: Modo automático

%I0.1
%M0.1 %I0.2 "S1.Modo %M0.5
"M1" "S2.Modo Auto" Manual" "M5"
S

%M0.1
"M1"
R

%M0.5 %I0.5 %M0.6


"M5" "S5.C1 Recogido" "M6"
S

%M0.5
"M5"
R

%M0.6 %I0.6 %M0.5


"M6" "S6.C1 Extendido" "M5"
S

%M0.6
"M6"
R

Símbolo Dirección Tipo Comentario


"M1" %M0.1 Bool
Totally Integrated
Automation Portal

Símbolo Dirección Tipo Comentario


"M5" %M0.5 Bool
"M6" %M0.6 Bool
"S1.Modo Manual" %I0.1 Bool
"S2.Modo Auto" %I0.2 Bool
"S5.C1 Recogido" %I0.5 Bool
"S6.C1 Extendido" %I0.6 Bool

Segmento 5: Parada emergencia Automático

%I0.3
%M0.6 "S3.Parada %M0.1
"M6" Emer." "M1"
S

%M0.6
"M6"
R

%I0.3
%M0.5 "S3.Parada %M0.1
"M5" Emer." "M1"
S

%M0.5
"M5"
R

Símbolo Dirección Tipo Comentario


"M1" %M0.1 Bool
"M5" %M0.5 Bool
"M6" %M0.6 Bool
"S3.Parada Emer." %I0.3 Bool
Anexo B. Datasheet
Switch
Anexo C. Datasheet
Motor de paso
Issued / Herausgegeben / Publicado / Publication 03/2002 V8963
Publicatto / Udgivet / Afgegeven / Utgiven

4-Phase unipolar stepper motors

Unipolare 4-Phasen-Schrittmotoren
Instruction Leaflet
Bedienungsanleitung Motores unipolares paso a paso de 4 fases
Hojas de instrucciones
Feuille d’instructions Moteurs pas à pas unipolaires tétraphasés
Foglio d’instruzioni
Betjeningsvejledning
Instructies Motori passo-passo unipolari a 4 fasi
Instruktionsfolder
4 fasede, enpolede stepmotorer DK

Enkelpolige 4-fasen stappenmotoren NL

4-fasiga unipolära stegmotorer SE

Figures / Abbildung / Figura / Figurer / Afbeeldingen

1 Connection diagram / Anschlußplan / Esquema de conexiones / Schéma de connexions /


Schema dei collegamenti / Koblingsdiagram / Aansluitdiagram / Elkretsschema

4 c 3
C

2 c 1
2

3 4
2
Suitable drive boards connections / Anschlüsse geeigneter Treiberplatinen / Conexiones con la tarjeta controladora /
Connexions appropriées sur cartes d’entraînement / Collegamenti alle schede di controllo
Egnede driverkorttilslutninger / Geschikte aansluitingen besturingskaarten / Passande drivkortsanslutningar
V8963

2
- Unipolar - 2A Drive board / - Unipolare Treiberplatine, 2A/ Tarjeta controladora unipolar de 2A, / Carte d’entraînement 2A unipolaire, /
Scheda di controllo 2A - Unipolare / Enpolet - 2A driverkort / Enkelpolig - 2 A besturingskaart / Unipolärt – 2 A drivkort

332-098 A B

0V +V
C

D
E 1
27 32 31 30 29 28
F 25 R* R*
G 24
332-098
H 23
Ø1 Ø2 Ø3 Ø4
I 22 J
13
12
10
9 O
7
K L 6
4
3
N M
V8963

A. Auxiliary output 12Vdc 50m/A A. Uscita ausiliaria da 12Vcc 50m/A


B. Board supply (15-30Vdc) B. Alimentazione scheda (15-30Vcc)
C. Board and motor may share the same supply C. La scheda e il motore possono condividere la stessa alimentazione
D. +V motor (30Vdc max.) D. Motore +V (max. 30Vcc)
E. External controls E. Controlli esterni
F. Full/half step F. Passo intero/mezzo passo
G. Clock G. Orologio
H. Direction H. Direzione
I. Preset I. Preimpostazione
J. All board connections are to the ‘a’ side of the DIN connector J. Tutti i collegamenti della scheda si trovano sul lato ‘a’ del connettore
K. Oscillator control inputs DIN
L. On-board oscillator (when assembled) K. Ingressi di controllo oscillatore
M. (see oscillator section) L. Oscillatore su scheda (se assemblato)
N. *R = +V motor-rated winding voltage M. (vedere la sezione relativa all'oscillatore)
rated winding current N. *R = Tensione avvolgimento nominale motore +V
O. Motor windings Ø1-Ø4 corrente avvolgimento nominale
O. Avvolgimenti motore Ø1-Ø4
DK
A. Hilfsausgang (12V DC, 50mA)
B. Betriebsspannung (15 bis 30V DC) A. Hjælpeoutput 12VDC 50mA
C. Treiberplatine und Motor können mit derselben B. Strømforsyning til kort (15-30V DC)
Betriebsspannung betrieben werden. C. Kort og motor kan dele samme strømforsyning
D. Positive Motorspannung +V (max. 30V DC) D. +V motor (30DC maks.)
E. Externe Steuerungen E. Ekstern regulering
F. Voll-/Halbschritt D. Hel-/ halvstep
G. Takt G. Taktur
H. Drehrichtung H. Retning
I. Voreinstellung I. Forudindstillet
J. Alle Platinenanschlüsse befinden sich auf der Reihe "a" des DIN- J. Alle korttilslutninger er til ‘A’ siden på DIN stikket
Steckverbinders. K. Oscillatorreguleringsinput
K. Oszillator-Steuerungseingänge L. Oscillator på kortet (når monteret)
L. On-board-Oszillator (sofern montiert) M. (Se afsnit om oscillator)
M. (siehe Oszillatorbeschreibung) N. *R = +V motor-mærkeviklingsspænding
N. *R = Motorspannung +V (nominale Wicklungsspannung) Mærkeviklingsstrøm
nominaler Wicklungsstrom O. Motorvikling
O. Motorwicklungen
NL

A. Uitgang hulpspanning 12 V gelijkstroom, 50 m/A


A. Salida auxiliar 12Vcc 50m/A B. Voeding kaart(15 - 30 V gelijkstroom)
B. Alimetación de la tarjeta (15-30Vcc ) C. Kaart en motor kunnen dezelfde voeding gebruiken
C. La tarjeta y el motor pueden compartir la misma alimentación D. +V motor (maximaal 30 V gelijkstroom)
D. +V motor (30Vcc máx.) E. Externe bedieningsknoppen
E. Controles exteriores F. Volledige/halve stap
F. Pasos enteros/medios G. Klok
G. Reloj H. Richting
H. Sentido de giro I. Voorinstelling
I. Preajuste J. Alle kaartaansluitingen zijn aan de 'a'-zijde van de DIN-connector
J. Todas las conexiones de la tarjeta están por el lado “a” del conector K. Regelingangen oscillator
DIN L. Geïntegreerde oscillator (indien gemonteerd)
K. Entradas de control del oscilador M. (Zie gedeelte over oscillator)
L. Oscilador de la tarjeta (si lo lleva) N. *R = +V nominale wikkelingspanning motor
M. (consulte la sección del oscilador) nominale wikkelingstroom
N. *R = *V motor - tensión nominal del arrollamiento O. Motorwikkelingen
corriente nominal del arrollamiento
SE
O. Arrollami entos del motor Ø1 - Ø4
A. Hjälputgång 12 V DC 50 mA
B. Strömförsörjning till kort (15–30 V DC)
A. Sortie auxiliaire 12 V continu 50 mA C. Kort och motor kan drivas från samma strömförsörjning
B. Alimentation de la carte (15-30 V continu) D. +V motor (max. 30 V DC)
C. L’alimentation peut être commune au moteur et à la carte E. Extern styrning
D. +V moteur (30 V continu max.) B. Helt/halvt steg
E. Commandes externes G. Klocka
F. Pas complet/demi-pas H. Riktning
G. Horloge I. Förinställning
H. Direction J. Samtliga anslutningar till kortet görs till DIN-anslutningens "A"-sida
I. Présélection K. Styringångar till oscillator
J. Toutes les connexions de la carte se trouvent sur le côté L. Inbyggd oscillator (tillval)
« a » du connecteur DIN M. (se oscillatoravsnittet)
K. Entrées de contrôle de l’oscillateur N. *R = +V motor – nominell lindningsspänning
L. Oscillateur interne (si présent) nominell lindningsström
M. (voir section sur l’oscillateur) O. Motorlindningar
N. *R = +V tension d’enroulement en fonction du moteur
intensité d’enroulement nominale
O. Enroulements du moteur
3
4
3 Bi-polar chopper 3.5A Drive board / Bipolare Chopper-Treiberplatine, 3A / Tarjeta controladora bipolar chopper de 3,5A / Carte d’entraînement bipolaire à hacheur 3,5A
Scheda di controllo 3,5A modulatore bipolare / Topolet jævnspændingsomformer 3,5A driverkort / 3,5 A besturingskaart bipolaire chopper / Bipolärt 3,5 A chopperdrivkort
V8963

c a 2
2 B
Ø1 Ø1
Ø1 N/C
4

Ø2 Ø2
6 Ø2

Ø3
1 2 3
8 Ø3 Ø3
Ø4
10 Ø4 Ø4
N/C
12 C
D
14
3
E
16
A
18

20 F
G
22
H
24

26 I +12V
J Q
28 K
R T 1kΩ to V
30 10kΩ
M N
CW CCW
32 L
O P S U W X Y Z
1. 4 Lead motor 1. Motor mit 4 Anschlüssen
2. 6 Lead motor 2. Motor mit 6 Anschlüssen
3. 8 Lead motor (Parallel connections) 3. Motor mit 8 Anschlüssen (Parallelschaltungen)

A. Board A. Platine
B. Motor supply (+12V to +36V) B. Motorbetriebsspannung (+12V bis +36V)
C. Synch I/O C. Synchronisiereingang/-ausgang
D. Home Ø1 output D. Home Ø1-Ausgang
E. Step clock input E. Schrittakteingang
F. Overload output F. Überlastausgang
G. Overtemp output (optional 1) G. Übertemperaturausgang (optional 1)
H. VCO clock output H. Oszillatortaktausgang
I. Aux 12V output (50mA max.) I. Hilfsausgang (12V, max. 50mA)
J. Aux 5V output (50mA max.) J. Hilfsausgang (5V, max. 50mA)
K. Logic supply (+15V to +24V) K. Logikspannung (+15V bis +24V)
L. Common OV L. Masse 0V
M. Run M. Start
N. Stop N. Stopp
O. Stop/run No ramping O. Stopp/Start ohne Hochlauframpe
P. Base speed values 10kΩ to ∞ P. Basisdrehzahlwerte (10kW bis ∞)
Q. Base speed optional Q. Basisdrehzahl (optional)
R. Base R. Basis
S. Base/high ramps between base and high speedsor zero and high speeds S. Basis-/Hoch-Rampen zwischen Hochdrehzahlen oder Null- und Hochdrehzahlen,
if no base speed pot is fitted. falls kein Basisdrehzahl-Potentiometer montiert ist.
T. High T. Hoch
U. High speed values 1kΩ to 10kΩ U. Hochdrehzahlwerte (1kΩ bis 10kΩ)
V. Optional V. Optional
W. Current program normally uses on-board DIP switch W. Aktuelles Programm nutzt normalerweise die DIP-Schalter auf der Platine.
X. Output disable X. Ausgang deaktivieren
Y. Reset Ø1 state Y. Ø1-Zustand zurücksetzen
Z. Half/full Z. Halb/Voll
* These components are only required if on-board VCO has been fitted. * Diese Bauteile sind nur dann notwendig, wenn auf der Platine ein
spannungsgesteuerter Oszillator montiert ist.
i. This facitlity requires the fitting of a thermal switch. i. Diese Funktion setzt voraus, daß ein Thermoschalter montiert wird.
ii. Logic may share motor supply if between +15V and +24V. ii. Die Logik kann auch an der Motorbetriebspannung liegen, sofern diese
iii. If the on-board VCO has been fitted the VCO output may be connected zwischen +15V und +24V beträgt.
directly to the step clock input. iii. Falls der spannungsgesteuerte Oszillator auf der Platine montiert ist,
kann der Oszillatortaktausgang direkt mit dem Schrittakteingang verbunden werden.

5
V8963
6
1. Motor de 4 hilos A. Moteur à 4 lignes
2. Motor de 6 hilos B. Moteur à 6 lignes
3. Motor de 8 hilos Velocidad base (opcional) C. Moteur à 8 lignes (montage en parallèle)
V8963

A. Carte
A. Tarjeta B. Alimentation du moteur (+12 V à +36V)
B. Alimentación del motor (+12V a +36V) C. Synchro E/S
C. E/S sincr. D. Sortie Home Ø1
D. Salida retorno Ø1 E. Entrée de l’horloge de pas
E. Entrada reloj pasos F. Sortie de surcharge
F. Salida sobrecarga G. Sortie de surchauffe (option 1)
G. Salida exceso temperatura H. Sortie d’horloge commandée en tension
H. Salida reloj VCO I. Sortie 12 V auxiliaire (50 mA max.)
I. Salida auxiliar 12V (50mA máx.) J. Sortie 5 V auxiliaire (50 mA max.)
J. Salida auxiliar 5V (50mA máx.) K. Alimentation de la logique (+15 V à +24 V)
K. Alimentación lógica (+15V a +24V) L. 0 V commun
L. Común OV M. Marche
M. Marcha N. Arrêt
N. Parada O. Marche/arrêt sans rampe
O. Parada/marcha sin rampa P. Valeurs à la vitesse de base 10 kΩ à ∞
P. Valores de velocidad base 10kΩ a ∞ Q. Vitesse de base (option)
Q. Velocidad basica (opcional) R. Base
R. Base S. Rampes base/haute vitesse entre hautes vitesse ou entre zéro et hautes
S. Base/alto Rampas entre velocidad base o alta, o entre elocidad cero o vitesse s’il n’y a pas de module de vitesse de base
alta si no lleva potenciómetero de velocidad base T. Haute vitesse
T. Alta U. Valeurs à haute vitesse 1 kΩ à 10 kΩ
U. Valores de velocidad alta 1kΩ a 10kΩ V. Option
V. Opcional W. Le programme actuel utilise normalement un commutateur DIP interne
W. El programa de corriente emplea normalmente un conmutador DIP en la tarjeta X. Désactivation de sortie
X. Inhabilite salida Y. Remise à zéro état Ø1
Y. Reinicialice estado Ø1 Z. Demi-pas/pas complet
Z. Medios/enteros * Ces composants sont nécessaires uniquement si un oscillateur à tension
* Estos componentes sólo son necesarios si se ha integrado un VCO. asservie interne a été monté.
i. Esta función exige la instalación de un interruptor térmico i. Cette installation nécessite un interrupteur thermique.
ii: El lógico puede compartir el suministro de alimentación del motor si éste se encuentra entre ii. La logique peut partager l’alimentation du moteur si celle-ci est comprise
los +15 V y los +24 V entre +15 V et +24 V.
iii. Si se ha integrado el VCO, la salida de VCO se puede conectar directamente a la entrada iii. Si l’oscillateur à tension asservie interne a été monté, la sortie VCO peut
del reloj de velocidad gradual. être directement connectée à l’entrée de l’horloge de pas.
DK

A. Motore a 4 conduttori 1. Motor med 4 viklinger


B. Motore a 6 conduttori 2. Motor med 6 viklinger
C. Motore a 8 conduttori (collegamenti paralleli) 3. Motor med 8 viklinger (i parallel kobling)
a. Scheda A. Kort
b. Alimentazione motore (da +12V a +36V) B. Motorforsyning (+15V til +36V DC)
c. Sincr. I/O C. Synkronisering I/O
d. Uscita Ø1 locale D. Faseudgang for normal position Ø1
e. Ingresso orologio passo E. Steptaktur - indgang
f. Uscita sovraccarico F. Overbelastningsudgang
g. Uscita temp. eccessiva (1 opzionale) G. Overtemp.udgang (valgfri 1)
h. Uscita orologio VCO H. VCO taktur - indgang
i. Uscita da 12V aus. (max 50mA) I. Hjælpeudgang +12V (50mA maks.)
j. Uscita da 5V aus. (max 50mA) J. Hjælpeudgang +5V (50mA maks.)
k. Alimentazione logica (da +15V a +24V) K. Logikforsyning (+15V to +24V)
l. 0V comune L. Fælles 0V
m. Esecuzione M. Kør
n. Arresto N. Stop
o. Arresto/Esecuzione nessuna accelerazione O. Stop/Kør ingen spændingsstigning
p. Valori velocità di base da 10kV a: P. Grundhastighedsværdier 10kΩ to ∞
q. Velocità di base (opzionale) Q. Grundhastighed (valgfri)
r. Base R. Grund-
s. Rampe alte/base tra velocità alta e velocità zero e alta senza regolatore della velocità di S. Grund-/højhastighedsændringer mellem højhastigheder eller nul og højhastigheder,
base. hvis der ikke er monteret et grundhastighedspotentiometer.
t. Alto T. Høj
u. Valori alte velocità da 1kV a 10kV U. Højhastighedsværdier 1kΩ til 10kΩ
v. Opzionale V. Valgfri
w. Il programma corrente utilizza di solito un microinterruttore su scheda W. Strømprogrammeringen anvender normalt en DIP-switch på kortet
x. Disattivazione uscita X. Udgangsblokering
y. Reset stato Ø1 Y. Nulstil Ø1-tilstand
z. Metà/completo Z Halv/Fuld
* Disse komponenter kræves kun, hvis der er moneret en VCO på kortet.
* Tali componenti sono necessari solo se è stato montato un VCO su scheda.
i. Denne facilitet kræver montering af en termokontakt
i. Questa funzione richiede la presenza di un interruttore termico ii. Logikken kan dele motorforsyningen, hvis den er mellem +15V og +24V
ii. La logica può condividere l'alimentazione motore se compresa tra +15V e +24V iii. Hvis den kortmonterede VCO er monteret, kan VCO’en måske kobles
iii. Se il VCO su scheda è stato montato, è possibile collegare l'uscita VCO direttamente direkte til steptakturets indgang.
all'ingresso dell'orologio passo.

7
V8963
8
NL SE

A. 4 motorkabels A. Motor med 4 anslutningar


B. 6 motorkabels B. Motor med 6 anslutningar
C. 8 motorkabels (parallelle aansluitingen) C. Motor med 8 anslutningar (parallellanslutningar)
V8963

A. Besturingskaart A. Kort
B. Motorvoeding (+12 V tot +36 V) B. Strömförsörjning till motor (+12 till +36 V DC)
C. Synchronisatie I/O C. In/utgång för synkronisering
D. Uitgang rust Ø1 D. Utgång hemmaläge Ø1
E. Ingang stappenklok E. Ingång för stegklocka
F. Uitgang overbelasting F. Överlastutgång
G. Uitgang overtemperatuur (optioneel 1) G. Övertemperaturutgång (tillval 1)
H. Uitgang klok VCO H. Oscillatorklockutgång
I. Uitgang hulpspanning 12 V (maximaal 50 mA) I. Hjälputgång 12 V, max. 50 mA
J. Uitgang hulpspanning 5 V (maximaal 50 mA) J. Hjälputgång 12 V, max. 50 mA
K. Voeding logica (+15 tot +24 V) K. Strömförsörjning till logik (+15 till +24 V)
L. 0 V gemeenschappelijk L. Gemensam 0 V
M. In bedrijf M. Kör
N. Uit bedrijf N. Stopp
O. Uit bedrijf/in bedrijf geen gelijkmatige belastingtoename O. Stopp/kör utan ramp
P. Waarden basistoerental 10kΩ tot ∞ P. Grundvarvtalsvärden 10–8 kΩ
Q. Basistoerental (optioneel) Q. Grundvarvtal (tillval)
R. Basis R. Grund
S. Basis/hoge oploop tussen hoge toerentallen of tussen nul en hoge toerentallen S. Grund/högramper mellan höga varvtal eller noll och höga varvtal
als er geen basistoerentalpotentiometer is bevestigd. om ingen grundvarvtalspotentiometer är installerad.
T. Hoog T. Hög
U. Waarden hoog toerental 1kΩ tot 10kΩ U. Högvarvtalsvärden 1–10 kΩ
V. Optioneel V. Tillval
W. Huidige programma gebruikt gewoonlijk een op de besturingskaart aangebrachte W. Det aktuella programmet utnyttjar normalt en DIP-omkopplare
DIP-schakelaar. på kortet
X. Uitgang blokkeren X. Avstängning av utgång
Y. Reset Ø1 status Y. Återställ tillstånd Ø1
Z. Halve/volledige Z. Halv/hel
* Deze componenten zijn alleen nodig indien VCO op de besturingskaart is aangebracht. * Dessa komponenter är de enda som krävs om spänningsstyrd oscillator är installerad.
i. Voor deze voorziening dient een thermische schakelaar te worden gemonteerd i. Denna funktion kräver att en termobrytare installeras.
ii. Logica en motor kunnen tussen +15 V en +24 V dezelfde voeding gebruiken ii. Logiken kan drivas från samma strömförsörjning som motorn, om spänningen
iii. Als VCO op de besturingskaart is gemonteerd, kan de VCO-uitgang rechtstreeks är mellan +15 och +24 V.
op de ingang stappenklok worden aangesloten. iii. Om den spänningsstyrda oscillator är installerad, kan dess utgång anslutas
direkt till stegklockans ingång.
V8963

RS Stock No. RS Best-Nr.

7.5° step angle, Holding torque (mNm) 7,5° Schrittwinkel, Haltedrehmoment (mNm)
20mNm 440-262 20 mNm 440-262
52mNm 440-284 52 mNm 440-284
155mNm 440-290 155 mNm 440-290
240mNm 440-307 240 mNm 440-307
15° step angle, Holding torque (mNm) 15° Schrittwinkel, Haltedrehmoment (mNm)
14.5mNm 199-863 14.5 mNm 199-863

A range of permanent magnet motor construction stepper motors


Eine Reihe von Schrittmotoren, die wie Dauermagnetmotoren
ideally suited to the RS range of stepper motor drive cards. These are
konstruiert sind und sich hervorragend für die Schrittmotor-
easily interfaced with simple low power electronics thus providing
Treiberplatinen der RS Serie eignen. Diese Schrittmotoren lassen sich
economical means of motion and speed control. Due to their
problemlos an einfache Kleinleistungselektronik anschließen und
permanent magnet rotors these motors have a breaking torque even
bieten so eine wirtschaftliche Lösung zur Steuerung von Bewegung
when not energised. This is the detent (residual) torque which is a
und Drehzahl. Aufgrund der Konstruktion mit Dauermagnetrotoren
useful feature for postional integrity.
haben diese Schrittmotoren auch dann ein Bremsmoment, wenn Sie
nicht erregt werden. Hierbei handelt es sich um das Halte- oder
Step sequence (full step) Restdrehmoment, das sich vorteilhaft auf die Positionsgenauigkeit
Start position Step no. 1 2 3 4 auswirkt.
(arbitary) ON OFF OFF ON
1 ON OFF ON OFF Anti-
Schrittfolge (Vollschritt)
(arbitary) 2 OFF ON ON OFF clockwise
Schritt- 1 2 3 4
3 OFF ON OFF ON Startposition
Above Nr.
4 ON OFF OFF ON (willkürlich)
sequence Clockwise EIN AUS AUS EIN
5 ON OFF ON OFF Linkslauf
repeating 1 EIN AUS EIN AUS
(willkürlich) 2 AUS EIN EIN AUS
3 AUS EIN AUS EIN
Step sequence (half step) Wiederholung Rechtslauf
4 EIN AUS AUS EIN
Step no. 1 2 3 4 obiger Folge 5 EIN AUS EIN AUS
Start position ON OFF ON OFF
1 ON OFF OFF OFF
2 ON OFF OFF ON Schrittfolge (Halbschritt)
3 OFF OFF OFF ON Anti-
clockwise Schritt- 1 2 3 4
4 OFF ON OFF ON
Nr.
5 OFF ON OFF OFF Startposition
Above EIN AUS EIN AUS
6 OFF ON ON OFF
sequence Clockwise 1 EIN AUS EIN AUS
7 OFF ON OFF OFF Linkslauf
repeating 2 EIN AUS AUS EIN
8 ON OFF ON OFF
3 AUS AUS AUS EIN
9
4 AUS EIN AUS EIN
5 AUS EIN AUS AUS Rechtslauf
RS Components shall not be liable for any liability or loss of any nature (howsoever 6 AUS EIN EIN AUS
caused and whether or not due to RS Components’ negligence) which may result Wiederholung 7 AUS AUS EIN AUS
from the use of any information provided in RS technical literature. obiger Folge 8 EIN AUS EIN AUS
9

RS Components haftet nicht für Verbindlichkeiten oder Schäden jedweder Art (ob auf
Fahrlässigkeit von RS Components zurückzuführen oder nicht), die sich aus der
Nutzung irgendwelcher der in den technischen Veröffentlichungen von RS
enthaltenen Informationen ergeben.

9
V8963

Código RS. Code commande RS.

Ángulo de paso: 7,50˚ Par de retención (mNm) Angle de pas de 7,5° Couple statique (mNm)
20mNm 440-262 20 mNm 440-262
52mNm 440-284 52 mNm 440-284
155mNm 440-290 155 mNm 440-290
240mNm 440-307 240 mNm 440-307
Ángulo de paso: 15˚ Par de retención (mNm) Angle de pas de 15° Couple statique (mNm)
14,5mNm 199-863 14,5mNm 199-863
Se trata de una serie de motores paso a paso de imán permanente, Gamme de moteurs pas à pas à aimant permanent, idéaux pour les
ideales para la gama de tarjetas controladoras de motores paso a paso cartes d’entraînement à moteur pas à pas RS. Ces moteurs
RS. Pueden interconectarse facilmente con sistemas electrónicos s’interfacent facilement sur les circuits électroniques simples à basse
sencillos para lograr un sistema económico de control de velocidad y puissance, ce qui permet de contrôler de façon économique le
movimiento. Debido a sus rotores de imán permanente, estos motores déplacement et la vitesse. Grâce à leur rotor à aimant permanent, ces
tienen par de frenado aunque no estén bajo tensión. Este par de moteurs exercent un couple de rupture même lorsqu’ils ne sont pas
retención (residual) se caracteriza por su utilidad en la integridad de sous tension. Il s’agit du couple de détente (résiduel), qui est utile pour
posicionado. assurer l’intégrité du positionnement.

Secuencia de pasos (pasos enteros) Séquence de pas (pas complet)


Posición Position de Pas no. 1 2 3 4
de partida Paso no. 1 2 3 4
départ MARCHE ARRÊT ARRÊT MARCHE
(arbitrario) ON OFF OFF ON en el sentido (arbitraire) 1 MARCHE ARRÊT MARCHE ARRÊT Sens
1 ON OFF ON OFF contrario a las 2 ARRÊT MARCHE MARCHE ARRÊT anti-
2 OFF ON ON OFF agujas del reloj
(arbitrario) (arbitraire) 3 ARRÊT MARCHE ARRÊT MARCHE horaire
3 OFF ON OFF ON
4 MARCHE ARRÊT ARRÊT MARCHE
se repite la 4 ON OFF OFF ON
Répétition 5 MARCHE ARRÊT MARCHE ARRÊT
secuencia 5 ON OFF ON OFF en el mismo de la Sens
anterior agujas del reloj séquence horaire
sentido que las ci-dessus

Secuencia de pasos (medios pasos) Séquence de pas (demi-pas)


Posición Paso no. 1 2 3 4
Pas no. 1 2 3 4
de partida ON OFF ON OFF Position MARCHE ARRÊT MARCHE ARRÊT
1 ON OFF OFF OFF en el sentido de départ Sens
1 MARCHE ARRÊT ARRÊT ARRÊT
2 ON OFF OFF ON contrario a las anti-
2 MARCHE ARRÊT ARRÊT MARCHE
3 OFF OFF OFF ON agujas del reloj 3 ARRÊT ARRÊT ARRÊT MARCHE horaire
4 OFF ON OFF ON 4 ARRÊT MARCHE ARRÊT MARCHE
5 OFF ON OFF OFF 5 ARRÊT MARCHE ARRÊT ARRÊT
6 OFF ON ON OFF en el mismo Répétition 6 ARRÊT MARCHE MARCHE ARRÊT Sens
Se repite la 7 OFF ON OFF OFF sentido que las de la 7 ARRÊT MARCHE ARRÊT ARRÊT horaire
secuencia 8 ON OFF ON OFF agujas del reloj séquence 8 MARCHE ARRÊT MARCHE ARRÊT
anterior 9 ci-dessus 9

RS Components no será responsable de ningún daño o responsabilidad de cualquier La société RS Components n’est pas responsable des dettes ou pertes de quelle que
naturaleza (cualquiera que fuese su causa y tanto si hubiese mediado negligencia de nature que ce soit (quelle qu’en soit la cause ou qu’elle soit due ou non à la
RS Componentscomo si no) que pudiese derivar del uso de cualquier información négligence de la société RS Components) pouvant résulter de l’utilisation des
incluida en la documentación técnica de RS. informations données dans la documentation technique de RS.

10
V8963

RS Codici. RS Varenr
DK
Angolo passo 7,5° Coppia di tenuta (mNm) 7,5° stepvinkel Låsemoment (mNm)
20mNm 440-262 20mNm 440-262
52mNm 440-284 52mNm 440-284
155mNm 440-290 155mNm 440-290
240mNm 440-307 240mNm 440-307
Angolo passo 15° Coppia di tenuta (mNm) 15° stepvinkel Låsemoment (mNm)
14.5mNm 199-863 14,5mNm 199-863
Una gamma di motori passo-passo a magnete permanente Et sortiment af permamagnetstepmotorer, der er velegnede til RS-
particolarmente adatti per la gamma RS delle schede di controllo dei sortimentet af driverkort. De kobles nemt sammen med simpel
motori passo-passo. Sono facilmente interfacciati tramite semplici lavspændingselektronik og giver dermed økonomisk drivkraft og
circuiti elettronici a bassa potenza e forniscono un sistema economico hastighedsstyring. På grund af deres rotorer med permanente
di controllo del movimento e della velocità. Grazie ai rotori a magnete magneter har disse motorer et låsemoment, selv når de ikke er slået til.
permanente, questi motori sono dotati di una coppia frenante anche Det er dette bremse-(residual)moment, der er en nyttig funktion til
quando non sono eccitati. Si tratta di una coppia (residua) di fermo positionel integritet.
utile per la precisione posizionale.
Stepsekvens (helstep)
Sequenza di passi (passo intero) Startposition Stepantal. 1 2 3 4
Posizione di avvio (vilkårlig) TIL FRA FRA TIL
(arbitraria) Passo n. 1 2 3 4 1 TIL FRA TIL FRA Med uret
ON OFF OFF ON Senso 2 FRA TIL TIL FRA
1 ON OFF ON OFF antiorario (vilkårlig) 3 FRA TIL FRA TIL
(arbitraria) 2 OFF ON ON OFF 4 TIL FRA FRA TIL Mod uret
3 OFF ON OFF ON 5 TIL FRA TIL FRA
4 ON OFF OFF ON Senso Over
Ripetizione 5 ON OFF ON OFF orario sekvensgentagelse
della sequenza
Stepsekvens (halvstep)
Sequenza di passi (mezzo passo)
Stepantal. 1 2 3 4
Posizione di avvio Passo n. 1 2 3 4 Startposition TIL FRA TIL FRA
ON OFF ON OFF 1 TIL FRA FRA FRA
1 ON OFF OFF OFF Senso 2 TIL FRA FRA TIL Mod uret
2 ON OFF OFF ON antiorario 3 FRA FRA FRA TIL
3 OFF OFF OFF ON 4 FRA TIL FRA TIL
4 OFF ON OFF ON 5 FRA TIL FRA FRA Med uret
5 OFF ON OFF OFF Senso 6 FRA TIL TIL FRA
6 OFF ON ON OFF orario 7 FRA FRA TIL FRA
Ripetizione 7 OFF ON OFF OFF 8 TIL FRA TIL FRA
della sequenza 8 ON OFF ON OFF 9
9 Over
sekvensgentagelse

La RS Components non si assume alcuna responsabilità in merito a perdite di RS Components frasiger sig ethvert ansvar eller økonomisk tab (uanset årsag og
qualsiasi natura (di qualunque causa e indipendentemente dal fatto che siano dovute uanset, om dette måtte skyldes RS Components' uagtsomhed), der opstår, som følge
alla negligenza della RS Components), che possono risultare dall’uso delle af brugen af oplysningerne i RS’ tekniske materiale
informazioni fornite nella documentazione tecnica.

11
V8963

RS Voorraadnummer RS Lagernummber
NL SE
Staphoek 7,5° Houdmoment (mNm) Stegvinkel 7,5° Hållmoment
20 mNm 440-262 20 mNm 440-262
52 mNm 440-284 52 mNm 440-284
155 mNm 440-290 155 mNm 440-290
240 mNm 440-307 240 mNm 440-307
Staphoek 7,5° Houdmoment (mNm) Stegvinkel 15° Hållmoment
14,5 mNm 199-863 14,5 mNm 199-863

Een assortiment stappenmotoren met permanente magneten, bij Ett sortiment stegmotorer med permanentmagneter, idealiska för RS
uitstek geschikt voor het assortiment besturingskaarten voor stegmotordrivkort. Motorerna lämpar sig väl att koppla till enkel
stappenmotoren van RS. Deze motoren kunnen gemakkelijk worden elektronik med låg effekt och ger därmed en ekonomisk rörelse och
gekoppeld aan eenvoudige elektronische apparaten met een laag varvtalsreglering. På grund av sina permanentmagnetrotorer har dessa
vermogen en zorgen zo op een voordelige manier voor bewegings- en motorer ett bromsmoment också då de är spänningslösa. Detta
toerentalregeling. Dankzij de rotors met permanente magneten hebben (rest)bromsmoment är en mycket användbar egenskap för säker
deze motoren zelfs als ze niet zijn geactiveerd een remmoment. Dit is positionering.
het (rest)klinkmoment, wat een nuttige voorziening is voor de
positionele integriteit Stegsekvens (helsteg)
Startposition
Steg nr 1 2 3 4
Volgorde stappen (volledige stappen) (godtycklig)
På Av Av På
Startpositie Stapnummer. 1 2 3 4 1 På Av På Av
(willekeurig) (godtycklig)
Aan Uit Uit Aan 2 Av På På Av
Moturs
1 Aan Uit Aan Uit 3 Av På Av På
(willekeurig) 2 Uit Aan Aan Uit Linksom 4 På Av Av På
Sekvensen
3 Uit Aan Uit Aan 5 På Av På Av
Herhaling ovan Medurs
4 Aan Uit Uit Aan
bovenstaande Rechtsom upprepas
5 Aan Uit Aan Uit
volgorde
Stegsekvens (halvsteg)
Volgorde stappen (halve stappen) Steg nr 1 2 3 4
Stapnummer. 1 2 3 4 På Av På Av
Startpositie Startposition 1 På Av Av Av
Aan Uit Aan Uit
1 Aan Uit Uit Uit 2 På Av Av På
3 Av Av Av På Moturs
2 Aan Uit Uit Aan
3 Uit Uit Uit Aan Linksom 4 Av På Av På
4 Uit Aan Uit Aan 5 Av På Av Av
6 Av På På Av Medurs
5 Uit Aan Uit Uit
6 Uit Aan Aan Uit Rechtsom 7 Av Av På Av
Sekvensen 8 På Av På Av
7 Uit Aan Uit Uit
Herhaling ovan 9
8 Aan Uit Aan Uit
bovenstaande upprepas
9
volgorde

RS Components ska inte vara ansvarigt för någon som helst skuld eller förlust av
vilken art det vara må (hur denna än har orsakats och om den är orsakad av
RS Components accepteert geen aansprakelijkheid met betrekking tot enige
försumlighet från RS Components eller ej) som kan resultera från användning av
verantwoordelijkheid of enig verlies (door welke oorzaak dan ook en al of niet te wijten
någons som helst information som tillhandahålls i tekniska skrifter från RS
aan nalatigheid van de zijde van RS Components) die zou kunnen ontstaan in
Components.
verband met het gebruik van gegevens die in de technische documentatie van RS
Components zijn opgenomen.
Anexo D. Datasheet
Driver A4988
A4988
DMOS Microstepping Driver with Translator
And Overcurrent Protection
Features and Benefits Description
▪ Low RDS(ON) outputs The A4988 is a complete microstepping motor driver with
▪ Automatic current decay mode detection/selection built-in translator for easy operation. It is designed to operate
▪ Mixed and Slow current decay modes bipolar stepper motors in full-, half-, quarter-, eighth-, and
▪ Synchronous rectification for low power dissipation sixteenth-step modes, with an output drive capacity of up to
▪ Internal UVLO 35 V and ±2 A. The A4988 includes a fixed off-time current
▪ Crossover-current protection regulator which has the ability to operate in Slow or Mixed
▪ 3.3 and 5 V compatible logic supply decay modes.
▪ Thermal shutdown circuitry
▪ Short-to-ground protection The translator is the key to the easy implementation of the
▪ Shorted load protection A4988. Simply inputting one pulse on the STEP input drives
▪ Five selectable step modes: full, 1/2, 1/4, 1/8, and 1/16 the motor one microstep. There are no phase sequence tables,
high frequency control lines, or complex interfaces to program.
The A4988 interface is an ideal fit for applications where a
Package: complex microprocessor is unavailable or is overburdened.
28-contact QFN
with exposed thermal pad During stepping operation, the chopping control in the A4988
5 mm × 5 mm × 0.90 mm automatically selects the current decay mode, Slow or Mixed.
(ET package) In Mixed decay mode, the device is set initially to a fast decay
for a proportion of the fixed off-time, then to a slow decay for
the remainder of the off-time. Mixed decay current control
results in reduced audible motor noise, increased step accuracy,
and reduced power dissipation.

Continued on the next page…


Approximate size

Typical Application Diagram


VDD 0.1 µF 0.1 µF
0.22 µF

VREG ROSC CP1 CP2 VCP VBB1


0.22 µF
VDD 100 µF
VBB2
5 kΩ
Microcontroller or SLEEP OUT1A
Controller Logic
A4988 OUT1B
STEP
SENSE1
MS1
MS2
MS3
OUT2A
DIR
ENABLE OUT2B

RESET SENSE2

VREF GND GND

4988-DS, Rev. 5
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Description (continued)
Internal synchronous rectification control circuitry is provided The A4988 is supplied in a surface mount QFN package (ES), 5 mm
to improve power dissipation during PWM operation. Internal × 5 mm, with a nominal overall package height of 0.90 mm and an
circuit protection includes: thermal shutdown with hysteresis, exposed pad for enhanced thermal dissipation. It is lead (Pb) free
undervoltage lockout (UVLO), and crossover-current protection. (suffix –T), with 100% matte tin plated leadframes.
Special power-on sequencing is not required.

Selection Guide
Part Number Package Packing
A4988SETTR-T 28-contact QFN with exposed thermal pad 1500 pieces per 7-in. reel

Absolute Maximum Ratings


Characteristic Symbol Notes Rating Units
Load Supply Voltage VBB 35 V
Output Current IOUT ±2 A
Logic Input Voltage VIN –0.3 to 5.5 V
Logic Supply Voltage VDD –0.3 to 5.5 V
Motor Outputs Voltage –2.0 to 37 V
Sense Voltage VSENSE –0.5 to 0.5 V
Reference Voltage VREF 5.5 V
Operating Ambient Temperature TA Range S –20 to 85 ºC
Maximum Junction TJ(max) 150 ºC
Storage Temperature Tstg –55 to 150 ºC

Allegro MicroSystems, LLC 2


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Functional Block Diagram

0.22 µF 0.1 µF

VREG ROSC CP1 CP2

VDD Current Charge


OSC
Regulator Pump
VCP
0.1 µF
DMOS Full Bridge
VBB1
REF

DAC OUT1A

OUT1B

PWM Latch
Blanking OCP
Mixed Decay SENSE1
STEP
DIR Gate
Drive DMOS Full Bridge RS1
VBB2
RESET
Control
Translator
MS1 Logic
OUT2A
MS2 OCP
OUT2B
MS3

PWM Latch
ENABLE Blanking SENSE2
Mixed Decay
SLEEP
RS2
DAC

VREF

Allegro MicroSystems, LLC 3


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection
ELECTRICAL CHARACTERISTICS1 at TA = 25°C, VBB = 35 V (unless otherwise noted)
Characteristics Symbol Test Conditions Min. Typ.2 Max. Units
Output Drivers
Load Supply Voltage Range VBB Operating 8 – 35 V
Logic Supply Voltage Range VDD Operating 3.0 – 5.5 V
Source Driver, IOUT = –1.5 A – 320 430 mΩ
Output On Resistance RDSON
Sink Driver, IOUT = 1.5 A – 320 430 mΩ
Source Diode, IF = –1.5 A – – 1.2 V
Body Diode Forward Voltage VF
Sink Diode, IF = 1.5 A – – 1.2 V
fPWM < 50 kHz – – 4 mA
Motor Supply Current IBB
Operating, outputs disabled – – 2 mA
fPWM < 50 kHz – – 8 mA
Logic Supply Current IDD
Outputs off – – 5 mA
Control Logic
VIN(1) VDD×0.7 – – V
Logic Input Voltage
VIN(0) – – VDD×0.3 V
IIN(1) VIN = VDD×0.7 –20 <1.0 20 µA
Logic Input Current
IIN(0) VIN = VDD×0.3 –20 <1.0 20 µA
RMS1 MS1 pin – 100 – kΩ
Microstep Select RMS2 MS2 pin – 50 – kΩ
RMS3 MS3 pin – 100 – kΩ
Logic Input Hysteresis VHYS(IN) As a % of VDD 5 11 19 %
Blank Time tBLANK 0.7 1 1.3 μs
OSC = VDD or GND 20 30 40 μs
Fixed Off-Time tOFF
ROSC = 25 kΩ 23 30 37 μs
Reference Input Voltage Range VREF 0 – 4 V
Reference Input Current IREF –3 0 3 μA
VREF = 2 V, %ITripMAX = 38.27% – – ±15 %
Current Trip-Level Error3 errI VREF = 2 V, %ITripMAX = 70.71% – – ±5 %
VREF = 2 V, %ITripMAX = 100.00% – – ±5 %
Crossover Dead Time tDT 100 475 800 ns
Protection
Overcurrent Protection Threshold4 IOCPST 2.1 – – A
Thermal Shutdown Temperature TTSD – 165 – °C
Thermal Shutdown Hysteresis TTSDHYS – 15 – °C
VDD Undervoltage Lockout VDDUVLO VDD rising 2.7 2.8 2.9 V
VDD Undervoltage Hysteresis VDDUVLOHYS – 90 – mV
1For input and output current specifications, negative current is defined as coming out of (sourcing) the specified device pin.
2Typical data are for initial design estimations only, and assume optimum manufacturing and application conditions. Performance may vary for individual
units, within the specified maximum and minimum limits.
3V
ERR = [(VREF/8) – VSENSE] / (VREF/8).
4Overcurrent protection (OCP) is tested at T = 25°C in a restricted range and guaranteed by characterization.
A

Allegro MicroSystems, LLC 4


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

THERMAL CHARACTERISTICS
Characteristic Symbol Test Conditions* Value Units
Package Thermal Resistance RθJA Four-layer PCB, based on JEDEC standard 32 ºC/W

*Additional thermal information available on Allegro Web site.

Power Dissipation versus Ambient Temperature


4.00

3.50

3.00
Power Dissipation, PD (W)

2.50 R
θJ
A =
32
2.00 ºC
/W

1.50

1.00

0.50

0
20 40 60 80 100 120 140 160
Temperature, TA (°C)

Allegro MicroSystems, LLC 5


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

tA tB

STEP

tC tD

MS1, MS2, MS3,


RESET, or DIR

Time Duration Symbol Typ. Unit


STEP minimum, HIGH pulse width tA 1 μs
STEP minimum, LOW pulse width tB 1 μs
Setup time, input change to STEP tC 200 ns
Hold time, input change to STEP tD 200 ns
Figure 1: Logic Interface Timing Diagram

Table 1: Microstepping Resolution Truth Table


MS1 MS2 MS3 Microstep Resolution Excitation Mode
L L L Full Step 2 Phase
H L L Half Step 1-2 Phase
L H L Quarter Step W1-2 Phase
H H L Eighth Step 2W1-2 Phase
H H H Sixteenth Step 4W1-2 Phase

Allegro MicroSystems, LLC 6


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Functional Description

Device Operation. The A4988 is a complete microstepping the home position which is by default common to all step modes.
motor driver with a built-in translator for easy operation with
minimal control lines. It is designed to operate bipolar stepper Mixed Decay Operation. The bridge operates in Mixed
motors in full-, half-, quarter-, eighth, and sixteenth-step modes. decay mode, at power-on and reset, and during normal running
The currents in each of the two output full-bridges and all of the according to the ROSC configuration and the step sequence, as
N-channel DMOS FETs are regulated with fixed off-time PWM shown in Figures 9 through 13. During Mixed decay, when the
(pulse width modulated) control circuitry. At each step, the current trip point is reached, the A4988 initially goes into a fast decay
for each full-bridge is set by the value of its external current-sense mode for 31.25% of the off-time, tOFF . After that, it switches to
resistor (RS1 and RS2), a reference voltage (VREF), and the output Slow decay mode for the remainder of tOFF. A timing diagram for
voltage of its DAC (which in turn is controlled by the output of this feature appears on the next page.
the translator).
Typically, mixed decay is only necessary when the current in the
At power-on or reset, the translator sets the DACs and the phase winding is going from a higher value to a lower value as determined
current polarity to the initial Home state (shown in Figures 9 by the state of the translator. For most loads automatically-selected
through 13), and the current regulator to Mixed Decay Mode for mixed decay is convenient because it minimizes ripple when the
both phases. When a step command signal occurs on the STEP current is rising and prevents missed steps when the current is falling.
input, the translator automatically sequences the DACs to the For some applications where microstepping at very low speeds is
next level and current polarity. (See Table 2 for the current-level necessary, the lack of back EMF in the winding causes the current to
sequence.) The microstep resolution is set by the combined effect increase in the load quickly, resulting in missed steps. This is shown
of the MSx inputs, as shown in Table 1. in Figure 2. By pulling the ROSC pin to ground, mixed decay is set
When stepping, if the new output levels of the DACs are lower to be active 100% of the time, for both rising and falling currents, and
than their previous output levels, then the decay mode for the prevents missed steps as shown in Figure 3. If this is not an issue, it
active full-bridge is set to Mixed. If the new output levels of the is recommended that automatically-selected mixed decay be used,
DACs are higher than or equal to their previous levels, then the because it will produce reduced ripple currents. Refer to the Fixed
decay mode for the active full-bridge is set to Slow. This auto- Off-Time section for details.
matic current decay selection improves microstepping perfor- Low Current Microstepping. Intended for applications
mance by reducing the distortion of the current waveform that where the minimum on-time prevents the output current from
results from the back EMF of the motor. regulating to the programmed current level at low current steps.
Microstep Select (MSx). The microstep resolution is set by To prevent this, the device can be set to operate in Mixed decay
the voltage on logic inputs MSx, as shown in Table 1. The MS1 mode on both rising and falling portions of the current waveform.
and MS3 pins have a 100 kΩ pull-down resistance, and the MS2 This feature is implemented by shorting the ROSC pin to ground.
pin has a 50 kΩ pull-down resistance. When changing the step In this state, the off-time is internally set to 30 µs.
mode the change does not take effect until the next STEP rising
edge. Reset Input ( R̄¯ Ē
¯ S̄
¯ Ē
¯ T̄
¯ ). The R̄¯ Ē¯ S̄¯ Ē¯ T̄¯ input sets the translator
to a predefined Home state (shown in Figures 9 through 13), and
If the step mode is changed without a translator reset, and abso-
turns off all of the FET outputs. All STEP inputs are ignored until
lute position must be maintained, it is important to change the
¯ Ē
the R̄ ¯ S̄¯ Ē
¯ T̄
¯ input is set to high.
step mode at a step position that is common to both step modes in
order to avoid missing steps. When the device is powered down,
or reset due to TSD or an over current event the translator is set to Step Input (STEP). A low-to-high transition on the STEP

Allegro MicroSystems, LLC 7


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Slow Mixed Slow Mixed Slow Mixed Slow Mixed


Decay Decay Decay Decay Decay Decay Decay Decay

Missed
Step

Voltage on ROSC terminal 2 V/div.

Step input 10 V/div. t → , 1 s/div.

Figure 2: Missed Steps in Low-Speed Microstepping

Mixed Decay

No Missed
ILOAD 500 mA/div. Steps

Step input 10 V/div. t → , 1 s/div.

Figure 3: Continuous Stepping Using Automatically-Selected Mixed Stepping (ROSC pin grounded)

Allegro MicroSystems, LLC 8


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

input sequences the translator and advances the motor one incre- ▪ ROSC through a resistor to ground — off-time is determined
ment. The translator controls the input to the DACs and the direc- by the following formula, the decay mode is automatic Mixed
tion of current flow in each winding. The size of the increment is decay for all step modes except full step whic is set to slow
determined by the combined state of the MSx inputs. decay.
tOFF ≈ ROSC ⁄  825
Direction Input (DIR). This determines the direction of rota-
tion of the motor. Changes to this input do not take effect until the Where tOFF is in µs.
next STEP rising edge. Blanking. This function blanks the output of the current sense
comparators when the outputs are switched by the internal current
Internal PWM Current Control. Each full-bridge is con- control circuitry. The comparator outputs are blanked to prevent
trolled by a fixed off-time PWM current control circuit that limits false overcurrent detection due to reverse recovery currents of the
the load current to a desired value, ITRIP . Initially, a diagonal pair clamp diodes, and switching transients related to the capacitance
of source and sink FET outputs are enabled and current flows of the load. The blank time, tBLANK (µs), is approximately
through the motor winding and the current sense resistor, RSx. tBLANK ≈ 1 µs
When the voltage across RSx equals the DAC output voltage, the
current sense comparator resets the PWM latch. The latch then Shorted-Load and Short-to-Ground Protection.
turns off the appropriate source driver and initiates a fixed off If the motor leads are shorted together, or if one of the leads is
time decay mode shorted to ground, the driver will protect itself by sensing the
overcurrent event and disabling the driver that is shorted, protect-
The maximum value of current limiting is set by the selection of
ing the device from damage. In the case of a short-to-ground, the
RSx and the voltage at the VREF pin. The transconductance func- ¯ Ē
¯ ¯ P̄¯ input goes
device will remain disabled (latched) until the S̄ L̄ Ē
tion is approximated by the maximum value of current limiting,
high or VDD power is removed. A short-to-ground overcurrent
ITripMAX (A), which is set by event is shown in Figure 4.
ITripMAX = VREF / ( 8  × RS) When the two outputs are shorted together, the current path is
through the sense resistor. After the blanking time (≈1 µs) expires,
where RS is the resistance of the sense resistor (Ω) and VREF is the sense resistor voltage is exceeding its trip value, due to the
the input voltage on the REF pin (V). overcurrent condition that exists. This causes the driver to go into
a fixed off-time cycle. After the fixed off-time expires the driver
The DAC output reduces the VREF output to the current sense
turns on again and the process repeats. In this condition the driver
comparator in precise steps, such that
is completely protected against overcurrent events, but the short
is repetitive with a period equal to the fixed off-time of the driver.
Itrip = (%ITripMAX / 100) × ITripMAX This condition is shown in Figure 5.
(See Table 2 for %ITripMAX at each step.) During a shorted load event it is normal to observe both a posi-
It is critical that the maximum rating (0.5 V) on the SENSE1 and tive and negative current spike as shown in Figure 3, due to the
direction change implemented by the Mixed decay feature. This
SENSE2 pins is not exceeded.
is shown in Figure 6. In both instances the overcurrent circuitry is
Fixed Off-Time. The internal PWM current control circuitry protecting the driver and prevents damage to the device.
uses a one-shot circuit to control the duration of time that the
Charge Pump (CP1 and CP2). The charge pump is used to
DMOS FETs remain off. The off-time, tOFF, is determined by the generate a gate supply greater than that of VBB for driving the
ROSC terminal. The ROSC terminal has three settings: source-side FET gates. A 0.1 µF ceramic capacitor, should be
▪ ROSC tied to VDD — off-time internally set to 30 µs, decay connected between CP1 and CP2. In addition, a 0.1 µF ceramic
mode is automatic Mixed decay except when in full step where capacitor is required between VCP and VBB, to act as a reservoir
decay mode is set to Slow decay for operating the high-side FET gates.
▪ ROSC tied directly to ground — off-time internally set to Capacitor values should be Class 2 dielectric ±15% maximum,
30 µs, current decay is set to Mixed decay for both increasing or tolerance R, according to EIA (Electronic Industries Alliance)
and decreasing currents for all step modes. specifications.

Allegro MicroSystems, LLC 9


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

VREG (VREG). This internally-generated voltage is used to


operate the sink-side FET outputs. The nominal output voltage
5 A / div.
Fault
of the VREG terminal is 7 V. The VREG pin must be decoupled
with a 0.22 µF ceramic capacitor to ground. VREG is internally latched
monitored. In the case of a fault condition, the FET outputs of the
A4988 are disabled.
Capacitor values should be Class 2 dielectric ±15% maximum,
or tolerance R, according to EIA (Electronic Industries Alliance)
specifications.
Enable Input ( Ē¯ N̄¯ Ā¯ B̄¯ L̄¯ Ē¯ ). This input turns on or off all of the
FET outputs. When set to a logic high, the outputs are disabled. t→
When set to a logic low, the internal control enables the outputs
as required. The translator inputs STEP, DIR, and MSx, as well as Figure 4: Short-to-Ground Event
the internal sequencing logic, all remain active, independent of the
¯  N̄¯  Ā¯   B̄
Ē ¯ L̄
¯   Ē
¯ input state.

Shutdown. In the event of a fault, overtemperature (excess TJ)


or an undervoltage (on VCP), the FET outputs of the A4988 are 5 A / div.
disabled until the fault condition is removed. At power-on, the
UVLO (undervoltage lockout) circuit disables the FET outputs Fixed off-time
and resets the translator to the Home state.

Sleep Mode ( S̄¯ L̄¯ Ē¯ Ē¯ P̄¯  ). To minimize power consumption


when the motor is not in use, this input disables much of the
internal circuitry including the output FETs, current regulator,
¯ Ē
and charge pump. A logic low on the S̄ L̄ ¯ Ē
¯ P̄¯ pin puts the A4988
into Sleep mode. A logic high allows normal operation, as well as
start-up (at which time the A4988 drives the motor to the Home
microstep position). When emerging from Sleep mode, in order t→
to allow the charge pump to stabilize, provide a delay of 1 ms Figure 5. Shorted Load (OUTxA → OUTxB) in Slow Decay Mode
before issuing a Step command.

Mixed Decay Operation. The bridge operates in Mixed


Decay mode, depending on the step sequence, as shown in Fig-
ures 9 through 13. As the trip point is reached, the A4988 initially 5 A / div.
goes into a fast decay mode for 31.25% of the off-time, tOFF.
After that, it switches to Slow Decay mode for the remainder of Fixed off-time
tOFF. A timing diagram for this feature appears in Figure 7.

Synchronous Rectification. When a PWM-off cycle is


triggered by an internal fixed-off time cycle, load current recircu-
lates according to the decay mode selected by the control logic.
This synchronous rectification feature turns on the appropriate Fast decay portion
FETs during current decay, and effectively shorts out the body (direction change)
diodes with the low FET RDS(ON). This reduces power dissipation
significantly, and can eliminate the need for external Schottky t→
diodes in many applications. Synchronous rectification turns off Figure 6: Shorted Load (OUTxA → OUTxB) in Mixed Decay Mode
when the load current approaches zero (0 A), preventing reversal
of the load current.
Allegro MicroSystems, LLC 10
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection
VSTEP

100.00

70.71

See Enlargement A

IOUT 0

–70.71

–100.00

Enlargement A

toff

tFD tSD
IPEAK
Slow Decay

Mixed Decay
IOUT

Fa
st
De
ca
y

Symbol Characteristic
toff Device fixed off-time
IPEAK Maximum output current
tSD Slow decay interval
tFD Fast decay interval
IOUT Device output current

Figure 7: Current Decay Modes Timing Chart

Allegro MicroSystems, LLC 11


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Application Layout

Layout. The printed circuit board should use a heavy ground- The two input capacitors should be placed in parallel, and as
plane. For optimum electrical and thermal performance, the close to the device supply pins as possible. The ceramic capaci-
A4988 must be soldered directly onto the board. Pins 3 and 18 tor (CIN1) should be closer to the pins than the bulk capacitor
are internally fused, which provides a path for enhanced thermal (CIN2). This is necessary because the ceramic capacitor will be
dissipation. Theses pins should be soldered directly to an exposed responsible for delivering the high frequency current components.
surface on the PCB that connects to thermal vias are used to The sense resistors, RSx , should have a very low impedance
transfer heat to other layers of the PCB. path to ground, because they must carry a large current while
supporting very accurate voltage measurements by the current
In order to minimize the effects of ground bounce and offset
issues, it is important to have a low impedance single-point sense comparators. Long ground traces will cause additional
ground, known as a star ground, located very close to the device. voltage drops, adversely affecting the ability of the comparators
By making the connection between the pad and the ground plane to accurately measure the current in the windings. The SENSEx
directly under the A4988, that area becomes an ideal location for pins have very short traces to the RSx resistors and very thick,
a star ground point. A low impedance ground will prevent ground low impedance traces directly to the star ground underneath the
bounce during high current operation and ensure that the supply device. If possible, there should be no other components on the
voltage remains stable at the input terminal. sense circuits.

Solder
A4988
Trace (2 oz.)
Signal (1 oz.)
Ground (1 oz.)
PCB
Thermal (2 oz.)

Thermal Vias

RS1 RS2
C7 C9 VBB
C2
OUT2A

OUT1A
VBB2
SENSE2

NC

SENSE1
VBB1

1
OUT2B OUT1B
ENABLE A4988 NC

PAD DIR
GND
CP1
C3 GND R3
CP2 REF
C4
VCP STEP R2
NC VDD
VDD
RESET

SLEEP
ROSC
VREG
MS1
MS2
MS3

C1 C8

C6 R6
R1

Figure 8: Typical Application and Circuit Layout

Allegro MicroSystems, LLC 12


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Pin Circuit Diagrams

VDD VBB VBB VCP CP1 CP2

8V 40 V

GND GND GND

PGND GND
8V

GND GND GND

MS1
VBB MS2 VBB
MS3 OUT
VREG SENSE VREG DIR
VREF DMOS
ROSC Parasitic
DMOS 8V
10 V SLEEP DMOS
Parasitic
Parasitic
GND GND GND GND GND

Allegro MicroSystems, LLC 13


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection
RESET
STEP
STEP 100.00
Mixed*
100.00
Mixed* 70.71

70.71 Slow Slow Slow


Phase 1 Mixed Mixed Mixed
Slow
Phase 1 IOUT1A 0.00
IOUT1A 0.00 Direction = H

Home Microstep Position

Home Microstep Position


Direction = H (%)
Home Microstep Position

Home Microstep Position


(%)
–70.71
–70.71
–100.00
–100.00

100.00
100.00 Mixed*
70.71
70.71
Slow Slow Slow Slow
Phase 2 Phase 2 Mixed Mixed Mixed
IOUT2A IOUT2B
0.00 0.00
Direction = H Direction = H
(%) (%)

–70.71 –70.71

–100.00
–100.00
*With ROSC pin tied to GND
*With ROSC pin tied to GND
DIR= H DIR= H
Figure 9: Decay Mode for Full-Step Increments Figure 10: Decay Modes for Half-Step Increments

STEP
100.00
92.39

70.71
Mixed*
38.27
Phase 1
Slow Mixed Slow Mixed Slow
IOUT1A
0.00
Direction = H
Home Microstep Position

(%) –38.27

–70.71
–92.39
–100.00

100.00
92.39

70.71 Mixed*

38.27 Slow
Phase 2
Mixed Slow Mixed Slow Mixed
IOUT2B
0.00
Direction = H
(%) –38.27

–70.71
–92.39
–100.00

*With ROSC pin tied to GND

DIR= H
Figure 11: Decay Modes for Quarter-Step Increments

Allegro MicroSystems, LLC 14


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

STEP
100.00
92.39
83.15
70.71
55.56
38.27 Mixed*
Phase 1
19.51
IOUT1A Slow Mixed Slow Mixed
0.00
Direction = H –19.51
Home Microstep Position

(%) –38.27
–55.56
–70.71
–83.15
–92.39
–100.00

100.00
92.39
83.15
70.71
55.56
38.27 Mixed*
Phase 2 19.51
IOUT2B Mixed Slow Mixed Slow
0.00
Direction = H –19.51
(%) –38.27
–55.56
–70.71
–83.15
–92.39
–100.00
*With ROSC pin tied to GND

DIR= H

Figure 12: Decay Modes for Eighth-Step Increments

Allegro MicroSystems, LLC 15


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

STEP
100.00
95.69
88.19
83.15
77.30
70.71
63.44
55.56

47.14
Mixed*
38.27

29.03

19.51

Phase 1 9.8
IOUT1A Slow Mixed Slow Mixed
0.00
Direction = H –9.8
(%)
–19.51

–29.03

–38.27
Home Microstep Position

–47.14

–55.56
–63.44
–70.71
–77.30
–83.15
–88.19
–95.69
–100.00

100.00
95.69
88.19
83.15
77.30
70.71
63.44
55.56

47.14
Mixed*
38.27

29.03

19.51
Slow
Phase 2 9.8
IOUT2B Mixed Slow Mixed Slow
0.00
Direction = H
–9.8
(%)
–19.51

–29.03

–38.27

–47.14

–55.56
–63.44
–70.71
–77.30
–83.15
–88.19
–95.69
–100.00
*With ROSC pin tied to GND

DIR= H

Figure 13: Decay Modes for Sixteenth-Step Increments

Allegro MicroSystems, LLC 16


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Table 2: Step Sequencing Settings


Home microstep position at Step Angle 45º; DIR = H

Phase 1 Phase 2 Phase 1 Phase 2


Full Half 1/4 1/8 1/16 Current Current Step Full Half 1/4 1/8 1/16 Current Current Step
Step Step Step Step Step [% ItripMax] [% ItripMax] Angle Step Step Step Step Step [% ItripMax] [% ItripMax] Angle
# # # # # (%) (%) (º) # # # # # (%) (%) (º)
1 1 1 1 100.00 0.00 0.0 5 9 17 33 –100.00 0.00 180.0
2 99.52 9.80 5.6 34 –99.52 –9.80 185.6
2 3 98.08 19.51 11.3 18 35 –98.08 –19.51 191.3
4 95.69 29.03 16.9 36 –95.69 –29.03 196.9
2 3 5 92.39 38.27 22.5 10 19 37 –92.39 –38.27 202.5
6 88.19 47.14 28.1 38 –88.19 –47.14 208.1
4 7 83.15 55.56 33.8 20 39 –83.15 –55.56 213.8
8 77.30 63.44 39.4 40 –77.30 –63.44 219.4
1 2 3 5 9 70.71 70.71 45.0 3 6 11 21 41 –70.71 –70.71 225.0
10 63.44 77.30 50.6 42 –63.44 –77.30 230.6
6 11 55.56 83.15 56.3 22 43 –55.56 –83.15 236.3
12 47.14 88.19 61.9 44 –47.14 –88.19 241.9
4 7 13 38.27 92.39 67.5 12 23 45 –38.27 –92.39 247.5
14 29.03 95.69 73.1 46 –29.03 –95.69 253.1
8 15 19.51 98.08 78.8 24 47 –19.51 –98.08 258.8
16 9.80 99.52 84.4 48 –9.80 –99.52 264.4
3 5 9 17 0.00 100.00 90.0 7 13 25 49 0.00 –100.00 270.0
18 –9.80 99.52 95.6 50 9.80 –99.52 275.6
10 19 –19.51 98.08 101.3 26 51 19.51 –98.08 281.3
20 –29.03 95.69 106.9 52 29.03 –95.69 286.9
6 11 21 –38.27 92.39 112.5 14 27 53 38.27 –92.39 292.5
22 –47.14 88.19 118.1 54 47.14 –88.19 298.1
12 23 –55.56 83.15 123.8 28 55 55.56 –83.15 303.8
24 –63.44 77.30 129.4 56 63.44 –77.30 309.4
2 4 7 13 25 –70.71 70.71 135.0 4 8 15 29 57 70.71 –70.71 315.0
26 –77.30 63.44 140.6 58 77.30 –63.44 320.6
14 27 –83.15 55.56 146.3 30 59 83.15 –55.56 326.3
28 –88.19 47.14 151.9 60 88.19 –47.14 331.9
8 15 29 –92.39 38.27 157.5 16 31 61 92.39 –38.27 337.5
30 –95.69 29.03 163.1 62 95.69 –29.03 343.1
16 31 –98.08 19.51 168.8 32 63 98.08 –19.51 348.8
32 –99.52 9.80 174.4 64 99.52 –9.80 354.4

Allegro MicroSystems, LLC 17


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Pin-out Diagram

27 SENSE2

23 SENSE1
26 OUT2A

24 OUT1A
28 VBB2

22 VBB1
25 NC
OUT2B 1 21 OUT1B
ENABLE 2 20 NC
GND 3 19 DIR
CP1 4 PAD 18 GND
CP2 5 17 REF
VCP 6 16 STEP
NC 7 15 VDD

MS2 10

RESET 12
ROSC 13
SLEEP 14
MS3 11
8
9
VREG
MS1
Terminal List Table
Name Number Description
CP1 4 Charge pump capacitor terminal
CP2 5 Charge pump capacitor terminal
VCP 6 Reservoir capacitor terminal
VREG 8 Regulator decoupling terminal
MS1 9 Logic input
MS2 10 Logic input
MS3 11 Logic input
R̄¯ Ē
¯ S̄
¯ Ē
¯ T̄
¯ 12 Logic input
ROSC 13 Timing set
S̄¯ L̄¯ Ē
¯ Ē
¯ P̄
¯  14 Logic input
VDD 15 Logic supply
STEP 16 Logic input
REF 17 Gm reference voltage input
GND 3, 18 Ground*
DIR 19 Logic input
OUT1B 21 DMOS Full Bridge 1 Output B
VBB1 22 Load supply
SENSE1 23 Sense resistor terminal for Bridge 1
OUT1A 24 DMOS Full Bridge 1 Output A
OUT2A 26 DMOS Full Bridge 2 Output A
SENSE2 27 Sense resistor terminal for Bridge 2
VBB2 28 Load supply
OUT2B 1 DMOS Full Bridge 2 Output B
¯ N̄¯ Ā
Ē ¯ B̄
¯ L̄¯ Ē¯ 2 Logic input
NC 7, 20, 25 No connection
PAD – Exposed pad for enhanced thermal dissipation*
*The GND pins must be tied together externally by connecting to the PAD ground plane
under the device.

Allegro MicroSystems, LLC 18


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

ET Package, 28-Pin QFN with Exposed Thermal Pad


0.30
5.00 ±0.15
1.15 28 0.50
28

1
2 A 1

5.00 ±0.15 3.15 4.80

3.15
29X D C
SEATING 4.80
0.08 C PLANE
+0.05 C PCB Layout Reference View
0.25 –0.07 0.90 ±0.10
0.50

For Reference Only; not for tooling use


(reference JEDEC MO-220VHHD-1)
Dimensions in millimeters
Exact case and lead configuration at supplier discretion within limits shown
0.73 MAX
B A Terminal #1 mark area
3.15 B Exposed thermal pad (reference only, terminal #1
identifier appearance at supplier discretion)
2
1 C Reference land pattern layout (reference IPC7351
QFN50P500X500X100-29V1M);
All pads a minimum of 0.20 mm from all adjacent pads; adjust as
28
necessary to meet application process requirements and PCB layout
3.15 tolerances; when mounting on a multilayer PCB, thermal vias at the
exposed thermal pad land can improve thermal dissipation (reference
EIA/JEDEC Standard JESD51-5)
D Coplanarity includes exposed thermal pad and terminals

Allegro MicroSystems, LLC 19


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
A4988 DMOS Microstepping Driver with Translator
And Overcurrent Protection

Revision History
Revision Revision Date Description of Revision
4 January 27, 2012 Update IOCPST
5 May 7, 2014 Revised text on pg. 9; revised Figure 8 and Table 2

Copyright ©2009-2014, Allegro MicroSystems, LLC


Allegro MicroSystems, LLC reserves the right to make, from time to time, such departures from the detail specifications as may be required to
permit improvements in the performance, reliability, or manufacturability of its products. Before placing an order, the user is cautioned to verify that
the information being relied upon is current.
Allegro’s products are not to be used in any devices or systems, including but not limited to life support devices or systems, in which a failure of
Allegro’s product can reasonably be expected to cause bodily harm.
The information included herein is believed to be accurate and reliable. However, Allegro MicroSystems, LLC assumes no responsibility for its
use; nor for any infringement of patents or other rights of third parties which may result from its use.

For the latest version of this document, visit our website:


www.allegromicro.com

Allegro MicroSystems, LLC 20


115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
Anexo E. Datasheet
Arduino UNO
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a
USB connection, a power jack, an ICSP header, 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 a AC-to-DC
adapter or battery to get started. The Uno differs from all preceding boards in that it does not use the FTDI
USB-to-serial driver chip. Instead, it features the Atmega8U2 programmed as a USB-to-serial converter.

"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and version
1.0 will be the reference versions of Arduno, moving forward. The Uno is the latest in a series of USB
Arduino boards, and the reference model for the Arduino platform; for a comparison with previous versions,
see the index of Arduino boards.
EAGLE files: arduino-duemilanove-uno-design.zip Schematic: arduino-uno-schematic.pdf

Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
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
32 KB of which 0.5 KB used by
Flash Memory
bootloader
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
The Arduino Uno can be powered via the USB connection or with an external power supply. The power
source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter
can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a
battery can be inserted in the Gnd and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V
pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

The power pins are as follows:

• VIN. The input voltage to the Arduino board when it's using an external power source (as opposed to
5 volts from the USB connection or other regulated power source). You can supply voltage through
this pin, or, if supplying voltage via the power jack, access it through this pin.
• 5V. The regulated power supply used to power the microcontroller and other components on the
board. This can come either from VIN via an on-board regulator, or be supplied by USB or another
regulated 5V supply.
• 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
• GND. Ground pins.

The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used for the bootloader); It
has also 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).

Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(), digitalWrite(), and
digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and
has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have
specialized functions:

• Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. TThese pins are
connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip .
• External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a
rising or falling edge, or a change in value. See the attachInterrupt() function for details.
• PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
• SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which,
although provided by the underlying hardware, is not currently included in the Arduino language.

• LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is
on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By
default they measure from ground to 5 volts, though is it possible to change the upper end of their range
using the AREF pin and the analogReference() function. Additionally, some pins have specialized
functionality:

• I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library.

There are a couple of other pins on the board:

• AREF. Reference voltage for the analog inputs. Used with analogReference().
• Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to
shields which block the one on the board.

See also the mapping between Arduino pins and Atmega328 ports.

The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other
microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on
digital pins 0 (RX) and 1 (TX). An ATmega8U2 on the board channels this serial communication over USB
and appears as a virtual com port to software on the computer. The '8U2 firmware uses the standard USB
COM drivers, and no external driver is needed. However, on Windows, an *.inf file is required..

The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the
Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-
serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.

The ATmega328 also support I2C (TWI) and SPI communication. The Arduino software includes a Wire
library to simplify use of the I2C bus; see the documentation for details. To use the SPI communication,
please see the ATmega328 datasheet.

The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino Uno w/
ATmega328" from the Tools > Board menu (according to the microcontroller on your board). For details,
see the reference and tutorials.

The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to upload new code
to it without the use of an external hardware programmer. It communicates using the original STK500
protocol (reference, C header files).

You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial
Programming) header; see these instructions for details.

The ATmega8U2 firmware source code is available . The ATmega8U2 is loaded with a DFU bootloader,
which can be activated by connecting the solder jumper on the back of the board (near the map of Italy) and
then resetting the 8U2. You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac
OS X and Linux) to load a new firmware. Or you can use the ISP header with an external programmer
(overwriting the DFU bootloader).
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a
way that allows it to be reset by software running on a connected computer. One of the hardware flow control
lines (DTR) of the ATmega8U2 is connected to the reset line of the ATmega328 via a 100 nanofarad
capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The
Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the
Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR
can be well-coordinated with the start of the upload.

This setup has other implications. When the Uno is connected to either a computer running Mac OS X or
Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or
so, the bootloader is running on the Uno. While it is programmed to ignore malformed data (i.e. anything
besides an upload of new code), it will intercept the first few bytes of data sent to the board after a
connection is opened. If a sketch running on the board receives one-time configuration or other data when it
first starts, make sure that the software with which it communicates waits a second after opening the
connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can
be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset
by connecting a 110 ohm resistor from 5V to the reset line; see this forum thread for details.

The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and
overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer
of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection
until the short or overload is removed.

The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB connector
and power jack extending beyond the former dimension. Three screw holes allow the board to be attached to
a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple
of the 100 mil spacing of the other pins.
Arduino can sense the environment by receiving input from a variety of sensors and can affect its
surroundings by controlling lights, motors, and other actuators. The microcontroller on the board is
programmed using the Arduino programming language (based on Wiring) and the Arduino
development environment (based on Processing). Arduino projects can be stand-alone or they can
communicate with software on running on a computer (e.g. Flash, Processing, MaxMSP).

Arduino is a cross-platoform program. You’ll have to follow different instructions for your personal
OS. Check on the Arduino site for the latest instructions. http://arduino.cc/en/Guide/HomePage

Once you have downloaded/unzipped the arduino IDE, you can Plug the Arduino to your PC via USB cable.

Now you’re actually ready to “burn” your


first program on the arduino board. To
select “blink led”, the physical translation
of the well known programming “hello
world”, select

File>Sketchbook>
Arduino-0017>Examples>
Digital>Blink

Once you have your skecth you’ll


see something very close to the
screenshot on the right.

In Tools>Board select

Now you have to go to


Tools>SerialPort
and select the right serial port, the
one arduino is attached to.
1. Warranties

1.1 The producer warrants that its products will conform to the Specifications. This warranty lasts for one (1) years from the date of the sale. The
producer shall not be liable for any defects that are caused by neglect, misuse or mistreatment by the Customer, including improper installation or testing,
or for any products that have been altered or modified in any way by a Customer. Moreover, The producer shall not be liable for any defects that result from
Customer's design, specifications or instructions for such products. Testing and other quality control techniques are used to the extent the producer deems
necessary.

1.2 If any products fail to conform to the warranty set forth above, the producer's sole liability shall be to replace such products. The producer's liability
shall be limited to products that are determined by the producer not to conform to such warranty. If the producer elects to replace such products, the
producer shall have a reasonable time to replacements. Replaced products shall be warranted for a new full warranty period.

1.3 EXCEPT AS SET FORTH ABOVE, PRODUCTS ARE PROVIDED "AS IS" AND "WITH ALL FAULTS." THE PRODUCER DISCLAIMS ALL OTHER
WARRANTIES, EXPRESS OR IMPLIED, REGARDING PRODUCTS, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE

1.4 Customer agrees that prior to using any systems that include the producer products, Customer will test such systems and the functionality of the
products as used in such systems. The producer may provide technical, applications or design advice, quality characterization, reliability data or other
services. Customer acknowledges and agrees that providing these services shall not expand or otherwise alter the producer's warranties, as set forth
above, and no additional obligations or liabilities shall arise from the producer providing such services.

1.5 The Arduino products are not authorized for use in safety-critical applications where a failure of the product would reasonably be expected to cause
severe personal injury or death. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the
operation of nuclear facilities and weapons systems. Arduino products are neither designed nor intended for use in military or aerospace applications or
environments and for automotive applications or environment. Customer acknowledges and agrees that any such use of Arduino products which is solely
at the Customer's risk, and that Customer is solely responsible for compliance with all legal and regulatory requirements in connection with such use.

1.6 Customer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements concerning its
products and any use of Arduino products in Customer's applications, notwithstanding any applications-related information or support that may be
provided by the producer.

2. Indemnification

The Customer acknowledges and agrees to defend, indemnify and hold harmless the producer from and against any and all third-party losses, damages,
liabilities and expenses it incurs to the extent directly caused by: (i) an actual breach by a Customer of the representation and warranties made under this
terms and conditions or (ii) the gross negligence or willful misconduct by the Customer.

3. Consequential Damages Waiver

In no event the producer shall be liable to the Customer or any third parties for any special, collateral, indirect, punitive, incidental, consequential or
exemplary damages in connection with or arising out of the products provided hereunder, regardless of whether the producer has been advised of the
possibility of such damages. This section will survive the termination of the warranty period.

4. Changes to specifications

The producer may make changes to specifications and product descriptions at any time, without notice. The Customer must not rely on the absence or
characteristics of any features or instructions marked "reserved" or "undefined." The producer reserves these for future definition and shall have no
responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The product information on the Web Site or Materials is
subject to change without notice. Do not finalize a design with this information.

The producer of Arduino has joined the Impatto Zero®


policy of LifeGate.it. For each Arduino board produced is
created / looked after half squared Km of Costa Rica’s
forest’s.
Anexo F. Datasheet
Módulo HC-06
Guangzhou HC Information Technology Co., Ltd.

Guangzhou HC Information Technology Co., Ltd.

Product Data Sheet

Module Data Sheet


Rev 1
1.0 2.0 2.1 2.2
2006/6/18 2006/9/6 2010/4/22 2011/4/6

MODEL :
DRAWN BY : Ling Xin HC-06

Description::
CHECKED BY : Eric Huang BC04 has external 8M Flash and EDR module
HC-06 is industrial, and compatible with civil HC-04

APPD. BY: Simon Mok REV: 2.0 Page :

Former version
HC-06 is the higher version of LV_BC_2.0. Linvor is the former of wavesen.
introduction

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

Contents
1. Product’s picture

2. Feature

3. Pins description

4. The parameters and mode of product

5. Block diagram

6. Debugging device

7. Characteristic of test

8. Test diagram

9. AT command set

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

1. Product’s picture

Figure 1 A Bluetooth module

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

Figure 2. A Bluetooth module size

Figure 3 50 pieces chips in an anti-static blister package.

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

2. Feature
 Wireless transceiver
 Sensitivity (Bit error rate) can reach -80dBm.
 The change range of output’s power: -4 - +6dBm.
 Function description (perfect Bluetooth solution)
 Has an EDR module; and the change range of modulation depth: 2Mbps - 3Mbps.
 Has a build-in 2.4GHz antenna; user needn’t test antenna.
 Has the external 8Mbit FLASH
 Can work at the low voltage (3.1V~4.2V). The current in pairing is in the range of 30~40mA.
The current in communication is 8mA.
 Standard HCI Port (UART or USB)
 USB Protocol: Full Speed USB1.1, Compliant With 2.0
 This module can be used in the SMD.
 It’s made through RoHS process.
 The board PIN is half hole size.
 Has a 2.4GHz digital wireless transceiver.
 Bases at CSR BC04 Bluetooth technology.
 Has the function of adaptive frequency hopping.
 Small (27mm×13mm×2mm)
 Peripherals circuit is simple.
 It’s at the Bluetooth class 2 power level.
 Storage temperature range: -40 ℃ - 85℃,work temperature range: -25 ℃ - +75℃
 Any wave inter Interference: 2.4MHz,the power of emitting: 3 dBm.
 Bit error rate: 0. Only the signal decays at the transmission link, bit error may be produced. For
example, when RS232 or TTL is being processed, some signals may decay.

 Low power consumption


 Has high-performance wireless transceiver system
 Low Cost
www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574
Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

 Application fields:
 Bluetooth Car Handsfree Device
 Bluetooth GPS
 Bluetooth PCMCIA , USB Dongle
 Bluetooth Data Transfer
 Software
 CSR

3.PINs description

Figure 3 PIN configuration


The PINs at this block diagram is as same as the physical one.
PIN Name PIN # Pad type Description Note
GND 13 21 22 VSS Ground pot
Integrated 1.8V (+) supply with
1V8 14 VDD On-chip linear regulator output
within 1.7-1.9V
VCC 12 3.3V
AIO0 9 Bi-Directional Programmable input/output line
AIO1 10 Bi-Directional Programmable input/output line
www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574
Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

Bi-Directional Programmable input/output line,


PIO0 23
RX EN control output for LNA(if fitted)
Bi-Directional Programmable input/output line,
PIO1 24
TX EN control output for PA(if fitted)
PIO2 25 Bi-Directional Programmable input/output line
PIO3 26 Bi-Directional Programmable input/output line
PIO4 27 Bi-Directional Programmable input/output line
PIO5 28 Bi-Directional Programmable input/output line
PIO6 29 Bi-Directional Programmable input/output line CLK_REQ
PIO7 30 Bi-Directional Programmable input/output line CLK_OUT
PIO8 31 Bi-Directional Programmable input/output line
PIO9 32 Bi-Directional Programmable input/output line
PIO10 33 Bi-Directional Programmable input/output line
PIO11 34 Bi-Directional Programmable input/output line
CMOS Input with
RESETB 11 weak intemal
pull-down
CMOS output,
UART_RTS 4 tri-stable with weak UART request to send, active low
internal pull-up
CMOS input with
UART_CTS 3 weak internal UART clear to send, active low
pull-down
CMOS input with
UART_RX 2 weak internal UART Data input
pull-down
CMOS output,
Tri-stable with
UART_TX 1 UART Data output
weak internal
pull-up
CMOS input with
SPI_MOSI 17 weak internal Serial peripheral interface data input
pull-down
CMOS input with Chip select for serial peripheral
SPI_CSB 16
weak internal interface, active low

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

pull-up
CMOS input with
SPI_CLK 19 weak internal Serial peripheral interface clock
pull-down
CMOS input with
Serial peripheral interface data
SPI_MISO 18 weak internal
Output
pull-down

USB_- 15 Bi-Directional

USB_+ 20 Bi-Directional

Default :
1.8V
1.8V 14 1.8V external power supply input
internal powe
r supply.

PCM_CLK 5 Bi-Directional

PCM_OUT 6 CMOS output

PCM_IN 7 CMOS Input

PCM_SYNC 8 Bi-Directional

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

4. The parameters and mode of product

If you want more information, please visit www.wavesen.com.

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

5. Block diagram

Figure 5 Block diagram 1

Figure 5 Block diagram 2

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

HC-04/06 master device has a function of remembering the last paired slave device. As a master
device, it will search the last paired salve device until the connection is built. But if the WAKEUP
bottom is pressed, HC-04/06 will lose the memory and research the new slave device.

6. Debugging device
6.1 Device
PC, hardware, 3G,3G Frequency Counter (SP3386), 3.15V DC power supply, Shielding,Bluetooth
Test box.
6.2 Software

7. Characteristic of test
Test Condition 25℃ RH 65%
Min Typ Max Unit
1. Carrier Freq. ( ISM Band ) 2.4 2.4835 MHz
2. RF O/P Power -6 2 4 dBm
3. Step size of Power control 2 8 dB
4. Freq. Offset ( Typical Carrier freq.) -75 75 KHz
5. Carrier Freq. drift ( Hopping on, drift rate/50uS ) -20 20 KHz
1 slot packet -25 25 KHz
3 slot packet -40 -40 KHz
6. Average Freq. Deviations ( Hopping off, modulation ) 140 175 KHz
Freq. Deviation 115 KHz
Ratio of Freq. Deviation 0.8
7 . Receive Sensitivity @< 0.1% BER( Bit error rate )-83 dBm

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

8. Test diagram

3GHz Ferq.
Counter RS232

CH C

COM 1
RF O/P
LPT1
UUT Interface
Computer
circuit
SPI

Shielding Box

Fig 1. Programming and Freq. Alignment

GPIB
Bluetooth test
Computer
set

RF I/P COM 1
LP1
RS232

RF Port

UUT SPI

Shielding Box

Fig 2 RF parameter Test Procedure


www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574
Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

9.AT command set


The way to the AT command mode: supply power to the module, it will enter to the AT mode if it
needn’t pair. The interval of command is about 1 second.
Default parameter: Baud rate:9600N81, ID: linvor, Password:1234
1. Test communication
Send: AT (please send it every second)
Back: OK

2. Reset the Bluetooth serial baud rate


Send: AT+BAUD1
Back: OK1200
Send: AT+BAUD2
Back: OK2400
……
1---------1200
2---------2400
3---------4800
4---------9600 (Default)
5---------19200
6---------38400
7---------57600
8---------115200
9---------230400
A---------460800
B---------921600
C---------1382400
PC can’t support the baud rate lager than 115200. The solution is: make the MCU have higher baud
rate (lager than 115200) through programming, and reset the baud rate to low level through the AT
command.
The baud rate reset by the AT command can be kept for the next time even though the power is cut
off.

3. Reset the Bluetooth name


Send: AT+NAMEname
Back: OKname
www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574
Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

Parameter name: Name needed to be set (20 characters limited)


Example:
Send: AT+NAMEbill_gates
Back: OKname
Now, the Bluetooth name is reset to be “bill_gates”
The parameter can be kept even though the power is cut off. User can see the new Bluetooth name
in PDA refresh service. (Note: The name is limited in 20 characters.)

4. change the Bluetooth pair password


Send: AT+PINxxxx
Back:OKsetpin
Parameter xxxx: The pair password needed to be set, is a 4-bits number. This command can be used
in the master and slave module. At some occasions, the master module may be asked to enter the
password when the master module tries to connect the slave module (adapter or cell-phone). Only if the
password is entered, the successful connection can be built. At the other occasions, the pair can be finish
automatically if the master module can search the proper slave module and the password is correct.
Besides the paired slave module, the master can connect the other devices who have slave module, such
as Bluetooth digital camera, Bluetooth GPS, Bluetooth serial printer etc.
Example:
Send: AT+PIN8888
Back: OKsetpin
Then the password is changed to be 8888, while the default is 1234.
This parameter can be kept even though the power is cut off.

5. No parity check ( The version, higher than V1.5, can use this command )
Send: AT+PN (This is the default value)
Back: OK NONE

6. Set odd parity check ( The version, higher than V1.5, can use this command )
Send: AT+PO
Back: OK ODD

7. Set even parity check( The version, higher than V1.5, can use this command )
Send: AT+PE
Back: OK EVEN

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Guangzhou HC Information Technology Co., Ltd.

8. Get the AT version


Send: AT+VERSION
Back: LinvorV1.n

www.wavesen.com Phone: 020-84083341 Fax: 020-84332079 QQ:1043073574


Address: Room 527, No.13, Jiangong Road, Tianhe software park, Tianhe district, Guangzhou Post: 510660
Technology consultant: support@wavesen.com Business consultant:sales@wavesen.com
Complaint and suggestion: sunbirdit@hotmail.com
Anexo G. Datasheet
Engranaje eje motor
ENGLISH

RS, Professionally Approved Products, gives you professional quality parts across all products categories. Our range has
been testified by engineers as giving comparable quality to that of the leading brands without paying a premium price.
ENGLISH

RS, Professionally Approved Products, gives you professional quality parts across all products categories. Our range has
been testified by engineers as giving comparable quality to that of the leading brands without paying a premium price.
ENGLISH

RS, Professionally Approved Products, gives you professional quality parts across all products categories. Our range has
been testified by engineers as giving comparable quality to that of the leading brands without paying a premium price.
ENGLISH

RS, Professionally Approved Products, gives you professional quality parts across all products categories. Our range has
been testified by engineers as giving comparable quality to that of the leading brands without paying a premium price.
Anexo H. Datasheet
Engranaje varilla
roscada
ENGLISH

RS, Professionally Approved Products, gives you professional quality parts across all products categories. Our range has
been testified by engineers as giving comparable quality to that of the leading brands without paying a premium price.
ENGLISH

RS, Professionally Approved Products, gives you professional quality parts across all products categories. Our range has
been testified by engineers as giving comparable quality to that of the leading brands without paying a premium price.
ENGLISH

RS, Professionally Approved Products, gives you professional quality parts across all products categories. Our range has
been testified by engineers as giving comparable quality to that of the leading brands without paying a premium price.
ENGLISH

RS, Professionally Approved Products, gives you professional quality parts across all products categories. Our range has
been testified by engineers as giving comparable quality to that of the leading brands without paying a premium price.
Anexo I. Programa
Arduino
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(0,1); // RX/TX

const int steppin = 9; // declaramos el pin 10 del arduino como step


const int dirpin = 8; // declaramos el pin 12 del arduino con dir
int estado= 0;
int tiempo = 4;
int contador = 0;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
bluetooth.begin(9600);
pinMode(steppin,OUTPUT); // declaramos como salidas
pinMode(dirpin,OUTPUT); // declaramos como salida
//pinMode(reset, OUTPUT);
}

void loop() {

if(Serial.available()>0){
estado = bluetooth.read(); }

if (estado == 'A')
{
if (contador==0) //El switch se mueve de la referencia/1L a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<9216;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==1536) //El switch se mueve de 1.5 Litros a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<7680;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2 Litros a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<6144;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<10752;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==6144) //El switch se mueve de 3L/6L a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<3072;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5L a 4/8 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<3072;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}
}
if (estado == '7')
{
if (contador==0) //El switch se mueve de la referencia/1L a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<9216;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==1536) //El switch se mueve de 1.5 Litros a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<7680;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2 Litros a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<6144;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<10752;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==6144) //El switch se mueve de 3L/6L a 4/8 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<3072;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5L a 4/8 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<3072;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}
}

if (estado == 'B')
{
if (contador==0) //El switch se mueve de la referencia a 2 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<3072;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==1536) //El switch se mueve de 1.5 Litros a 2 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<1536;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==9216) //El switch se mueve de 4L/8L a 2 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<6144;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a 2 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<4608;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==6144) //El switch se mueve de 3L/6L a 2 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<3072;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5L a 2 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<9216;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}

}
if (estado == 'C')
{
if (contador==0) //El switch se mueve de la referencia a 1.5 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<1536;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2 Litros a 1.5 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<1536;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==9216) //El switch se mueve de 4L/8L a 1.5 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<7680;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a 1.5 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<3072;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==6144) //El switch se mueve de 3L/6L a 1.5 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<4608;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5L a 1.5 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<10752;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}

if (estado == 'F')
{
if (contador==1536) //El switch se mueve de 1.5 Litros a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<1536;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2 Litros a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<3072;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==9216) //El switch se mueve de 4L/8L a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<9216;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a la ref/1L
{digitalWrite (dirpin,LOW);
for(int x=0;x<1536;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==6144) //El switch se mueve de 3L/6L a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<6144;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5 Litros a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<12288;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}
}
if (estado == '3')
{
if (contador==1536) //El switch se mueve de 1.5 Litros a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<1536;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2 Litros a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<3072;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==9216) //El switch se mueve de 4L/8L a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<9216;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a la ref/1L
{digitalWrite (dirpin,LOW);
for(int x=0;x<1536;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==6144) //El switch se mueve de 3L/6L a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<6144;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5 Litros a la ref/1L
{digitalWrite (dirpin,HIGH);
for(int x=0;x<12288;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}

}
if (estado == '2')
{
if (contador==0) //El switch se mueve de 1L/ref a 0.5 litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<1536;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==1536) //El switch se mueve de 1.5L a 0.5 litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<3072;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2L a 0.5 litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<4608;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==6144) //El switch se mueve de 3L/6L a 0.5 litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<7680;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==9216) //El switch se mueve de 4L/8L a 0.5 litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<10752;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5L a 0.5 litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<13824;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}

}
if (estado == '4')
{
if (contador==0) //El switch se mueve de la referencia a 3/6 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<6144;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==1536) //El switch se mueve de 1.5 Litros a 3/6 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<4608;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==9216) //El switch se mueve de 4L/8L a 3/6 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<3072;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a 3/6 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<7680;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2L a 3/6 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<3072;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5L a 3 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<6144;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}

}
if (estado == '6')
{
if (contador==0) //El switch se mueve de la referencia a 3/6 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<6144;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==1536) //El switch se mueve de 1.5 Litros a 3/6 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<4608;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==9216) //El switch se mueve de 4L/8L a 3/6 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<3072;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a 3/6 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<7680;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2L a 3/6 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<3072;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==12288) //El switch se mueve de 5L a 3 Litros
{digitalWrite (dirpin,HIGH);
for(int x=0;x<6144;x++,contador--)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}

if (estado == '5')
{
if (contador==0) //El switch se mueve de la referencia/1L a 5 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<12288;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==1536) //El switch se mueve de 1.5 Litros a 5 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<10752;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==3072) //El switch se mueve de 2 Litros a 5 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<9216;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==-1536) //El switch se mueve de 0.5 Litros a 5 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<13824;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==6144) //El switch se mueve de 3L/6L a 5 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<6144;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}else
if (contador==9216) //El switch se mueve de 4L/8L a 5 Litros
{digitalWrite (dirpin,LOW);
for(int x=0;x<3072;x++,contador++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}
}

if (estado == 'D') //Ajuste sentido 1


{
digitalWrite(dirpin,HIGH);
for(int x = 0; x <302; x++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}
if (estado == 'E') //Ajuste sentido 2
{
digitalWrite(dirpin,LOW);
for(int x = 0; x <302; x++)
{
digitalWrite(steppin,HIGH);
delay(tiempo);
digitalWrite(steppin,LOW);
delay(tiempo);
}
}
}
Anexo J. Programa
App

También podría gustarte