Performance Evaluation of Smart Home System using Internet of Things

ABSTRACT


INTRODUCTION
In the past few years, there is a growing interest on smart home system. The automated appliance control enable users to execute tasks before arriving home. Smart home control system provide solution for assistive technologies especially to the disabled and elderly person using the mobile remote control apps. According to the report in [1], around 72% respondents said that self-adjusting thermostat and 71% said that doors that can be locked from a remote location, were the most important features when it comes to the most desired smart home devices.
Smart home system is the control and management of integrated of many small systems at home. The small system can be a lamp switch, temperature monitoring, motion detection, home surveillance and other sensors. The sensors in these systems will be controlled by users using interface devices such as remote control, computer, and smartphone. By increasing the type of sensor to be controlled, the main system needs to be more specialized to integrate the sub-systems to become the smart home system. The networking of system can be wired or wireless depending on application. Figure 1 shows the relation between intelligent buildings, home automation, and smart homes.
There are four modes that can be used for communication, such as power line systems, wireless systems, hardwired systems, and internet protocol systems [2]. The smart home communication protocol could be divided into wired (X10, KNX, INSTEON) and wireless (Infrared, ZigBee, WiFi, APC220) modes [3], [4]. In the communication domain for smart home, two requirements are needed. The first one is how to make possible the communication of the equipment inside the house. The second one is to connect the smart house to the outside internet world. Internet of Things refers to a network of objects, where all things are uniquely and universally addressable, identified and managed by computers. It is a collection of technologies that makes it possible to connect things like sensors and actuators to the Internet [5].

Figure 1. Relationship between Intelligent Buildings, Home Automation, and Smart Homes
From the invention of embedded smart home many decades ago until today, numerous researchers and developers envisioned, designed and developed ubiquitous applications, to transform physical environments into smart spaces. The purpose of smart home project includes HVAC (Heater, Ventilation, and Air Conditioning), lighting, energy monitor, and security [6], [7]. Many researchers used ZigBee and SAANet protocol to develop their smart home project [4], [8], [9]. Meanwhile, the authors in [10] designed smart home by using OSGi technology as home network subsystem. OSGi technology is a set of specifications that defines a dynamic component system for Java.
Although many researches have been conducted on smart home system, but it still needs further improvement on the user friendly and reduce its complexity for the wide implementation. In [2], we have designed a prototype of smart home system, while in [11] we have added the security feature by face indentification. In this paper the performance of the prototype system will be evaluated in more details. First, experiments on various sensors will be conducted. Next, the communicaton channel using wireless and Ethernet modules will be discussed. Moreover, the overall smart home system using IoT will be evaluated in terms of hardware and software performance. Figure 2(a) shows our proposed smart home control system (SHCS) as have been discussed in [2]. The proposed system consists of a website platform and an Ethernet based micro web-server. User need to configure the IP addres of the SHCS and subsequently access the server at the web browser. PIN is required to access the main page. The website is kept in idle mode and will be refreshed in every 1 second (configurable) so that it can be updated with the current sensor reading. A command string is decoded if the user enter a command key which is interpreted by microcontroller and HIGH or LOW output is produced to the relay circuit. This in turns enables a low voltage Arduino to control a high voltage home appliances. Figure 2(b) shows the primary test field of SHCS that has been developed to monitor the temperature, user location, and swith electrical appliances. In addition, Figure 3(a) shows the top view of test field design created using Solidworks, while Figure 3(b) shows the actual prototype.

PROTOTYPE DESIGN AND IMPLEMENTATION OF SMART HOME CONTROL SYSTEM
As discussed in [2], we have designed a website Graphical User Interface (GUI) to interface between user, sensors, and electronic appliances using Arduino IDE. User can control the home appliances either to turn it on or off at any time. The website also displays current gas and temperature reading. Notification is shown when the PIR sensor detects a human motion in the room and ultrasonic sensor detects a car at main gate. Users can use the GUI without any complexity on understanding and learning the command language. Exchange of data between applications on the Internet is achieved by using webserver with simple HTML.

EXPERIMENTS ON VARIOUS SENSORS AND DATA COMMUNICATION
In this section, various experiments were conducted to evaluate various sensors used and wireless communication. The experiments were designed in order to verify the performance of the selected sensors and data communication in daily life. Each experiments were repeated three or five times to obtain an accurate measurement.

Experiments on the Ultrasonic, PIR, Gas, and Temperature Sensors
For this experiment, the ultrasonic sensor will read distance of an object within the echo range and display the distance in centimeter at the serial monitor as illustrated in Figure 4. The ultrasonic contained one trigger pin as input and one echo pin as output. First, the trigger pin need to be initialized as HIGH and delayed for 10 microsecond. The echo pin will read the pulse produced by the trigger pin. Since the analog value is in PWM, the distance can be calculated as follows [12]: (1) where d is the ditstance in centimeter, W is the pulse width, and K is constant, i.e. 29.1 pulse/cm. We repeated each experiment for three time, the error percentage is calculated as follows: where d n is the measured distance for trial n and ̅ is the average distance, and N is the number of trials. Table 1 shows the ultrasonic distance measurement result by varying the distance parameter from 5 to 100 cm. From the table, it is shown that the nearer object to the ultrasonic sensor, the lower the distance 403 error reading. It is observed that the ultrasonic has high sensitivity at distance ranging from 0 to 70cm. After 70cm, the distance accuracy is low and produce more than 10% error reading. From this experiment, it can be concluded that our ultrasonic sensor is able to detect the objects less than 70 cm distance. The ultrasonic sensor with higher accuracies could be utilized if the proposed system is required to detect longer distance.   Passive infrared (PIR) sensor is made of a pyro-electric sensor which can detect levels of infrared emission. PIR sensor produce HIGH output when human presence is detected. The experiment is conducted in two scenario: static and moving object. When the PIR sensor detects human presence, it will turn on the lamp and display Room: Y (yes) in the LCD screen, as shown in Figure 5.  Static human presence will produce false reading with 90% of error. In real life situation, this simple and cheap PIR sensor could be replaced by more advanced but more expensive Omron D6T MEMS Thermal IR sensor. The D6T sensor is capable of monitoring an area for a variety of heat sources for energy saving, security or safety monitoring. The gas sensor is sensitive to flammable and combustible gasses. The MQ2 gas sensor was selected in our research due to its ability to detect gas leakage, such as LPG, i-butane, methane, alcohol, hydrogen, smoke, etc. The sensor sensitivity can be adjusted by the potentiometer attached to the module. Figure 6 shows the MQ2 gas sensor experiment. From MQ2 datasheet, it was found that the higher the analog voltage reading (V g in volt), the higher the gas concentration (C in ppm) as follows: The unit of gas concentration is measured in ppm, which is the most common unit of measurement for toxic gases. A -10,000 parts per million‖ gas concentration level equals a 1% by volume exposure. Table 3 presents the gas sensor test results for five trials that have been conducted in the normal surrounding, flame gas and perfume environment. It can be concluded that the measured results is in the range of ppm standard for normal surrounding, carbon monoxide gas and ethanol alcohol gas.  DHT-22 humidity and temperature sensor was selected in this research due to its low error and high precision with over 20 m measured distance, as shown in Figure 7. For the temperature sensor, the value of temperature was get from the library imported to the Arduino and the value is in o C. The temperature sensor is tested in room temperature, body sensor by placing finger at the temperature sensor and flame temperature by placing lighter near to the temperature sensor as discussed in Table 4. From this experiment, it can be concluded that the selected temperature sensor is suitable to measure the room temperature on a normal condition or in the case of emergency.

Experiments on Wireless and Ethernet Data Communication
Serial communication between APC220 wireless module and Arduino is accomplished by connecting the Rx pin of APC 220 to Tx pin of Arduino. APC220 Rx pin is connected because APC220 is reading data from Arduino. The serial baud of Arduino and APC220 should be the same to enable the serial communication. The Arduino must be supplied by external power supply (not from laptop USB) to avoid the COM port conflict with the APC 220. However, this problem can be overcome by applying software serial library that allows APC220 to be connected to digital pin 6 and 7 instead of pin 0 and 1 for TX RX serial communication. In the experiment, user input from serial monitor is transmitted through wireless APC220 module to Arduino. Character ‗g' is transmitted from the monitor and if the ‗g' character is received at Arduino, it will turns ON the fan as shown in Figure 8. From the experiment, the data can be transmitted up to 1000m range line of sight. The APC220 also managed to penetrates wall with very low observed delay. This is shown in Table 5, in which the percentage error is 0% during transmission of 10 meters between line of sight and across building.  In the next experiment, W5100 Ethernet shield is plugged into the Arduino board to keep the USB features and Arduino general purpose board, and adds Ethernet network connectivity as shown in Figure 9. A standard in the firmware is required to allow Arduino communicates over the Ethernet cable, and more generally over an Ethernet network. The shield then is connected to the router using a standard ethernet cable RJ45 connectors. The shield must be assigned a MAC address and a fixed IP address using the Ethernet.begin() function. A MAC address is a globally unique identifier hardware address of the shield. For this experiment, the MAC address is taken from the Arduino library, which is byte [ ] { }. As an example, the acquired IP address of the proposed SHCS is 192.168.137.2. Then, the IP address is used to implement a simple web server based on HTML page. The requests sent by a client, such as a web browser can be parsed to provide output from the arduino. In this experiment, LED is turn on or off by entering different urls. To turn on, use http://192.168.137.2/$1 while to turn off use http://192.168.137.2/$2. The LED is turned on after the webpage is refreshed. Lowering the refresh time can reduce the transmission delay to the Arduino.

EXPERIMENTS ON THE SMART HOME SYSTEM
This section will evaluate the performance of the proposed smart home system, in terms of security, ability to turn on/off home appliances, display sensor readings, integration with existing home appliances, and solar charger. Figure 10 shows the proposed overall SHCS circuit.

Securing Smart Home System
Security is the main concern when discussing about IoT since it is accessible around the world. Thus protecting the house in SHCS website from unauthorized users is very important. In our proposed system, we do simple PIN protection of the SHCS website. After the IP address is entered at the browser, user need to 407 enter a correct password by pressing the numeric button as shown in Figure 11. Each button has their own name and value. To read the pressed button, the URL need to be parsed because the client read the URL character by character. Figure 11 showed that the URL is 192.168.137.2/?b=5. This means button 5 is currently pressed. The button 5 is programmed with name b and value 5, as shown in the appendix code.
-Incorrect password‖ message is displayed because the programmed PIN is ‗1234'. After the user is authenticated and authorized, the SHCS main webpage is displayed and user can then do common household operations.
(a) PIN keypad display (b) Incorrect PIN display Figure 11. Simple PIN Security for Smart Home System Table 6 shows the success rate for the PIN keypad in four character length. As can be seen in the table, the percentage of success for PIN with different button number have the highest success rate, which is 100%. PIN that have same button number has lower success rate. However, this result will depend on other variables as well such as the speed of pressing the button, the time duration the button being held down when being pressed and others. This means other user will have different success rate.

Controlling Home Appliances
The button in SHCS website enables user to switch on or off the appliances connected directly to Arduino or to the relay. Table 7 shows the value assigned to the button which is read by the Arduino from the webserver. This character is used as user case condition to produce desired output of the household appliances. The example of home appliances that can be switched on/off (close/open) is shown in Figure 12.

Sensors Reading and Monitoring
The SHCS notification consists of LCD and website to display the emergency occur, such as gas leakage, fire, or intruder. The LCD is placed at the house wall to ease home monitoring when user is in the house. As shown in Figure 13, all important data of current sensor, gas sensor, temperature sensor and PIR sensor are collected and displayed. For PIR sensor and ultrasonic sensor, notification ‗Room: Y' is displayed at LCD when human presence is detected or car is approaching at the main gate.

Integration with Existing Home Appliances
This experiment aims to control AC lighting by using a relay and the user prompt from SHCS website. A relay is used to control high power device ranging from 12 to 240 V, as shown in Figure 14 and Figure 15. Several precaution should be taken to handle this dangerous experiment as we are going to deal with high voltage 220 V. The live wire of AC lamp is connected in series with the NO and COM pin to allow the relay act as a switch between the plug supply and the lamp. When the relay is in HIGH state, it turns on the transistor, which in turn energizes the relay's coil. Then, the relay's switch contacts are closed. This connects the relay's COM pin to the NO (Normally Open) pin and turn ON the AC lamp.

Solar Charger Circuit
The solar panel harvest the solar energy and the collected energy will be stored into the batteries via a solar charger controller which is a DC to DC converter. The DC to AC inverter allows the stored energy to be generate to the available applications usage. The solar charger circuit, as shown in Figure 16, controls the harvesting of solar energy and storing the collected energy to the storage batteries. The solar charger controller consists of three charging stage which are bulk, absorption and float. The battery is recharged when it is in the bulk and float stage. Besides that, the LCD is used as battery charging indicator which indicates the battery voltage state. Moreover, it also have a built-in protection circuit which protects the controller from over charging and discharging plus reverse protection for the battery.   Table 8 shows the data of input voltage collected by solar recharge controller system in one day operation period. The battery has initial start of input voltage from 8.20V at 8.00 hours. At 9.00 hours, the the battery level is drop to 6.8V. The weak battery then switch on the mosfet in between solar and battery to allow the solar to recharge the battery. The battery level begins to rise gradually from 6.8V to 8.2V at 9.00 hours to 9.30 hours. Then, the storage batteries are maximum charge by the system at 10.00 hours where the voltage level collected is 8.946V.

CONCLUSIONS
This paper presents performance evaluation of the proposed smart home control system. Several experiments were conducted to evaluate the suitability of the selected sensors, as well as the data communication modules using Ethernet W5100 and APC220 Wireles. All the sensors and data communication modules are connected to Arduino as the IoT platform. Using the Ethernet shield, it is possible to implement a simple web server which can provide control and instrumentation of the smart home system. To connect with the real household appliance, like ceiling lamp, ceiling fan, air conditioner, it requires a proper relay circuit. The designed home experiments was tested a number of times and confirmed to control different households. The results shows that the SHCS was successfully tested in the prototype and real environment. Effective performance evaluation is deemed important towards achieving successful smart home system. The performance is verified with very low percentage error. The results showed that the developed system improved the traditional smart home system because it can be controlled everywhere through the IoT, capable to monitor and track any dangerous situation, easy and convenience end-user interface, protect user security from unauthorized person, and provide backup power supply to the battery and household. Further research includes energy monitoring and energy saving, enhanced security, and additional household appliances. Hasmah Mansore completed her studies at the University of Salford, UK. She has obtained her Master of Science and PhD in Control and Automation Engineering from Universiti Putra Malaysia. Currently she is an Associate Professor at Electrical and Computer Engineering Department, and starting Jan 2017 she has been the Deputy Dean of Students Affairs, Faculty of Engineering, IIUM. She is an IEEE member and currently a member of executive committe for Instrumentaiton and Measurement Society -Malaysia section. Here research interests include instrumentation and control systems.