Designing and Implementing Applications of Smart Home Appliances

Smart house or automation house and security system has been developed in the recent years because its importance to provides the energy saving, comfort for the elderly and security to the house owners. This paper proposed to design a low cost and flexible home prototype system for controlling and monitoring. The proposed design based on two parts; first part, automation system was building by using Arduino UNO microcontroller which responsible on reading and processing the different types of sensor values that's used in the design such as gas leak, flame and temperature as well as the remote control used in automatic garage door. The second part is security system and outdoor lighting the NodeMCU will be used to monitor the state of the house security from anywhere through a special GUI was programming by HTML language that allows the user to monitor the house security as well as turning ON/OFF the outdoor lights via specific IP address granted by the NodeMCU.


Introduction
With the increase in population growth and the remarkable increase of factories, the most countries are suffering from the problems of energy conservation and the proper consumption of electricity in this paper will address the design of a smart home contributes effectively to energy conservation.Smart house automation technology, lifetime is getting easier and simpler on all side in life.In the world, automatically systems are being chosen over the manual system.With the fast growth in the number of users of the internet through the past decade, the Internet has become a part and section of human life.Home automation gives an individual the ability to remotely or automatically control things around the home.A home appliance is a device or instrument designed to perform a specific function, especially an electrical device, for household use.The words appliance and devices are used interchangeably.Automation is today's fact, where things are being controlled automatically, usually the basic tasks of turning ON/OFF certain devices and beyond, either remotely or in close proximity (Almali, N., Bahir, K. S., & Atan, Ã. Z., 2017).The main aim of an intelligent house is to focus the control of all the devices into a private control unit which can be programmed to do special tasks suitable for the possessor and the house in question, the aim of a smart home is not only suitability but also to reduce the consuming of resources such as power, gas, etc. Due to the present pricing on energy, energy saving has become a part of a person's day-to-day life, if a person has the possibility to control his home automation, he can remotely reduce the consumption of energy and thus cut down on expenses (David, N., Chima, A., et al., 2015).In the present day, security systems play an important role in the protection of lives and investment.This is achieved by the incorporation of various subsystems into the security system with a single control unit such as surveillance, intruder control, access control, fire detection, etc.A smart home is one that is equipped with lighting, heating, and electronic devices that can be controlled remotely by smartphone or via the internet.An internet-based home automation system focuses on controlling home electronic devices whether you are inside or outside your home (Porter, M. E., & Heppelmann, J. E., 2014).An arduino is a tiny computer that you can program to process inputs and outputs between the device and external components you connect to it.The arduino board is where the code you write is executed.The board can only control and respond to electricity, so specific components are attached to it to enable it to interact with the real world.These components can be sensors, which convert some aspect of the physical world to electricity so that the board can sense it, or actuators, which get electricity from the board and convert it into something that changes the world (Marhoon, H. M., & Taha, I. A., 2018).This paper presents a smart home automation design with different rooms and services.Each room and part are monitored or controlled using analog or digital sensors which are compatible with arduino.

System Sensors and Other Devices
Many sensors and other devices were used in the experiment of this paper.Therefore, this part was dedicated to describing those devices.

Arduino
The arduino microcontroller board it based on the ATmega328P, it has 14-digital pin can use either digital input or digital output specified that by programming (6 pins of which can using to provide analog output by PWM technique), 6 to analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, as ICSP header and a reset push-button.It containing on everything may needed to support the microcontroller, simply connect it to a computer via the USB cable and can power it with an DC adapter or external battery.Figure 1 shows arduino UNO kit (Marhoon, H. M., & Taha, I. A., 2018).

MQ-02 Gas Sensor
The MQ-02 Gas sensor can detect or measure different types of gasses such as LPG, Alcohol, Propane, Hydrogen, CO and even methane.The MQ-02 gas sensor made-up from a sensitive material is tin oxide (SnO2), which has lower conductivity in a clean air medium and When the target combustible gas exists, the sensor's conductivity is having a higher along with the gas concentration rising.Figure 3

Flame Sensor
This sensor type designed to detect and respond to the presence of a flame.The flame sensor uses to detect fire source and also can detect the ordinary light sources that are with the wavelength in the range of (760 nm -1100 nm).The detection range is up to 100 cm.The flame sensor can output digital or analog signal.Figure 4

Bluetooth HC-06
This module can configure for baud rates 1200 to 115200 bps, the Bluetooth used to exchange data within same area (i.e. over short distances) using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz.

Light-Dependent-Resistor Sensor
This sensor is a light controlled variable resistor, its value decreases with increasing the incident light intensity on the surface of resistance, the photoresistor can be used in light detector circuit and dark activated switch circuit.
Photoresistor made of a high resistance semiconductor material called cadmium sulphide, in the dark a photoresistor can have resistance as high as several Megaohms according and prevent the current from flow to the circuit while in light a photoresistor can have low resistance as a few hundred Ohms (Kaur, T., Mahajan, S., et al., 2016).Light Dependent-Resistor is illustrated in Figure 7. Figure 8 shows the relation between resistance and light.9.A standard servo can be moved from (0) to (180) degree and there is another type moved from (0) to (360) degree.The servo engine features a DC motor with the strong torque, better performance and easy control of the direction at a constant speed not affected by the change in load (Kaur, T., Mahajan, S., et al., 2016).Figure 10 shows servo motor.
Figure 9. Angle positioning depends on the pulse length Figure 10.The servo-motor

Soil Moisture
This sensor measures the water and humidity level present in soil, when the humidity is increased in the soil the sensor will allow the passage of the current and the more moisture the greater proportion of the connection the signal type in this sensor is treated as a signal analogue (Sahu, C. K., & Behera, P., 2015).Figure 11 shows soil moisture sensor.

Radio Frequency Identification (RFID)
Wireless scanning frequency for identification.The RFID can be used to perform labelling by capturing the transmitted data to identify and store information stored in RFID tags.Each RFID tag has unique 64-bit code that is read by the RFID reader and is processed through the arduino to perform the required function.There are two kinds of RFID tag namely passive and active RFID tags (Ya'acob, N., Azize, A. M., et al., 2018).Table 1 illustrates the comparison between both types.Figure 13 shows RFID reader.

Table 1. Comparison between RFID types
Passive tag Active tag Doesn't need to power supply source.
Need power supply source.Modulation activated when the tag receives the electromagnetic waves from the reader.
Modulation activated directly from the tag because it has a powered already.A reading range is about 10 cm to 10 m.
A reading ranges up to 100 m.Having 100,000 times for read/write.
Effected by the tag battery life.
Figure 13.The RFID reader

NodeMCU
The NodeMCU has integrated built-in ESP8266 is Wi-Fi SoC developed by Espressi Systems.The ESP8266 designed to solve the Wi-Fi networking problem by acting as a bridge between different types of microcontrollers to the Wi-Fi module.NodeMCU microcontroller also has ability of running applications loaded to it.The NodeMCU can use USB micro cable; the NodeMCU development kit can be connected to laptops and run it like arduino, the NodeMCU, shown in Figure 14, can program by the python programming language and also can programming by Arduino IDE (Al-Kadhimi, A. M., Marhoon, H. M., et al., 2018).

System Design and Implementation
This paper presents design of smart home to gives an individual the ability to remotely or automatically control things around the home.

Room with Temperature and Humidity Sensor
A DHT11 sensor was used to sense the temperature and humidity inside the children room, when a temperature degree exceeds (35°) a lamp is lighted and the temperature and humidity are viewed on LCD screen as indication to that.The LED used to represent the fan or air cooler that was used to reduce temperature level.Figure 15 illustrate the implemented circuit of room with DH-11 sensor.
Figure 15.The implemented design of room with DHT-11 sensor

Kitchen Automation System
This part is focusing on the using of flame sensor with Gas leakage sensor in the purpose of protect the house from burning or inhalation the gas by house owners.Sensors are used to sense fire and gas at the kitchen room, when a fire or a gas are detected a buzzer alarms (in the design the red LED was used to represent the alarm) the residents of the house, so as to avoid burning the house.Figure 16 shows the implemented circuit of kitchen automation system.
Figure 16.The implemented design of Kitchen Automation System

Toilet Automation System
A gas sensor used to sense methane gas at the toilet room.When a gas detected, a fan operates to evacuate the gas smell.Also, PIR sensor was used in toilet in order to switch ON a light when a person enters the toilet as an economic power consumption purposes and apply the smart automation system instead of traditional switches and also to assist the disables or blind persons.Figure 17 shows the implemented circuit of toilet room automation system.
Figure 17.The implemented circuit of toilet Room Automation System

Garden Irrigation Automation System
Outdoor garden soil was monitored using special soil moisture sensor which senses the level of soil moisture and determines if it is dry or wet.If soil garden is dry, irrigation motor operates watering the plants at the time of need for real-water and switch OFF when soil garden is wet in part of save energy.Figure 18 shows the implemented circuit of this sub-system.
Figure 18.The implemented design of garden irrigation system

Garage Gate Automation System
A Mobile application was designed by using App Inventor for Android, the App Inventor is an open-source web application originally provided by Google, and now maintained by the Massachusetts Institute of Technology (MIT).The application created to control garage gate via Bluetooth technology, where that it provides a safety because only the house owner can open or close the garage door and also provides the comfort to the house owners.Figure 19 shows the implemented circuit and Figure 20 shows the android application of this sub-system.
Figure 19.Design of the garage gate system Figure 20.Android application

Security and Outdoor Lighting System
This part of design refers to (Internet of Think) IOT to build more intelligent system.PIR sensor was used to detect the motion and alert the house owners if there is intruder and also show the alert on the specific GUI programmed in HTML language, the GUI accessing via IP address granted by the NodeMCU to allows user monitor and control his house from anywhere.Also, the users can turn ON/OFF the outdoor lights through this GUI.

Conclusion
The system has been designed to provide several basic features.One of the important things that have been taken in the consideration in the design is the energy conservation and provides comfort of users, especially older ones.
In this system, remote home appliances were turned "ON" and "OFF" instead of using traditional switches, as well as providing a safe environment for the home population through a sophisticated and efficient security system.The smart garage door was designed by using servo motor that controlled by Andriod application to enhance the security and comfortable for user.

Figure 3 .
Figure 3.The MQ-02 gas sensor illustrate the flame sensor, and Figure5shows the curve between output voltage from the flame sensor values via distance(Taha, I. A., & Marhoon, H. M., 2018).

Figure 4 .
Figure 4.The flame sensor Figure 5. Flame sensor output voltage vs distance Figure 6.HC-06 Bluetooth module

Figure 11 .
Figure 11.The soil moisture sensor

Figure 12 .
Figure 12.The PIR sensor Figure 21.Block diagram of security and outdoor lighting system