WO2016117992A1 - Wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones - Google Patents

Wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones Download PDF

Info

Publication number
WO2016117992A1
WO2016117992A1 PCT/MX2015/000007 MX2015000007W WO2016117992A1 WO 2016117992 A1 WO2016117992 A1 WO 2016117992A1 MX 2015000007 W MX2015000007 W MX 2015000007W WO 2016117992 A1 WO2016117992 A1 WO 2016117992A1
Authority
WO
WIPO (PCT)
Prior art keywords
infrared
devices
wireless
micro controller
smartphones
Prior art date
Application number
PCT/MX2015/000007
Other languages
Spanish (es)
French (fr)
Inventor
Brayan Gamaniel CASTRO BALDENEBRO
Omar VAZQUEZ PALMA
Dino Alejandro Pardo Guzman
Original Assignee
Castro Baldenebro Brayan Gamaniel
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Castro Baldenebro Brayan Gamaniel filed Critical Castro Baldenebro Brayan Gamaniel
Priority to PCT/MX2015/000007 priority Critical patent/WO2016117992A1/en
Publication of WO2016117992A1 publication Critical patent/WO2016117992A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C23/00Non-electrical signal transmission systems, e.g. optical systems
    • G08C23/04Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/94Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated

Definitions

  • the present invention belongs to the field of electronics and computer science since it is based on the creation of an electronic circuit that will be used to control infrared remote control devices, using a micro controller for the collection of signals from input and output response determination.
  • Figure 1 shows a schematic drawing of the general communication between the devices to be controlled, the controller device, the cell phone and the universal remote control.
  • Figure 2 illustrates a communications sketch of the controller device and the mobile device.
  • Figure 3 represents an electronic diagram of the infrared receiver module.
  • Figure 4 illustrates the electronic diagram of the infrared emitter module. DETAILED DESCRIPTION OF THE INVENTION
  • the present invention includes several modules coupled to form the device, such modules are set forth below: IR emitting sensor (36), which allows the sending of infrared signals to any device that has a command receiver. In this way, if the device is in the same room as the television or the air conditioning, the module can take action on these devices either programmed or directly from the mobile phone application (35).
  • IR emitting sensor 36
  • the module can take action on these devices either programmed or directly from the mobile phone application (35).
  • IR sensor infrared detector 31
  • the device can record the commands sent from a remote control, and reproduce them by software with a mobile phone application (35), or you can configure the devices to turn on or off with a certain button on the television's infrared remote control. .
  • Coupling module for power signals consisting of a solid state relay to switch power loads from low level control signals.
  • LED indicator that shows the status and works as a night indicator.
  • the HC-05 bluetooth module is the one that offers a better price and feature ratio, since it is a Master-Slave module, which means that in addition to receiving connections from a PC or tablet, it is also capable of generating connections to other devices bluetooth This allows us, for example, to connect two bluetooth modules and form a point-to-point connection to transmit data between two microcontrollers or devices.
  • An integrated infrared detector (31) was used to filter the signal.
  • the receiver output is then a square signal (32) that varies in its pulse widths depending on the protocol of the control brand.
  • the multicore microcontroller (33) to carry out the beginnings of the signal and to identify, thanks to a main database stored in the same processor, the command received.
  • the name of the command is sent via bluetooth device (34) to the application on the mobile phone (35), for example, the receiver picks up a 32-pulse code, between 1.2 ms (0 logical) and 2.4ms (1 logical), a 4 ms start pulse, when analyzing the arrangement of the bits with an Eeprom memory database, determines that this pulse train corresponds to the Volume + button of the Sony brand, so immediately send the Sony Vol + command via bluetooth signal (37), telling the phone that the Vol + key was pressed on the remote control.
  • a 32-pulse code between 1.2 ms (0 logical) and 2.4ms (1 logical
  • a 4 ms start pulse when analyzing the arrangement of the bits with an Eeprom memory database, determines that this pulse train corresponds to the Volume + button of the Sony brand, so immediately send the Sony Vol + command via bluetooth signal (37), telling the phone that the Vol + key was pressed on the remote control.
  • this same device has a transmitter (36), which basically consists of a high power infrared LED (38), with an open spectrum, which is connected to one of the terminals of the multicore micro controller (33) to a 40KHz PWM signal (39) emitted by the same multicore microprocessor (33) in one of its cores.
  • the main module (30) receives an order from the application, for example, Sony Canal +, which indicates that it must generate the Sony protocol, the Channel + button, for this the program inside the multicore microprocessor (33) it takes both the length and the number of pulses, and the characteristics of the start pulse of a database in memory, and generates the infrared signal through the infrared LED (38).
  • Both the multicore microprocessor program (33) and the application program on the mobile phone (35) are designed to synchronize their databases, in order to be able to add new protocols, modify the previous ones, or even generate new ones.
  • the signal is high (inactive).
  • the package consists of a series of ON (low) and OFF (high) pulses. Obviously after going down / up several times we will end up. Normally there is usually a longer initial ON pulse as an indication of START, but that depends on the protocol.
  • the sequence of ON / OFF encodes the message bits. There are many possibilities (Manchester coding, pulse width coding, etc.). It is this project that we are not interested in decoding, just seeing the information on the duration of the ON and OFF pulses. With this data we would have an idea of the protocol that the command uses and we can modify the program to obtain the codes. Considering these objectives, the general idea to apply in our software is based on:
  • the timer 0 is reset to each change.
  • the next function dumps the results we save (the pulse timings). As obviously the line starts from OFF and returns to OFF we will have an odd number of pulses, starting with a start (ON) pulse and then a sequence of pairs (OFF / ON). We use printf to dump the results to the standard output (serial port).
  • the main program opens the serial port [115200 bauds) and configures TMRO (without starting it).
  • the interruption INT0 (which is always a high priority) and the interruption of the TMRO (low priority) are enabled.
  • the main program After enabling the interruptions, they are responsible for the bulk of the work.
  • the main program simply enters a loop where the ir_detected flag is monitored. If set to 1 it is a sign that we have detected a packet and call the function that dumps the information through the port. After finishing the results, we enable the line monitoring again.

Abstract

The invention relates to a wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones. The device of the invention is highly effective, discrete and compact, offering Bluetooth and IR connectivity, and it is linked to an application for mobile devices, from which commands can be sent in order to transmit infrared signals to any IR remote control appliance. In addition, the IR controller device can obtain signals from any universal remote control and translate same into wireless Bluetooth signals in order to use the application.

Description

DISPOSITIVO DE CONTROL INALÁMBRICO INTELIGENTE PARA  SMART WIRELESS CONTROL DEVICE FOR
CONTROLAR DISPOSITIVOS DE MANDO INFRARROJO Y DOMÓTICOS POR MEDIO DE TELÉFONOS INTELIGENTES.  CONTROL DEVICES OF INFRARED CONTROL AND DOMOTICS BY INTELLIGENT PHONES.
CAMPO TÉCNICO DE LA INVENCIÓN La presente invención pertenece al campo de la electrónica y la informática ya que está basada en la creación de un circuito electrónico que se utilizara para controlar aparatos de mando a distancia infrarrojo, utilizando un micro controlador para la recolección de señales de entrada y la determinación de respuestas de salida. TECHNICAL FIELD OF THE INVENTION The present invention belongs to the field of electronics and computer science since it is based on the creation of an electronic circuit that will be used to control infrared remote control devices, using a micro controller for the collection of signals from input and output response determination.
ANTECEDENTES BACKGROUND
La revolución tecnológica que el mundo ha venido experimentando durante los últimos 50 años ha impactado cada una de las facetas del diario vivir de los seres humanos. Tras el marcado desarrollo de la electrónica, a partir de la década de los 60 y el desarrollo de nuevas tecnologías orientadas a las comunicaciones y aplicadas a la vida, generaron un cambio en la mayoría de las personas que conviven en un entorno globalizado, donde la conectividad juega un papel preponderante y hasta el más simple elemento como un dispositivo móvil funciona como transición a la dinámica de interconectividad global. The technological revolution that the world has been experiencing during the last 50 years has impacted each of the facets of the daily life of human beings. After the marked development of electronics, since the 60s and the development of new technologies oriented to communications and applied to life, they generated a change in the majority of people living in a globalized environment, where the Connectivity plays a preponderant role and even the simplest element as a mobile device functions as a transition to the dynamics of global interconnectivity.
La transformación de los hogares tradicionales en hogares inteligentes, a partir de la incorporación de herramientas de la domótica, trasciende los límites de la comodidad hacia la eficiencia y la sostenibilidad ambiental. La automatización de los ambientes fue considerada por muchos años una frivolidad tecnológica al alcance de los grupos más privilegiados de la sociedad, pero en la actualidad su apropiación masiva es motivo de múltiples investigaciones. The transformation of traditional homes into smart homes, from the incorporation of home automation tools, transcends the limits of comfort towards efficiency and environmental sustainability. The automation of the environments was considered for many years a technological frivolity within the reach of the most privileged groups of society, but nowadays its massive appropriation is the subject of multiple investigations.
En la actualidad la dinámica productiva enfrenta a las personas e instituciones al desafío de la eficiencia, la velocidad y la ubicuidad; en el mundo moderno cualquier actividad que no pueda ser realizada en forma eficiente mediante herramientas remotas representa una enorme desventaja, tanto competitivamente como de calidad de vida. Dentro de esta perspectiva, la automatización de los espacios y su dinamización con la incorporación de herramientas y tecnologías de la información y las telecomunicaciones, es más que un capricho frivolo, una necesidad inminente. Tareas tan simples como controlar el acceso en entornos con elevados requerimientos de seguridad se convierte en la vertiginosa dinámica global en un problema, para aquellas instituciones y personas que no están preparadas. At present, the productive dynamic faces people and institutions to the challenge of efficiency, speed and ubiquity; In the modern world, any activity that cannot be carried out efficiently using remote tools represents a huge disadvantage, both competitively and in terms of quality of life. Inside this perspective, the automation of spaces and their revitalization with the incorporation of tools and technologies of information and telecommunications, is more than a frivolous whim, an imminent necessity. Tasks as simple as controlling access in environments with high security requirements becomes the vertiginous global dynamic in a problem, for those institutions and people who are not prepared.
Son múltiples los factores que pueden caracterizar las formas de vida de las personas hoy en día, como ejemplo, adultos mayores que viven solos, población con algún tipo de discapacidad y que viven de forma independiente, incluso los mismos avatares de la modernidad que requieren todo con prontitud y ahorro del tiempo que no les permite siquiera descender del vehículo. There are many factors that can characterize the ways of life of people today, as an example, older adults living alone, population with some type of disability and living independently, even the same avatars of modernity that require everything promptly and saving time that does not even allow them to get off the vehicle.
Es así como, labores tan comunes como abrir o cerrar una ventana o una puerta se convierten en un problema; pero con la implementación de la domótica en el hogar se disminuye el grado de dificultad para realizar estas tareas. En el mercado actual se cuenta con un gran número de aplicaciones de muy alto nivel sobre el tema, las cuales en su mayoría tienen costos elevados y están pensadas más en generar una experiencia de lujo al cliente que en facilitar el desarrollo de una actividad específica a las personas. This is how, tasks as common as opening or closing a window or a door become a problem; But with the implementation of home automation, the degree of difficulty in performing these tasks is reduced. In the current market there is a large number of very high level applications on the subject, which mostly have high costs and are designed more to generate a luxury customer experience than to facilitate the development of a specific activity to people.
BREVE DESCRIPCIÓN DE FIGURAS BRIEF DESCRIPTION OF FIGURES
La figura 1 muestra un dibujo esquemático de la comunicación general entre los aparatos a controlar, el dispositivo controlador, el teléfono celular y el control remoto universal. Figure 1 shows a schematic drawing of the general communication between the devices to be controlled, the controller device, the cell phone and the universal remote control.
La figura 2 ilustra un bosquejo de comunicaciones del dispositivo controlador y del dispositivo móvil. Figure 2 illustrates a communications sketch of the controller device and the mobile device.
La figura 3 representa un diagrama electrónico del módulo receptor infrarrojo. La figura 4 ilustra el diagrama electrónico del módulo emisor infrarrojo. DESCRIPCIÓN DETALLADA DE LA INVENCIÓN Figure 3 represents an electronic diagram of the infrared receiver module. Figure 4 illustrates the electronic diagram of the infrared emitter module. DETAILED DESCRIPTION OF THE INVENTION
La gran mayoría de los controles remotos transmiten una señal lumínica en forma de pulsos a 38 KHz, aunque también existen otras frecuencias portadoras de 30KHz, 36KHz y 56KHz. Estas frecuencias suelen traducirse a señales binarias tomando como referencia la presencia de la onda portadora como un 1, y la ausencia como un 0. Para codificar este mecanismo es necesario filtrar el ruido para analizar la cadena binaria e identificar el comienzo y la longitud de dicha cadena. The vast majority of remote controls transmit a light signal in the form of pulses at 38 KHz, although there are also other carrier frequencies of 30KHz, 36KHz and 56KHz. These frequencies are usually translated into binary signals taking as reference the presence of the carrier wave as a 1, and the absence as a 0. To code this mechanism it is necessary to filter the noise to analyze the binary chain and identify the beginning and length of said chain.
La presente invención incluye varios módulos acoplados para formar el dispositivo, tales módulos se enuncian a continuación: Sensor IR emisor (36), que permite el envió de señales infrarrojas a cualquier dispositivo que cuente con receptor de mando. De esta forma si el dispositivo se encuentra en la misma habitación que la televisión o que el aire acondicionado, el modulo puede tomar acción sobre estos aparatos ya sea programada o directamente desde la aplicación para teléfono móvil (35]. The present invention includes several modules coupled to form the device, such modules are set forth below: IR emitting sensor (36), which allows the sending of infrared signals to any device that has a command receiver. In this way, if the device is in the same room as the television or the air conditioning, the module can take action on these devices either programmed or directly from the mobile phone application (35).
Sensor IR detector infrarrojo (31), que detecta las señales provenientes de cualquier control remoto para sincronizarse o cambiar el estado de las variables. Con este modulo, el dispositivo puede grabar los comandos enviados desde un control remoto, y reproducirlos mediante software con una aplicación para teléfono móvil (35), o bien puede configurar que las aparatos se enciendan o apaguen con cierto botón del mando infrarrojo de la televisión. IR sensor infrared detector (31), which detects signals from any remote control to synchronize or change the state of the variables. With this module, the device can record the commands sent from a remote control, and reproduce them by software with a mobile phone application (35), or you can configure the devices to turn on or off with a certain button on the television's infrared remote control. .
Módulo de acoplamiento para señales de potencia que consiste en un relevador de estado sólido para conmutar cargas de potencia a partir de señales de control de bajo nivel. Coupling module for power signals consisting of a solid state relay to switch power loads from low level control signals.
Indicador LED que muestra el estado y funciona como indicador nocturno. LED indicator that shows the status and works as a night indicator.
Bluetooth, para comunicar el apagador con cualquier dispositivo móvil como tablets o iphones. Bluetooth, to communicate the switch with any mobile device such as tablets or iphones.
El módulo de bluetooth HC-05 es el que ofrece una mejor relación de precio y características, ya que es un módulo Maestro-Esclavo, quiere decir que además de recibir conexiones desde una PC o tablet, también es capaz de generar conexiones hacia otros dispositivos bluetooth. Esto nos permite por ejemplo, conectar dos módulos de bluetooth y formar una conexión punto a punto para transmitir datos entre dos microcontroladores o dispositivos. The HC-05 bluetooth module is the one that offers a better price and feature ratio, since it is a Master-Slave module, which means that in addition to receiving connections from a PC or tablet, it is also capable of generating connections to other devices bluetooth This allows us, for example, to connect two bluetooth modules and form a point-to-point connection to transmit data between two microcontrollers or devices.
Para filtrar la señal se utilizó un detector infrarrojo (31) integrado. La salida del receptor queda entonces como una señal cuadrada (32) que varía en sus anchos de pulso dependiendo del protocolo de la marca del control. Así pues le corresponde al microcontrolador multinúcleo (33), realizar los inicios de la señal e identificar gracias a una base de datos principal guardada en el mismo procesador, el comando recibido. Después de que el paquete de datos es recibido y decodificado, se envía el nombre del comando vía dispositivo bluetooth (34) hacia la aplicación en el teléfono móvil (35), por ejemplo, el receptor recoge un código de 32 pulsos, de entre 1.2 ms (0 lógico) y 2.4ms (1 lógico), un pulso de inicio de 4 ms, al analizar la disposición de los bits con una base de datos en memoria Eeprom, determina que ese tren de pulsos corresponde al botón Volumen + de la marca Sony, así que inmediatamente envía mediante señal bluetooth (37) el comando Sony Vol+, indicándole al teléfono que se presionó la tecla Vol+ en el control remoto. Para la simulación de señales infrarrojas este mismo dispositivo cuenta con un emisor (36), que consiste básicamente en un LED infrarrojo (38) de alta potencia, con espectro abierto, que va conectado en una de las terminales del micro controlador multinúcleo (33) a una señal PWM de 40KHz (39) emitida por el mismo microprocesador multinúcleo (33) en uno de sus núcleos. De igual forma, el módulo principal (30) recibe una orden de la aplicación, por ejemplo, Sony Canal+, lo que le indica que debe generar el protocolo Sony, el botón Canal +, para esto el programa dentro del microprocesador multinúcleo (33) toma tanto la longitud como el número de pulsos, y las características del pulso de inicio de una base de datos en memoria, y genera la señal infrarroja a través del LED infrarrojo (38). An integrated infrared detector (31) was used to filter the signal. The receiver output is then a square signal (32) that varies in its pulse widths depending on the protocol of the control brand. Thus, it is up to the multicore microcontroller (33), to carry out the beginnings of the signal and to identify, thanks to a main database stored in the same processor, the command received. After the data packet is received and decoded, the name of the command is sent via bluetooth device (34) to the application on the mobile phone (35), for example, the receiver picks up a 32-pulse code, between 1.2 ms (0 logical) and 2.4ms (1 logical), a 4 ms start pulse, when analyzing the arrangement of the bits with an Eeprom memory database, determines that this pulse train corresponds to the Volume + button of the Sony brand, so immediately send the Sony Vol + command via bluetooth signal (37), telling the phone that the Vol + key was pressed on the remote control. For the simulation of infrared signals this same device has a transmitter (36), which basically consists of a high power infrared LED (38), with an open spectrum, which is connected to one of the terminals of the multicore micro controller (33) to a 40KHz PWM signal (39) emitted by the same multicore microprocessor (33) in one of its cores. Similarly, the main module (30) receives an order from the application, for example, Sony Canal +, which indicates that it must generate the Sony protocol, the Channel + button, for this the program inside the multicore microprocessor (33) it takes both the length and the number of pulses, and the characteristics of the start pulse of a database in memory, and generates the infrared signal through the infrared LED (38).
Tanto el programa del microprocesador multinúcleo (33) como el programa de la aplicación en el teléfono móvil (35) están diseñados para sincronizar sus bases de datos, con el fin de poder agregar protocolos nuevos, modificar los anteriores, o incluso generar nuevos. Both the multicore microprocessor program (33) and the application program on the mobile phone (35) are designed to synchronize their databases, in order to be able to add new protocols, modify the previous ones, or even generate new ones.
Sería sencillo hacer un bucle monitorizando el pin RB0 y usar un timer para medir los tiempos involucrados en los pulsos ON (abajo) y OFF (arriba). El problema, como siempre, es que con ese enfoque el PIC no podría hacer otra cosa. Lo que haremos es usar la interrupción INT0 (asociada a cambios del pin RBO) para detectar los pulsos. De esta forma mantenemos el PIC libre para otras funciones. El aspecto general de un paquete enviado por el mando puede verse en la figura 5. It would be easy to make a loop by monitoring the RB0 pin and use a timer to measure the times involved in the ON (down) and OFF (up) pulses. The problem, as always, is that with that approach the PIC could not do otherwise. What we will do is use the INT0 interrupt (associated with changes of the RBO pin) to detect the pulses. In this way we keep the PIC free for other functions. The general appearance of a package sent by the command can be seen in Figure 5.
Por defecto, la señal está en nivel alto (inactivo). El paquete consiste en una serie de pulsos ON (bajo) y OFF (alto). Obviamente tras bajar/subir varias veces terminaremos arriba. Normalmente suele haber un pulso ON inicial más largo como indicación de START, pero eso depende del protocolo. La sucesión de ON/OFF codifica los bits del mensaje. Hay muchas posibilidades (codificación Manchester, codificación por ancho de pulsos, etc). Es este proyecto no estamos interesados en decodificar, sólo en ver la información sobre la duración de los pulsos ON y OFF. Con estos datos tendríamos una idea del protocolo que usa el mando y podremos modificar el programa para obtener los códigos. Considerando estos objetivos, la idea general a aplicar en nuestro software se basa en: By default, the signal is high (inactive). The package consists of a series of ON (low) and OFF (high) pulses. Obviously after going down / up several times we will end up. Normally there is usually a longer initial ON pulse as an indication of START, but that depends on the protocol. The sequence of ON / OFF encodes the message bits. There are many possibilities (Manchester coding, pulse width coding, etc.). It is this project that we are not interested in decoding, just seeing the information on the duration of the ON and OFF pulses. With this data we would have an idea of the protocol that the command uses and we can modify the program to obtain the codes. Considering these objectives, the general idea to apply in our software is based on:
Empezamos activando la interrupción 1NT0 en modo HIGH to LOW para detectar el inicio de un paquete. Al mismo tiempo se pone a cero el timer 0 y se arranca para medir tiempos. Cada vez que detectemos un cambio en RBO guardaremos valor del timer 0 y volveremos a resetearlo para medir el siguiente pulso. We start by activating interrupt 1NT0 in HIGH to LOW mode to detect the start of a packet. At the same time, timer 0 is reset and started to measure times. Each time we detect a change in RBO, we will save the value of the timer 0 and reset it again to measure the next pulse.
Con lo anterior mediríamos los tiempos entre bajada y bajada. Como interesa discriminar entre tiempo abajo (ON) y arriba (OFF) lo que haremos es que cada vez que entre la interrupción INTO cambiaremos el sentido de la detección. De esta forma si entramos con una bajada, pondremos la detección a subida y así medimos el tiempo abajo. With the above we would measure the time between descent and descent. As it is interesting to discriminate between time below (ON) and above (OFF), what we will do is that every time between the INTO interruption we will change the sense of detection. In this way if we enter with a descent, we will set the detection to rise and thus we measure the time below.
El timer 0 se resetea a cada cambio. Usaremos la interrupción del TMRO como indicador de que hace mucho que no hay cambios y que por lo tanto el pulso ha terminado. En ese caso se deja de monitorizar la línea y simplemente volcamos los tiempos (convertidos a milisegundos) de todas las transiciones. Para volcar los tiempos usaremos el puerto serie. Podríamos usar el enfoque de interrupciones explicado antes, pero como no es crítico usaremos en principio las funciones bloqueantes del compilador. A continuación tenemos el código de la interrupción INTO. Está declarada de alta prioridad para asegurarnos de que no perdemos nada. En un principio el programa arranca con un status=WAIT (esperando un paquete). Cuando se detecta el arranque del paquete ponemos en marcha TMRO y habilitamos su interrupción para disponer de una base de tiempos y pasamos a status = SCANNING. Si estamos en modo SCANNING simplemente guardamos el tiempo transcurrido desde la última vez que estuvimos por aquí e incrementamos una variable que lleva la cuenta del número de transiciones. En ambos casos se pone a 0 el timer y se invierte el sentido de la detección de cambios. The timer 0 is reset to each change. We will use the TMRO interruption as an indicator that there has been no change for a long time and therefore the pulse has ended. In that case we stop monitoring the line and simply turn over the times (converted to milliseconds) of all transitions. To overturn the times we will use the serial port. We could use the interrupt approach explained above, but as it is not critical we will use the blocking functions of the compiler in principle. Next we have the INTO interrupt code. It is declared a high priority to ensure that we do not lose anything. Initially the program starts with a status = WAIT (waiting for a package). When the start of the package is detected, we start TMRO and enable its interruption to have a time base and go to status = SCANNING. If we are in SCANNING mode, we simply save the time elapsed since we were last here and increase a variable that takes the number of transitions into account. In both cases the timer is set to 0 and the direction of the change detection is reversed.
Ahora viene el código de la interrupción del TMRO, declarada como de baja prioridad. Como cada vez que detectamos un cambio se hace TMR0L=0, la interrupción no entra mientras haya actividad en la línea. Una vez que la línea se queda en OFF ya no hay cambios y nadie se ocupa de resetear el contador, por lo que terminará rebosando y se provocará la interrupción. Now comes the TMRO interrupt code, declared as low priority. Since every time we detect a change TMR0L = 0 is made, the interruption does not enter as long as there is activity on the line. Once the line is OFF, there are no changes and nobody takes care to reset the counter, so it will end up overflowing and the interruption will be caused.
En la interrupción lo primero que se hace es volver al status de esperar inicio de paquete (status=WAIT, parar TMRO y esperar un cambio HIGH2LOW). A continuación se verifica que el número de transiciones no es muy bajo (para evitar "falsos positivos" por alguna transición espúrea en la línea). Todos los protocolos tendrán un mínimo de 12-16 transiciones. Si hay un número suficiente de transiciones se procede a desactivar la interrupción INTO (esto es, dejamos de monitorizar la línea) y volcamos los datos por el puerto serie. Para evitar incluir un código complejo dentro de la interrupción (lo que no es aconsejable) lo que se hace es poner a 1 la bandera ir_detected. En el programa principal detectaremos dicha bandera y volcaremos los resultados. In the interruption the first thing that is done is to return to the status of waiting for the start of the package (status = WAIT, stop TMRO and wait for a HIGH2LOW change). Next, it is verified that the number of transitions is not very low (to avoid "false positives" due to some spurious transition in the line). All protocols will have a minimum of 12-16 transitions. If there is a sufficient number of transitions, the INTO interrupt is deactivated (that is, we stop monitoring the line) and we dump the data through the serial port. To avoid including a complex code within the interruption (which is not advisable) what is done is to set the ir_detected flag to 1. In the main program we will detect this flag and dump the results.
La siguiente función vuelca los resultados guardamos (los timings de los pulsos). Como obviamente la línea parte de OFF y vuelve a OFF tendremos un número impar de pulsos, empezando con un pulso de start (ON) y luego una sucesión de pares (OFF/ON). Usamos printf para volcar los resultados a la salida standard (puerto serie). The next function dumps the results we save (the pulse timings). As obviously the line starts from OFF and returns to OFF we will have an odd number of pulses, starting with a start (ON) pulse and then a sequence of pairs (OFF / ON). We use printf to dump the results to the standard output (serial port).
Lo único más críptico es la conversión de los tiempos a microsegundos. Los tiempos guardados (uint8's) están en unidades de ticks de reloj. Con la configuración escogida para el TIMERO, cada paso del contador corresponde a 51.2 microsegundos. Una aproximación con aritmética entera y que evita dividir es multiplicar por 205 y dividir por 4 (»2) lo que corresponde a 205/4 = 51.25, lo suficientemente cerca para la aplicación en curso. Obviamente esta conversión será dependiente de los parámetros elegidos al configurar TMRO. The only thing that is most cryptic is the conversion of times to microseconds. Saved times (uint8's) are in units of clock ticks. With the configuration chosen for the TIMERO, each step of the counter corresponds to 51.2 microseconds. An approach with Whole and avoids dividing arithmetic is multiplying by 205 and dividing by 4 (»2) which corresponds to 205/4 = 51.25, close enough for the current application. Obviously this conversion will be dependent on the parameters chosen when configuring TMRO.
El programa principal abre el puerto serie [115200 bauds) y configura TMRO (sin arrancarlo). Se habilita la interrupción INT0 (que siempre es de alta prioridad) y la interrupción del TMRO (baja prioridad). The main program opens the serial port [115200 bauds) and configures TMRO (without starting it). The interruption INT0 (which is always a high priority) and the interruption of the TMRO (low priority) are enabled.
La parte más delicada es escoger los parámetros del Timerl. Hemos escogido usar modo 8 bits porque es suficiente para los tiempos involucrados y nos ahorramos manejar contadores de 16 bits. Se ha escogido un divisor de 1:256 lo que corresponde a 256x0.2 = 51 usec. Ésta será la máxima resolución de los timing hallados (ya que se miden en múltiplos de 51 usec). Es adecuada porque típicamente los pulsos más pequeños en los mandos a distancia son del orden de 400-600 usec, por lo que entran del orden de 10 pasos como mínimo. The most delicate part is choosing the parameters of the Timerl. We have chosen to use 8-bit mode because it is sufficient for the times involved and we save handling 16-bit counters. A divisor of 1: 256 has been chosen which corresponds to 256x0.2 = 51 usec. This will be the maximum resolution of the timing found (since they are measured in multiples of 51 usec). It is suitable because typically the smallest pulses on the remote controls are of the order of 400-600 usec, so they enter the order of at least 10 steps.
La consecuencia inmediata de dicha elección es que el rebosamiento por falta de actividad sucederá al cabo de 256 x 51 = 12.5 msec. Esto determina que los pulsos más largos detectables serán de 12 msec. Si un pulso (ON/OFF) dura más de 12 msec el programa considerará que ya no va a haber más actividad y declarará (erróneamente) un fin de paquete. The immediate consequence of this choice is that the overflow due to lack of activity will occur after 256 x 51 = 12.5 msec. This determines that the longest detectable pulses will be 12 msec. If a pulse (ON / OFF) lasts more than 12 msec the program will consider that there will be no more activity and will declare (erroneously) an end of package.
Tras habilitar las interrupciones, del grueso del trabajo se encargan ellas. El programa principal simplemente entra en un bucle donde se monitoriza la bandera ir_detected. Si se pone a 1 es señal de que hemos detectado un paquete y llamamos a la función que vuelca la información por el puerto. Tras terminar de volcar los resultados volvemos a habilitar la monitorización de la línea. After enabling the interruptions, they are responsible for the bulk of the work. The main program simply enters a loop where the ir_detected flag is monitored. If set to 1 it is a sign that we have detected a packet and call the function that dumps the information through the port. After finishing the results, we enable the line monitoring again.
Se adjuntan dos volcados del puerto serie al pulsar un par de teclas de un mando SONY, los resultados se observan en la tabla de la figura 6. Vemos que empezamos siempre con un START largo (2400 usec) y luego hay una serie de OFF/ON. La parte OFF es siempre constante (512 usec) pero la parte ON oscila entre 615 y 1230 usec. Claramente los 0/1 están codificados en esta duración. De hecho el protocolo usado por SONY establece un bit de START de 2400 usec, unos pulsos OFF de 600 usec y unos pulsos ON de 600 (0) o 1200 (1) según se observa en la figura 7. Two dumps of the serial port are attached when you press a couple of keys of a SONY command, the results are shown in the table in figure 6. We see that we always start with a long START (2400 usec) and then there is a series of OFF / ON. The OFF part is always constant (512 usec) but the ON part ranges between 615 and 1230 usec. Clearly the 0/1 are encoded in this duration. In fact the protocol used by SONY sets a START bit of 2400 usec, OFF pulses of 600 usec and ON pulses of 600 (0) or 1200 (1) as seen in Figure 7.

Claims

REIVINDICACIONES ue se reclama es: CLAIMS that are claimed are:
1. Un dispositivo y un método de control demótico para aparatos electrónicos de mando a distancia por medio de luz infrarroja discreto y compacto, que se enlaza a una aplicación diseñada para dispositivos móviles con plataforma android y/o IOS y que está constituido por los siguientes elementos: 1. A device and a demotic control method for electronic remote control devices by means of discrete and compact infrared light, which is linked to an application designed for mobile devices with android and / or IOS platform and which is constituted by the following elements:
a) Un micro controlador multinúcleo programado en uno de sus núcleos con lenguaje de alto nivel Spin para las funciones de comunicación y enlaces, de igual forma es utilizado otro de sus núcleos en lenguaje de bajo nivel [ensamblador) para realizar las operaciones de medición de pulsos y frecuencias.  a) A multicore micro controller programmed in one of its cores with high-level Spin language for communication and link functions, in the same way another of its cores in low-level language [assembler] is used to perform the measurement operations of pulses and frequencies
b) Un Emisor-Receptor Bluetooth que es utilizado para establecer la comunicación serial bidireccional a 1 Mbps entre el micro controlador de la reivindicación la y la aplicación del celular descrita en la reivindicación le, mediante el cual se transmiten comandos u órdenes e información acerca de los protocolos infrarrojos y tiempos de encendido o apagado.  b) A Bluetooth Emitter-Receiver that is used to establish two-way serial communication at 1 Mbps between the micro controller of claim la and the mobile application described in claim le, by means of which commands or orders and information about Infrared protocols and on or off times.
c) Un módulo receptor infrarrojo capaz de realizar el proceso de demodulación de la señal de infrarroja, entregando en su salida una señal digital lista para ingresar al micro controlador multinúcleo descrito en la reivindicación la.  c) An infrared receiver module capable of carrying out the demodulation process of the infrared signal, delivering a digital signal ready to enter the multicore micro controller described in claim la.
d) Un módulo emisor infrarrojo consistente en un arreglo de transistores en forma de puente H que funciona como amplificador de señal con 2 entradas, un PWM a 40 d) An infrared transmitter module consisting of an array of H-shaped transistors that functions as a signal amplifier with 2 inputs, a PWM at 40
Khz, y un tren de pulsos con la información del protocolo que se quiere enviar, excita un LED infrarrojo de ángulo abierto que manipula los dispositivos compatibles. Khz, and a pulse train with the protocol information to be sent, excites an infrared open-angle LED that manipulates compatible devices.
e) Una aplicación diseñada de manera ligera y fácil de instalar en cualquier dispositivo móvil, con menus interactivos modifi cables por el usuario, donde puede establecer la imagen real del dispositivo que desea controlar, así como un canvas de la casa-habitación en donde se encuentran los aparatos.  e) An application designed in a light and easy way to install on any mobile device, with interactive menus modifiable by the user, where you can establish the real image of the device you want to control, as well as a canvas of the house-room where you They find the devices.
PCT/MX2015/000007 2015-01-21 2015-01-21 Wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones WO2016117992A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/MX2015/000007 WO2016117992A1 (en) 2015-01-21 2015-01-21 Wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/MX2015/000007 WO2016117992A1 (en) 2015-01-21 2015-01-21 Wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones

Publications (1)

Publication Number Publication Date
WO2016117992A1 true WO2016117992A1 (en) 2016-07-28

Family

ID=56417438

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/MX2015/000007 WO2016117992A1 (en) 2015-01-21 2015-01-21 Wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones

Country Status (1)

Country Link
WO (1) WO2016117992A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107659471A (en) * 2017-09-19 2018-02-02 深圳聚点互动科技有限公司 Control the method and device of a variety of intelligent domestic gateways of end-on
CN111557097A (en) * 2018-05-29 2020-08-18 华为技术有限公司 Control method of power key in virtual remote controller and terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080180228A1 (en) * 2007-01-26 2008-07-31 Sony Ericsson Mobile Communications Ab User interface for an electronic device used as a home controller

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080180228A1 (en) * 2007-01-26 2008-07-31 Sony Ericsson Mobile Communications Ab User interface for an electronic device used as a home controller

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RAMLEE R. A.; ET AL.: "Smart home system for Disabled People via Wireless Bluetooth.", 2012 INTERNATIONAL CONFERENCE ON SYSTEM ENGINEERING AND TECHNOLOGY (ICSET, 11 September 2012 (2012-09-11), pages 1 - 4, XP032264316, ISBN: 978-1-4673-2375-8 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107659471A (en) * 2017-09-19 2018-02-02 深圳聚点互动科技有限公司 Control the method and device of a variety of intelligent domestic gateways of end-on
CN111557097A (en) * 2018-05-29 2020-08-18 华为技术有限公司 Control method of power key in virtual remote controller and terminal
CN111557097B (en) * 2018-05-29 2022-04-05 华为技术有限公司 Control method of power key in virtual remote controller and terminal

Similar Documents

Publication Publication Date Title
Eady Hands-on ZigBee: Implementing 802.15. 4 with microcontrollers
Khedkar et al. Using raspberry Pi and GSM survey on home automation
Thakur et al. Voice recognition wireless home automation system based on Zigbee
US10116431B2 (en) Optical communication transmitting apparatus and receiving apparatus
Kumbhar Wireless sensor network using Xbee on Arduino Platform: An experimental study
US20060114120A1 (en) System and method for the unpredictable remote control of devices
WO2016117992A1 (en) Wireless, smart control device for controlling infrared-controlled devices and home automation devices, using smartphones
ES2300231B1 (en) MULTIPROTOCOL DOMOTIC CONTROL SYSTEM WITH USER INTERFACE.
Popoola et al. Design of improved IR protocol for LED indoor positioning system
Fourniol et al. Applications of an ultra low-power analog wake-up detector for environmental iot networks and military smart dust
Adiono et al. Developing of general IrDa remote to wirelessly control IR-based home appliances
Visconti et al. FEATURES, OPERATION PRINCIPLE AND LIMITS OF SPI AND IC COMMUNICATION PROTOCOLS FOR SMART OBJECTS: A NOVEL SPI-BASED HYBRID PROTOCOL ESPECIALLY SUITABLE FOR IoT APPLICATIONS
KR101512687B1 (en) Portable height measure device and smart phone for controlling the device
KR20060093706A (en) Radio system with configurable links
CN209917265U (en) Intelligent building block system
CN103366476A (en) Wireless remote control 626 alarm
JP2018151264A (en) Environment sensor
CN109639830B (en) NB-IoT-based building temperature and humidity monitoring system and monitoring method applying same
CN203165205U (en) Remote control device matched with intelligent electronic product with flashlight
CN202663402U (en) Visible light communication system based on time division multiple access
Shanmugasundaram et al. Implementation of PIC16F877A based intelligent smart home system
Samad et al. Design of remote intelligent smart home system based on Zigbee and GSM technology
KR20200112846A (en) Functional state transition of sensor devices based on optical signals
San Implementation of IoT-based Home Control and Monitoring System using Raspberry Pi and NodeMCUs
WO2015101792A1 (en) Wirelessly triggering smart devices

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15879106

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15879106

Country of ref document: EP

Kind code of ref document: A1