Low-cost Appliance Switching Circuit for Discarding Technical Issues of Microcontroller Controlled Smart Home

: As technological advancement in recent years is bringing ease to our everyday life, smart home systems based on wireless networks and sensors are rapidly gaining importance. Research on microcontroller controller smart home systems has become popular due to its low cost and reliability. However, appliance switching capacity of microcontroller is quite low which limits the widespread use of such sort of systems. This paper introduces an external appliance switching circuit for microcontroller controller automated home which has the ability to control 208 appliances. This large appliance switching capability has been obtained by demultiplexing digital signals obtained from microcontroller board using a complex array of 4 to 16 line decoders. The proposed appliance switching circuit can be implemented with 60-70% less wiring cost in real time compared to the typical wiring technique in microcontroller controlled smart homes. Also, hardware implementation expenditure in this research has been reduced significantly compared to the existing designs. Moreover, the issue associated with existing microcontroller appliance switching scheme in case of incorporating manual switch has been solved. The proposed circuit is incorporated with a smart phone application by which the user sends commands to the microcontroller board using Bluetooth as the medium of wireless transfer. The proposed microcontroller controlled smart home system with external appliance switching circuit is quite cheaper than the existing systems which allows consumers to afford smart living with limited budget. Due to reduction of implementation cost and solution of major technical design issues incorporated with the existing microcontroller-based system been solved in this research work, microcontroller based smart home systems is expected to become a potential product in the market in near future.


Introduction
Smart Home Systems or simply Smart Home means automation of our electrical and electronic devices of our house. Smart Home has achieved a great interest in the recent years and has become a popular topic of interest for researchers. By implementing Smart Home System in our home, numerous household activities of appliances can be controlled [1]. Depending on user's demand, various types of Smart Home Systems have been developed [2].
Early versions of Smart Home Systems used Dual Tone Multi Frequency (DTMF) technology [3]. However, DTMF technology-based appliance control system in home is not quite reliable since the system often result in false appliance switching. Recently, due to technological advancement in wireless sensors and smart devices, Smart Home System is heading towards a new dimension. Using smart phones to control home appliances is the most recent trend in Smart Home Systems [4]. Moreover, hand gesture controlled systems [5,6] and voice controlled smart home system [7] are getting popularity nowadays. However, gesture controlled and voice controlled smart hoe systems require huge installation cost which makes these systems less affordable for people having low budget. Moreover, accuracy is a major problem in such sort of systems. Global System for Mobile (GSM) and Internet have made operating range of home automation systems global [8][9][10]. Internet based systems nowadays offers a wide range of smart functions. But GSM and Internet based smart home systems are sometimes unreliable due to speed issues. Moreover, operating cost of GSM and Internet based smart home systems are high due to SMS and Internet bills. Bluetooth based smart homes offer users smart living within low budget but they have limited range of operation [11]. Energy management in smart home have also become popular to optimize energy consumption which reduces electricity bills significantly [12].
Microcontroller controlled smart home systems have recently gained much interest among researchers [13]. Various smart home methodologies such as Gesture Controlled, Bluetooth based, GSM technology based, voice recognitionbased use microcontrollers for appliance switching [5,11,14,15]. Microcontroller offers a low-cost implementation of smart home appliance control system. But the number of appliances that can be controlled by a microcontroller is very limited. Remote switching of appliances is the most basic and major function of a smart home. Due to having limited number of pins, microcontrollers don't have the ability of controlling a large number of appliances. Due to this reason, widespread use of microcontroller controlled cheap smart homes is halted. Hence, it is necessary to enhance the appliance switching capacity of microcontroller controlled smart homes. This paper introduces a microcontroller controlled smart home system with an external circuit which has the capacity of controlling 208 appliances. The external circuit only needs 4 pins of microcontroller to handle this large number of appliances. The system incorporates a smart app with user-friendly Graphical User Interface (GUI) by which user can send commands to the microcontroller board. Bluetooth was used as the wireless medium from smart phone to microcontroller board.

Literature Review of Existing Microcontroller Controlled Appliance Switching Circuits
Microcontroller controlled Smart Home Systems are gaining much importance nowadays due to its simplicity and low-cost implementation. Various smart features and complicated functions such as voice-controlled lighting, flame and gas monitoring, automatic ventilation etc. can be implemented by microcontroller controlled Smart Home Systems [16].
Typical microcontroller-controlled appliance switching systems consist of a smart phone app, a wireless device or system such as Bluetooth, Wi-fi, Internet etc. and relays to switch on/off appliances [11,17]. Block diagram of conventional microcontroller controlled smart home for appliance switching is presented in figure 1. Microcontroller based appliance switching other than using smart app such as Gesture Controlled, GSM controlled, voice controlled etc. utilizes the same technique for appliance switching by connecting microcontroller pins directly to relay [5,14,15]. The major problem for such sort of systems is appliance switching capacity since microcontroller has limited number of pins. For instance, ATmega328 microcontroller-controlled system presented [16] can control only 12 appliances. ATmega2560 microcontroller-based system presented in the study [18] can control 52 appliances which provides a better option.
Another major problem of microcontroller-based appliance control is inability of switching appliance manually. These systems cannot incorporate manual switches by which appliances can be switched on/off manually. Hence, it is necessary to overcome this problem.

Design Approach of Proposed Microcontroller Controlled Appliance Switching Circuit
The proposed circuit for switching on/off appliance consists of IC4067 (4-16 line decoder IC) and IC4013 (D Flip-flop IC). The proposed circuit requires only 5 back to back 4-bit digital input signals to control 208 appliances. Microcontroller board Arduino UNO R3 is used to send the 4-bit input signal to the circuit. Arduino UNO R3 uses ATmega328 as the microcontroller. Smart phone app has been developed using MIT AppInventor by which the user can send commands. MIT AppInventor is an online and open source software by which smart phone applications can be developed without any sort of programming language [19]. Bluetooth HC-05 module has been used to receive commands from the smart phone app wirelessly.
Block diagram of the proposed external circuit is represented by figure 3. The circuit divides the entire home into 13 different branches, locations or rooms. One decoder IC works as the central controller and the other decoder ICs work in the branches to control appliances. Each Branch Decoder IC has the capability of controlling 16 appliances. Hence, a total of 208 appliances can be controlled using the circuit.

Method of Operation of the Proposed Circuit
The To have a clear understanding of the operation of the proposed circuit, an example is provided using figure 4. If the user wants to switch on/off the appliance number 13 in branch 9, at first, he/she needs to give command from the android app by touching the particular button. The command is sent to the microcontroller board wirelessly by Bluetooth module. Since the Branch IC number is 9 for the command, the microcontroller sends the binary signal 1001 to the circuit.

Design Implementation
The proposed appliance switching circuit for microcontroller controlled smart home system has been practically implemented and tested. Picture of the implemented circuit is represented by figure 5. To show different modules clearly, the circuit contains control mechanism for only 9 appliances located in two different locations. Hence, two Branch Decoder ICs has been used. More appliances in different locations can be controlled by adding more Branch Decoder ICs and D Flip-Flop ICs. Outputs of D Flip-Flops for appliance are connected to LEDs which indicate outputs of our circuit. These output pins are required to be connected to relay for appliance switching. For controlling appliances manually, manual push switches can be connected to the clock of D Flip-Flops connected to relay.

Comparison Between Proposed and Existing Designs
The proposed appliance switching circuit can control large number of appliances compared to the conventional microcontroller systems. The circuit can incorporate manual switch which removes another major problem of existing systems. Detailed analysis between proposed and existing systems is discussed in the following sub-sections. Microcontroller Controlled Smart Home

Appliance Switching Capacity
The proposed ATmega328 microcontroller controlled have the capability of controlling 208 appliances whereas typical systems [11,16,19] can control only 12 appliances. ATmega2560 based system in [18] has the ability of controlling 52 appliances but still it would require 4 such kind of microcontroller to match the appliance switching capability of the proposed circuit.

Practical Implementation in Home
According to theoretical analysis, the microcontrollercontrolled systems [4,5,11,[13][14][15][16][17][18][19] might look very effective. However, these systems have a common major problem. These systems cannot incorporate manual switches with them. This problem is explained using figure 5. If we look fig. 6 carefully, we can observe that the microcontroller-controlled appliance switching technique won't work if the manual switch is turned off. On the contrary, if the relay switch is not energized, it is not possible to switch on the appliance using manual switch. Therefore, appliance switching has to be completely depended smart phone app, gesture, voice or sending SMS. But appliance switching cannot be completely depended on the system and adding manual switches with the system is compulsory.
The proposed circuit has the ability of adding manual switches with it. For manual control of appliances, manual push switches are needed to be connected to the clock of the D Flip-Flops for appliances. Hence, the proposed circuit overthrows a major limitation of existing microcontroller-controlled systems.

Comparative Cost Analysis
The proposed circuit requires only 5 wires to control 16 appliances in a location. But the existing systems need 1 wire for controlling an appliance. Hence, wiring cost is reduced by around 60-70%. Moreover, hardware cost of the proposed system is also quite less than the existing microcontroller-controlled systems. A detailed cost of hardware of the proposed system and existing systems is listed in Table 1.

System Size and Area
After observing Table 1, the thing that might come in one's mind that the proposed circuit contains too much D Flip-Flop ICs [20]. But with careful analysis, it can be figured out that the conventional systems [4,11,16,18] actually require more hardware since they will require additional hardware and circuit techniques to incorporate manual switches. However, the proposed circuit already has the hardware by which in can be incorporated with manual push switches. Moreover, the proposed circuit requires just 4 pins of a microcontroller for 208 appliances whereas the existing system [18] requires 4 microcontroller boards and existing systems in the studies [4,11,16,19] require 7 microcontroller boards. Hence, size of the proposed system is actually less than the conventional microcontroller-controlled systems.

Conclusion
Microcontroller based smart home systems offer consumers a low-cost implementation of automated home. However, due to the major problems such as low appliance switching capability, problems in adding manual switches, inefficient wiring technique etc. limited widespread use of such sort of systems. The proposed circuit for appliance switching has overthrown theses major problems and have made microcontroller controlled smart home systems more reliable, more practical and cheaper. Therefore, people having little budget would be able to afford smart home systems. Since the proposed circuit can handle large number of appliances, it can be also used in industries and offices for remote switching of appliances. We believe that with the proposed appliance control circuit, road to widespread use of low-cost microcontroller controlled smart home systems will be opened.