0% found this document useful (0 votes)
14 views14 pages

Arduino

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 14

International Peer Reviewed Journal

Vol. 28 · March 2017 JPAIR Multidisciplinary Research is produced


Print ISSN 2012-3981 • Online ISSN 2244-0445 by PAIR, an ISO 9001:2008 QMS certified
DOI: https://doi.org/10.7719/jpair.v28i1.506 by AJA Registrars, Inc.
Journal Impact: H Index = 3 from Publish or Perish

Designing of Lighting Automation System


Based on Arduino Bluetooth Interface
using Android Smartphone as Platform
NARCISA T. MORALLO
http://orcid.org 0000-0002-5468-9179
narcisamorallo@gmail.com
Negros Oriental State University
Dumaguete City, Philippines

ABSTRACT

Bluetooth is now mainstream that it has become synonymous with the 21st
century. The wireless technology allows exchanging data over short distance
using short wavelength radio transmission, providing convenience, intelligence
and controllability. In this paper, a home lighting control system using arduino
bluetooth interface with android smartphone as platform is proposed and
prototyped. Technology in arduino, android smartphone and bluetooth are
reviewed. HC-05 bluetooth SPP (Serial Port Protocol) module, designed for
transparent wireless serial connection setup is being used in the design. Android
application is downloaded to android smartphone to monitor and control the
operation of the lighting system remotely. The application facilitates in controlling
the operating pins of Arduino. Design shows that arduino bluetooth interfacing
can control a house lighting using an android smartphone as a platform. In future
lighting home automation, timer will be included to be more energy- efficient
and highly scalable. For secured, ubiquitously accessible and remotely controlled
lighting system, GSM module will be incorporated in future designs. It would
be extended to the large-scale environment such as colleges, offices and factories,
among others.

149
JPAIR Multidisciplinary Research

Keywords – Science and Technology, lighting automation, Bluetooth module,


Arduino, Philippines

INTRODUCTION

Smartphones provoke a true revolution to our society. Apps are available


to smartphone users for more type of connections, such as communication
platforms. Bluetooth technology makes it possible for electronic devices to be
linked over short distance, without needing to be connected by wires. Generally,
Bluetooth has a range of up to 30 ft., or greater, depending on the Bluetooth core.
This technology offered better opportunity in convenience, comfort and security
in home lighting. With dramatic increase in smartphone users, smartphones have
gradually turned into an all-purpose portable device and provided people for
their daily use.
In recent years, an open-source platform Android has been widely used in
smartphones. Android is a mobile operating system developed by Google, based
on the Linux kernel and designed primarily for touchscreen mobile devices such
as smartphones and tablets. Android platform has support for Bluetooth network
stack, which allows Bluetooth-enabled devices to communicate wirelessly with
each other in a short distance .Bluetooth uses short-wavelength UHF radio waves
in the ISM band from 2.4 to 2.485 GHz from fixed and mobile devices. It can
connect up to seven devices.

Figure 1 .Bluetooth Symbol

Table 1. Bluetooth Specification


Bluetooth version Maximum speed Maximum range
3.0 25 Mbit/s
4.0 25 Mbit/s 200 feet (60 m)
5 50 Mbit/s 800 feet (240 m)

150
International Peer Reviewed Journal

Smart lighting is a lighting technology designed for energy efficiency. This


technology enables to minimize and save light by allowing the householder to
control remotely lighting. This ability saves energy and provides a level of comfort
and convenience. With bluetooth based design, lights can be turned on and out
automatically if within the portal’s range.
In the study of Yan and Shi (2013), a system has been developed to monitor
and control the lighting status using an Android Bluetooth-enabled phone and
Bluetooth modules via BF10-A. This design utilizes a microchip in gathering
status of the lighting and provides interface to control the lighting.
The study of David, Chirna, Ugochukwu and Obinna (2015) presented
a home control and environmental monitoring system. This uses an Arduino
microcontroller for accessing and controlling devices remotely. This uses a
smartphone as platform. Saini, Singh, Sharma, Wattanawisuth and Leeprechanon
also presented a system that monitors and controls the home electric appliances
in the real-time environment with the potential benefits in terms of flexibility,
scalability, security in the sense of data protection through cloud-based data
storage protocol, and energy efficiency.
About 150 billion kWh, which is 11 % of the total commercial sector
electricity consumption is utilized for lighting in 2016. In 2010, manufacturing
facilities consumed about 52 billion kWh for lighting, which is 1.3% of total
U.S. electricity consumption (Annual Energy Outlook, 2017).
In the Philippines, 2011 Household Energy Consumption Survey (HECS)
shows that electricity was mostly used for lighting purposes with 74% of
households reporting the use of electricity for such purpose. According to the
International Energy Statistics (IES), in terms of energy consumption, Philippines
is positioned at the median of countries in Southeast Asia. With the country’s
1.260 quadrillion British thermal units (Btu) energy consumption, Philippines is
way down below Asia and Oceania.

151
JPAIR Multidisciplinary Research

Figure 2. South East Asia Total Primary Energy Consumption

Electricity, which is usually used for lighting, is consumed at 58.33 billion


kilowatt-hours. Electricity was most commonly used for lighting purposes with
about 74 percent of the households reporting its use (Jane Moraleda, February
6, 2015).

Figure 3. Philippines’ End- Use of Household Electricity

Smart lighting market is growing exponentially from 2016 to 2022 and


expected to be valued at almost 20 billion by 2022. It is expected to witness
a shipment of 1.27 billion units by 2022, at a compound annual growth rate
(CAGR) of 27.1% and 71.3%, respectively, between 2016 and 2022 (Smart
Lighting Market by Product Type, Light Source, Communication Technology,
Software & Service, Application, and Geography - Global Forecast to 2022,
2016).
152
International Peer Reviewed Journal

OBJECTIVE OF THE STUDY

The purpose of this study is to design a home lighting control system using
Arduino bluetooth interface with android smartphone as platform.

MATERIALS AND METHODS

Bluetooth Based Home Automation


Bluetooth-based home lighting automation makes use of a cell phone and
Bluetooth technology. Bluetooth technology is secured and low cost. It is password
protected for secured system. Android app in the smartphone provides the user
interface. Bluetooth module and relays are used as interface for the bulbs. The
Bluetooth has a range of 10-100 meters, 2.4 GHz bandwidth and 3Mbps speed.
The android app on the phone is portable. It is also fast and cost effective system.

System Architecture
In this study, a design in lighting automation system based on Arduino
bluetooth interface using android smartphone as platform is presented. This
system is composed of hardware interface module and software communication
module. Being the heart of the system, all communication and control pass
through the arduino microcontroller.
The hardware required materials in this design are Arduino and battery (with
cable), bluetooth module HC 05/06, relay, bulbs, connecting wires and android
device. Android version use in this study are android 7 nougat, marshmallow
version 6.x, lollipop version 5.x, kitKat version 4.4.x, and 4.3, 4.2 and 4.1
version all jelly bean. Figure 4 shows an Arduino microcontroller and a Bluetooth
module HC 05/06. While the software requirement are Arduino Integrated
Development Environment (IDE) and android studio.

153
JPAIR Multidisciplinary Research

Figure 4.Arduino microcontroller

Figure 5. Bluetooth module

Figure 6. Relay

The four main parts of this project are android smartphone, a bluetooth
transceiver, an arduino and relay as shown in Figure 7.
154
International Peer Reviewed Journal

Figure 7. Block diagram

Bluetooth module HC 05/06 works on serial communication. As shown in


figure 7, the Android app is designed to send serial data to the bluetooth module.
The bluetooth module will communicate with the arduino microcontroller
through the transmitter and receiver pins of the module. The arduino activates
the relay connected to it by passing 5V through it. The bulb will turn on once
the relay is triggered.

Figure 8. Automatic Lighting System Block diagram

The following are the steps in making this design:

Step 1. Setting up the hardware connections


For setting up this system, wiring connections have to be made between
the arduino and bluetooth module and also with the relays. Figure 9 shows the
hardware connection of arduino and the bluetooth module. There are only four
connections to be made between the Arduino and Bluetooth module.. Here,
the bluetooth module’s Tx is connected to arduino Rx (digital pin 0) and the
module’s Rx to arduinoTx (digital pin 1). VCC and GND of the module is
connected to the arduino’s 5V and GND.

155
JPAIR Multidisciplinary Research

Figure 9. Arduino Bluetooth hardware Connection

Figure 10 shows the schematic diagram of the lighting system with switching
functionalities to control lighting using arduino through the relay system. The
corresponding bluetooth module pin connection is indicated in the figure.

Figure 10. Lighting System Schematic Diagram

156
International Peer Reviewed Journal

Step 2. Connecting the bulb to the relay


The relay used in this design is SPDT, it has 5 pins on the underside as shown
in Figue 12. Pins 1 and 3 are the coil pins. Pin 1 is connected to the arduino
digital pin and 3 is connected to arduinoGND . Pin 2 is the common contact
in the relay.

Figure 11. Single-pole double-throw (SPDT) 5V Relays

Figure 12. Relay pin-out

A relay pin–out, as shown in figure 12, pins 2 and 4 act identical to the two
terminals of a switch. When a HIGH voltage is applied to the relay, switch turns
ON, and switches OFF when a signal is withdrawn.

Step 3. Loading the Arduino Software


Aduino Integrated Development Environment can be downloaded from
Arduino. The code checks the bluetooth signal and compares using and “if ”
statement with the pre-defined values. The relay is activated once the value
matches, which passes 5V to the arduino digital pin.

157
JPAIR Multidisciplinary Research

Upload the code to the arduino board.

The Bluetooth module should be removed from the arduino board and
connected once the upload is complete.

The code in this design is shown below:


char data = 0;
constintblueLamp = 2;
constintredLamp = 4;
constintgreenLamp = 6;

void setup()
{
Serial.begin(9600);
pinMode(blueLamp, OUTPUT);
pinMode(redLamp, OUTPUT);
pinMode(greenLamp, OUTPUT);
}
void loop()
{
if(Serial.available() > 0)
{
data = Serial.read();
Serial.print(data);
}

if(data == ‘d’){digitalWrite(blueLamp, LOW);} //turn OFF blue lamp


if(data == ‘D’){digitalWrite(blueLamp, HIGH);} //turn ON blue lamp

if(data == ‘e’){digitalWrite(redLamp, LOW);} //turn OFF red lamp


if(data == ‘E’){digitalWrite(redLamp, HIGH);} //turn ON red lamp

if(data == ‘f ’){digitalWrite(greenLamp, LOW);} //turn OFF green lamp


if(data == ‘F’){digitalWrite(greenLamp, HIGH);} //turn ON green lamp
}

158
International Peer Reviewed Journal

Step 4 : Downloading the android application and setting up Bluetooth

Figure 13.Graphical User Interface Application

Download the android application, Arduino Remote to the phone from


PLAYSTORE as shown in figure 13. When application is installed, pair and
connect with bluetooth module before opening the Arduino Remote app. Power
the arduino and bluetooth module and then turn ON the bluetooth of the phone
and make it visible to other devices. Then search for new devices in bluetooth,
select the Bluetooth module from the list, enter the pairing code when prompted,
it is usually ’1234′ or ’0000′.
Note the name of the device, in this case it is “HC-06″. After pairing with
the system, open the android application “Arduino Remote” and enter the name
of bluetooth module (case-sensitive) and click “OK”. After that, the phone will
get connected to the system. By clicking the respective buttons on the app,
the bulbs turn ON/OFF.

RESULTS AND DISCUSSION

Figure 14 shows the circuit connection of the design. The working module
of the proposed system has been successfully built by harnessing the potential
benefits of android phone and bluetooth together. The Bluetooth system can

159
JPAIR Multidisciplinary Research

function at real time with high speed of communication. The range of Bluetooth
appliances is around 10- 100 meters. The system can be controlled within the
Bluetooth range. This is a significant drawback of this system.

Figure 14. Circuit Connection

CONCLUSION

The primary aim of this paper is to design a home lighting system based on
arduino Bluetooth interface using android smartphone as platform. A working
designed has been developed to control the lighting status using android Bluetooth-
enabled phone and Bluetooth modules through arduino. All communication
pass through the microcontroller for lighting status and interface for the control
of lighting. The bluetooth module transmits and receives commands from the
bluetooth-enabled phone. Arduino Remote app communicates among Bluetooth
devices. Android application, Arduino Remote, proved to be very efficient and
convenient. It is concluded that the design of lighting system using arduino
microcontroller and bluetooth module using android smartphone as platform
can effectively control home lighting remotely and wirelessly.

160
International Peer Reviewed Journal

RECOMMENDATION

For secured, ubiquitously accessible and remotely controlled lighting system,


GSM module will be incorporated in the future designs since accessibility to
the devices is limited within the Bluetooth range. Timer will be included to be
more energy- efficient and highly scalable. It would be extended to the large-scale
environment such as colleges, offices and factories etc.

TRANSLATIONAL RESEARCH

The circuit design can be introduced at homes, homes for Person with
Disability (PWD) and home for the aged. The design concept can also be
evaluated by stakeholders alike for acceptability and impact.

LITERATURE CITED

Annual Energy Outlook 2017, U.S. Energy information Administration.


Retrieved on March 21, 2017 from https://www.eia.gov/outlooks/aeo/
tables_ref.cfm

David, N., Chima, A., Ugochukwu, A., & Obinna, E. (2015). Design of a
home automation system using arduino. International Journal of Scientific
& Engineering Research, 6(6), 795-801. Retrieved on October 2016 goo.
gl/6Miyyj

Marimuthu, R., Singh, A. K., Balamurugan, S., & Aroul, K. (2006). Home
Automation Using Bluetooth-A Review. Retrieved on October 2016 from
goo.gl/o7Lgid

Markets and Markets Research. (2016, September). Lighting Market by Product


Type, Light Source, Communication Technology, Software & Service,
Application, and Geography - Global Forecast to 2022. Retrieved on October
2016 from http://www.marketsandmarkets.com/Market-Reports/smart-
lighting-market-985.html

Moraleda, J. (2015, February 6). Energy Consumption in the Philippines.


Philippine Canadian Inquirer. Retrieved on October 2016 from http://www.
canadianinquirer.net/2015/02/06/energy-consumption-in-the-philippines/
161
JPAIR Multidisciplinary Research

Philippine Statistics Authority (PSA). (2013, December 27). Electricity is the


most common source of energy used by households. Retrieved on October
2016 from https://psa.gov.ph/content/electricity-most-common-source-
energy-used-households

Saini R.P., Singh B.P., Sharma M. K., Wattanawisuth N., and Leeprechanon
,N.,Designing of smart home automation system based on Raspberry Pi,
American Institute of Physics, 2016. Retrieved on October 2016 from goo.
gl/SqxVmn

Yan, M., & Shi, H. (2013). Smart living using Bluetooth-based Android
smartphone. International Journal of Wireless & Mobile Networks, 5(1), 65.
Retrieved on October 2016 from goo.gl/x8fSqD

162

You might also like