Modern Home Automation System for Energy Conservation Archis Banerjee1 , Sadeque Reza Khan2,∗ and M. S. Bhat2 1
Dept. of EEE, 2 Dept. of ECE National Institute of Technology Karnataka, Surathkal. e-mail: sadeque−
[email protected]
Abstract. Last decade has seen serious concerns for the future availability of electrical energy due to the drastic depletion of the conventional fuel resources. Various solutions have been proposed and implemented, of which, using the available energy in the most efficient manner has been seen to give great results in energy conservation. This project contributes to the efforts of energy conservation with the help of cost effective embedded automation. The system offers two modes, one automatic, and the other manual. The former automates the electrical systems of the home to a large extent using the outputs of various sensors through a control mechanism using PIC microcontroller 16F877A, keeping the energy conservation as its primary concern, while the latter is a more of a conventional system, giving the user certain new perks of the existing technology like controlling the electrical appliances, fans and lighting systems through Infrared Remote Control. The system is accompanied with the technology of The Global System for Mobile communication (GSM). Keywords:
LDR, PIR sensor, LM35DZ, IR transmitter-receiver, RS232.
1. Introduction In today’s world, it is very important to have sufficient energy for the continuous growth of the human society in varied fields [1]. But as evident from the facts and figures, the gap between the supply and demand of electricity is increasing each year. India, for example, even after being the fifth largest electrical energy producer, still suffered from 7 percent average power shortage in the year 2007–2008, and the trend is continuing the same way [2]. Also, the conventional non-renewable resources, which are the major contributors to the present day energy, are forecasted not to last very long. Now, automation is one of the finest implementations of the technological developments. Automation basically is meant to avoid the necessity of addressing the same problem again, once it had been solved earlier. For example, in a plastic bottle factory, once the design for the dye is made, the same dye can be used to produce thousands of bottles of the exact dimensions, with so much lesser man power. Today’s industries, and hence the growth of the whole society, is revolutionized by automation. Automation, when applied to domestic environment, brings better convenience, better security, a flexible and a more comfortable life [3,4]. This paper brings out two aspects of home automation, which are user convenience and energy conservation. For the chief objectives of the home automation system brought ∗
98
Corresponding author. ICC-2014
Editors: K. R. Venugopal and A. C. Ramachandra
pp. 98–104.
Modern Home Automation System for Energy Conservation
Figure 1. Proposed system architecture with IR remote.
Figure 2. Proposed system architecture with GSM modem.
out here, considerations have to be made on cost; power consumption and installation ease [5]. The system presented here is very easily compatible with the conventional electrical layouts. The system offers two modes of operation, firstly Automatic mode, secondly Manual mode. Automatic mode is meant to automate the electrical loads and appliances, using a control mechanism which has inputs from a Light Dependent Resistor(LDR), Infrared(IR) Receiver, Passive Infrared (PIR) sensor and a temperature sensor, through a microcontroller (here PIC16F877A). The switching of the electrical appliances is controlled through the proposed system, along with the fan speed controlling, keeping energy conservation as the major concern. Manual mode does not change the conventional system much, but allows the user to control the switching and fan regulation through an Infrared Ray (IR) remote control. The facility to the user of switching between the two modes will spare the user the opportunity to slowly realize the importance of the automatic mode (i.e. automation) in energy conservation [6], and get comfortably adapted to it. The Manual mode of operation is also accompanied with wireless remote switching of the above said appliances, and also their status can be known, through the Global System for Mobile (GSM) Communication technology [3], which further supports to the motive of the system. 2. Architecture of the Proposed System The proposed system is comprised of two modes, Automatic and Manual mode respectively. Automatic mode is composed of a sensor unit (LDR, PIR [7], IR and temperature sensor) and PIC microcontroller 16F877A as the central control unit. Manual mode consists of an IR transmitter which is driven by the PIC microcontroller 16F876A to control a receiver integrated with the central unit in order to control the electrical appliances with the IR remote (transmitter) [8]. In this system the user has the flexibility to preset the fan speed according to their comfort level. Additionally the system occupies a GSM modem to monitor and control the home electrical utilizations remotely. Figures 1 and 2 show the overall system, as explained in the briefing above, to give a better imagination of the architecture of the system. 3. System Implementation The Process flow of the “Automatic” and “Manual” mode is provided in Figures 3 and 4 respectively. 99
Archis Banerjee et al.
Figure 3. Automatic mode.
100
Figure 4. Manual mode.
Modern Home Automation System for Energy Conservation
Figure 5. PIR sensor.
Figure 6. LCD output.
3.1 Automatic Mode In this mode, an IR sensor (namely TSOP 38238) is placed at the entrance door. The receiver gives an output as active LOW in response to the IR light of frequency 38 KHz, which it receives from an IR transmitter placed right opposite to it, connected to a 555 timer to produce the IR light of the desired frequency. When the output of the receiver goes active HIGH, it is inferred that a person has crossed the door. The PIR sensor is placed inside the room to detect motion. It detects the heat generated by the human body during body movements through its Fresnel lens, and in turn generates certain voltage corresponding to the same. The outputs of both the IR receiver at the door and the PIR sensor are compared to infer the entry or exit of a person, into or from the house. Figure 5 shows a typical PIR sensor. If the person exits the room, all the electric appliances are turned off by not firing the TRIAC. Else, the central control unit PIC16F877A reads the voltage drop at the LDR to decide between night time (lumen intensity is not enough for clear visibility) and day time. The inference of night time switches ON the lighting by firing the TRIAC. The control unit also reads the voltage drop at LM35DZ, which is a “Centigrade calibrated’ temperature sensor with sensing range of 0 to 100 degree centigrade. The user is given the flexibility to set one’s Comfort Mode from the three modes offered, which are Cool, Normal, Warm and also the corresponding temperatures. Each mode has different relations between the temperature sensed and the speed of the fan. Hence the temperature sensed is compared with the Comfort mode settings to run the fan at different speeds by firing the TRIAC at different corresponding times. In Figure 6, Liquid Crystal Display (LCD) shows the current temperature and the speed of the fan for the Normal comfort mode. Zero sensing mechanism is used in this project which interrupts the central control unit during that particular instant when the sinusoidal input Alternating Current (AC) becomes zero, and this sensed time is used to calculate the exact delay times after which the respective TRIACs are to be fired. 3.2 Manual Mode In manual mode the central control unit does not control the switching of the electric appliances or the speed of the fan using its sensor output. Instead, these actions are controlled through the IR pulses received by an IR receiver (different from the one used at the door in automatic mode) from an IR Remote Controller, which has dedicated buttons on it for each of these functions. The control unit used for the remote controller is a microcontroller (PIC 16F876A), which through its control logic generates unique IR pulses of different burst lengths for each of the remote controller buttons. The electrical 101
Archis Banerjee et al.
Figure 7.
Format of a single burst of IR data.
Figure 8.
Format of transmitted and received IR data for button 1.
Figure 9.
Format of transmitted and received IR data for button 2.
appliances can also be controlled manually in this mode, using soft touch switches. Figure 7 shows how a single burst of the IR data transmitted by the IR remote controller looks. The frequency and duty cycle of a single pulse is 38 kHz and 50 percent respectively. The IR receiver initially gives the output as active HIGH, and takes a delay (td) of 7 times the time period (To) of 1 pulse, which is (1/38 kHz) seconds, to give the output as active LOW. The output of the receiver remains LOW for 6 times the time period of 1 pulse after the IR burst gets over. A single burst contains 10 pulses. For each of its buttons, the IR remote controller transmits unique IR data by varying the no: of bursts. For example, for button 1, the IR remote controller transmits 100 bursts that is shown in Figure 8 causing the output of the receiver to go active LOW 100 times. As the output of the receiver is connected with the external interrupt pin (RB0) of PIC 16F877A, the transmission for button 1 causes 100 interrupts to the central control unit. For button 2 (shown in Figure 9), IR remote controller transmits 200 bursts, causing 200 interrupts on the receiving side. Similarly, the no. of bursts transmitted for each button on IR remote controller varies, causing each button to have its own unique IR data. 102
Modern Home Automation System for Energy Conservation
Figure 10. Message sent by the GSM modem to the user.
Figure 12.
Figure 11. User command to switch OFF the appliances.
Overall circuit of control unit.
Again in manual mode, after every 15 minutes, the sensors check for the presence of a person in the room. If the person is absent, the central control unit checks if the appliances are ON by checking the particular ports of the microcontroller 16F877A, in which case the microcontroller sends a SMS (Short Message Service) to the user’s mobile number showing the current status of the electric appliances through the GSM modem, and keeps sending similar messages after every 15 minutes until the user sends an “OFF” command to the GSM modem, which turns off the appliances, saving energy. Figures 10 and 11 show the message format which is sent to the user mobile number, after the 15 minutes (when the timer TMRO gets overflowed), showing the status of the appliances, and then “OFF” command will be sent from the mobile of the user back to the control unit 16F877A through a GSM modem. 4. Circuitry Discussion and Briefing Figure 12 shows the final implemented circuit for the central control unit. 103
Archis Banerjee et al.
The proposed system is designed with PIC 16F877A, as central logic unit, with analog inputs from LDR at its AN0 pin and from the temperature sensor at AN1. The digital inputs from sensors include inputs from the IR receiver at door and PIR sensor at RC3 and RD0 pins, respectively, while the digital input from the IR receiver for remote control is acquired by the external interrupt pin INT0. The three buttons for settings are placed at RD1, RD2 and RD3. The TX and RX pins are dedicated for the RS232 communication with the GSM modem, while a major part of PORTB is occupied for interfacing with the LCD. The RS232 serial communication with the GSM modem is established through a MAX232 IC which is actually a voltage level converter. The zero crossing sensing is detected by the Port Change Interrupt at RB7, while the firing of the respective TRIACs is controlled by the pins RD4 and RD5. Finally, RC4 and RC5 pins take input from the soft touch switches for manual switching of the electrical appliances, in the Manual Mode. The fifteen minutes timer operation is implemented by the TMR0 timer register of the microcontroller. The clock used for the operation is a High Speed crystal oscillator of 16 MHz. 5. Conclusion The proposed architecture has a unique feature of controlling the fan speed according to the comfort level of the user automatically by taking feedback of environment temperature which is in fact a distinctive feature of air conditioner (AC). Along with this feature it conveys some other decent characteristics which include remote controller operation and controlling the appliances automatically if there is no human present. This system is designed by taking concern of both the power saving and the comfort of the user. The system implementation cost is also in the range of the general user class. References [1] V. K. Bhansali, “Energy conservation in India - challenges and achievements”, IEEE/IAS International Conference on Industrial Automation and Control, pp. 365–372, (1995). [2] G. D. Kamalapur and R. Y. Udaykumar, “Electrical Energy conservation in India - Challenges and Achievements”, International Conference on Control, Automation, Communication and Energy Conservation, pp. 1–5, (2009). [3] H. ElKamchouchi and Ahmed ElShafee, “Design and Prototype Implementation of SMS Based Home Automation System”, IEEE International Conference on Electronics Design, Systems and Application, pp. 162–167, (2012). [4] M. Van Der Werff, X. Gui and W. L. Xu, “A Mobile-Based Home Automation System”, 2nd International Conference on Mobile Technology, Applications and Systems, pp. 5, (2005). [5] Yanbo Zhao and Zhaohui Ye, “A Low Cost GSM/GPRS Based Wireless Home Security System”, IEEE Transactions on Consumer Electronnics, vol. 54, no. 2, pp. 567–572, (2008). [6] D. Tejani, A. M. A. H. Al-Kuwari and V. Potdar, “Energy conservation in a smart home”, Proceedings of the 5th IEEE International Conference on Digital Ecosystems and Technologies, pp. 241–246, (2011). [7] Bai Ying-Wen, Cheng Chen-Chien and Xie Zi-Li, “Use of a time-variation ultrasonic signal and PIR sensors to enhance the sensing reliability of an embedded surveillance system”, 26th Annual IEEE Canadian Conference on Electrical and Computer Engineering, pp. 1–6, (2013). [8] Park Yunjung and Lee Minho, “Effective smart remote controller based on invisible IR-LED using image processing”, IEEE International Conference on Consumer Electronics, pp. 434–435, (2013).
104