Enhancement of Wireless Lighting Control System

The rapid increase in wireless technology has enormously increased wireless control of lighting system in residential, commercial, and industrial settings of many countries across the world. However, this system lacks troubleshooting interface, making it very diﬃcult for the identiﬁcation of faults in the lighting system. This paper therefore seeks to improve on the wireless lighting system by incorporating into the system two types of sensors such as the current sensor and light dependent resistance (LDR). The current sensor is functioned to determine fault in power supply, whilst the LDR determines fault due to damage in the AC lamp. The proposed system was ﬁrst simulated with Proteus software to observe the set objectives. A successful simulation resulted in the implementation of the system. The results discussed prove that incorporating wireless technology with current sensor and LDR will make troubleshooting easy and eﬀective when the need arises.


Introduction
Automation of lighting system has become undoubtedly an essential utility in residential and industrial settings. is type of system enhances the ease in controlling the lighting system. Moreover, automation of lighting system enhances security in residential and industrial settings [1]. e increase in the automation of lighting system is due to the rise in wireless communication technology.
Wireless communication technology is a medium for transmitting information from one device to another [2]. Essential wireless communication technology include microwave radio, Zigbee, Bluetooth, satellite communication, broadcast radio, Wi-Fi, Global Positioning System (GPS), and Global System for Mobile Communication (GSM). Researchers always focus on the cost, efficiency, and the size in choosing the type of communication technology to implement the system. is research work focuses on enhancing automatic lighting system with sensors. Additionally, light dependent resistor (LDR) and ACS712 current sensors were added to the wireless technology system. ese new features of the system enhance effective maintenance when the need arises.

Communication Technology.
is section of the paper discusses the essential communication technologies used in designing an automatic lighting system. e wireless technologies discussed under this section include Zigbee, IoT, Bluetooth, and GSM module. e Zigbee technology makes use of digital radio to enhance the transmission of information from one device to another. is type of communication technology is usually preferred because of its low cost and low battery consumption. Moreover, it has the ability to create up to 65,000 nodes per network. However, with respect to the Wi-Fi technology, Zigbee is not secured. In addition, this technology has a limited distance compared with the GSM technology. Figure 1 shows an image of Zigbee module.

Internet of ings.
Internet of ings (IoT) refers to the devices across the world, which are connected to the Internet for collecting and sharing data [4]. ESP8266 module is usually connected to the Arduino Uno to enable the Internet connection. e use of IoT enhances the storing of information on cloud. However, there is a high risk with privacy and security. ere might be a leakage of important data to a third party when using IoT. Moreover, hackers can hack into the cloud to retrieve important data. Figure 2 shows an image of ESP8266 module.

Bluetooth.
Bluetooth is a high-speed short-range technology, which connects phones and other portable equipment together for information transfer [5,6]. It operates within a frequency band of 2.45 GHz. One main advantage of Bluetooth is that it has low power consumption (at about 0.3 mW). However, the distance needed to control the lighting system is very short compared to other wireless communication technologies. Figure 3 shows an image of a Bluetooth module.

Global System for Mobile Communication Module.
e Global System for Mobile Communication (GSM) is a digital cellular wireless technology, which is used for transmitting mobile voice and data services [7]. is type of technology operates at a frequency band of 850 MHz, 900 MHz, 1800 MHz, and 1900 MHz. Modern GSM technology provides high-speed data transfer. However, this technology uses pulse-based burst transmission which interferes with certain electronics. erefore, locations such as hospitals, petrol bunks, and airplanes do not encourage the use of GSM-based mobile. Figure 4 shows an image of GSM module.

Related Works. Taştana and Gökoza implemented an
Internet of ings (IoT) based air conditioning and lighting control system for smart homes [8].
e work aimed at providing a comfortable and smart way of controlling air conditioning and lighting system. It was achieved with Arduino Pro Mini, NodeMCU embedded system microcontroller, and Blynk iOS/Android interface developer. is research work succeeded in controlling home appliances and devices with a mobile phone or tablet. However, the system has no interface to diagnose fault condition when the need arises.
A group of researchers designed an efficient smart home management system with IoT [9]. e work focused on enhancing the security and efficiency of an IoT-based smart lighting system. It was achieved with the Secure Hash Algorithm 256 (SHA-256). e researchers succeeded in contributing to knowledge by implementing the system with a piece of hardware, a server with high security, and a web application. Although the research work was successful, yet there was no interface to diagnose fault condition for easy repair and maintenance.
Swamy et al. also implemented a smart home lighting system [10]. e work aimed at developing a flawless smart home helper to operate home appliances easily through voice command. It was achieved with both hardware and software components possessing a speech recognition module. e speech recognition module was implemented with natural language processing (NLP). Although the system improved wireless lighting system, there was no fault detection interface to diagnose fault in appliance. Hence, diagnosing of fault in appliances becomes difficult when the need arises.
Lee et al. developed a residential lighting control system with Zigbee wireless technology [11]. e work aimed at reducing the power consumption of residential lighting system. It was achieved by integrating Zigbee wireless technology into the lighting control system. e proposed system was able to save the electrical energy up to around 11.81%. However, the system lacked the ability to diagnose fault in appliances.     Journal of Electrical and Computer Engineering A team of researchers implemented an automatic lighting and control system for classrooms [12]. e work focused on eliminating the attitude of leaving the appliances in a classroom ON when no one is available.
is was achieved using Arduino Uno, Bluetooth module, and a voice-controlled module. e system was implemented and used in a classroom. However, the system has no interface to diagnose faults in appliances during fault condition.

Methods Used
e proposed system was first designed with Proteus software before its implementation. is was to avoid the waste of money in buying irrelevant electronic components. A block diagram was designed to serve as a guide in simulating the proposed design. Figure 5 shows the block diagram of the proposed design.
Considering Figure 5, as current flows from the AC power supply to the lamp, part of the current is fed to the microcontroller through the current sensor. e light dependent resistor (LDR) sensor also monitors the brightness of the room and sends results in a form of electrical signal to the microcontroller. e microcontroller processes the input signal from the current and the LDR sensor to provide feedback to the user. e feedback to the user is transferred wirelessly through a wireless technology. e microcontroller receives its power supply from a rectified 5VDC output. e user wirelessly controls the state of the relay through the wireless technology and the microcontroller.

Selection of Components.
Selection of components was based on cost, efficiency, and availability. Current sensor, LDR sensor, and Atmega328p-pu microcontrollers were among the key components considered for the design.
3.1.1. ACS712 Current Sensor. ACS712 current sensor is a fully integrated indirect current sensor that is used in detecting the amount of current flow from an electrical source to a load. e principle of operation of ACS712 current sensor is based on Hall Effect. e Hall Effect sensing method detects the presence of magnetic field as current flows through the sensor. is is followed by the generation of a proportional analog output voltage at the output terminal of the sensor. e output voltage signal is then transferred to a connected microcontroller for processing. Figure 6 shows an image of an ACS712 current sensor module.

Light Dependent Resistor.
Light dependent resistor (LDR), also known as photocell or photoresistor, is a passive electronic component, which increases or decreases its resistance based on the light intensity. An increase in the light intensity decreases the resistance of the LDR, whilst a decrease in the light intensity increases the resistance of the LDR. e LDR present in the circuit was responsible to transfer a proportional analog current signal to the microcontroller based on the amount of light intensity detected. Figure 7 shows an image of an LDR.

Atmega328p-pu Microcontroller.
Atmega328p-pu is an 8-bit RISC processor core microcontroller based on modified Harvard architecture. e main function of the microcontroller is to control the relay based on the input signal from the user. Moreover, it aids in detecting faults by monitoring current flow of the power supply, as well as the light intensity of the lamp. e microcontroller receives proportional analog voltage signal from the current sensor and converts it to a digital signal by the principle of the following equations: where V p−p � peak-to-peak voltage V rms � RMS voltage I rms � RMS current V ref � analog reference voltage input R � sensitivity of current measured in ohms ADC max � maximum ADC value based on the input of the current sensor ADC min � minimum ADC value based on the input of the current sensor Concerning the light intensity, the microcontroller converts the analog output voltage of the LDR (ranging from 0 V to 5 V) to digital value ranging from 0 to 1023. e higher the intensity of the light, the higher the digital value of the output voltage of the LDR sensor.

Results of Simulation.
e proposed system was simulated with Proteus software to observe its response to the set objective. Figure 8 shows the system's design on the software.
With reference to Figure 8, the design has three main sections, that is, the controller circuit, the main circuit, and the receiver. e main circuit mainly consists of a 220 V/ 50 Hz AC voltage source, which supplies power to a 60 W AC lamp. e power supply flows through a Single Pole Single row (SPST) control switch (the control switch is used to introduce fault into the system), the relay, and the current sensor. e controller circuit controls the 5 V input electromagnetic relay to determine the state of the AC lamp. Moreover, it monitors the state of the main circuit by receiving signal from the 20 A current sensor and a 100 mW LDR with 540 nm spectral peak value. e "receiver" circuit controls the relay of the main circuit through the controller circuit. During fault condition, the virtual terminal also displays the type of fault in the system based on the communication signal from the control circuit to the "receiver" circuit. e run button of the software was pressed to begin the observation under normal state condition. After pressing on the run command, the virtual terminal appeared on the screen, as shown in Figure 9. An "ON" command was then input at the virtual terminal dialogue area to turn on the relay.   Succeeding the normal state condition, the control switch was opened to indicate a fault in the power supplied to the AC lamp. Figure 10 shows the state of the device during a fault in the power supply.
With reference to Figure 10, after sending the "ON" command, feedback was displayed on the virtual terminal. e feedback displayed on the virtual terminal indicated that current was not flowing from the AC source to the load. Hence, the lamp went OFF. e control switch was closed again to correct fault in the power supply. However, the resistance of the AC lamp was increased to a very high value to indicate a fault in it. Figure 11 shows the state of the design with a damaged AC lamp.
Although current flowed to the AC lamp, its high resistance caused it to remain OFF. e LDR detected its OFF state and transferred the information to the "receiver" through the controller circuit. is was then displayed on the virtual terminal.  e successful output of the simulation resulted in the implementation of system. A prototype of the system was implemented and tested to observe its response to fault condition. e output of the implementation proved that the system has the ability to notify users during fault condition in home lighting system. Figure 12 shows the process of the implementation.

Discussion of Results.
Based on the observed results, it can be deduced that the system has the ability to detect two main types of faults in the wireless lighting system, that is, a fault in the power supply and the AC lamp.
A comparison was made with the reviewed studies at Section 2.2 to determine the novelty of the proposed system [8][9][10][11][12].
e results of the comparison indicate additional  Journal of Electrical and Computer Engineering features have been added to the wireless lighting system, that is, the current sensor and the LDR. Moreover, the system's ability to detect fault from the power supply and the AC lamp is distinct. e two additional features of the wireless lighting control system ease troubleshooting fault condition. Hence, there is an ease with corrective maintenance when the need arises.

Cost
Analysis. e cost of components that were purchased to realize the implementation of the system was analyzed. Based on the analysis in USD, it can be stated that improving the wireless lighting system will negligibly affect cost. Table 1 shows the output of the cost analysis. e cost of the proposed system was compared to available wireless systems on sale [13,14]. e comparative cost analysis proves that the system will be affordable when produced in a large quantity.

Conclusion
e paper has presented a modified wireless home lighting system for residential buildings. e new approach aids in troubleshooting two main types of faults that usually occur in the system, that is, fault in the power supply and fault due to damage in the AC lamp. is was realized with the aid of a current sensor and an LDR. Modifying the wireless lighting system with these two types of sensors will make troubleshooting easy and effective when the need arises.

Data Availability
Microcontroller codes for the proposed system can be accessed at https://github.com/GeorgeOwusu223/Wireless-System.