Modelo de interconectividad ZigBee & Wi-Fi para el control de un sistema inteligente de iluminación tipo LED usando IoT

ZigBee & Wi-Fi interconnectivity model for controlling an intelligent LED lighting system using IoT

DOI: http://doi.org/10.17981/ingecuc.17.1.2021.11

Artículo de Investigación Científica. Fecha de Recepción: 24/10/2020. Fecha de Aceptación: 18/11/2020.

Álvaro Romero-Acero

Universidad Nacional de Colombia. Bogotá, D.C. (Colombia)

alromeroac@unal.edu.co

Alejandro Marín-Cano

Universidad Nacional de Colombia. Medellín (Colombia)

amarincan@unal.edu.co

Jovani Alberto Jiménez-Builes

Universidad Nacional de Colombia. Medellín (Colombia)

jajimen1@unal.edu.co

Para citar este artículo:

A. Romero-Acero, A. Marín-Cano & J. Jiménez-Builes, “Modelo de interconectividad ZigBee & Wi-Fi para el control de un sistema inteligente de iluminación tipo LED usando IoT”, INGECUC, vol. 17. no. 1, pp. 146–155. DOI: http://doi.org/10.17981/ingecuc.17.1.2021.11

Resumen

Introducción— La iluminación inteligente utilizando el Internet de las cosas (IoT, Internet of Things) y diferentes mecanismos de interconexión es un campo de investigación que cada día toma relevancia a nivel mundial.

Objetivo— El artículo presenta un modelo de iluminación LED inteligente utilizando el IoT y dos mecanismos de interconectividad: ZigBee & Wi-Fi.

Metodología— El modelo utiliza LEDs (diodo emisor de luz), LED RGB, monitoreo y control de las variables de intensidad luminosa, mediciones de variables ambientales por sensores, y actuadores acoplados a los dispositivos de control. El modelo permite interconectar redes inalámbricas con servicio móvil celular basado en los protocolos ZigBee (IEEE 802.15.4) y Wi-Fi (802.11a / g), rigiéndose además por la norma ANSI / ISA 100.11.a.

Resultados— El modelo admite el acceso a dispositivos remotos, con gran escalabilidad y cobertura, como una puerta de enlace (gateway) para la interconexión de redes LAN con redes WAN. Lo anterior faculta una serie de aplicaciones a través de dispositivos electrónicos como teléfonos inteligentes, tabletas, computadores y paneles táctiles, distribuidos físicamente en la planta física.

Conclusiones— El modelo de iluminación inteligente presentado en este artículo, ha sido ampliamente aplicado en diferentes proyectos de construcción civil, tanto pública como privada. Ha servido como un referente que permite ofrecer ventajas tales el ahorro de energía y la automatización de los hogares y oficinas (domótica).

Palabras clave— Sistemas de iluminación inteligente; protocolo ZigBee; redes Wi-Fi; redes de sensores remotos; internet de las cosas; industria 4.0

Abstract

Introduction Intelligent lighting using the Internet of Things (IoT) and different interconnection mechanisms is a field of research that is becoming increasingly relevant worldwide.

Objective The article presents an intelligent LED lighting model using the IoT and two interconnectivity mechanisms: ZigBee & Wi-Fi.

Methodology The model uses LEDs (light emitting diode), RGB LEDs, monitoring and control of light intensity variables, measurements of environmental variables by sensors, and actuators coupled to the control devices. The model allows wireless networks to be interconnected with cellular mobile service based on the ZigBee (IEEE 802.15.4) and Wi-Fi (802.11a / g) protocols, and complies with the ANSI / ISA 100.11.a standard.

Results The model supports access to remote devices, with great scalability and coverage, such as a gateway for the interconnection of LAN networks with WAN networks. This enables a series of applications through electronic devices such as smartphones, tablets, computers and touch panels, distributed in the physical plant.

Conclusions The intelligent lighting model presented in this article has been widely applied in different civil construction projects, both public and private. It has served as a benchmark that allows to offer advantages such as energy saving and automation of homes and offices (domotics).

Keywords Intelligent lighting system; ZigBee; Wi-Fi; wireless sensor networks; IoT; Industry 4.0

I. Introducción

The high energy consumption generated by conventional lighting such as metal halide (HM), T5 fluorescent tubes (TL5) and induction, is part of the misuse of energy resources. In addition, the lack of integration with technical standards and rigorous consumption studies has caused direct damage to the Rational Use of Energy-URE [1], [2], [3]. However, at present, intelligent lighting models are being implemented in office environments, shopping centers, architectural facades, buildings and public lighting, which allows for a reduction in consumption costs [4].

According to the approach formulated about the lack of integration of intelligent lighting systems, there is a great problem when interconnecting the communication devices with the lighting models or systems, due to the wiring and the structures where the lighting points are installed [5]. To solve this problem, models based on wireless communication that can coexist on the same network are being developed, such as the ZigBee protocol (IEEE 802.15.4) for the design of wireless sensor networks (WSN) and Wi-Fi (IEEE 802.11). The above model allows access to software applications in mobile cellular devices (APP) and interconnection to other renewable energy sources [6].

Some important factors that make the operation of lighting systems interconnected to wireless networks difficult must be taken into account at the time of implementation, such as:

Lighting systems can be classified according to the light source. In a research of the Unizar [11], the evaluation method of LED illumination with respect to conventional models is taken as a study case. The result is that the LED luminaires have a 50% reduction in consumption. In addition, the following technical parameters are taken into account: a) efficiency b) luminosity c) luminaire lifetime and d) temperature dependence. This study compares several types of commercial metal halide lamps (400W HPI plus Philips), fluorescence with TL5 tubes (4x80W Master TL5 HO 80W/840 1SL Philips), induction fluorescence (250W Icetron Sylvania-Osram) and LED (200W Luxeon Rebel ES Philips).

Another important factor to evaluate the lighting systems is harmonic distortion, in which the LED luminaires present less total harmonic distortion compared to fluorescent ones with electronic ballast [12].

The following section shows the interconnectivity system in wireless ZigBee and Wi-Fi networks applied to the lighting model. Then the mobile cellular APP developed for the interaction of the technological tools with the lighting model is presented. Next the results and discussion are shown, and finally the conclusions and bibliographic references are given.

II. Materials and Methods

A. Interconnectivity and lighting

The design of the interconnected model of wireless networks for mobile cellular services applied to lighting systems is implemented by means of ZigBee and Wi-Fi protocols subjected to ANSI/ISA 100.11.a. standards, which consists of determining the wireless communications standards endorsed for the development of applications in industrial automation and control [13], [14].

Thus, the embedded system establishes ZigBee and Wi-Fi interconnectivity with mobile cellular service applications (APP) for lighting models. The design of the embedded system is developed to interconnect XBee (ZigBee) and Wifly (Wi-Fi) communication peripheral modules, with pulse-width modulated (PWM) signal outputs for controlling the intensity and colors of RGB (Red-Green-Blue) LED lighting [15].

1) Embedded system

Fig. 1 shows the embedded system in charge of specific communication functions: data reception and transmission. It determines the communication protocol to use IEEE 802.15.4 and 802.11, which depends respectively on the XBee (ZigBee) or Wifly module. We call it the interconnectivity node [16].

Fig. 1. ZigBee – Wifly Embedded System. Interconnectivity node.
Source: The authors.

To establish device connectivity based on the IEEE 802.15.4 and IEEE 802.11 standards, it is necessary to first configure each device to its corresponding protocol, either ZigBee or Wi-Fi [17]. After this, the corresponding microcontrollers must be programmed, which are responsible for packaging the data in the corresponding protocol and in turn, the equipment responsible for interconnecting the two networks as master-slave must be configured (Fig. 2).

Fig. 2. Master-slave ZigBee & Wi-Fi interconnectivity.
Source: Own elaboration.

Data reception from the ZigBee WSN wireless sensor network [18] brings with it the information from another monitoring station. Therefore, local and remote data are transmitted to the slave microcontroller by SPI (Serial Peripheral Interface). The slave establishes communication with the Wifly device -which provides Wi-Fi connectivity- with mobile devices [19].

Fig. 3 shows the wireless sensor network in which each node is associated with an XBee router module (Node 1 and 2). They communicate through API frames to the XBee coordinator (Interconnectivity Node).

Fig. 3. ZigBee (blue) and Wi-Fi (red) interconnected networks structure.
*n: number of nodes (up to 64000 nodes).
Source: Own elaboration.

The mobile device is linked to the Wi-Fi network, by using the Wifly 802.11a/g (Interconnectivity Node) devices through the wireless router. Thus, the different wireless communication networks are integrated with the HMI (Human Machine Interface) present in the mobile device.

2) Microcontroller

Fig. 4 shows the flow chart of the functions established by the microcontroller (PIC 16F887), which reads the sensor data, interprets and packs the information through a ZigBee-API communication frame and sends the data read by the sensors. These must have an operating range between 0 and 5 volts. Microcontroller (PIC 16F887) also routes the information to a specific node in the network.

Fig. 4. Microcontroller Flow chart.
Fuente: Elaboración propia.

Another task performed by the microcontroller is to generate the PWM signals that control light intensity and color variety of RGB LEDs. In this way, the structure of the microcontroller program is determined by the flow chart of nodes 1 and 2 shown in Fig. 4, where its main functions are interpreted.

3) Power and control stage

The power and control stage is implemented through three PWM signals coming out of the microcontroller to manage each RGB color, which is then managed by the Mosfet (P36NF06L) with high performance at a maximum working power of 1800W (60V to 30A) and fast response in the PWM signal. Therefore, it is a critical stage in the suitable generation of PWM signal, which in normal conditions works for each color at a maximum power of 24W (12VDC at 2A) on a 5050 RGB LED ribbon of 5m. It can reach a maximum total consumption of 72W. This is achieved when the luminaire becomes totally white, that is, when the red, green and blue colors are at their maximum intensity and power ratio respectively.

In addition, a variation for each color is set by programming in the 8bit microcontroller. Thus, a variety of more than 16 million colors is reached as shown in Fig. 5a and Fig. 5b. A part of the RGB LED ribbon controlled by node 1 in green and node 2 in blue respectively can be seen.

Fig. 5. ZigBee communication card with power module and RGB LED control. (a) Node 1 (RGB in green), (b) Node 2 (RGB in blue).
Source: Authors.

B. Mobile celular APP

Software applications on mobile cellular devices (APP) are designed using Android environment in the Java programming language. These are compiled using the Android SDK Tools, which generates the code and creates the files needed to run the applications on mobile devices, creating the package extension .apk, which is installed on devices with Android operating systems [20].

Once the application is installed in a device, it lives in its own limited security environment under the following conditions [21]:

Android operating system is Linux for multiple users, where each application is a different user. The system assigns each application a unique Linux user ID by default (the ID is used only by the system).

In this way, Android system implements the principle of minimum privileges. That is, by default each application has access only to the components it needs to do its job and nothing else. This creates a very secure environment in which an application cannot access parts of the system for which it is not given permission. However, there are ways for an application to share data with other applications; these are:

1) Lifecycle of an activity

An activity is a simple task that a user can do (each screen of an application is considered an independent activity). During the lifetime of an activity, the system calls a set of basic methods known as lifecycle methods, in a sequence similar to a step pyramid. That is, each stage of the activity’s lifecycle is a separate stage in the pyramid (Fig. 6). As the system creates a new stage of the activity, each call method moves the activity one step up. The upper part of the pyramid is the point at which the activity runs in the background and the user can interact with it [22], [23].

Fig. 6. Lifecycle of an activity.
Source: [22].

As the user begins to leave the activity, the system calls other methods that move the activity to the bottom of the pyramid in order to dismantle it. In some cases, the activity will move only some stages down the pyramid and wait (for example when the user changes applications). At that point, the activity can return to the top (if the user returns to the activity) recalling where the user left it.

2) Mobile application development

The development of this application looks for the integration of embedded systems, which works as a tool when managing the present lighting resources to optimize execution times and costs related to the energy consumption of lighting models.

Fig. 7 shows one of the functional parameters in the design of lighting models. It consists of its remote interaction by planning and programming light intensities from a mobile cellular device. Fig. 8 shows the design of the APP user graphic interface, developed under programming environments that use languages Java, C/C++, Eclipse, among others [23].

Fig. 7. Eclipse programming environment.
Source: Authors.
Fig. 8. Mobile cellular interface APP.
Source: Authors.

This development has the purpose of integrating the analysis and knowledge of programming structures oriented to objects with the handling of wireless communications and the varieties of RGB illumination. In addition, it integrates luminous effects with temporary variables.

3) Wireless communication protocols and standards

The mobile application complies with the IEEE 802.11.a/g standard by implementing the TCP/IP protocols through the so-called sockets, which allow the exchange of information between an IP address and a destination port. The interface has a socket to which only the IP address of the interconnectivity node present in the sensor network must be supplied. It also identifies the network node under the ZigBee protocol with which it exchanges information. In the interface this selection is made with the so-called seekbar (slider bars), which indicate the light intensity that each node must have in the subnet [24].

4) Status control and system indicators

Status control and system indicators refer to light intensity, sequences, special effects and RGB color range.

Fig. 7 shows the development platform used (Eclipse). The interface of the developed application can be seen in Fig. 8, in which the parts making up its functioning are shown.

III. Results and Discussion

The preliminary design of the embedded system complies with the interconnectivity of XBee and Wifly technologies. In addition, the interconnectivity node and the other nodes of the network can generate PWM signals that control the RGB lighting system. In this way, an independent lighting control point which can operate independently can be obtained from each node.

To initially establish the link between the interconnection node and the cellular mobile device, a previous inspection of the wireless networks of the environment must be performed in order to configure the IP addresses of the Wifly modules, so that the IP addresses of other devices present in the wireless network are not repeated. In this case, an application (APP) called Fing - Network Tools is used, of open source in which the available connectivity of the network devices can be visualized. In this way the scanning is obtained: SSID (Service Set IDentifier) name of the network generated by the router, cellular mobile IP address (192.168.0.100), Wifly IP address (192.168.0.101), gateway IP address (192.168.0.254).

Fig. 9 shows the results as follows: IP address 192.168.0.100 that allows connection with the router. This address can be entered in the first red box of the Control Wireless Network interface.

Fig. 9. APP Mobile cellular Control Wireless Network.
Source: the authors.

In “Frame” the ZigBee API transmission frame will be displayed in green box, which sends the RGD data in hex code (77, 55) to the master node; 7E 00 0E 1A 32 32 32 00 00 77 55 00 00 00 00. Then, the scale of the RGB slider is determined by the interval of (0-128). It can be observed in a numerical decimal way; R:119, G:85 and B:0. The RGB values respectively in hexadecimal code corresponds to: R:77, G:55 and B:00. The RGB values: 119,85,0 must be duplicated for simplicity of the algorithm, to obtain RBG: 238,170,0. As a result, #EEAA00 yellow-red color is obtained by taking the MS-Word color palette. It can be exactly located on the color scale.

In addition, it has two (2) buttons at the top to activate on/off signals remotely, through an actuator in the master embedded system. The four (4) lower buttons have predetermined intermittent effects with lighting effects.

IV. Conclusions

After the tests carried out in the laboratory, the model developed proved to be reliable in the transmission and reception of data, through the different protocols used, thus demonstrating its great scalability and flexibility. It allows users to have information in real time of a specific point of the lighting model.

This development allows the construction of a great variety of network topologies, and the inclusion of different and new technologies, very useful in the management of information with the possibility of dynamizing the interconnected lighting model with the APPs.

Real-time wireless data collection by using ZigBee protocol provides a dynamic and expandable tool, through the wireless sensor network (WSN), coexisting with Wi-Fi communications.

According to the model, the ZigBee network topology can be extended to other applications through the design of industrial processes at scale, or directly to the remote operation of machines through wireless networks, making use of the advantages offered by an HMI and the client/server service implemented in these embedded systems. This allows to keep a real time record of the operation and consumption of the lighting devices or other devices implemented as exercise of the record and report of all the variables of the model.

References

[1] L. Altoé, J. M. Costa, D. Oliveira, F. J. Rey, A. H. Ferrarez & L. Viana, “Políticas públicas de incentivo à eficiência energética,” Estud av São Paulo, vol. 31, no. 89 , pp. 285297, 2017. https://doi.org/10.1590/s0103-40142017.31890022

[2] J. Díaz, “Eficiencia energética: análisis del sistema de iluminación artificial del edificio de la Facultad de arquitectura, arte y diseño de la Universidad Autónoma del Caribe,” Art Dño, vol. 14, no. 1, pp. 3647, 2019. Available: http://ojs.uac.edu.co/index.php/arte-diseno/article/view/2033

[3] G. Pinto, “Uso racional de la energía a partir del diseño de aplicaciones sostenibles en el edificio eléctrica II de la Universidad Industrial de Santander,” tesis magistral, dpto ing elect, UIS, BO, CO, 2013.

[4] M. Beccali, L. Bellia, F. Fragliasso, M. Bonomolo, G. Zizzo & G. Spada, “Assessing the lighting systems flexibility for reducing and managing the power peaks in smart grids,” Appl Energy, vol. 268, pp. 116, Jun. 2020. https://doi.org/10.1016/j.apenergy.2020.114924

[5] X-D. Lai, M-Y. Dai & R. Rameezdeen, “Energy saving based lighting system optimization and smart control solutions for rail transportation: Evidence from China,” RINENG, vol. 5, pp. 1 12, Mar. 2020. https://doi.org/10.1016/j.rineng.2020.100096

[6] H. Jiang, B. Liu & C. Chen, “Performance analysis for ZigBee under WiFi interference in smart home,” presented at IEEE Int Conf Commun, ICC, PAR, FR, 21-25 May. 2017. https://doi.org/10.1109/ICC.2017.7997161

[7] ONU, Aceleración de la adopción mundial de la iluminación energéticamente eficiente. PA, FR: PNUMA/FMAM/U4E, 2016. Recuperado de https://united4efficiency.org/wp-content/uploads/2017/04/Lighting-Policy-Guide-Spanish-20180201.pdf

[8] F. J. Martínez & E. Velasco, Eficiencia energética en edificios: certificación y auditorías energéticas. ES: Editorial Paraninfo, 2006.

[9] J. M. Rey, A. Rey, E. Velasco, J. F. San José & F. J. Rey, “Propuesta de la certificación energética, mediante simulación dinámica, como herramienta de gestión energética ISO 50001 Versus auditoria energética en edificios,” presentada al III Congreso Iberoamericano Energía Ambiente y Tecnología , CIEEMAT, Brg, PT, pp. 18, 12-15 jul. 2017. Disponible en http://uvadoc.uva.es/handle/10324/25500

[10] M. Kokken, Control inteligente para una iluminación eficiente Schreder, BE: Owlet Eds, 2013.

[11] A. Serrano-Tierz, A. Martínez, O. Guardddon & J. L. Santaloya, “Análisis de ahorro energético en iluminación LED industrial: Un estudio de caso,” DYNA, vol. 82, no. 191, pp. 231239, 2015. https://doi.org/10.15446/dyna.v82n191.45442

[12] S. Bunjongjit, A. Ngaopitakkul & M. Leelajindakrairerk, “Analysis of harmonics in indoor Lighting System with LED and fluorescent luminaire,” presented at IEEE 3rd International Future Energy Electronics Conference and ECCE Asia, ECCE Asia, Khh, Tw, Cn, 3-7 Jun. 2017. https://doi.org/10.1109/IFEEC.2017.7992380

[13] H. Toshi, H. Hisanori, K. Tsuyoshi & S. Hisashi, “Industrial Wireless Standardization - Scope and Implementation of ISA SP100 Standard,” presented at SICE Annual Conference 2011, SICE, Tyo, Jp, pp. 20592064, Abr. 2013.

[14] P. Bosch, T. De Schepper, E. Zeljković, J. Famaey & S. Latré, “Orchestration of heterogeneous wireless networks: State of the art and remaining challenges,” Comput Commun, vol. 149, pp. 6277, Jan. 2020. https://doi.org/10.1016/j.comcom.2019.10.008

[15] W. Diewald, “Nuevas posibilidades de iluminación con LED,” Téc Ind. Esp Elec Elect, vol. 15, no. 10, pp. 4244, Oct. 2004. Available: https://www.tecnicaindustrial.es/wp-content/uploads/Numeros/15/10/a10.pdf

[16] A. Romero, A. Marín, A. Quiceno & J. Jiménez , “Integration in wireless sensor networks (WSN) IEEE 802.15.4–802.11 for industrial automation,” II Int Cong Eng Mechatron Autom, CIIMA, BO, CO, 23-25 Oct. 2013. https://doi.org/10.1109/CIIMA.2013.6682778

[17] S. Sadowski & P. Spachos , “Wireless technologies for smart agricultural monitoring using internet of things devices with energy harvesting capabilities,” Comput Electron Agric, vol. 172, pp. 1–12, May. 2020. https://doi.org/10.1016/j.compag.2020.105338

[18] A. Romero, A. Marín & J. A. Jiménez, “SCADA system for detection of explosive atmospheres in underground coal mines through wireless sensor network,” IEEE Lat Am Trans, vol. 12, no. 8, pp. 13981403, Dec. 2014. https://doi.org/10.1109/TLA.2014.7014506

[19] G. A. C. Gouvea, E. L. Santos, A. C. K. Ferrari & H. T. S. Filho, “A study of the Mesh topology in a ZigBee network for home automation applications,” IEEE Lat Am Trans, vol. 15, no. 5, pp. 935942, May. 2017. https://doi.org/10.1109/TLA.2017.7910209

[20] Developer Android, “Developers,” developer.android.com, [online]. Available: https://developer.android.com/about/versions/o/index.html

[21] P. Guerreiro, “Interfaz en smartphone para supervisión de un sistema de control de una instalación solar térmica,” tesis magistral, dpto ing elect, UALG, Faro, PT, 2014.

[22] Desarrollador Android, “Gestionar el Ciclo de Vida de una Actividad,” desarrollador-android.com, [online]. Available: https://desarrollador-android.com/desarrollo/formacion/empezar-formacion/gestionar-el-ciclo-de-vida-de-una-actividad/iniciar-una-actividad/

[23] G. Pandey & D. Dani , “Android mobile application build on Eclipse,” Int J Sci Res, vol 4, no. 2, pp. 15, Feb. 2014. Available: http://www.ijsrp.org/research-paper-0214/ijsrp-p26114.pdf

[24] K-Y Lian, S-J Hsiao & W-T Sung, “Intelligent multi-sensor control system based on innovative technology integration via ZigBee and Wi-Fi networks,” J Netw Compt Appl, vol. 36, no. 2, pp. 756767, Mar. 2013. https://doi.org/10.1016/j.jnca.2012.12.012

Álvaro Romero-Acero. Control Engineer of the Universidad Nacional de Colombia, Mobile Communications Specialist, member of the research group GIDIA (Spanish stand for : Artificial Intelligence Research and Development Group). https://orcid.org/0000-0002-2974-317X

Alejandro Marín-Cano. Control Engineer of the Universidad Nacional de Colombia, member of the research group GIDIA (Spanish stand for: Artificial Intelligence Research and Development Group). https://orcid.org/0000-0001-9092-4212

Jovani Alberto Jiménez-Builes. Full time Professor of the Universidad Nacional de Colombia. Ph. D. in Engineering – Systems, and Master in Systems Engineering of the Universidad Nacional de Colombia. Codirector of GIDIA (Spanish stand for: Artificial Intelligence Research and Development Group). https://orcid.org/0000-0001-7598-7696