Scientific African: Abiodun E. Amoran, Ayodele S. Oluwole, Enitan O. Fagorola, R.S. Diarah

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Scientific African 11 (2021) e00711

Contents lists available at ScienceDirect

Scientific African
journal homepage: www.elsevier.com/locate/sciaf

Home automated system using Bluetooth and an android


application
Abiodun E. Amoran a, Ayodele S. Oluwole a, Enitan O. Fagorola a, R.S. Diarah b,c
a
Department of Electrical and Electronics Engineering, Federal University Oye-Ekiti, Nigeria
b
Landmark University SDG9 (Industry, Innovation and Infrastructure Research Group)
c
Department of Electrical and Information Engineering, Landmark University, Omu-Aran, Nigeria

a r t i c l e i n f o a b s t r a c t

Article history: This article describes the implementation of a Bluetooth technology and an android ap-
Received 14 October 2020 plication with voice prompts based home-automated system using an Arduino microcon-
Revised 25 December 2020
troller. The system is aimed at designing an automated appliance control that is user-
Accepted 20 January 2021
friendly and convenient to use. The design comprised an Arduino ATMEGA328 microcon-
troller board, Bluetooth module (HC-06), and an android application (MIT App Inventor 2).
Keywords: The Arduino controls any connected component and was programmed with C++ program-
Android application ming language by using Integrated Development Environment (IDE). Relays and Triacs are
Arduino used for the switching mechanism. Once the system is connected, the user controls the
Bluetooth module electrical appliances connected to the home-automated system, which can also be con-
Home automated system trolled using voice prompt with the help of a Google assistant inbuilt with the android
MIT app inventor
smartphone. The system switches the home appliances ON and OFF using the android app,
Smartphone
Bluetooth module, and voiced prompt. It can also be timed to switch off appliances for a
pre-time of 12 h, thus making the application easy and convenient to operate via a smart-
phone.
© 2021 The Author(s). Published by Elsevier B.V. on behalf of African Institute of
Mathematical Sciences / Next Einstein Initiative.
This is an open access article under the CC BY-NC-ND license
(http://creativecommons.org/licenses/by-nc-nd/4.0/)

Introduction

Home automation is the use of one or more computerized remote to control basic home appliances remotely and some-
times automatically [7]. It is designed to contr1 ol lighting points, entertainment systems, and home security such as access
control as well as alarm systems. Automation and wireless technology have become a key technology in the twenty-first
century. It helps communication between one point to another without the use of cables, and this makes the system to be
more secure [1]. The attractiveness of controlling electrical devices through a phone has been increasing because of its high
performance and availability. Connecting appliances through smartphone is useful for the elderly and physically disabled
persons, who can access and control the appliances from where they are located and access them remotely without the
help of others. Time is a precious thing; everybody wants to save time as much as they can (Kannapiran and Arvind, [6, 2]).
Home automation systems are a technological means of intelligent monitoring, control, feedbacks and actions of home
appliances according to the needs of the home occupants. Wireless medium such as ZigBee, Bluetooth, wireless Fidelity (Wi-

1
[email protected]

https://doi.org/10.1016/j.sciaf.2021.e00711
2468-2276/© 2021 The Author(s). Published by Elsevier B.V. on behalf of African Institute of Mathematical Sciences / Next Einstein Initiative. This is an
open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
A.E. Amoran, A.S. Oluwole, E.O. Fagorola et al. Scientific African 11 (2021) e00711

Fi), Short Message Service (SMS), Android Application, Wireless Sensor Network (WSN), Radio frequency identification (RFID)
and Software Defined Network just mention a few serves as a medium of communication between the appliances and the
control unit and according to [17] home automation are essential for non-invasive and non-intrusive implementation of the
advanced automation system.
Android, a vivid operating system, has 76.24% usage worldwide, and 78.05% of Nigeria’s total smartphone market share
[9]. Android has become the topmost used mobile gadget operating system (OS) on the market today. The Android smart-
phone has become the most popular and commonly used Operating System in our world, especially in Nigeria. This had
made us base the control terminal of the home automated system on an android application as it has been shown that
majority cannot do without their phone with them almost all the time [2].
Conventional home controlled systems and its components are all wired to the same cable that connects them to the
home control panel. The key problem with conventional home controlled systems is that they require the mobility of the
user to operate it, hence the need for automation.

Literature review

Radio frequency identification (RFID) was used to design and monitor the indoor activity of elderly people in a smart
home by Nisar et al. [14]. The RFID monitored and collected the movement activity of the elder person using RFID tags,
information collected was used to take critical decisions about the health of the elderly person. But RFID can’t work where
its radio waves do not cover. Similarly Nisar and Ibrahim [15] presented A Smart Home Model Using Android Application
where the vital signs of the elderly are monitored. A communication module and sensors such as accelerometer, gyroscope,
force and temperature were attached to the knee and walking analyzer to monitor and extract of a person’s unique walking
pattern, which is used to classify the walking pattern an individual whether walking anomaly and walking with a level of
stability. The signals are taken by the sensors and information gathered from walking analyzer and knee monitor was used
to design a smart sleep room where vital signs like body temperature, breathing patterns and cardiac are monitored these
signs are sent through a smartphone and a local wireless network to monitor elderly persons’ health. The processes involved
in this design are too cumbersome and if sensors are not properly attached signal might fail and waking pattern will not be
got.
Also, Nisar and Ibrahim [16] proposed "a smart home model using android application" the home model uses ZigBee
module to communicate between the android phone and the smart home model. This is not an effective medium of com-
munication, as an external ZigBee transceiver must be connected to the android phone. This leads to waste in power, use of
many components as compare to Bluetooth that is part of an android phone already. In the same vein, Nisar et al. [17] pro-
posed a smart home automation for the elderly using Wireless sensor network and android application, the system was
divided into modules namely sensor, control and actuator. The sensor module served as the transmitting medium, the con-
trol module controlled the smart house, remote monitoring of other sub-modules and the actuator modules showed the
response of all appliance connected in the actual system as illustration, the drawback of this system is that failure to the
control modules is failure of the whole system.
Moreso et al. [2] presented a low-cost Bluetooth based home automation system using an Android phone was presented
by. An Arduino Mega 2560-R3 board and relays were used to connect the home appliances as input/output ports of the
board, a Bluetooth were used to establish wireless communication between them. Furthermore, Wanjale et al. [12] designed
and implemented an Android application with a Bluetooth module and Arduino UNO board for home-based automation.
Users can interact with the android phone and send a control signal to the Arduino UNO that will control other embedded
devices/sensors. Similarly, Tyagi et al. [11] controlled Home appliances through voice commands with Arduino and Android
OS. In the same vein, Sriskanthan and Karande [8] networked all home appliances and controlled them through Bluetooth.
The network contained a remote, mobile host controller and home appliances. The home appliance communicated with the
host controller through the Bluetooth devices, which operated the Home appliances through a RS232 network using Blue-
tooth module. Yuksekkaya et al. [3] developed a GSM, Internet, and speech recognition based home appliances automation.
The Signals from the Radio Frequency (RF) antenna were processed by the microprocessor, which in turn was used to control
the appliances. Also, Pandya et al. [7] also presented a Bluetooth-based home automation, but the only difference is that it
had an authentication mechanism that made it secure and accessible to authorized users. Teymourzadeh et al. [10] designed
and implemented a smart home automation system based on a mobile phone and GSM modem. In this design, an incoming
message was sent from the user phone to the GSM modem as a text message via the cellular network. It then decodes
the SMS to activate the connected appliances; this is not a cost-effective method of automation, as there is no means of
getting feedback from the system. Jubadi and Zulkifli [13] proposed how to use a Television (TV) remote control to control
room lighting and other appliances in their work entitled “Programmable Infrared Accessory Light Switch”. An Infrared (IR)
remote and one IR receiver was programmed to store the frequency of the existing remote and use them directly to control
appliances. Gurek et al. [5] explored internet-based home appliance connectivity but, a major demerit is this: when there is
no internet connectivity, the system fails especially in a country like Nigeria. Diarah et al. [4] in their work titled, “Design
and Implementation of a Microcontroller Based Home Automation System Using Aiwa Remote”, explore the use of television
remote to control home appliances, this is not efficient as users have to be physically present to activate the system by
pointing the remote towards the appliance.

2
A.E. Amoran, A.S. Oluwole, E.O. Fagorola et al. Scientific African 11 (2021) e00711

Fig. 1. Block diagram of the system architecture.

Materials and methods

This paper was implemented using the hardware and software approach. This was achieved by using a Bluetooth module
(HC-06) to communicate between the hardware system and the smartphone as shown in Fig. 1. The software part was based
on an android application created using MIT App Inventor 2, which is an easy to use online platform used to develop the
android application. The entire system was controlled by on two devices, namely the microcontroller and a wireless network
know as Bluetooth. The system architecture comprosed five major sections namely, microcontroller unit, notification unit,
relay and triac unit, communication channel, and power supply unit as shown below. The input, which can either be a voice
prompt or a graphical user interface (GUI) command but not both, serves as input to the mobile smartphone through the
Android application. The received command is transmitted using the Bluetooth, which is inbuilt in the mobile smartphone.

System designs: hardware design and implementation

Relay driver
The relay driver circuit is powered by Darlington IC ULN2003A that has seven pairs of a transistor with seven inputs
and output pins. The Darlington IC used eliminates the use of multiple components. The relay is powered by 12 V from
the power supply and it has two terminals, one terminal is connected to the 12 V supply while the other terminal is
connected to 5 V from the Arduino board which acts like a neutral that activates the relays. The Darlington IC has the
circuitry inside it that can increase the current to the relays and it has seven transistorized output pins, which eliminate
the use of several single transistors, but the output is only activated when the input pin of the IC is supplied with lower
voltage. The Darlington IC ULN2003A is shown in Fig. 2.

Power section
The mains power supplied to the system is 220VAC stepped down to 12VAC by the transformer while the four Diode
converted from 12VAC to 12VDC through the process of rectification to avoid dead time in rectification cycle and because it
was being used to power sensitive device components like microcontroller and Bluetooth module. A LM7812 12volt voltage
regulator powered the Darlington IC, relay, and the Diacs, while a 5volt voltage regulator LM7805 was used to power the
Arduino, Bluetooth, and optocoupler. Before the optocoupler, the Triac was used to drive a load that required a variable
speed like a fan while the Diac was used to activate the gate of the Triac. Just like in the transistor, the Diac gets the
required signal from the Arduino to drive the triac this will allow variable voltage to pass through the Triac. The Arduino
signals the Diac to activate the triac, while the optocoupler acted as a detector to detect the 220VAC and controlled voltage

3
A.E. Amoran, A.S. Oluwole, E.O. Fagorola et al. Scientific African 11 (2021) e00711

Fig. 2. Darlington IC (ULN2003A).

Fig. 3. Bluetooth module.

to the load (fan). All these are interchanged in the Arduino code. The Light -Emitting Diodes are connected to the relay, and
it served as an indicator when the relays are activated and a resistor connected with it is to resist current flow.

Bluetooth
The Bluetooth module used in this design is HC-06 as shown in Fig. 3. It receives the command and passes it onto the
Arduino microcontroller. The microcontroller reads the command through a serial port and therefore the Arduino microcon-
troller compares the command from the android phone to the code written on the Arduino Uno. If it matches the command,
the corresponding output pin goes high. The relay driver receives the signal from the microcontroller and activates the cor-
responding appliance (load). The HC-06 works with a supply voltage of 3.6VDC to 6VDC, however, the logic level of RXD pin
is 3.3 V and is not 5 V tolerant.

Connecting the Bluetooth module to the Arduino-Uno board. The process of connecting the Arduino-Uno and the Bluetooth
module followed the steps 1–3 to enable the android application to control the Arduino-Uno (microcontroller).
Step 1: The Bluetooth module and microcontroller was connected through their respective VCC pins.
Step 2: The Bluetooth module and microcontroller was connected through their respective GND pins.
Step 3: Similarly, the transmitter (Tx pin) of the Bluetooth module to the receiver (Rx pin) of the microcontroller and the
receiver (Rx pin) of the Bluetooth module to the transmitter (Tx pin) of the microcontroller.

Arduino microcontroller
This is the processing brain behind the work of this home automation, and it was used to interface the entire system
together. The Arduino board contains sets of both digital and analog input/output (I/o) pins that were interfaced to various
expansion boards or breadboards (shields) and other circuits. It was programmed using C++ programming language. Fig. 4
shows the circuit diagram for both hardware and software implementation.

Software design and implementation

This section discusses the software and algorithm used in developing the android application and programming of the
Arduino board Integrated Development Environment software, namely Arduino IDE and Proteus IDE. Fig. 5 show the opera-
tional flowchart of the software implementation.

Arduino IDE
The Arduino IDE is an open-source software that writes, compiles, and upload codes directly into the microcontroller.
The version used in this paper is version 1.8.9. The Arduino IDE environment is used for writing the desired software code
and for compiling, uploading code into the given Arduino board. Its environment supports both C and C++ language. It is
also used for debugging, editing, compiling, and uploading code in its environment to physical hardware modules.

4
A.E. Amoran, A.S. Oluwole, E.O. Fagorola et al. Scientific African 11 (2021) e00711

Fig. 4. Circuit Diagram of the Home automation.

Proteus IDE
Proteus IDE is a virtual system modeling (VSM) and circuit simulation application software. It also has a virtual system
studio, a free universal IDE for Proteus. Also, Proteus VSM can be used for advanced embedded simulation, offering-system
level simulation based on the schematic circuit. It has a wide range of components in its database or library. Besides its
own database component, more components can be designed as part of the library component if they are not part of the
original software library. Such a library component includes Arduino and Bluetooth Library for Proteus, etc.

MIT app inventor 2


The android developing platform MIT app inventor 2 is the latest version of an online app used in developing android
applications. It contains blocks that are dragged and dropped at the desired blocks in the corresponding place. The devel-
oped Application can be installed on an Android phone/tablet with a Bluetooth module. Figs. 6 and 7 shows code blocks for
Bluetooth connection and voice recognition, relay switch respectively.

Testing and discussion

The implementation of both the hardware and software programming was done initially on a Vero board. To determine
whether the different components are working fine, all the components were tested using a digital multimeter to check
that they conform to their datasheet. The test carried out includes a relay switching test, which is to ensure that the re-
lay switches as expected and the desired signal went through the android application. Timing test was also done since
the android application was developed to include a time picker which can activate or de-activate the electrical appliances
connected to the system. To reduce power consumption and manage power effectively, an Observe, Learn and Adapt (OLA)
algorithm through the use of machine learning tools as suggested by [18] can be adopted and the home automation sys-
tem can also be switched into sleeping mode when not in use such that power consumption will be low as well as power
supplied to a sensor or some sensors can be cut when it is not in use at a particular time, this can be done manually or
automatically.
The incorporation of voice command/prompt in this research work made the difference between existing methods such
as Amirah [2] which presented only a Bluetooth based home automation, Wanjale et al. [12] presented an Android applica-
tion with a Bluetooth module and Arduino UNO board for based home automation. Jubadi and Zulkifli, [13] proposed how
to use a Television (TV) remote control to control room light and other appliances.
Nisar et al. [14] attached RFID tags to elderly person to monitor their movement, also Nisar & Ibrahim, [15] attached a
walking analyzer and sensor to knee of elderly persons for proper monitoring their health status and control of appliances
in the same view Nisar & Ibrahim, [16] attached ZigBee module to communicate between the android phone and the smart

5
A.E. Amoran, A.S. Oluwole, E.O. Fagorola et al. Scientific African 11 (2021) e00711

Fig. 5. Operational flowchart of the home automation system.

Fig. 6. Bluetooth connection and voice recognition code block.

home, although all the above mentioned researches and this research focused on elderly persons our main was to make the
home automation simple such that nothing is attached to the body and it is easy to control appliance. Also, this research
did not put into much emphasis on health like Nisar et al. [14], Nisar and Ibrahim, [15] and Nisar and Ibrahim, [16] did. But
ultimately all these methods have made home automation easy and convenient to use.

6
A.E. Amoran, A.S. Oluwole, E.O. Fagorola et al. Scientific African 11 (2021) e00711

Fig. 7. Relay switching code block.

Conclusion and future work

An Arduino based home automation system using Bluetooth and an android application with voice command has been
designed and implemented. The Home automation system used an Android application and a Bluetooth technology in the
design; this is because they are easy to use, fast, readily available, and reliable in communications between the remote user
and devices. A low cost and highly reliable home automation system that can assist handicapped/old aged people, as well
as a user-friendly device was developed. Other features can be added in the future such as biometrics so that unauthorised
persons can not have access to the appliances and an also timing schedule can developed for each appliances connected
this will effectively conserve energy.

Declaration of Competing Interest

None

Funding

The authors received no funding.

References

[1] A.K. Kasim, A. Raheem, Bluetooth based smart home automation system using Arduino UNO microcontroller, Al-Mansour J. 27 (2017) 139.
[2] A.B.H. Amirah, H.I.I. Mohamad, K Chan, Bluetooth based home automation system using an android phone, J. Teknologi (Sci. Eng.) 70 (3) (2014) 57–61.
[3] B. Yuksekkaya, A.A. Kayalar, M.B. Tosun, M.K. Ozcan, A.Z. Alkar, A GSM, internet and speech controlled wireless interactive home automation system,
IEEE Trans. Cons. Electr. 52 (3) (2006) 837–843.
[4] R.S. Diarah, D.O. Egbunne, B.A Aaron, Design and implementation of a microcontroller based home automation system using AIWA remote, Int. J. Sci.
Res. Educ. 2 (3) (2014) 575–588.
[5] A. Gurek, G. Caner, A. Mustafa, K., .M.. Senem, K Ilker, An Android Based Home Automation System, in: Proceedings of the 10th International Confer-
ence on High Capacity Opt. Net. and Enabling Techn. (HONET-CNS), 2013.
[6] S. Kannapiran, A. Chakrapani, A novel home automation system using Bluetooth and Arduino, Int. J. Adv. Comp. Elect. Eng. 1 (5) (2016) 41–44.
[7] B. Pandya, et al., Android based home automation system using Bluetooth & voice command, Int. Res. J. Eng. and Tech. 3 (3) (2016).
[8] N. Sriskanthan, T. Karande, Bluetooth Based Home Automation Systems, J. Micro-Proc. Micros. 26 (2002) 281–289.
[9] StatCounterMobile Operating System, 2019 Available at https://gs.statcounter.com/os- market- share/mobile/worldwide .
[10] R. Teymourzadeh, et al., Smart GSM based home automation system, in: Proceedings of the IEEE Conference on System (ICSPC2013), Kuala Lumpur,
Malaysia, 2013.
[11] Tyagi, C.S., Agarwal, M., Gola, R.(2016) “Home Automation using voice recognition and Arduino” IJRTER, 12(7).
[12] N. Wanjale, R. Mathews, B. Mendes, M. Navale, Bluetooth based home automation, Int. J. Sci. Eng and Tech. Res. 3 (12) (2014) 2645–2650.
[13] W.M. Jubadi, N. Zulkifli, Programmable infrared accessory light switch, Int. Conf. Intell. Adv. Syst. Kuala Lumpur (2007) (2007) 1130–1134.
[14] K. Nisar, et al., Indoor roaming activity detection and analysis of elderly people using RFID technology, in: Proceedings of the 1st International Confer-
ence on Artificial Intelligence and Data Sciences (AiDAS), Ipoh, Perak, Malaysia, 2019, pp. 174–179, doi:10.1109/AiDAS47888.2019.8970780.
[15] a K. Nisar, A.A.A Ibrahim, A smart home model using android application, in: A. Lokman, T. Yamanaka, P. Lévy, K. Chen, S. Koyama (Eds.), Proceedings
of the 7th International Conference on Kansei Engineering and Emotion Research Advances in Intelligent Systems and Computing, 739, Springer,
Singapore, 2018, pp. 501–509, doi:10.1007/978- 981- 10- 8612- 0_1. KEER 2018, AISC 739.

7
A.E. Amoran, A.S. Oluwole, E.O. Fagorola et al. Scientific African 11 (2021) e00711

[16] b K. Nisar, A.A.A Ibrahim, A smart home model using android application, in: A. Lokman, T. Yamanaka, P. Lévy, K. Chen, S. Koyama (Eds.), Proceedings
of the 7th International Conference on Kansei Engineering and Emotion Research Advances in Intelligent Systems and Computing, 739, Springer,
Singapore, 2018, pp. 3–10, doi:10.1007/978- 981- 10- 8612- 0_1. KEER 2018, AISC 739.
[17] Nisar, K., Ibrahim, A.A.A., Wu, L., Adamov, A., and Deen. M.J. (2016). Smart home for elderly living using wireless sensor networks and an android
application. Proceedings of the IEEE 10th International Conference on Application of Information and Communication Technologies (AICT).
[18] B. Qela, H.T. Mouftah, Observe, learn and adapt (OLA) – An algorithm for energy management in smart homes using wireless sensors and artificial
intelligence, IEEE Trans. Smart Grid 3 (4) (2012) 2262–2272, doi:10.1109/TSG.2012.2209130.

You might also like