Control Home Appliances Through Internet of Things To Assist Elderly In Their Daily Routine

. Aging population rate in Malaysia is getting higher every year. When people becoming older, they start losing their abilities to do some of the activities properly and easily that they were able to do when they were younger. Basic tasks like cooking and cleaning, which were once part of manageable daily routine, become too difficult to perform as they enter to the elderly age. Despite this, many elderlies choose to live independently in their own home. This paper presents a new approach to utilize advanced Internet of Things (IoT) based pulse sensors for elderly. This proposed solution is an embedded scheme that support elderly with controlled automation solution that control and operates various home electrical appliances such as lights, fans, and televisions based on the measurement of pulse rate and instructions. The solution consists of pulse sensors, microcontrollers which integrated with Blynk server as a communication protocol. The proposed solution aims to minimize elderly movement by providing substantial assistance to the physically challenged elderly without assistance from any third person. The scope of the article focuses on enhancing and improving quality life of elderly. The main advantage of the proposed solution is that it is sensible and required zero technology knowledge that provides users with an automation solution with minimum movement needed. The proposed solution reduces human labours, effort, and energy conservation in the meantime. This study is limited to the scale of elderly in Malaysia rather than the whole world.


Introduction
Malaysia is predicted to attain it population aging through the year 2021 [1]. As the aging population rate in Malaysia is getting higher every year, there are numerous issues faced by the elderly due to decreasing ability. When people becoming older, they start losing their abilities to do some of the activities properly and easily that they were able to do when they were younger [2]. Basic tasks like cooking and cleaning, which were once part of manageable daily routine, become too difficult to perform as they enter to the elderly age. Despite this, many elderlies choose to live independently in their own home. IoT technology is one of the options to help the elderly to live independently in their every life [3].
The main objective of this study was to develop an Internet of Things (IoT) based pulse sensor solution to undertake the challenges that elderly Malaysians face at home, such as turning on and off the home appliances so that they can live independently without assistance from third person even with minimum movement. The proposed solution is an embedded scheme that support physically challenged elderly with controlled automation that control and operates various home electrical appliances such as lights, fans and televisions based on the measurement of pulse rate and instructions -assuming that the individual is in awake or sleep condition. The limitation of this proposed system is limited into certain age group individuals with range of heartbeat rate.
The objectives of this study are (1) Developing a low-cost automation solution using IoT. (2) embedded a pulse sensor for controlling the home electrical appliances for elderly (3) helps in energy conservation by switching off the electrical appliances through elderly's heartbeat rate. This study supposed to significance in the elderly quality life in the light of living in an ambient assisted environment and energy conservation. The rest of the articles are as follows; section 2 provides the state of art literature review related to the study. Section 3 discusses on proposed solution with system design and architecture of the system. Section 4 mentioned on the research methodology and section 5 discusses on the results and discussion. The article is concluded in section 6 with research limitations and future research.

Literature Review
"Internet of Things (IoT) was first introduced by Kelvin Aston in 1999 as "We need an internet of things, a standardized way for computers to understand the real world". He further explained that through internet of things, physical object can connect to internet via sensors all around the world, at anytime and anywhere [4]. One of the researchers suggested that Internet of Things can be refer as a type of network that allow to connect anything to the internet based on stipulated protocols through information sensing equipment to conduct, exchange, and communicate information to achieve recognitions, positioning, tracking, monitoring and administration [5].
In the idea of architecture of IoT, the layer of architecture of IoT can be found to be three, four or five layers. The topic of architecture of IoT often causes controversy among the researchers and has not yet to be framed as standardized [6]. According to Ning and Wang, the IoT architecture was inspired by the layers of processing in the human brain, from the ability and intelligence of human beings to think to decision making and to reacts to the physical environment [7]. The three layers architecture consists of three layers; perception, network and application layer [8]. The perception layer which consists of different type of sensors, such as temperature sensor, pressure sensors, gas sensors and accelerometer and functions to identify things, collect information and send to the network layer. The network layer represents as a bridge that connects and transmits information between the perception and application layer. The process of transmission can be wire based or wireless therefore often causing high risk of security threats, such as Dos attack, MiTM attack, Storage attack, and exploit attack [9][10][11]. The application layer is where the IoT is deployed to the users. Example of applications of IoT includes smart home, smart healthcare and wearable devices. With the rapid growth of development in IoT, the three layers architecture was no longer satisfying the requirements of IoT.
Hence, researchers proposed a new IoT architecture with extra support layer. The support layer is inserted between the perception layer and network layer to prevent threats from happening while sending information directly to the network layer. Verification is conducted to verify authentic users in this layer, such as required passwords [12]. Considering the issues of security and storage in the four-layer architecture, researchers proposed a five-layer architecture with additional of two newly layer; processing and business layer [13]. The processing layer act as a middleware to store, analyze and process data coming from the lower layer. Technologies such as big data processing and databases are embedded in this layer. Business layer is implemented above the application layer to manage and control applications, for example user's privacy and determine how information can be created, stored and changed.
Based on the Figure 1, three layers architecture was proposed in the early stage of IoT and then develop into four and five layers to fulfil the requirements of IoT. The author suggested a new version of architecture from modification of the previous architectures for the development of the proposed IoT based pulse sensor solution. From Figure 2, the new architecture consists of five layers covered by a security layers; the role of the three layers; perception layer, gateway and network layer and application layer is the same as the other architecture. In the new architecture, processing layer is spitted into data storage and data processing layer which serves as a temporary storage layer that provides storage functionalities such as data replication, distribution and storage and provides a diverse set of services to the lower layer.

Applications of Internet of Things
As technology has becoming more important in the recent years, technology has been wide used all around the world in different industries and it is affecting people life in unimaginable ways, such as healthcare, hospitality, construction, and agriculture industry [14][15]. Figure 3 shows that IoT is widely used in the healthcare industry [16][17][18][19][20]. The monitoring system represents the most common IoT system in the healthcare industry. There are few previous papers that proposed IoT systems that claim to enhance elderly daily life; however, there is no significant evidence showing the effectiveness and usefulness of the system. One of the researchers proposed a unique system of advanced IoT system that embedded with the speech instruction that control electrical appliances to assist the physically challenged people [21]. The benefits of this system eliminate the remote controller use and allow automation to do its work however, the system only indicate its effectiveness with high accuracy of voice recognition. Lack of accuracy and misinterpretation will be the disadvantages of the system affecting the outcome. In addition, the voice control systems still required interaction between the users to press button on the devices before issuing commands resulting inconveniences for the elderly [22]. There are many available IoT gadgets in the market, such as smart watch that reads individual heart rate and sleeping condition, fall detection, however it is not suitable for the elderly especially in physically disabilities category considering the physical movement needed for interaction with the devices. Based on the current literature, we believe that there are opportunities in research gap for us to develop an ease of use, hand-free, and lowcost automation solution with IoT based on pulse sensor to assist and improve quality life of the elderly in their daily living.

Proposed Solution
The home appliances such as ceiling light and fan are one the most common household found in every single home as illustrated in Figure 4. The proposed solution included two sensing units: heart pulse sensor and temperature and humidity sensor. The Arduino microcontrollers are used as a port to collect data from the sensors via Wi-Fi. The data is then being analyzed to check for the parameter with several conditions. If heart rate is lower than the pre-set condition, the system assumes that the person is not active and sleeping, hence turning off the light and fan, respectively. The temperature and humidity sensor are also implemented and work with the heart pulse sensor to create conditions to increase the usability of the system. For instance, if heart rate is lower than the pre-set condition, and room temperature is higher than 30 Celsius, turn off the light and turn on the fan. This system embedded decision-making instructions with data handling where it trigger instruction based on specific conditions for user to remote control their home appliances without having any physical interaction with the electronic smart devices.

Fig. 4. System design
The system design outlines the components and subsystems use to form the basis of the fully functional system. There are total of two main subsystems in this smart home appliances controlling unit. The system consists of two microcontrollers; microcontroller A and microcontroller B to gather data from the heart pulse and temperature and humidity sensor respectively. The sensors provide inputs to the system by gathering sensor data. Microcontrollers are communicate with each other, allowing them to share data and commands via Wi-Fi. Finally, the microcontrollers provides output controls on the home appliances.

Sensors
The sensors are used in the system to gather physical measurements of the heart pulse and temperature and humidity level ( Figure 5). For instance, the heartbeat rate per minute, and room temperature Celsius and humidity level. This information is gathered by both the microcontrollers A and B where the sensors are used as a node unit. The heart pulse sensors to read the heartbeat rate every second, and the temperature and humidity sensor to read the room's temperature and humidity level. As displayed in Figure 6, the DHT11 sensor can measure temperatures from 0 to 50 Celsius with an accuracy of +/-2 and relative humidity levels of 20 to 80% with an accuracy of +/-5. A measure can be done every second.

Communication
The BLYNK server is used to serves as a connection where it plays the role of a central processing unit and a mobile app to enables both microcontrollers A and B to communicate with each other, share and gather sensor's data as illustrated in Figure 7. The microcontrollers both are connected through the bridge function output the sensor data to the Arduino Blynk hosted server through Wi-Fi. The bridge function is used for device-todevice communication, which turn into a channel to control another device that allows transaction from both sides. The microcontrollers will then associate with a unique authorization token. The authorization token is used to gain access to other internet of things modules connected. The microcontrollers are served as the central processing unit of the system is programmed to gather data from sensors. The microcontroller will proceed with the data analysis, and data can be accessed through the mobile app or Arduino's serial monitor. The Wi-Fi to connect the microcontrollers is provided from an Iphone's Wi-Fi hotspot that serves as a temporary modem. The additional blynk app functions allow user to view data at anytime and anywhere such as the room's temperature and humidity level.

Controller
The controller of the system is serves as the output of the whole system. The controller unit is pre-program with specific conditions decision making. It will actuate the mechanical components to turn on and off the home appliances, light and fan for the system as shown in Figure 8. An LED bulb and a motor fan are used as a smaller scale for the system prototyping. After receiving commands from the sensors, the microcontrollers send the decision-making commands to the PCB controller to trigger the home appliances.

Configuration
The design of configuration discusses on the details of each the components use in the system. For instance, the microcontrollers, the sensors, processor, and the platform use to program the system. The Arduino IDE is used to program the entire system with coding (as displayed in Figure 9). The Arduino is an open-source platform consists of programming language and software based on the wiring and processing, respectively. Arduino can make interesting projects that read input and turn it into output by sending a set of instruction to the microcontroller on the board. In addition, the BLYNK app is used as part of sensor data management in the project to stores the entire sensor's data where the data can be used in further research and analysis. Fig. 9. Arduino IDE Table 1 shows the basic working of this project where how the various logics working takes place based on the hardware implementation and code written according to the user. According to the case scenarios in this proposed idea we have implemented 2 sensors heart rate and temperature/humidity sensor where based on the code uploaded by the user if the heart rate and temperature/humidity detect is less than 60 and 28 respectively the device will get OFF and if the heart rate is higher than 60 and temperature is more than 38 the light will turn off and turn on the fan. The average max heart rate in beats per minutes and the target rate range in beats per minutes for a healthy person are used for decision making instruction. If heart rate value > 60 Turn on light 4

Elderly home appliances control (EHAC) algorithms
If heart rate value < 60 Turn off light 5 If heart rate < 60 && temperature < 28 Turn off fan and light 6 If heart rate > 60 && temperature > 38 Turn on fan, turn off light The pseudo code shows the algorithms that trigger the home electrical appliance based on the pulse measurement. The code used the "if else" conditional statement, using if to specify a block of code to be executed, if the statement is true and else to specify a block of code to be executed, if the statement is false. In this case, the statement is reading the heart rate value. For instance, if the heart rate value is in the range of the target rate range in beats/minute, data analysis measurements will assume that the user is awake, hence the light will be trigger by the command to switch on, and if the heart rate value is Table 2 the target rate range in beats/minute, the light will be switch off itself assuming that the user is sleeping.

Research Methodology
The research methodology consists of 3 phases: Methodology one, methodology two and methodology three. The main purpose of methodology one is to increase our knowledge in the domain of IoT and elderly reviewing the art-of state related literature, a good review paper can clarify the state of knowledge of the domain of study and able to explain the apparent contradictions. This session consists of review, investigate and extract.
Methodology two consists of addressing the requirements, analyzing the solution design, and development and implementation. Understanding the requirements is very important in order to develop a good solution to solve the research problem. Besides that, solution design is analyzed during this phase, and development and implementation start in this phase.
Methodology three consists of conducting experiments, validating the results of the experiments and evaluating the proposed prototype. The final phase of the research methodology plays a critical role in the software development life cycle in order to develop a bug-free solution. This purpose of this phase is to find out all the possible bugs and issues and ensure that each models of the system is working well.

Discussion
The smart controlling home appliances system consists of few subsystems, from monitoring the heart rate, room's temperature and humidity to control the controlling the home appliances. Other than that, the user can also view and control the system via the mobile app. The structure of the system is model as shown in Figure 10 and the prototyping unit used in the work is as Figure 11. The purpose of sensors in the system is to detect and parameter of the heart pulse and temperature and humidity level. All the data gathered by the sensors will be sending to the microcontrollers and to the Arduino server. The implementation of pre-programed decision making on the server will then analyze the data and send commands back to the led and motor fan. The mobile app functions to gather data from the server as well as to view and control the home appliances without the use of the sensors (remote controlling without the use of sensors).

Fig. 11. Prototyping unit
Real time monitoring of the heart rate, temperature and humidity was successfully implemented through the Arduino IDE programming. The system was also successfully connected to the BLYNK app. The system consists of two main sensors that be implemented into the microcontrollers gather data such as the person's heart rate beat per second and the room's temperature and humidity level. The data are sent to the central processing unit (The microcontroller) which is then uploaded to the Arduino server. These data can be retrieved by accessing the Arduino's IDE serial monitor or via the mobile app. Both the sensors were used to measure important parameters of the system, for instance the BPM of a person's heart rate and the room's temperature and humidity level. The parameter of data gathered will be further tested out for the accuracy rate of the data. There are few electronics components that were used in the system, such as the light bulb, a motor fan, sensors, PCB. Several disadvantages might occur by the duration of use of these components. Long use time of these components might cause defects due to the heat rise in the components. To prevent any security issues, user can choose to whom they want to share their data with. Only authorize user can access and view the data.
The heart rate data collected in the arduino IDE is shown in Figure 12. The data can be access by normal serial monitor or serial plotter (graph view). The pre-programed decision making create an Algorithms to allow the led bulb and motor fan to turn on and off in specific condition of rules. Figures 13 and 14 show the parameter gathered from the sensors. The heart pulse, temperature and humidity sensors are repeatedly tested on the input and output. The developed system integrated with the Google firebase database to store data of heart pulse can be used for further data analysis.

Conclusions
To conclude the paper, a proposed system that measures the key components of the heart pulse, temperature and humidity sensors to control the home appliances are presented. The framework embeds the combination use of sensors and microcontroller to monitor and control it operations. The system consists of three main subsystems which are the sensors, microcontroller, and server. The purposes of the developed system provide remote controlling the home appliances via the heart pulse and temperature and humidity sensors while monitoring the elderly's health. Algorithms are pre-programmed with the data collected to control the performance of what the system can do. The proposed solution reduces human labours, effort, and energy conservation in the meantime. This study is limited to the scale of elderly in Malaysia rather than the whole world.