key: cord-0058761-xb0tsdco authors: Taiwo, Olutosin; Ezugwu, Absalom E.; Rana, Nadim; Abdulhamid, Shafi’i M. title: Smart Home Automation System Using ZigBee, Bluetooth and Arduino Technologies date: 2020-08-24 journal: Computational Science and Its Applications - ICCSA 2020 DOI: 10.1007/978-3-030-58817-5_43 sha: eb50a109744800bf2a29d2c8219f2f0e2eb45d11 doc_id: 58761 cord_uid: xb0tsdco The use of modern technologies for control and monitoring and accessing devices in domestic or industrial buildings with convenience, comfortable and easy access from any location is the primary aim of the internet of things (IoT) technology for smart home automation. Complete Smart home automation, with overall control from any place at any time is still not fully available. Nevertheless, this work proposes a mobile application system for smart homes, with the purpose of overall monitoring and control of home appliances and devices. The proposed method is based on Zigbee, Arduino and Bluetooth for wireless communication among devices in the home. At the same time, a mobile application is used for the control and monitoring of the devices or appliances. In this study, Zigbee and Bluetooth are combined in order to establish efficient communication either within or outside the home premises. A user scenario of the proposed work was simulated using Proteus Simulation software to validate the practicability of the new system. allow for remote monitoring and control by occupants or other uses to provide frequent and regular services to occupants. Smart home technology is a significant aspect of the internet of things (IoT), which is rapidly growing and being incorporated into daily activities, business, health, education and other aspects of life. Smart home technology is aimed at five major Cs; namely, convenience, comfort, consciousness, care and control. The ability to control ones' home from any location is highly convenient; for instance, in winter, making the house comfortably warm before even opening the door or switching on or off the sockets, lights, or appliances from an outside location. Smart home technology not only benefits home users has an impact on the economy and lifestyle of the community it is being used. It reduces stress, and saves time, energy, and money by preventing wastage of resources and basic amenities. For an effective smart home, technology has to be automated. Smart home automation systems connect controlled devices in the home to a central hub through which a user can control lighting, climate, entertainment systems remotely with the assistance of ambient intelligence [2] . The use of smartphones for daily communication and interaction has enhanced the use of smart home technologies for controlling home appliances, devices and utilities, while the user is either at home or far away. Devices in a smart home establish a connection through communication, which is a major link for devices to transmit instructions to one another for automation. Such communication may be wired or wireless [3] . Wireless communication in smart home automation involves different types of protocols; examples from the literature include Bluetooth [4, 5] , Zigbee [6] , Wireless Fidelity (Wi-Fi) [7] , GSM [8] , and Z-wave [9] . This study proposes a method for control, monitoring and access to a home through the use of a smartphone. The home is controlled via an Android-based mobile application. The design of the proposed method is based on Bluetooth module, Arduino Uno Board, sensors for control of doors and gate, and a smartphone application. Communication between home appliances or devices is established through Bluetooth communication that is embedded in the smartphone Android-based mobile application. The primary function of the proposed system is to give the user convenience, ease of access and monitoring of home from any location. It is of particular value for assisting handicapped, elderly, frail or disabled persons in using home appliances with ease. The remaining part of this paper is organized as follows: Sect. 2 gives a discussion on related work. Section 3 presents the system design and architectural framework of the proposed system. Implementation and simulation results are presented in Sect. 4. Finally, the concluding remarks and future work are discussed in Sect. 5. An IoT framework to control home appliances with the use of Digi Device Cloud was presented by Rajalekshmi and SivaSankari [10] , which entailed a smart home system using a cloud-based network platform, a gateway and low-cost microcontrollers. The framework allows users to issue commands to turn on or off multiple appliances. However, the design and control of devices via mobile application were not explicitly described in their work. Ye and Huang [11] presented a framework for a cloud-based smart home that enables home automation, household mobility and interconnection. Their cloud-based framework is expected to expand service scope in order to offer special and efficient home services for digital appliances. However, theirs is only a conceptual framework for a future intelligent household. Hence, there was no implementation. Wahab et al. [12] presented the design and implementation of a smart home automation system for controlling all electrical home appliances via Wi-Fi, with the use of an Android-based smartphone, tablet, or laptop. The system also uses sensors to monitor environmental conditions such as temperature and humidity, and can control or monitor voltages. The technologies used in the system are Arduino, ESP8266 Wi-Fi module, as well as temperature, humidity, smoke and motion sensors. The remote control of electrical appliances in the designed system is also aimed at reducing energy consumption. Security of the home in case of intrusion into the house or breakage is ensured by the ability of the system to send alerts to the user's phone However, implementation of the system and performance were not discussed. Another smart home automation system for monitoring and control through an Android application was presented by Hamzah et al. [13] . The system controls and monitors the temperature, humidity, gas flame, light, water and humidity level in the soil and detects motion. For example, room temperature is adjusted when it exceeds a set value; the kitchen is installed with a flame sensor and gas leakage sensor to forestall a fire accident and the homeowner's security is protected through a system alert notifying users of intruder in the building. The designed system is also capable of garden irrigation. The technologies used are Arduino, PIR motion sensor, ESP8266 microcontroller and Bluetooth. In this work, the designed system controls and monitors the home remotely and automatically, although exchange of data is limited to a short range due to Bluetooth being deployed in the system. Soliman et al. [14] , in their approach, presented a smart home automation system based on an Arduino microcontroller kit and LabView platform. The primary functions of the system are to control light, manage temperature and monitor home security through an ultrasonic security camera. Monitoring, access and control of the system are based on the signals received from the installed sensors in the system. For instance, temperature is measured by a sensor and, once it exceeds a set limit, a microcontroller in the system is capable of automatically turning on the fan. The system was evaluated based on object-sensor distance over which the sensor can detect changes and the autoadjustment rate of temperature. The technologies involved are Arduino, temperature sensors and motion detectors. A smart home energy management system proposed by Han et al. [15] detects use of energy based on wireless and wired networks. Power and energy from home appliances are transferred and measured through a low-power Zigbee communication network. Energy to run the system is generated through renewable energy sources (solar power and wind power); home energy usage is optimized based on power line communication. Light was installed as a means of energy and power measurement in a prototype system and was used for implementation with the home server of the proposed system. Results showed that the home server could achieve energy conservation and save energy costs. Other research works [16, 17] have been conducted in the area of smart home automation for monitoring, control, and security, with the aim of making life more comfortable and easier. However, most systems are limited in terms of their technologies and the coverage range of communication between devices. This work intends to eliminate the short-range communication barrier by incorporating Zigbee with Bluetooth for on-site and off-site communication. It also provides for easy control and monitoring of home appliances from any location via a smartphone and using low-cost technologies that are capable of covering a more extensive communication range. The proposed system consists of two major parts; specifically, the software and hardware. Components of the hardware are the Arduino board, Bluetooth module, Zigbee protocol and smartphone. In the proposed system Zigbee is combined with Bluetooth for off-site and on-site communication between devices. For instance, on the one hand, if one is at home, the gate, doors, or other appliances in the house can be controlled remotely via the Bluetooth link, without needing an internet connection. On the other hand, if one is off-site, the phone can communicate with the router using Wi-Fi communication to automatically open the door or gate through the internet, using the configured Zigbee stack in the router. The Bluetooth module is limited in communication range, hence the need for it being combined with Zigbee for wider communication coverage. The software part of the proposed system consists of the mobile application, Arduino Uno Board configuration using the Arduino Integrated Development Environment, Bluetooth application for communication between smartphone and Arduino Board and Proteus for simulation. The primary hardware technologies used in the proposed system are Arduino Uno Board, Zigbee and Bluetooth module together with a Smartphone for communication, control and monitoring of the home. The hardware implementation is to be incorporated using the Arduino Board interfaced with Zigbee and the Bluetooth module. Arduino Uno Board: Arduino boards have the ability to read inputs such as light on a sensor, a finger on a button, or a text message and turn it into an outputperhaps activating a motor, turning on a LED, publishing online and so on [18] . The Arduino Uno board was selected for this work because it has extensible hardware and it is a cross-platform program. The basic function of the board is to digitally read pins and the value of the given pin to set the input/output mode through the pin mode. The home is controlled remotely by Android smartphone using the Arduino board interfaced with Bluetooth. The board is configured using an open-source prototyping board formulated on easy-to-use hardware and software Arduino IDE (Integrated Development Environment) 1.8.10 windows version. Input and output signals are made available on the Arduino board using rows of conductors into which single inline connectors can be plugged. The Arduino development board has at least nine digital pins, which can be either input or output channels, four analog input channels and at least one serial port. The port may be used to download code to the Arduino board. Bluetooth Module: An easy to use Bluetooth Module Serial Port Protocol was used for wireless communication and serial connection set up in the system. Bluetooth communication is serial, hence it is easy to interface with a board, microcontroller, or PC. In this work, the Bluetooth module is connected to the board for control of LEDs by sending commands. The Bluetooth is paired to the master device (smartphone) to establish connection between the home and the phone. In the proposed system the HC-06 Bluetooth module, which features a 2.4 GHz ISM band frequency, is used and controlled from the Arduino board. To power the Arduino board, the Smartphone's Bluetooth is turned on to search for nearby devices; once this is found, paring is required with a password and so connection is established. In our proposed work, Bluetooth has a dual-task (master-slave and slave-master). It communicates with the Android application and also with the Arduino board for home control. Bluetooth is known to cover only a short range and, to overcome this limitation, Zigbee is combined with Bluetooth for communication and connection in the proposed system. Zigbee: ZigBee is a low power wireless mesh technology. It uses digital radios based on IEEE 802.15.4 standard for personal area networks with a focus on monitoring, control and sensor applications. It operates in mainly the 2.4 GHz ISM band [19] . A ZigBee network allows a set of devices to communicate wirelessly via one of several possible topologies. Packets of data can be sent between nodes and may be routed by intermediary devices to more distant nodes that would otherwise be out of range. Each device has both a MAC address and a ZigBee network address, the network as a whole has its own Private Area Network (PAN) ID shared by all devices. To secure communication with Zigbee, the IEEE 802.15.4 security model will be adopted. With the IEEE model, authentication, encryption and integrity of frames are ensured to avoid manipulation during network transmission and node communication in the home. In our work, sensors installed on home appliances such as doors, gates and lights and other sensors, such as those used for measuring ambient conditions like home temperature, are connected to Zigbee for communication with Arduino board and then home control through the smartphone. Functioning of the home automation system involves configuration of devices such as the Arduino board and development of applications such as an Android mobile app for smartphone. In this work, the software components are the Arduino Integrated Development Environment (IDE), Bluetooth terminal and the Android-based mobile application. Mobile Application: An Android-based smartphone application is developed using Android Studio for the control of appliances in the proposed system. Android Studio is a recognized Integrated Development Environment (IDE) for Google's Android operating system. It is based on a Java integrated development environment for software development. The smartphone communicates wirelessly with the home appliances through Bluetooth, interfaced with the Arduino board for home control. Arduino Integrated Development Environment IDE: Programming or coding of the Arduino Board for the proposed system is done using the Arduino IDE tool, which is a cross-platform application for Windows, Linux and macOS. The Arduino IDE is written in functions from C and C++ programing languages. Arduino IDE is used to write and upload programs to Arduino compatible boards. The command for receiving data serially from a smartphone is of the form "Serial.available()" while the command for transmitting data serially from an Arduino board to a smartphone is represented as follows: Arduino IDE code is also used for turning ON and OFF appliances in the smart home system. In order to address the issue of interoperability and scalability in the problem statement, the proposed home system is modelled to be a convenient, low-cost home controlling (activation and deactivation) and monitoring system. As shown in the architectural design illustrated in Fig. 1 below. The smart home system is divided into three major phases; viz, sensor-based appliances, non-sensor-based home appliances and IoT smart home automation technologies. The sensor-based home appliances include those which involve locks, such as gates, doors, etc. Non-sensor based appliances are basic home appliances such as microwave, fridge, fans, switches, electric cooker, television and so on. Technologies used are the Arduino board and microcontroller, Bluetooth module, Zigbee and sensors. The sensor-based appliances are interfaced with the Zigbee module for communication with the Arduino board, to enable better communication and control of the appliances. Other home appliances are connected to the Bluetooth module for wireless communication and interaction with the developed smartphone application. The set up for this module comprises integrating home devices to communicate simultaneously with one another and then communication between the homeowner (or user) and the home is through the mobile application. Zigbee is combined with Bluetooth in the developed system for both off-site and on-site communication of devices. The proposed methodology for the smart home mobile application system has two major modes or components. The user (home) and communication modes. For communication between the user and home appliances, Arduino Uno board, Zigbee and Bluetooth module are used and for home control, an Android Mobile application was developed. The smartphone communicates with the Bluetooth module through the developed mobile application; as such, the Bluetooth module sends a signal to the device, once they are connected, a signal is sent to the board for control of home devices. The system proposed in this project was tested using Proteus Simulation Software to check its feasibility. The simulation output of the Arduino board and home appliances is shown in Fig. 2 . For the simulation, the Arduino UNO board was used with LEDs (Red-Blue) connected to the pins; the LEDs were set to switch on and off with a delay of one second. A successful simulation makes the LEDs blink red and blue colors. The Arduino boards are designed for faster and easier building of electronics, and feature pins for inputs and outputs as well as a microcontroller. The code for the board was programmed using open-source Arduino IDE version 1.8.10. LEDs in Proteus were used to depict home appliances to be controlled by the board. Any mobile device that has the developed Android application installed can connect to the board via the Bluetooth module and the device thus controls home appliances such as fans, bulbs, sockets, fridge. For security, before access can be gained for control of the home appliances on the application the user creates login credentials. Also, a passcode is needed for establishing the Bluetooth connection and pairing of devices in the developed mobile application; (see Fig. 3a to 3c). After establishing successful communication, the user can then control home devices from the application (see Fig. 3d ). In the developed application, the user can only gain access to establish communication with the Bluetooth module after a successful registration (see Fig. 3a ). The passcode for set up would have been gotten during registration and the user is expected to use the passcode to gain access. Once the passcode is accepted (see Fig. 3(b) ), a search is done for Bluetooth device and once it is paired, communication must be established with device is needed (see Fig. 3c ). The home control module is initiated (see Fig. 3d ), and lastly, control of devices can be initiated (see Fig. 3e ). In this paper, we have presented a system for controlling home devices or appliances from any location, with a hybrid technique based on an Android mobile application, Bluetooth, Zigbee and Arduino board. The main purpose of the work is to allow accessible communication between devices in the home and control of devices or appliances either from within or outside the house. The system has been tested using Proteus Simulation Software for feasibility. The next phase of the current study would be to establish a connection using actual hardware components required for building Fig. 3 . User authentication and network connection establishment process smart home automation. The simulation process shows that communication can be established between home appliances using the Arduino board, Bluetooth module and Zigbee. The mobile application should also be investigated for communication, control and monitoring of home from any location. In the future, closed circuit television (CCTV) installed in the home would also be connected to the system for monitoring of the house; thereby providing the security option of confirming a visitor's identity for whom the user may need to open the gate while not within the house. The home system is also intended to incorporate devices that could be useful for the elderly or handicapped. With the combination of both Zigbee and Bluetooth, the system seems to perform better in terms of communication range than with Bluetooth alone. Also, because the system accommodates a variety of sensors, the system could be extended for use in healthcare for monitoring and recording of a patient's vital health signs. Furthermore, to reduce costs, the system is intended to be used with an existing home appliances rather than the user needing to purchase new devices. Smart Home -A Definition A review of systems and technologies for smart homes and smart grids A Guide to Home Automation Protocols Smart home automation system using bluetooth technology Android & bluetooth module based door automation system Smart home: integrating internet of things with web services and cloud computing Smart home automation system using arduino and IOT Smart home automation using android application Smart homes automation using Z-wave protocol IoT framework for smart home using cloud computing via open source mobile platform A framework for cloud-based smart home Design and implementation of IoT-based automation system for smart home Designing and implementing applications of smart home appliances Design and implementation of a real-time smart home automation system based on arduino microcontroller kit and labview platform Smart home energy management system including renewable energy based on ZigBee and PLC Design and implementation of simple IoT-based smart home system using arduino Design and implementation of an IoT-based smart home security system Common IoT Hardware Platforms A review of connectivity challenges in IoT-smart home