EXPERIMENTAL VERIFICATION OF THREE MODE CONTROLLER FOR HOME APPLIANCE USING WIRELESS TECHNOLOGY

An attempt is made to enhance the automation and sophistication of a home appliance. In this work, electric lamp is considered as a home appliance and it is controlled through three different modes. Technology is a never-ending process, the home automation is a well-known field of recent research, which makes the customer to reach the next level of sophistication. One such next level is presented in this article. The proposed paper is about design, experimentation and testing of three-way control for a lamp, using low cost microcontroller, Bluetooth module and android mobile application. The three modes of control are manual switch mode, Light Dependent Resistor (LDR) mode and Bluetooth based Wireless communication mode. The work is initially simulated using Proteus 8 Professional Application and then implemented as a real time working model. Also, the working performances were tested using the Simulation and developed working model. The control in Bluetooth mode is based on an Android Application. A dedicated Android Application is developed for testing the developed working model, using MIT App Inventor. ABSTRAK: Percubaan dibuat untuk meningkatkan automasi dan kecanggihan perkakas rumah. Dalam karya ini, lampu elektrik dianggap sebagai perkakas rumah dan ia dikendalikan melalui tiga mod yang berbeza. Teknologi adalah proses yang tidak pernah berakhir, automasi rumah adalah bidang penyelidikan baru-baru ini, yang menjadikan pelanggan mencapai tahap kecanggihan yang seterusnya. Satu tahap seterusnya ditunjukkan dalam artikel ini. Makalah yang dicadangkan adalah mengenai reka bentuk, eksperimen dan pengujian kawalan tiga arah untuk lampu, menggunakan mikrokontroler kos rendah, modul Bluetooth dan aplikasi mudah alih android. Tiga mod kawalan tersebut ialah mod suis manual, mod Perintang Bergantung Cahaya (LDR) dan mod komunikasi Tanpa Wayar berasaskan Bluetooth. Karya ini pada mulanya disimulasikan menggunakan Proteus 8 Professional Application dan kemudian dilaksanakan sebagai model kerja masa nyata. Juga, prestasi kerja diuji menggunakan Simulasi dan model kerja yang dikembangkan. Kontrol dalam mod Bluetooth didasarkan pada Aplikasi Android. Aplikasi Android khusus dikembangkan untuk menguji model kerja yang dikembangkan, menggunakan MIT App Inventor.


INTRODUCTION
In the modern era of automation and sophistication, there are tremendous changes and impacts in the human life style [1,2]. Undoubtedly, electricity has a major role in the Abdul Wahidh and Masilamani https://doi.org/10.31436/iiumej.v22i2.1618 betterment of human life style. The expectation of sophistication in our day to day life is on the increasing trends. The field of automation, drives the controllability of electrical appliances to an innovative level, for meeting the future requirements. Wireless communications are becoming more popular around the world and the consumers appreciate this wireless life style which gives them relief from the congestion of more wires [3,4].
Usually the control of electric applications is achieved by using switches i.e., when switched ON, the electric supply will be given to the applications and vice versa. If the user wants to control the application, he should be near the switch. In case if he wants to control the application from a faraway place then he should carry a remote always. Bluetooth (wireless) technology finds its usage in the field of home automation [5,6].
The day to day advancements in smart phones and its features, make the users to think about replacement of the recent smart phones as the remote for the home appliances [7,8]. Using a Smart Phone as a remote not only decrease the human intervention, also it reduces the time of control. Adopting the Smart Phones as a remote, to control the appliances will make it easy to do switching operation of an electric appliances, by elderly or handicapped persons. So, the mobile phones were introduced into the monitoring and control of home appliance, by avoiding dedicated remote to control the electrical appliances [9,10].
Many researches have been made and exhibited related to the control of a Lamp using Arduino UNO microcontroller. But in all the basic controlling strategy we can control the Lamp by only one mode, i.e., the Manual Switch mode. While going for the Sensor based lamp control, an electric lamp can be controlled according to the signal received from the sensor. In this a Light Dependent Resistor (LDR) is used to detect the surrounding light and control (ON / OFF) the lamp accordingly [11][12][13].
In the recent days, some home automations were also proposed using Bluetooth Communication. The traditional control of home appliance through wall mounted switches were changed into wireless control of appliances. Here home electrical appliances were controlled through Bluetooth communication between the Bluetooth Module (HC-06) and the Bluetooth enabled android smart phone. The Bluetooth mobile phone will work as a transmitter and the Bluetooth Module connected with the microcontroller will act as the receiver. [14][15][16].
To command the Bluetooth receiver, the Bluetooth enabled Android Phone, i.e., the Bluetooth transmitter, should have the proper Application installed in it, to ensure proper control of electrical appliances. The research work related to the development of an Android Mobile Application development, for the purpose of home automation by Arduino Microcontroller and Bluetooth module has been proposed [17,18]. These papers gain us ideas about Android Mobile Application development using MIT App Inventor, for lamp control using Bluetooth, through three different modes.
The previous researches were proposed to control the electric lamp in any one mode (or in very few cases two modes) of operation. This will give the user only a certain level of sophistication. The implemented system is designed to integrate all the three individual control techniques into a single control system, which controls the electric lamp in all the above said 3 different modes, say Manual switch mode, LDR mode and Bluetooth mode. This will make the user of lamp to reach the next level of sophistication.

THE PROPOSED METHOD
Block diagram of the proposed system is illustrated in Fig. 1 LDR mode and another wireless channel controls the lamp in Bluetooth mode. For the manual switch mode of operation, a two pin SPST switch is used. For the LDR mode, a 10K LDR is used in series with a 10K ohm resistor, as a voltage divider network. The control signal to the microcontroller is taken from the mid-point between the resistor and the LDR. The Bluetooth communication is achieved by using HC-06 module. This module will establish a wireless connectivity between the controller and the android mobile phone. Upon receiving the control signal from the android mobile phone, the micro controller will change the lamp status accordingly. The android mobile will have a dedicated application which is developed for controlling the lamp. The lamp is connected to the microcontroller through relay module.

Arduino UNO
Arduino is an open-source electronics platform supported with easy to use hardware and software supports. Arduino UNO is a low-cost microcontroller board, built around ATMEGA328p processor. It has 6 analog pins and 14 digital pins. The board can be powered by USB cable or 12V external power supply. The board can be programmed to control any pins, through Arduino Software (IDE). In recent years the Arduino boards finds it application in all of the electronics projects ranging from beginner level to highest level like scientific solutions etc.

Relay Module
It is an electrically isolated switch, which isolates the power circuit from control circuit. The control signal (5 V) which will be available in one off the digital pin can be connected to the input side of the relay. Now the output of this relay can even be connected to any 240 V power supply side, if we desire to control a 240 V load. This Switch operates through a relatively small electric current that can turn or off a much larger electric current.

Bluetooth Module
The Bluetooth module used here is HC-06. It is easy to use Bluetooth Serial Port Protocol Module. This module works on serial communication. HC-06 is a Master/Slave module. By default, every module will be set to Slave. It can be reconfigured to Master, through AT commands. As it is a Slave module, it can only accept connections, whereas Master module can initiate a connection to other devices. The operating range of this module is around 2.4 GHz, with a distance of about 10 meters at a speed of 1 Mbps. The Smart phone will send serial data to the Bluetooth module when a button is pressed on the app.

Light Dependent Resistor (LDR)
LDR is a variable resistance whose resistance value will vary according to the intensity of light falling on lit. The LDR will offer less resistance when the Light intensity on the LDR is more and the resistance offered will be more when the light intensity on the LDR is less. Due to this property, it will be commonly used as Day/Night Sensor in Street Lighting Projects. Since on Day time, the resistance of LDR will be less and on Night time resistance of LDR will be high.

Arduino IDE
The Arduino IDE (Integrated Development Environment) is an open-source software that allows the user to do coding, editing, compiling of program. The written program will be uploaded into the Arduino boards. Arduino IDE was available for all of the major OS. The Arduino IDE has inbuilt functions and libraries that works on Java platform.

MIT App Inventor
This is also another Integrated Development Environment (IDE) used to develop applications for Android Phone using web browser. This application can be connected to a mobile phone or an emulator. In MIT App Inventor, there will be two main windows, one is the designer window to design the Graphical User Interface (GUI) and the second window is the Block Programming Window. Figures 2 and 3 show the Designer Window and Block programing window respectively. In MIT App Inventor, there will be no coding to develop an android app, rather we will be doing a much easier block programming (pick and place programming). This App inventor is available for all major OS and easy to upload the developed app in any android smart phone. The most interesting feature of this paper is the graphical user interface, developed in MIT App inventor. This will be installed in the android smart phone. The smart phone used throughout this paper was Samsung A5-2017.This user interface is developed in such a way that; it will help the user to pair the smart phone with the Arduino Bluetooth module. The communication between the Bluetooth module and the Android Smart phone will be using Bluetooth protocol. The GUI will have a list picker, which will list all the available Bluetooth devices, around the Android Smart phone. Also, the GUI will have a label, to display the Bluetooth device connectivity status. In addition, two buttons were provided in the application, one to switch ON the lamp and another button to switch OFF the lamp. To increase the facility for elderly/physically changed people, voice reply is also added in the application to say the status of lamp.

SIMULATION OF THE PROPOSED SYSTEM
Proteus is the one of the simulation software to do the all type of electronics project from simple rectifier circuit to advanced level controllers with all the recent sensors, switches, wireless communication devices and controllers. Here the Proteus 8 professional application is used for the proposed system simulation. Figure 4 depicts the complete circuit diagram of the proposed system with Proteus simulation software. Here the same Arduino code and the android mobile application are used for controlling the lamp for both simulation and for hardware implementation. In simulation the Arduino sketch is initially compiled and the developed hexadecimal code path is identified and it will be entered into the Arduino controller. Similarly, for the Bluetooth, the input COM port number is identified and it will be entered into the Bluetooth device for connectivity between mobile and the computer for simulation. Figure 5 illustrates the simulation output, in which the lamp is turned ON by manual switch. Out of three mode of control the first mode is simulated and illustrated here. From  Fig. 5, it is clear that the LDR torch is near, meaning that more light is fall on the LDR also no signal from Bluetooth device, only the manual switch is turned ON and the lamp is glowing.     Figure 6 demonstrates the simulation output, in which the lamp is turned ON by LDR sensor. Out of three mode of control, the second mode is simulated and demonstrated here. From Fig. 6, it is clear that the manual switch is turned OFF also no signal from Bluetooth device, but the LDR torch is moved away meaning that the light is not falling on the LDR, hence the lamp is glowing. This mode is automation mode whenever the surrounding light intensity is less or dark, the lamp will be turned ON automatically by using the LDR sensor.   Figure 7 shows the simulation output, which the lamp is turned ON by Bluetooth communication. Out of three mode of control the third mode is simulated and displayed here. From Fig. 7, it is clear that the manual switch is turned OFF also the LDR torch is near, meaning that more light falls on the LDR, but the Bluetooth device receives signal from the android mobile app which is developed using MIT app inventor, hence the lamp is glowing. This mode is sophistication mode whenever the light illumination is needed then the lamp may be turned ON using the mobile application which was developed and installed on the user's android smart phone.

IMPLEMENTATION AND VERIFICATION OF THE PROPOSED SYSTEM
The lamp will be controlled in three different ways. One is the manual mode, by using a SPST switch. Second is the automatic mode. In this mode, the LDR will work as a Day/Night sensor and get the surrounding light intensity. If the surrounding light is dark, the lamp will be ON. If the surrounding light is bright, then the lamp will be made OFF through the relay.    The third mode is through wireless Bluetooth communication. The Bluetooth Module will be connected to the Arduino Controller. Figure 8(a) and (b) shows the lamp status, while Fig. 8(c) show the comment lines which were made printed on the Serial Port Monitor in the Arduino IDE for the corresponding status of the lamp. Depending on the data sent from the Bluetooth module the Arduino controller will make the relay module ON or OFF. The lamp will be turned ON or OFF through the relay driver module. The data sent to Bluetooth module will be varied in the Android Smart Phone. The communication between Android Smart Phone and Bluetooth Module is through serial data communication. All the three modes of operation were represented in Fig. 9 as a flowchart.

RESULTS AND DISCUSSION
The project was tested and the results obtained were represented as in a table format as shown in Table 1. The obtained results were found to be accurate. In manual operation mode, when the manual switch is made ON then the lamp will be made ON through relay. The delay time elapsed by the Lamp for switching form OFF state to ON state was measured to be 2 sec. Similarly, if the manual switch is made OFF, then the lamp will be made OFF. Again, the time elapsed by the lamp was measured to be 2 sec.  In LDR mode of operation, if the surrounding light intensity is Dark, the lamp will be made ON. Similarly, if the surrounding light intensity is Bright, then the lamp will be made OFF. This is made automated that no need of human intervention to change the lamp status, in LDR mode of control. The time taken by the lamp to change from ON state to OFF state or vice versa was measured to be 2 sec.
In wireless mode, the Android Smart phone is paired with the Bluetooth module correctly, either by Media Access Control (MAC) address or by giving a specific name to the Bluetooth Module. The distance between Android Smart phone and HC 06 Bluetooth Module was kept to be 10 meters during the test.
The control word (data) will be sent from the Android Mobile phone through the Android App developed. This data will be received by the Bluetooth module and the same data will be checked by the microcontroller. If the data received is 1 (by pressing ON button in the App), the lamp will be made ON. Similarly, if the data received is 0 (by pressing OFF button in the App), the lamp will be made OFF. In Bluetooth mode the delay time for reaching ON status in the lamp is measured to be 2 sec, and the same for reaching OFF status in the lamp is measured to be 4 sec.

CONCLUSION
The endowment of innovation to human kind is to make life more straight forward. In this paper, a three-way control of electric lamp was outlined, exhibited and executed. The lamp is controlled individually without the requirement of Line of Sight. The relay activity and thereafter the lamp can be controlled with an automated mode and also in Bluetooth control mode.
This proposed system not only make it easy to do switching operation of an electric appliances, by elderly or handicapped persons, but also decrease the human intervention into the lamp control cycle and reduce the time delay in manual mode of control. The control over the lamp is secured, to the access from any other intruders, through a pairing password, for the Bluetooth control. Through this Unauthorized Bluetooth device entries were avoided, which give more security to the System. This project can be used for any other electrical appliance that requires on/off switching, without internet connections.
The full functionality of the lamp was tested in all three modes using manual switch, LDR operation and Bluetooth wireless communication, between the android smart phone and the Bluetooth module. The results achieved were 100% accurate.