Prototyping Design of Electronic End-Devices for Smart Home Applications

Prototyping Design of Electronic End-Devices for Smart Home Applications Trio Adiono1, Rachmad Vidya Wicaksana Putra2, Maulana Yusuf Fathany3, Khilda ...
Author: Amanda Hunter
2 downloads 0 Views 832KB Size
Prototyping Design of Electronic End-Devices for Smart Home Applications Trio Adiono1, Rachmad Vidya Wicaksana Putra2, Maulana Yusuf Fathany3, Khilda Afifah4, Muhammad Husni Santriaji5, Braham Lawas Lawu6, Syifaul Fuada7 Microelectronics Center Institut Teknologi Bandung, Indonesia 1 [email protected], [email protected], [email protected], {4khilda_afifah, 5santriaji, 6bram_labs, 7syifaulfuada}@students.itb.ac.id Abstract—In accordance with our previous works on data protocol design and smart home platform, we propose end-devices prototyping design for supporting several main electronic based applications which are commonly found in a home. Motivation of this work is to propose end-devices prototyping design which are: (1) able to represent several main electronic functions in a common home; (2) able to support our existing and efficient smart home platform; and (3) able to provide smart functions on existing appliances without any major changes and modifications. For prototyping purposes, we design several electronic end-devices to represent: (1) humidity and temperature sensors, (2) remote power switch controller, and (3) ambient lamp (standard and colored) controller. All of them can be remotely controlled by using a smartphone, anytime and from anywhere. Experimental results give us proofs that the designated end-devices can work properly to fulfill the research targets. Keywords—Smart home applications; electronic end-devices; humidity and temperature; remote power switch; ambient lamp.

I. INTRODUCTION Development of Internet-of-Things (IoT) based smart home technology is one of main trend nowadays. This development can be divided into five aspects: (1) control system, (2) security, (3) residence monitoring, (4) appliances information, and (5) energy saving. Control system covers the system controlling schemes and their mechanism. Meanwhile, security covers the authority management and its encryption scheme. Residence monitoring aspect is related on several monitoring functions like humidity-temperature sensing, lighting illumination controlling [1]-[4], and many more. Appliances information talks about the appliances activity status. Last one, energy saving covers the usage efficiency and power management [5]-[7]. Unfortunately, from literature studies, we found that there are not many publications on smart home designs which cover discussion from the beginning to the end (i.e. data protocol to end-device applications design). Thus, in accordance with our previous works on data protocol design [8], smart home platform [9] and those five development aspects, we propose end-devices prototyping design for supporting several main electronic based applications which are commonly found in a home. Motivation of this work is to propose end-devices prototyping design which are: (1) able to represent several main electronic functions in a common home; (2) able to support our existing and efficient

smart home platform; and (3) able to provide smart functions on existing appliances without major changes and modifications. For prototyping purposes, we design several electronic enddevices to represent: (1) humidity and temperature sensors, (2) remote power switch controller, and (3) ambient lamp controller. All of them can be remotely monitored and controlled by using a smart-phone, anytime and from anywhere. There are two types of command used in the system: monitoring and controlling. Residence monitoring obviously uses monitoring command. Actually, residence monitoring applications are various, but for this research, we focus on humidity and temperature only, since they are considered as key functions for ambient monitoring in smart home concept. For controlling command, remote power switch and ambient illumination lamp are presented. In these controlling applications, there are two functions explored. First function is what we call as “hard-control”, since the condition is determined only with “high” and “low” status (i.e. remote power switch). Second one is what we call as “soft-control”, since the condition is determined with wider range of condition, not only “high” and “low” (i.e. ambient colored lamp). This paper is organized in a number of sections. First is an introduction that discuss the research background and its targets. Second is proposed design which discuss about electronic enddevices design for humidity-temperature sensor, remote switch, and ambient lamp. It is followed by controller user interface and evaluation results. The last three sections are conclusion, acknowledgment, and references. II. RELATED WORKS In this research, our previous work on data protocol design [8] and smart home platform is used [9]. In data protocol design, there are 3-bytes allocated for header, 1-byte for address, 1-byte for packet initialization, n-bytes for payload, and 1-byte for checksum. Detailed protocol design is presented in Tab. 1. In this system, the environment is divided into two parts: indoor and outdoor. Those two parts are connected to each other by using gateway. This connection is internet-of-things (IoT) concept which is not only about connecting devices to internet but also establishing a smart environment to increase the quality of user experiences. Focusing on indoor environment, the network is established from wireless sensor network (WSN) system based on our desiganted protocol. Meanwhile, outdoor

environment uses the existing internet-cloud scheme. This platform is illustrated in Fig. 1. TABLE I. Header 3-byte

Address 2-byte

DATA PROTOCOL FORMAT [9] Packet Init 1-byte

Data Payload n-byte

Checksum 1-byte

error ±2oC) and the measurement range of the humidity is 20%95% (with error ±5%). The electronic circuit of the humidity and temperature sensor using DHT11 is shown in Fig 2. This sensor has 4 pins: VCC, GND, data, and NC. It needs resistor at VCC and data to avoid the current flowing directly through the sensor, before it goes to the microcontroller. Package of the sensor module is shown in Fig 3, with dimension of 5cm x 5cm. It consists of DHT11 sensor, ZigBee, and STM32 microcontroller.

Fig. 1. System architechture based on mesh network Fig. 2. Humidity and temperature sensor circuit schematic

III. PROPOSED PROTOTYPING DESIGN In the proposed design, data protocol is the first thing that we need to define. There are five electronic functions which are presented in this paper: humidity, temperature, standard lamp socket, red-green-blue (RGB) lamp socket, power switch socket. Data protocol designs are presented in Table II and Table III. TABLE II. End-Devices Temperature Humidity RGB Lamp Standard Lamp Power Switch

DETAILED DATA PROTOCOL FORMAT – PART 1 Header (3 Bytes) 1 2 3 50 4D 45 50 4D 45 50 4D 45 50 4D 45 50 4D 45

Address (2 Bytes) Device Equip 03 01 03 02 04 35 01 31 02 31

Packet Init (Hexa) C0 C0 83 80 80

TABLE III. DETAILED DATA PROTOCOL FORMAT – PART 2 End-Devices Temperature Humidity RGB Lamp Standard Lamp Power Switch

Payload 0-255 (1 Byte) 0-100% (1 Byte) R G B b (4 Bytes) 01 00 01 00

Type Monitor Monitor Control Control Control Control Control

Packet Init (Binary) 0b11000000 0b11000000 0b10000011 0b10000000 0b10000000 0b10000000 0b10000000

A. Humidity and Temperature Sensor In this design, we use DHT11 module as a sensor to measure temperature and humidity condition, since it has good quality in stability, response, precise output, and resistant to interference. Moreover, this sensor has small size which can transmit signal up to 20 meters. This sensor has digital value output, hence it does not need a conversion from analog to digital [10]. The output is already calibrated. Calibration coefficient is saved in program memory. Thus, when internal sensor detect something, this module includes the calibration in the measurement. The range measurement of the temperature is between 0-50oC (with

Fig. 3. Humidity and temperature module

B. Power Switch Socket Power switch socket works as a remote-controlled switch to replace the conventional one. It is using relay function which is controlled by microcontroller STM32. If we are working with relay, we need to know the voltage-limit value of the relay and its control voltage. Usually, it is stated on the body of the relay. As an example, a 12VDC / 4A, 220Vac. It means that the relay will work if we use control-voltage 12VDC and current up to 4 Ampere to control 220Vac. This relay should be used 80% of its maximum capacity or less than that, for safety purpose. The principal work of relay is when current flows to the solenoid in a relay, the lever is pulled because of magnet force. Thus, the switch will be closed. If the current stop flows to the solenoid, the solenoid will lose its magnetic force, and the lever will be back to its normal position. Thus, the switch will be open. In the application, relay is moved by DC current. Circuit of the power switch can be seen in Figure 4. In addition, a diode is placed in reverse parallel configuration with the solenoid in order to maintain a safety from high voltage which might occur when the relay turned quickly from condition “ON” to “OFF”. Meanwhile, function of the optocoupler is to isolate the AC ground and the DC ground of the circuit, thus the noise from the high voltage (AC or DC circuit) will not interrupt the low voltage (microcontroller circuit). The relay is controlled

by the digital pin of the microcontroller which gives high logic (i.e. 3.3V STM32) and low logic (0 Volt). It is also connected to the base of the transistor 2N2222. When a microcontroller digital pin gives high logic, the current will flow from VCC 5V to the ground, through the solenoid relay and transistor. Therefore, the transistor will turn “ON” and the solenoid will be in normally-open state. For prototyping test purpose, we use this schematic for standard lamp and control them by using smartphone which is connected to WSN host. The final packaging of this relay based power switch sockets are shown in Fig. 5 and Fig 6. Fig. 5 is generic power switch socket and Fig. 6 is standard lamp power switch socket.

Color of the LED is the result of the combination between basic lights used (i.e. red, green, and blue). Each basic light’s brightness and illumination can be controlled, by changing the input value at each of the pin. If we set all of those three type LEDs in the same value, the result will be white color. If the red LED is turned OFF, and the green LED and blue LED have the same value, cyan color is obtained. The black color is obtained as the absence of light, therefore it can be represented by turning off all of the three LEDs. Fig. 8 is the combination of the RGB colors and a simple truth table of colors can be seen in Table IV.

Fig. 8. RGB color composition TABLE IV. COLOUR TRUTH TABLE

Fig. 4. Power switch circuit schematic

Fig. 5. Generic power switch package

Fig. 6. Standard lamp switch package

C. Ambient Colored Lamp For ambient colored lamp application, we use light-emittingdiode (LEDs) lamp. These red-green-blue (RGB) LED lamps are packaged with surface-mount device (SMD) technology. We use SMD-5050 RGB LED type from Dreamland. Each RGB LED has size of 5mm x 5mm and it has 6 pins with anodecathode pins for each red-green-blue are separated. This LED brightness and illumination can be controlled, thus it makes this LED suitable to use for this research. Figure 7 shows the dimension of RGB LED.

Red ON ON OFF ON OFF

Green ON ON ON OFF OFF

Result White Yellow Cyan Magenta OFF

The range of color combination varies from 0 to 255 value. Hence, the combination would be (0-255), (0-255, (0-255) for red-green-blue respectively. Based on the datasheet, RGB lamp has forward voltage Vf = ~3.2V on the green and blue LEDs, and Vf = ~2.1V on the red LED. Each LED has forward current If = 20mA. Thus, there are many configuration of RGB lamp that can be used. In this prototype, we use parallel configuration because it is easier to be implemented. RGB LEDs are in parallel configuration with MMBT222A as a transistor driver. Based on the datasheet, this transistor has VCE(sat)max = ~300mV. In this case, we assume VCE(sat)max = ~200mV = 0.2mV and hfe or β = 10. For calculating the resistor value at the collector of transistor, the equation is presented in (1). For calculating the resistor at the base of the transistor, the equation is presented in (2), and for calculating the current at the base of the transistor, the equation is presented in (3). For calculating the transistor’s power dissipation, equation (4) is used.

RRGB  RB  IB 

VCC  V f ( LED )  VCE ( sat) If

VIN ( micro)  VBE IB IC hFE

Pt  VCE( sat)  I C Fig. 7. SMD-5050 type RGB LED

Blue ON OFF ON ON OFF

(1)

(2) (3)

(4)

Based on (1), value of the resistor for RGB LEDs are presented in (5) and (6). Current at the collector IC is the result of multiplication from all of the parallel LEDs. Suppose IF = 20mA, therefore, for 11 parallel LEDs, current IC = 11 x 20mA = 0.22A. Thus, the value of base current IB refers to (3) is 22mA. Transistor’s base has input from output of the microcontroller (i.e. STM32 = 3.3V). Refers to (4), the consumption power of the transistor MMBT2222A is given in (8).

Rred 

5V  2.1V  0.2V  135 20mA

Rgreen  Rblue 

5V  3.2V  0.2V  80 20mA

(b)

(5)

(6)

3.3V  0.7V  118 22mA

(7)

Ptransistor  0.2V  0.22 A  44mW

(8)

RB 

system. For generic power switching application, user can simply select “ON” or “OFF” to control the device which is connected to this socket.

Based on the calculation (5) and (6), circuit of RGB lamp for red LEDs can be seen in Fig. 9. Meanwhile, green and blue LEDs use resistor 80Ω. Transistor MMBT2222A is used here, since it has power dissipation up to 250 mW which is suitable for proposed design. The product of RGB Lamp is shown in Fig 11 with color variation of lights.

(a)

(c)

Fig. 10. Android application as remote device of smart house applications (a) lamps, (b) humidity and temperature, (c) power switch

V. RESULTS We have evaluated the proposed design by performing demo test. Results of the demo are proven to work properly. Fig. 11 (a)-(b) show that standard lamp and power switch applications are proven to work properly. The delivered power to the lamp can be switched “ON” and “OFF” as we need. Fig. 12 (a)-(f) show the functionality of ambient colored lamp (RGB). User can control this lamp by swiping the right parameter on red-greenblue parts individually. For example, user can adjust how bright and how much illumination needed by swiping the controller, whether it is only red part, green part, blue part, or even the combination among those three. For humidity and temperature monitoring, Fig. 13 shows that request on those two parameters gives the right results. Humidity and temperature are monitored as 34% and 28oC respectively.

(a)

(b)

Fig. 11. Standard lamp and power switch demo (a) OFF and (b) ON Fig. 9. Electronic circuit of red RGB LED with R135Ω

IV. GUI BASED CONTROLLER In order to control all those electronic devices remotely, we design graphical-user-interface (GUI) based controller on an Android smart-phone. Display of the GUI applications are showed in Fig. 10. There are 3 categories involved: (a) lamps – standard and RGB, (b) humidity-temperature, and (c) power switch. User can control the lamps by switching the standard lamp “ON” or ”OFF” and swiping the illumination color parameters of RGB lamp. For humidity and temperature monitoring, user can use request button to achieve the latest condition of humidity and temperature that are recorded by the

(a)

(b)

(c)

(d)

(e)

(f)

Fig. 12. RGB lamp applications demo for illumination (a) red, (b) green, (c) blue, (d) white, (e) yellow, and (f) magenta

Fig. 13. Humidity and temperature request results

VI. CONCLUSION Smart home is designed make human living becomes easier. This paper discussed about prototyping design of electronic circuit end-devices which are commonly used for smart home: (1) power switch socket; (2) ambient lamps - standard and RGB; and (3) humidity-temperature monitor. Those three applications can be directly applied to the common house without changing its electrical system. They can be plugged-and-played soon after its installation. Moreover, these applications can be controlled and monitored from our smart-phone, anytime and from anywhere. Hopefully, these prototyping designs can deliver alternative solutions of end-device applications for any smart home platform. ACKNOWLEDGMENT This research is supported by “Program Penelitian Unggulan Perguruan Tinggi - Desentralisasi DIKTI 2016” from Ministry of Research and Technology for Higher Education (RISTEKDIKTI), Republic of Indonesia. REFERENCES [1] [2]

[3] [4] [5] [6] [7] [8]

D. Wijanarko, A. Setiawan, “Kontrol lampu menggunakan Android berbasis mikrokontroler,” Seminar Nasional Komputer dan Informatika Terapan, pp. 140-144, December 2015. Y.S. Cheng, J.H. Chen, Y.H. Liu, S.C. Wang, “Development of wireless RGB LED dimming control technology using smart phone,” Proc. of International Conference of Intelligent Green Building and Smart Grid, pp. 1-4, April 2014. Y.E. Wu, K.C. Huang, “Smart household environment illumination dimming and control,” Journal of Display Technology, Vol.11 No.12, pp. 997-1004, December 2015. E. Taruna, “Pengendalian lampu rumah berbasis mikrontroler Arduino menggunakan smartphone Android,” Jurnal TI, pp.1-8, 2015. L. Ke, T.L. Huang, L. Lifang, “Design of temperature and humidity monitoring system based on ZigBee technology,” Proc. of Chinese Control and Decision Conference, pp. 3625-3631, June 2009 W.Z. Zhang, M.A. Sheng, M.H. Fan, J.L. Li, “Design of temperature and humidity intelligent monitoring system,” Proc. of International Conference on Electrical and Control Engineering, pp. 782-785, June 2010. S. Aram, A. Troiano, E. Pasero, “Environment sensing using smartphone,” IEEE Sensors Application Symposium, pp.1-4, February 2012. M.Y. Fathany, T. Adiono, “Wireless protocol design for smart home on mesh wireless sensor network,” Proc. of International Symposium on

Intelligent Signal Processing and Communication Systems, pp. 462-467, November 2015. [9] T. Adiono, R.V.W. Putra, M.Y. Fathany, M.A. Wibisono, W. Adijarto, “Smart home platform based on optimized wireless sensor network protocol and scalable architecture,” Proc. of International Conference on Telecommunication Systems Services and Applications, pp. 1-5, November 2015. [10] A.H. Saptadi, “Perbandingan akurasi pengukuran suhu dan kelembaban antara sensor DHT11 dan DHT22: studi komparatif pada platform ATMEL AVR dan Arduino,” Jurnal Infotel, Vol. 6 No.2, pp. 49-56, November 2014