You are on page 1of 82

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/359190460

VOICE CONTROLLED LIGHTING SYSTEM

Thesis · March 2022

CITATIONS READS

0 858

1 author:

Shane Viran
University of Hertfordshire
1 PUBLICATION   0 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

VOICE CONTROLLED LIGHTING SYSTEM View project

All content following this page was uploaded by Shane Viran on 12 March 2022.

The user has requested enhancement of the downloaded file.


UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

School of Engineering and Technology

University of Hertfordshire

BEng Honors in Electronics and Communication Engineering

Individual Major Project

6FTC1167

VOICE CONTROLLED LIGHTING SYSTEM

Name: P.S.V. Wijethilaka


UH Registration Number: 17061097
SLT Registration Number: ED/ECME/2018/11
Supervisor Name: Ms. Umesha Sandarenu

VOICE CONTROLLED LIGHTING SYSTEM


UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

DECLARATION STATEMENT
I certify that the work submitted is my own and that any material derived or quoted from the published
or unpublished work of other persons has been duly acknowledged (ref. UPR AS/C/6.1, Appendix I,
Section 2 – Section on cheating and plagiarism)

Student Full Name


P.S.V Wijethilaka

Student Registration Number:- 17061097

i
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Abstract
This paper presents the general concept of the Smart lighting system, which was initially developed
with the aim of helping the physically disabled. More importantly, this machine is capable of delivering
help and support to address the needs of individuals with disabilities at home. This project was broken
down into two stages. The primary section was devoted to developing a detailed understanding of the
most common and diffused concepts for home automation. During this process, I intended to acquire a
bit of in depth-awareness of a number of companies involved in this field, their capacities, drawbacks,
and potential growth areas of the existing home automation systems. It has been a little challenging to
learn information. The explanation for that is that most of the items included in this analysis are protected
commercially. The second step offers my own input in the form of a concept, a smart lighting device,
and it has the potential to work as a smart home system. My design is called as "Smart lighting system"
and mainly controlled by the processing of voice commands. I contend that this approach should be
accessible to people with disabilities and those with reduced mobility. Besides that, the hardware used
for developing and installing the device is always available and has a fair price tag. In my concept, the
most sophisticated device is a smartphone which is already owned by the future customer in most
situations.

ii
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Acknowledgments
First and foremost, praises and thanks to God for his showers of blessings throughout my project work
to complete the project successfully.

This individual major project would not have been possible without the valuable assistance of many
people to whom I am indebted, in particular, my project supervisor Eng. Umesha Sandarenu, for
providing invaluable guidance throughout my project. Her vision, sincerity, and motivation have
enormously helped me throughout my works. I would also like to thank Eng. Sameera Bandaranayake,
our project coordinator who leads us in these challenging times. Additionally, I would thank the Sri
Lanka Telecom Training Center for supplying the requisite components and, most importantly, the skills
to the research venture.

Last but not least, I would like to thank my colleagues, who helped me with my beta testing of the
Android application. I am immensely grateful to my mother for her encouragement, prayers, care, and
dedication for educating and preparing me for my future.

iii
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Contents
DECLARATION STATEMENT ................................................................................................................. i

Abstract ................................................................................................................................................... ii

Acknowledgments ...................................................................................................................................iii

List of Figures .........................................................................................................................................vii

List of Tables .......................................................................................................................................... ix

Glossary .................................................................................................................................................. x

1.Introduction .......................................................................................................................................... 1

1.1 Home automation .......................................................................................................................... 1

1.2 Problem Statement ....................................................................................................................... 1

1.3 Project Aim's and Objectives. ....................................................................................................... 2

1.3.1 Project Aim's .......................................................................................................................... 2

1.3.2 Project Objectives .................................................................................................................. 2

1.4 Project Feasibility .......................................................................................................................... 3

1.4.1 Existing Systems .................................................................................................................... 3

1.4.2 New System ........................................................................................................................... 4

1.4.3 Project Cost and Marketability ............................................................................................... 4

1.4.4 Project Justification ................................................................................................................ 5

1.4.5 Software ................................................................................................................................. 5

1.4.6 Hardware ................................................................................................................................ 6

1.4.7 Project Limitation .................................................................................................................... 6

1.5 Project Layout ............................................................................................................................... 6

1.6 Significance of the study ............................................................................................................... 7

2.Literature Review ................................................................................................................................. 8

2.1 What is Home Automation System ............................................................................................... 8

2.2 Background ................................................................................................................................... 8

2.3 History ........................................................................................................................................... 8

2.4 Comparison between popular home automation systems in the past .......................................... 9

2.5 Modern Technology of Home Automation Industry .................................................................... 10

2.5.1 Comparison .......................................................................................................................... 12

2.6 Home Automation Standards ...................................................................................................... 13

iv
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
2.7 Future Scope of Home Automation ............................................................................................. 13

2.8 Challenges .................................................................................................................................. 14

2.9 Similar Projects ........................................................................................................................... 15

3.Methodology ....................................................................................................................................... 17

3.1 Preliminary Consideration ........................................................................................................... 17

3.2 System Design ............................................................................................................................ 17

3.3 Developing the Android Application ............................................................................................ 21

3.4 Project Breakdown Structure ...................................................................................................... 24

3.5 System Process .......................................................................................................................... 26

3.6 Alternative Analysis ..................................................................................................................... 27

4.Implementation ................................................................................................................................... 28

4.1 Hardware Description .................................................................................................................. 28

4.1.1 Arduino Uno R3 .................................................................................................................... 28

4.1.2 HC-05 Bluetooth Module ...................................................................................................... 29

4.1.3 HLK-PM-01 AC to DC Power Module .................................................................................. 31

3.1.4 One Channel Relay Module ................................................................................................. 31

4.1.5 2N222 NPN Transistor ......................................................................................................... 32

4.2 Hardware Implementation ........................................................................................................... 32

4.3 Software Description ................................................................................................................... 33

4.3.1 Arduino IDE .......................................................................................................................... 33

4.3.2 Proteus Design Suite ........................................................................................................... 33

4.3.3 MIT App Inventor for Android ............................................................................................... 34

4.4 Software Implementation ............................................................................................................ 34

5. Results and Discussion ..................................................................................................................... 35

5.1 HC-05 Bluetooth Module ............................................................................................................. 35

5.1 Low power Amplifier and Switch ................................................................................................. 35

5.2 Beta Testing of Android Application ............................................................................................ 37

5.3 Range of the Device.................................................................................................................... 39

5.4 Google Speech Recognizer ........................................................................................................ 39

5.5 Discussion ................................................................................................................................... 41

6.Conclusions ........................................................................................................................................ 43

v
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
7. Future Development.......................................................................................................................... 44

8.Project Management Review. ............................................................................................................ 45

8.1 Comparison ................................................................................................................................. 48

References ............................................................................................................................................ 51

Appendix A ............................................................................................................................................ 53

Appendix B ............................................................................................................................................ 57

Appendix C ............................................................................................................................................ 62

Appendix D ............................................................................................................................................ 67

Appendix E ............................................................................................................................................ 68

Appendix F ............................................................................................................................................ 70

vi
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

List of Figures
Figure 1-ZigBee Home automation system .......................................................................................... 10
Figure 2-GSM based Home automation system ................................................................................... 11
Figure 3-Wi-Fi based home automation system ................................................................................... 11
Figure 4-The WHADDA Architecture of the system .............................................................................. 15
Figure 5-Circuit diagram of Smart lighting system using Raspberry .................................................... 16
Figure 6-System Architecture of Smart lighting system ........................................................................ 18
Figure 7-Schematic Diagram of the system .......................................................................................... 20
Figure 8-PCB Diagram of the system ................................................................................................... 21
Figure 9-Wireframe of the Android application ..................................................................................... 23
Figure 10-Flow diagram of the mobile application ................................................................................ 24
Figure 11-Project Breakdown Structure ................................................................................................ 25
Figure 12-Flow Chart of the System process ........................................................................................ 26
Figure 13-Arduino Uno R3 .................................................................................................................... 28
Figure 14-HC-05 Bluetooth Module ...................................................................................................... 29
Figure 15-HLK PM-01 Power Module ................................................................................................... 31
Figure 16- 5V Singla channel relay ....................................................................................................... 31
Figure 17-2N2222 Transistor ................................................................................................................ 32
Figure 18-Prototype of the system ........................................................................................................ 32
Figure 19-Driver circuit .......................................................................................................................... 36
Figure 20- Android versions of beta testers .......................................................................................... 37
Figure 21-Feedbacks of the testers ...................................................................................................... 37
Figure 22-Interface face change ........................................................................................................... 38
Figure 23-Features added into the mobile application .......................................................................... 38
Figure 24-Identification rate of voice commands before the changes .................................................. 40
Figure 25-Changes done in the code .................................................................................................... 40
Figure 26-Identification rate of voice commands after the changes ..................................................... 41
Figure 27-Initial Gantt Chart .................................................................................................................. 46
Figure 28-Actual Gantt Chart ................................................................................................................ 47
Figure 29- Graphical representation of the initial milestone chart ........................................................ 47
Figure 30-Graphical representation of final milestone chart ................................................................. 48
Figure 31- Appearance of the loading screen ....................................................................................... 57
Figure 32-Block structure of the code(loading screen) ......................................................................... 57
Figure 33-Appearance of the screen 2 ................................................................................................. 58
Figure 34-Block structure of the code(Screen 2) .................................................................................. 59
Figure 35-Appearance of the main menu ............................................................................................. 60
Figure 36-Block structure of the code (Main menu) .............................................................................. 60
Figure 37-Appearance of the Screen 4 ................................................................................................. 61
Figure 38-Block structure of the code(Screen 4) .................................................................................. 61
Figure 39-Pin diagram of Arduino Uno R3 ............................................................................................ 62

vii
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
Figure 40-Arduino Uno R3 dimensions ................................................................................................. 62
Figure 41-Pin diagram of HLK PM-01 ................................................................................................... 63
Figure 42-HLK PM-01 dimensions ........................................................................................................ 63
Figure 43-Pin diagram of HC 05 Bluetooth module .............................................................................. 64
Figure 44-HC 05bluetooth dimensions ................................................................................................. 64
Figure 45-Pin diagram of 2N2222 transistor ......................................................................................... 65
Figure 46-2N2222 transistor dimensions .............................................................................................. 65
Figure 47-Pin diagram of relay .............................................................................................................. 66
Figure 48-PCB(Top) .............................................................................................................................. 67
Figure 49-PCB(Bottom) ......................................................................................................................... 67
Figure 50-Dimensions of the enclosure (Bottom) ................................................................................. 68
Figure 51-Dimensions of the enclosure (Top)....................................................................................... 68
Figure 52-Enclosure .............................................................................................................................. 69

viii
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

List of Tables
Table 1-Comparison ................................................................................................................................ 3
Table 2-Project Cost ............................................................................................................................... 5
Table 3-Comparison between popular home automation systems in the past ..................................... 10
Table 4-Comparison between existing home automation systems ...................................................... 13
Table 5-Connections in the system and their purpose ......................................................................... 20
Table 6-Range of the device ................................................................................................................. 39
Table 7-Initial estimated cost ................................................................................................................ 45
Table 8-Actual cost ............................................................................................................................... 46

ix
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Glossary
Performance Index - A single composite performance index is sought on a 0-1 scale. A perfect scale
is one and rated best performing on all factors.[7]

Affordability Index - This index is premeditated based on the cost required to obtaining a basic system
(controller, four smart switches, two occupancy sensors and one temperature sensor); Since installation
costs for all technologies are equivalent, labor costs are not included.[7]

HMM - Hidden Markov Model


DC - Direct current

AC - Alternating current

User Persona - A user persona is one of the essential tools in UI designing. This helps the developer
to keep a simple user story in mind and work according to that.

PCB – Printed Circuit Board

x
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

1.Introduction
1.1 Home automation

Some great pandit once remarked, "Every time has his technology, and Every technology has its time."
Taking the last century into account, technology has been updated with time. The rapid technological
advancement made our day to day life even more comfortable. The smart home or Home automation
idea has become more familiar to us more than ever. In the early 1970s, the smart home concept was
born, and it was a fantasy for both architectures and system designers at the time. The rapid
advancement of the embedded systems has clashed directly with the automation industry. It is expected
to widely spread home automation systems like smartphones. The smart lighting system is playing a
significant role in the home automation industry. Moreover, this allows the consumer to change the
mood of any area of his or her house to suit the occasion just using a simple command.

Home automation is not a concept of the future; it has become a reality. Most of the electronic devices
are now implemented as software applications running on smart devices. So far, the world has generally
adopted the concept of managing homes with the aid of smart devices.

1.2 Problem Statement

The problem lies with the situation of physically differently-abled people. People who cannot usually
move themselves on their own. To use these systems, the user needs some energy and knowledge as
well as some assistance. These goods are not groups which belong to plug and play. Moreover, the
greatest concern is that these devices are expensive.

According to the reports of WHO, 15% of the world population is estimated to be live with a disability.
Most of them are physically disabled, and this causes a lack of a person's physical functioning, mobility,
and stamina, and this limits their day to day life activities.[1]

In Sri Lanka, there are 1.6 million disabled persons. Around 20% of them are suffering from a physical
disability. Moreover, most of these people cannot afford modern smart home systems, and most of the
houses are not compatible with these technologies. So, basically, high tech home automation systems
will not make their day to day life easy. [2]

That is why this project is focused solely on the lighting system rather than focusing on automating the
entire house. When considering the comfort level of the project, the user has to plug and connect with
it via Bluetooth, and the user can connect with the device using a mobile application. Also, this will be
cheaper than other products in the market in this category.

Since this project is mainly focusing on physically disabled persons, as speech recognition technology
has developed over the years, the system has used voice as the primary interface between the user
and the device. Users need a smartphone, and internet access to use this device. Infrastructure has

1
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
grown in Sri Lanka over the years, and there will be no significant effect on this project from the internet.
Overall, this is an affordable commodity that much of the population can afford, and this focuses
primarily on increasing the satisfaction level of those with disabilities.

1.3 Project Aim's and Objectives.


1.3.1 Project Aim's
1. Ease of disabled person's
• The primary purpose of this project is to help physically disabled persons who cannot
access the entire lighting system without sacrificing the visual comfort and energy. So,
this system will give access to control the lighting system of the house, and also, they
can control it according to the occasions.

2. Increase the efficiency


• This automated lighting system gives full access to disabled people to turn off and on
the light as they wish. So, there will be no waste of electricity.

3. Reduce the Complexity


• In a modern automated lighting system requires smart lights; otherwise, it does not
work. However, In this product, there is no need for smart lights. Users can use regular
lights. Apart from that, the system consists of simple commands. Also, the mobile
application was developed in a more user-friendly way. And it will reduce the complexity
of the system.

4. Reduce the price tag


• Since existing home automation systems are expensive, most of the disabled persons
who live in Sri Lanka cannot afford it. However, this product is cheaper compare to the
existing system. So, most people can afford it.

1.3.2 Project Objectives


1. Voice Controlled System
• In order to increase the effectiveness of the system and to help physically disabled
persons, this product is using voice command as the primary input. To identify the voice
commands, this system has included an android application. This application will detect
the voice command and communicate with the device via Bluetooth.

2
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
2. Remote Control
• Since this product using Bluetooth as the communication bridge, this will have around
20m range. So, the consumer can access this remotely using his or her smartphone.
The disabled person does not need to sacrifice energy to switch on or off the lights.
3. Increase the Accuracy
• Smartphones have better Mic and an average range of capturing voice with respect to
the Voice recognition module. That is why this product uses smartphones as its remote
controller.

1.4 Project Feasibility


1.4.1 Existing Systems
In most wireless systems, the designer has dual overriding limitations: it must operate over a certain
distance and transfer a particular volume of information within a time frame. Then the overall cost of the
system must work out according to the rules and regulations of the government agencies.
Zigbee is one of the most commonly deployed wireless networks, an open, modular framework.
Considering the existing technologies. Zigbee is designed mainly to use network architectures like point
to point network topology, star network topology, and mesh network topology in a building block within
a least-cost per node. To design and build a home automation system, Zigbee is often used for routing
Ad Hoc On-Demand Distance Vector (AODV) to design and build a home automation system.
Wi-Fi is the perfect choice for an environment like a three-bedroom home. It utilizes radio waves to
supply the consumer's house with high-speed broadband. However, it uses several overlapping access
points to span a wide area. In comparison, these numerous overlapping entry points allow users to gain
control of a device that spans a wide area. Omnidirectional radio waves can travel through walls and
nonmetal barriers.
Bluetooth technology is the best and broadly used wireless technology for that particular character. The
short-range radio transmission unit has been built for Bluetooth communication. It has numerous
applications to setup communication among devices. The new primary device in the home automation
system is an android smartphone.

Wi-Fi Bluetooth ZigBee


The architecture of the Star Star Mesh
network
Size of the Network 32 7 Between 20 to 250
Optimized for, • Speed • Low cost • Reliability
• Convenience • Low power
• Low cost
• Scalability
Table 1-Comparison

3
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
Amazon Echo is a leading home automation platform, leveraging Amazon's patented voice-powered
Alexa technology. The Echo will act as a standalone unit, linking to a cloud-based service delivering
audio, making calls, setting up reminders and times, asking questions or even requesting weather and
traffic updates. The Echo has several omnidirectional microphones that make it easy to take voice
commands from across a building and has several speakers to make it easy to hear.
Another popular method for implementing a home automation system is the Google Home Platform. It
uses Google Assistant to execute functions using voice commands, but acts mostly as a visual GUI,
functioning in essence like a mobile computer-controlled by speech. It will show local weather, activities
and announcements, regular timetables, as well as watching YouTube music and video, among other
facilities. It will display a clock over its screen while not in use, or function as a digital picture frame by
showing photos from users Google Picture account.
There is another project pending in the Home Automation industry, and it is known as IVEE. This system
is capable of communicating with the operator, it can take an order, and it can control some home
appliances. As an example, if a consumer asks about the weather report from IVEE and if the system
relates to Wi-Fi, then it can tell and show the total forecast.

1.4.2 New System


Smart lighting system, intended in particular to help physically disabled people, but this is capable of
providing service for elders, decrepit, and cripples. This device enables these kinds of consumers to
control the lighting system of the house. This new system is about developing a better solution to be
applied to impaired individuals.

The overall system is working on three steps; First, Connect the device with the existing lighting system
with minimum external wiring system. Secondly, install the provided android application to consumers'
portable android device. Lastly, Connect the android application with the device via Bluetooth and
control the device using voice commands.

Users will get a set of voice commands to control the lighting system, and then the android application
will identify the command using the google speech recognition system. After recognizing the command,
the application will communicate it with the microcontroller through the Bluetooth module. In this case,
the Bluetooth module will act as a communicating hub. Finally, the microcontroller will pass the
instruction to the relays.

This new system is specialized for pre-existing houses despite its eligibility to be extended to a new
house.

1.4.3 Project Cost and Marketability


This project is cost-effective compare to the existing smart home systems. The components used in the
project are readily available in the market. These reasons will help to reduce the cost of the product.
Also, the cost of the product will further reduce if this device starts manufacturing industrially.

4
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
The device is light weighted, simple, and easy to install, and the Android application build with a user-
friendly GUI, every instruction is available in both text and voice mode. Non-expert of the areas can
also control the device easily. The device will execute the command with minimum time usage. Usually,
it takes 2-5 seconds. The device is also capable of upgrading to a complete home automation system

No Component Amount Unit Price Cost (LKR)


(LKR)
1 Microcontroller 1 1050.00 1050.00
HC-05 Bluetooth Module 1 1000.00 1000.00
2 2N2222 Transistor 6 3.00 18.00
3 Resistor (1 kΩ) 6 4.50 27.00
4 1N4007 Diode 3 4.50 13.50
5 HLK-PM01 AC to DC 1 1000.00 1000.00
Converter
6 Relays 3 450.00 450.00
7 Rocker Switch 1 20.00 20.00
8 Enclosure 2 2000.00 2000.00
Estimated Total Cost ≈ 5600.00
Table 2-Project Cost

➢ The estimated total cost for the smart lighting system is Rs.5,600, which is less than the
allocated budget (Rs.10,000) for this project.

1.4.4 Project Justification


This project is of contributory knowledge to the development and implementation of the smart lighting
system, which is suitable for disabled people in Sri Lanka using low cost and locally available
components such as Arduino microcontroller, HC 05 Bluetooth module.

1.4.5 Software
In this project, to code the microcontroller, Arduino IDE was used, and to develop the Android
application, MIT app inventor was used. MIT App inventor is a web application integrated development
environment initially provided by Google and now continued by the Massachusetts Institute of
Technology (MIT). MIT app inventor is free and open-source software released under dual licensing: A
Creative Commons Attribute ShareAlike 3.0 Imported license and Apache license 2.0 for the source
code. Also, there are several other software used to create audio files used in the android application.
Proteus was used to design the schematic diagram of the device.

5
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
1.4.6 Hardware
In this project, HC 05 Bluetooth module was selected as the communicating bridge between the device
and the user. The operating voltage of the module is 4v to 6v (typically +5v), and the operating current
is 30 mA, and the range of the module as per the records, <100m. This module follows the IEEE
802.15.1 standardized protocol. 802.15.1 based on Bluetooth technology. It defines the physical layer
(PHY) and Media Access Control (MAC) specification for wireless connectivity with fixed, portable, and
moving devices within or entering personal operating space. Furthermore, these standards were issued
in 2002 and 2005. This module can operate in Master, Slave, or Master/Slave mode and can easily
interface with Laptop or Mobile phones with Bluetooth. Supported baud rate are 9600, 19200, 38400,
57600, 115200, 230400, 460800. Also, this gives full-duplex wireless functionality.

In this project, Arduino Uno R3 was used as the microcontroller. The latest Uno R3 uses an ATmega
16U2. Furthermore, this ATmega 16U2 provides faster transfer rates and more memory. The
operational voltage of the board is 5V. There are 14 Input and Output pins, and out of 14 pins, there
are six pins that provide PWM output.

1.4.7 Project Limitation


This product does not implement control of other electronic appliances or automatic detection of a
fault in the control system. Besides, this device is highly reliant on the internet connectivity of the
users.

1.5 Project Layout


The layout of the project was broken down into various phases to simplify preparation and product
development. These steps have also been used to store the aims and objectives listed in section 1.1.

1. Stage 1: Feasibility Study


• This comprises the key Goals and Priorities archived at the completion of the project.
It also includes the review of resource analysis and the evaluation of danger and
hazard.

2. Stage 2: Literature Review


• Conducting a summary of the literature is an important process, as this section
discusses the past and current status of the project subject area. This segment also
briefly addresses the potential reach of the smart home market, as well as the problems
facing the industry.

3. Stage 3: Software Familiarization


• Arduino IDE and MIT app inventor were familiarized by demonstrations, and related
samples were tested and updated.

6
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

4. Stage 4:Developing and the beta testing of the Android Application


• The Android framework was built at this point, according to the predefined user
persona. The essential purpose of the program was to regulate the house's lighting
scheme. However, after developing process ends, the application was subjected to a
beta test. The primary purpose of this evaluation is to enhance the program in both
performance-wise and interface-wise.

5. Stage 5: Developing the code for the microcontroller


• This was an essential stage because without proper coding microcontroller does not
work correctly. Therefore, this stage took some time to complete.

6. Stage 6: Hardware Development


• In this stage, the final model was built according to the schematic diagram.

7. Stage 7: Testing
• Even though this is done as of last part, this plays a crucial role in all the project reports,
because analyzing the results decide the project's success. By de-bugging the errors,
the model was tested to make the design effective

1.6 Significance of the study


The results of this study will help design and develop a home automation system for low cost and less
complicated. Most important this study will help to develop a sustainable solution for the problems facing
the disabled people. Apart from that, this product will benefit the user as well as the manufacture. The
most significant advantage is that this will make the house a much more convenient place for the
consumers.

7
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

2.Literature Review
2.1 What is Home Automation System
A smart home is one in which the electronic home appliances are wired up to a central controlling
system. So, they can either be switched on and off at consumers' will.

Most of the modern home appliances are contain with build-in sensors or electronic sensors. As an
example, modern washing machines have a programmed controlling board that makes them follow a
series of washes, rinses, and spins depending on how the user sets their knobs when they first switch
on.

This is a simple example of a simple home automation system. However, the home automation concept
takes things to the next level step further centralized and organized control system. In the most
advanced and modern home automation system, there is a control unit that does most of the things
residence usually do by their self.

2.2 Background
Home automation systems have been a dream for both architectures and system designers in the
twentieth century. Early trials of home automation systems begin in the 1970s. The rapid advancement
of the embedded systems has directly interfered with the automation industry. It is expected widely
spread home automation systems like smartphones. The term "Home Automation" refers to improving
the home occupant experience using a set of sensors and actuators to observe the situation and
automatically control the home appliances. Moreover, the concept behind home automation can be
perceived as broader because it is involving more than just executing instructions, but as further self-
learning.

This smart home concept can be used in 3 different ways.

• Manage and automate the daily demands in the household in a better way.
• Efficient functions, such as energy management and security control.
• Digitalization of everyday life and opens the door for the next level of human-building.

2.3 History
Controlling the entire house using natural voice used to be something we watched in science frication
movies. However, with the development in the home automation industry, Home automation systems
are going to be a part of our day to day life.

The smart home concept has been there for a while. However, the existing home automation system
has only existed a short while. In the early 90s, the inventions of home appliances happened. Although
the home appliances are not what we had considered "Automation," they were an incredible

8
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
achievement in the early 20th century. The base of this achievement is the first engine-powered vacuum
cleaner in 1901.

Furthermore, in 1907 the electricity-powered vacuum cleaner was invented. Throughout twenty years,
refrigerators, cloth dryers, washing machines, irons, etc. were invented. In the 1960s, ECHO IV and the
Kitchen Computer were invented. Although ECHO IV never commercially sold, it was the first smart
device. This smart device was able to perform some activities on its own, such as control the home
temperature, On and Off some home appliances. However, the functionality of the ECHO IV was
questionable. In 1975 first home automation system, X-10, was invented by a Scottish company named
Pico electronics, and this system still in use. This system gives access to control of various items in
their households. Through this system, consumers could control all electrical appliances, and this
system automates a series of tasks through the transmitters. The critical drawback of this system is that
the system relied heavily on power lines; it was susceptible to electrical interference. X-10 has now
upgraded its home automation system according to modern requirements. The key advantage of this
system is, it can use either a wired power line or wireless communication methods. The critical drawback
of this system is that the transmission of messages occurs one command at a time.

The 90s were a significant period in the home automation industry. The invention of Microcontrollers
changed the path of the home automation industry.

In 2001 Z-Wave was invented, and it is the most widely used technology in the home automation
systems. This system offers excellent network reliability and stability. Z-Wave has cross-compatibility
among different branded systems. The unique identification of this system makes this more secure.
However, the operating frequency varies with the region. For example, the US uses 908.42MHz, and
Europe uses 868.42MHz. Most importantly, the signal range of these systems are up to 30m, and it is
possible to extend the range by using a repeater.

In 2004 Zigbee was introduced by IEEE. ZigBee is an IEEE 802.15 standard used in home automation.
ZigBee devices are attractive for their consumers because of its power efficiency and open
specification, which makes the device ideal for the consumers.[3][4][6]

2.4 Comparison between popular home automation systems in the past


X10 Z-Wave ZigBee INSTEON EnOcean
Released Year 1975 2001 2004 2005 2008
Inventor Pico ZenSys IEEE Smartlab EnOcean
Electronics Corp. Inc. GmbH
Standardization Proprietary Proprietary Proprietary Proprietary
Primary Market Home Home Home Automation, Home Home
Automation Automation Industrial Automation Automation,
Automation, Industrial
Research, Automation,

9
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
Telecommunication,
Health Care
Energy Usage High High Medium High Nil
Transmission 30 120 60 120 >20
Range(meters)
Number of > 500 >600 <500 <500 >600
Certified
Devices
Ease of Difficult Easy Medium Easy Medium
Installation
Performance 0.375 0.916 0.792 0.75 0.75
Index
Affordability 1.00 0.34 0.212 0.362 0.46
Index
[7]

Table 3-Comparison between popular home automation systems in the past

2.5 Modern Technology of Home Automation Industry


1. Bluetooth based home automation systems

Basically, in Bluetooth based home automation systems, the home appliances are connected to the
Arduino board through relays. The program of this Bluetooth board is based on a high-level interactive
C language of microcontrollers. The connection will be established between the board and smartphone
through wireless communication.

2. ZigBee based home automation system

The monitoring and control part of the system will be designed and implemented using ZigBee. The
performance of the device will be recorded and store by network coordinators using Wi-Fi, which uses
the four switch port standard wireless ADSL router.

Figure 1-ZigBee Home automation system

10
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
3. GSM based home automation system

The SMS based home automation, GPRS based home automation, and dual-tone multi-frequency
(DTMF) based home automation, these options we considered mainly for communication in GSM.[4]

Figure 2-GSM based Home automation system

4. A Wi-Fi-based home automation system

Wi-Fi-based home automation system mainly consists of three modules, the server, the hardware
interface module, and the software package. Wireless communication is used by the server and
hardware interface module to communicate with each other.[4]

1. Home automation using Android ADK


2. A cloud-based home automation system
3. Raspberry pie home automation system with wireless sensors
4. Wireless home automation system using IoT

Figure 3-Wi-Fi based home automation system

11
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
2.5.1 Comparison
System Communication Controller User Applications Merits
Interface Interface
Wi-Fi based using Wi-Fi Arduino Web Temperature Low cost,
Arduino Application and motion Secure,
microcontroller and Android detection, Remotely
through IoT App monitoring controlled
and
controlling
appliances
Web service and Web server and Raspberry Android Controlling Autonomous,
android app interface card pi application the shutter of and Quite
Based using the window scalable
Raspberry pi
Cloud-Based Cloud-based Home Smart Monitoring Effectively
Using Hadoop data server uses gateway device and manage
System Hadoop and router Controlling Semi-
technology Home structured
Appliances and
unstructured
data, Reduce
the
computational
burden of
smart devices
Cloud-Based Zig bee wireless Smart PC or entrance Convenience,
Using Zig Bee Network Socket Android control safety, and
Microcontroller Phone management, Power-saving
monitoring
power
consumption,
temperature,
and humidity
Wireless Sensors cloud-based PCB Mobile monitor the Low power
Based on mobile data server circuits Application home consumption
technology conditions And system
and power cost
consumption efficiency.

12
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
of the
appliance
Android-based MicroWeb Arduino Android Light Feasibility
using Arduino Server Mega App switches, and
2560 and Temperature, Effectiveness
the Humidity
Arduino sensors,
Ethernet Intrusion
shield detection,
Smoke/Gas
sensor
Bluetooth Based Bluetooth Arduino Python controlling Secured and
using Arduino supported Low cost
mobile
GSM Based SMS Arduino Smartphone Control Simplicity
Using Arduino App appliances
[4]

Table 4-Comparison between existing home automation systems

2.6 Home Automation Standards


There are various standards and protocols in the home automation industry. Most companies implement
their own version of standards and protocols. So, it is unfair to analyze since each and every device is
using a unique platform. However, this will look into the comparisons of open source and generally
defined standards.

The modern industry has implemented a multitude of standards and protocols. IoT is the leading
communication platform for the light-weight microcontroller based home automation systems. Each
company has its particular way of implementing IoT into their products. As an example, ZigBee has its
ZigBee based routers to establish a communication bridge with its in-house manufactured device. Apart
from this, most of the industry tend to use Wi-Fi and Bluetooth to design their IoT based network.

However, standardizations are very fragmented in the modern industry.

2.7 Future Scope of Home Automation


Future smart homes will have the ability to provide almost every required service (communication,
medical, energy, et cetera.) As we move to the future generations, more and more devices will be
connected to each other, and the system will be more compressed and simpler. In the future, manual
communication between machines and humans will be reduced, and the computer will automatically
mine the data and then use it to execute the instructions.

13
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
For example, the lights can respond to the consumer's home cinema. They can turn off or dim whenever
the consumer wishes. Going further, they may even react to the type of movie. For example, they can
turn off completely if the lights sense that the consumer is watching a horror movie, giving a consumer
a proper atmosphere.

Also, the efficiency of the future healthcare system will be highly dependent on the home automation
industry. Especially to elderly and disabled persons, this will be affected in the right way.

As technologies continue to advance, we can expect the home automation industry of the future to be
even more automated, or maybe it will replace by more effective advanced technology.[5]

2.8 Challenges
There are plenty of obstacles that prevent the home automation industry from advancing rapidly
enough. Four fundamental problems were established according to the research conducted during this
time period. [3]

1. Cost

The high cost of an end to end smart home system is the main reason to hold this technology speeding
all around the world. It could be the first question the customer would ask before considering its
advantages. There are some ways to solve this problem. However, the most flexible options are to build
an extendable device by separating the components into cheap smart equipment which can be used
one by one in the device according to the customer's will.

2. Expect-ability

Some people, particularly older users, may find upgrading and installing a new system challenging. So,
developers can build a home automation system which does not circumvent the customer's decisions.
Developers should build a system to run seamlessly and be planned with limited changes instead of
modifying the whole system.

3. Context-awareness

These systems need complex management and maintenance, which is performed by virtually any
system. In addition, this is seen as one of the biggest obstacles. The system has to be user-friendly,
easy to run, or even a flawless system to prevent that. Otherwise, this will be replaced by new
technologies in the near future.

4. Domestic use implication.

There is confusion in traditional domestic homes, particularly with children in attendance.


Implementation of a new system must be compatible with such a situation. In addition, it should not be
anticipated that customers would have an advanced understanding of technology. Provided that

14
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
residential buildings are the key place to live safely, this commodity does not contribute to the
discomfort.

2.9 Similar Projects


• Madimask
Madimask is Australia's leading provider of high energy-efficient solutions for homes. Also,
Madimask designs special devices such as Smart home assistance, Smart security system,
and Smart lighting system to help disabled and older people [10]
• WHADDA System
This system contains three main functional parts,
➢ Remote environment
This represents authorized users who can access the system using their smart device,
which is connected to the internet.

➢ Home gateway
This provides data translation services between the device and the internet. The core
of the home gateway is the Micro webserver.

➢ Home environment.
This consist of a hardware interface which directly interfaced with sensor and actuators.

By using the WHADDA system, disabled people will able to control and manage Electronic
appliances in their homes. However, the consumer must have a smart device with at least an
average internet service. Apart from smart homing experience WHADDA system is capable of
providing safety to the consumer against major dangerous home accidents by using a self-
automated security device.[9]

Figure 4-The WHADDA Architecture of the system

15
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

• Smart lighting system using Raspberry Pi


This automated lighting system uses a raspberry pi as its control unit since it is a more flexible
system compared to the Arduino. The main goal of the system is to gain more electrical
efficiency while helping the elderly in the disabled. Apart from residential use, this system can
be implemented in industrial, commercial, and institutional uses. Since this system is fully
automated, there is no need for manual controlling. The most specific part of this system is that
this system has a Micro SD card, which acts as a hard drive. The power consumption of the
system is considerably low as it is using 2 watts.[8]

Figure 5-Circuit diagram of Smart lighting system using Raspberry

16
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

3.Methodology
When designing a smart lighting system, one or more suitable platforms are used to build a more
efficient, reliable, and flexible system. Also, this system should be easily operated and adapted for both
consumers and the new household's appliance. Furthermore, this section will describe the basics
system of the device, what has been achieved throughout the period of project work and testing.

3.1 Preliminary Consideration


At first place before designing the project work, specific, deliberate choices in the selection of suitable
implementation platform and hardware components were made, and the selection priority was given to
low cost, availability, reliability, flexibility, and less complexity.

As already explain in the literature review, there are many platforms over which a smart lighting system
can be implemented. Bluetooth, WIFI, Microcontroller were found most appropriate due to their low
cost, availability, reliability, and less complexity. When considering individually about these
technologies, implementing WIFI with Microcontrollers are more complex and high cost than Bluetooth.
On the other hand, Bluetooth is a bit unreliable than WIFI. However, Bluetooth still can be used as a
primary platform for this project.

3.2 System Design


To achieve the project objectives and aims mentioned in the above chapter one, Arduino Uno R3 was
selected as the control unit of the system. Compare to other microcontrollers, Arduino Uno R3 is more
flexible, low cost, and less complicated.

The voice-controlled smart lighting system consists of several individual components put together to
perform its function. As illustrate in below figure six, the system blocks are namely,

➢ AC Power Supply
➢ AC to DC Converter
➢ Relay Unit
➢ Bluetooth module
➢ Android application
➢ Internet service

Voice is the only way to give input for the system, and by using the Google speech recognition system
device will recognize the command. Then after using Bluetooth connectivity, the Android application will
transmit the voice command to the control unit. Finally, based on the command received from the
Android application, the microcontroller will switch on or off the lights connected to the system.

17
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 6-System Architecture of Smart lighting system

18
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
The following section shows the characteristics of each component used in the smart lighting system.

➢ AC Source and Power Supply

This unit is consisting of an AC power supply and the AC to DC converter. The AC pins are where AC
voltage is supplied, and it has neutral and live connectors. As shown in the below figure-41, neutral and
live are defined and connected to the AC source, and the other two pins are connected to the Voltage
(Vin) and GND pin in Arduino Uno.

➢ Microcontroller

Arduino Uno R3 board is used as the microcontroller board. This is the control unit in this system. The
control unit performs the commands which are given by the consumer.

➢ Bluetooth Module

HC 05 module is used as the Bluetooth module. This contains six pins, which are State, RXD, TXD,
GND, Vcc, EN.

En or Enable key use to toggle between data mode and AT command mode. By default, it is in data
mode.

Vcc pin powers the module, and the GND pin ground the module.

TXD serves as the data transmitter. Receiving data will be transmitted through this port. RXD serves
as the data receiver, and every data receives through this port.

The state pin is connected to an onboard LED, and it can be used as feedback to check if Bluetooth is
working correctly.

➢ Android Application and Google cloud

Android application is the layer that connects the user and the device. The application takes voice
commands, and by using the Google cloud speech API, it identifies the voice command and then passes
it into the control unit.

The below table shows the connection between each module and what is the purpose of each
connection.

Connection Purpose
A Identify the voice command using Google services.
B Capture the voice command given by the user.
C Wireless connection between the control unit and the Mobile Application. Bluetooth
is used to connect the mobile application and the control panel.
D RXD connection. This receives the command and the instruction given by the
microcontroller.
E TXD connection. This transmits the commands and the instructions to the
microcontroller.

19
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
F GND connection. This is used to ground the Bluetooth module.
G Vcc connection. This is used to power the Bluetooth connection.
H Vcc connection used to transmit power to the Relay module
I Transmit the data and instruction to the Relay module.
J GND connection is used to ground the Relay module.
K Commercial powerline.
L GND and Vcc connection used to power the microcontroller.
Table 5-Connections in the system and their purpose

Figure 7-Schematic Diagram of the system

It is an essential step to create the schematic design first before designing the PCB layout. This is
because the PCB document was created from the schematic diagram. That is the reason for allocating
every schematic block with appropriate footprints. It is for PCB design purposes.

When the PCB document is created based on the schematic, all the components used in the schematic
will be present in the PCB document in the form of their individual footprints. The footprints which are
transferred in the PCB document arrange linearly, next to each other, according to the allocated number
or designator. Therefore, the components’ footprints are arranged manually.

After the footprints are arranged neatly, there will be faint lines coming out from the pad of the footprints.
The lines are the guidelines that represent the connection between the pads for the copper wires.
Therefore, wires can be drawn either at the top layer or bottom layer. These wires can be drawn
manually, or by using “autoroute” it is more convenient to use “autoroute,” but this may give connection
errors which are hard to recognize, and it does not look neat. Hence, the connections are made
manually, which is very time-consuming.

20
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 8-PCB Diagram of the system

The printed circuit board was created as it used either industrial purposes or domestic uses. PCB's are
connecting every component in the system electrically. Also, it gives mechanical support to the electrical
components. Finally, all these hardware components were integrated into an enclosure. The primary
purpose of using an enclosure with proper standards is to protect electrical equipment. Most importantly,
this protects consumers from accidents.

3.3 Developing the Android Application


In this system, an android application serves as the link between the user and the system. So, it takes
an essential place in this system. When developing the application, there was some key concept
considered. Such as,

• Simple and user friendly.


• It must be compatible with the new android operating system as well as the old operating
system.
• Space for user feedback
• Integrating tools which will be helpful to the user

Since this system aims to help physically disabled, most of the application instruction will be presented
using voice. Also, the mobile application uses Ascend, which is developed by Wix, and this helps the
user to connect with developers when they need it.

Smart Lighting system mobile application gives full control over the device via Bluetooth technology.
When considering the operation of the application, When it is connected with the device user can give
commands. These commands will identify by using the Google speech recognition system, and then
commands will send to the control unit.

21
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
Application information

• Version 3.5
• Last Update on 8th September 2020
• Application permissions – Version 3.5 may request access to,
➢ Full network access
➢ Bluetooth administration
➢ View network connection
➢ Pair with Bluetooth devices
➢ Receive data from the internet
• (Note – Consumers can disable access for these permissions in Settings. Disabling of these
permissions may create a harmful impact on the performance of the application.)

Community feedbacks are playing a massive part in developing a successful mobile application. So, in
order to have such feedback, beta testing was conducted.

The following steps were followed in beta testing of the application.

Step 01 – Decided how many testers are needed to test the application

In a typical scenario, it is advised to get 100 to 300 beta testers to make sure the app works well before
launching. Since every tester does not experience bugs, it is better to have a higher number of testers.
However, with limited resources and time, it is not practical to have such a number of testers. So, this
limited the beta testers into 30-50 people.

Step 02 – Types of testers

When considering the type of beta testers, it entirely depends upon the objectives and aims of this
project. There are two types of beta test users. However, In this case, there is only one type of testers
were used,

• Technical – Technical testers detect bugs and give constructive feedback.

(Marketing testers are usually influencers, who creates the awareness before your app get launch)

Step 03 – Developing a beta tester persona

At the beginning of the planning part of the application development process, the user persona was
developed. Furthermore, the whole project was developed around the final user.

Step 04 – Setting a Timeframe for testing

If the time period is not planned according to the project plan, beta testing might take some time to
reach its expected audience. And timeframe of the beta testing depended upon a few key factors. Such
as Project Aims and objectives. Resources, the tester limitation, and a number of testing phases.

Step 05 – Delivering the Application to the beta testers

22
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
Step 06 – Keep testers engaged

In this stage, testers were frequently reached and, moreover, motivate testers to use the application
more frequently and share feedbacks.

Step 08 – Take their opinion into consideration.

At the end of the beta testing, there were some bugs and request interface improvement. Moreover,
with the help of valuable feedbacks of beta testing, community application was built and finalized.

After conducting a beta test, as per the information and feedback gathered from beta testers, the Initial
application was changed almost completely. The main reason for that is the initial application was
suffered from some missing vital elements which mobile application should have had.

Figure 9-Wireframe of the Android application

In the above figure, the Wireframe of the android application shows the screen sketches of the mobile
application used in this project.

23
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 10-Flow diagram of the mobile application

The above flowchart represents the main functions of the Android mobile application.

When considering the functionality of the application, the application consists of four main sections,

1. Controlling System
This section is used to control the device.
2. Feedback
This section was used to collect feedback from users. So, this feedback will be helpful in the
future improvement of the application
3. Help Centre
The primary aim of including this section is to establish a communication link between the
developer and the user.
4. Info
This includes some necessary information about the system

3.4 Project Breakdown Structure


This project was breakdown into three main sections, Communication, Implementation, and Network.
As mentioned in the previous chapter at first, initialize the critical points regarding which platform system
is going to build, the main components, and the software needed to build the system. Furthermore, the
below figure shows the breakdown structure of the smart lighting system.

24
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Smart Lighting System

Communication Implementation Network

Wired Wireless Software Hardware ISP

Google Speech
Android Microcontroller Electronics
Between Microcontroller Bluetooth Recognizion
Application Coading components
& Bluetooth module System

Bluetooth
Voice
Module
Between Microcontroller
& Relays
RF
Power System
Communication

Figure 11-Project Breakdown Structure

When considering the communication section, it divides into two main sections, namely, Wired and
Wireless communication. This section is responsible for every single communication which is going to
happen in the system and between user and system. Under normal circumstances, wired
communication is not going to be affected by any internal or external activities. However, wireless
communication is depending upon the distance between the user and the device. When the distance
increase, the communication link is getting interfered by many objectives, and this result in connection
lost between the user and the device.

Moving into implementation, as in the previous section, this is also divided into two sections, namely,
Software implementation and Hardware implementation.

• The software implementation is consist of the Implementation of Android application and


Microcontroller coding. In this scenario, the whole system is depending on this section. This
section is to determine how the hardware components are going to behave. Microcontroller
coding is the primary code if the system which connects and controls the whole system. Android
application is the bridge between the user and the device. The application captures the voice
signal of the user and identifies it with the help of the Google speech recognition system. The
performance of the android application depends upon the performance of the smartphone.
However, there are some common errors in the android application, which is needed to be
fixed.

• Hardware implementation is divided into three main categories, Electronics components,


Bluetooth module, and the power system.

25
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
The network is consist of ISP and Google speech recognition system. To identify the voice commands,
the android application uses the AI developed by Google.

3.5 System Process


When considering the entire process of the system, it consists of four main stages.

Stage 01 – User must open the “Smart lighting system” mobile application.

Stage 02 – Bluetooth must switch on. So this will allow the application to connect with the Bluetooth
module.

Stage 03 – In this stage user must enable the voice recognition option. After that, when the user gives
the commands, the application will identify it by using the Google speech recognition system. In order
to access the Google speech recognition system, the mobile phone must have internet access. If the
commands were identified by the application, the command would pass into the next stage, or if the
command was not identified by the application user must have to give the command again. Additionally,
the application is always displaying the previous command. So, this will help the user to identify if there
was an error or not in the command.

Stage 04 – In this stage, user command will execute by the microcontroller.

Below flow chart shows the visual representation of the system process.

Figure 12-Flow Chart of the System process

26
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
3.6 Alternative Analysis
Under this section explains the alternate methodology options and the reason why it is not using them
in this project.

Comparing Raspberry PI and Arduino Uno, Raspberry PI is more flexible and capable as a
microcontroller, but in this case cost of the project plays a significant role, and that is the only reason to
use Arduino Uno as the microcontroller over Raspberry PI.

Since this project use voice as the primary bridge between the device and the user, there are some
voice recognition modules which does not need any assistance to understand the voice command, but
due to the following issues, the system used the Android application based on the Google speech
recognition system,

• Due to the Covid-19 pandemic, it is almost impossible to import voice recognition module into
Sri Lanka
• The biggest problem I faced in this module was, In a practical scenario, it is less efficient. It is
not capable of identifying the commands when there is some amount of noise. Also, its
maximum range of voice capturing is less than two meters.
• Since this was a low budget project, using a voice recognition module will cost almost Rs.
5,600.

These reasons, forced to design a system that depends on the Google speech recognition system.

In the beginning, there were two options either build this entire system based on the internet or use
Bluetooth as the primary communication method in the system. However, according to the statistic, only
35% of Sri Lankans have access to the internet. So, this forced to use a hybrid system that uses
Bluetooth as the primary communication method and the internet to communicate with the Google
speech recognition system.

27
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

4.Implementation
4.1 Hardware Description
Each platform has a unique set of hardware components. As this project is based on Bluetooth
technology, there are some specific components used to archive the aims and objectives mentioned in
the above section. The main components that are going to use in this project are Arduino Uno R3
microcontroller and HC 05 Bluetooth. These components are chosen due to availability, low cost, and
flexibility.

4.1.1 Arduino Uno R3

Figure 13-Arduino Uno R3

Arduino Uno is mainly based on an 8-bit ATmega328p microcontroller. Apart from that, it consists of a
crystal oscillator, serial communication, voltage regulator. Arduino Uno has 14 digital input and output
pins. Furthermore, these 14 pins consist of 6 PWM output pins, six analog input pins, a USB connection,
A power barrel jack, an ICSP header, and a reset button. Input and output pins can be configured by
using pinMode, digitalWrite, digitalRead function in Arduino IDE. Each pin capable of providing or
receiving 40mA (maximum) and operates at 5V. Also, this consists of 20 KΩ to 50 KΩ, which is
disconnected by default. [11]

Serial Pins: In default settings, Receiver pin (Rx) and Transmitting pin (Tx) is configured to PIN 0 and
1, respectively. These pins are used to transmit to receive serial data. To connect with each other, there
are ATmega328p USB to TTL serial chip.

External Interrupt Pins: Pin number 2 and 3 is configured to trigger an interrupt.

PWM Pins: Pin numbers 3, 5, 6, 9, and 11 are configured as PWM pins, and these pins are capable of
providing an 8-bit PWM output.

SPI Pins: These pins are used to serial peripheral interface communication. SPI pins are configured as
below,

28
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
• Pin number 10 as Slave Select pin
• Pin number 11 as Master Out Slave In Pin
• Pin number 12 as Master In Slave Out pin
• Pin number 13 as Serial Clock.

Arduino can be used to communicate with computers, another microcontroller, Bluetooth device, et
cetera. ATmega328p provides UART TTL serial communication, which can be done by using serial
pins. [11]

Microcontroller ATmega328P –8-bit AVR family


microcontroller
Operating Voltage 5V
Recommended Input Voltage 7-12V
Input Voltage Limits 6-20V
Analog Input Pins 6 (A0 – A5)
Digital Input and Output Pins 14
DC Current on Input and Output Pins 40 mA
DC Current on 3.3V Pin 50 mA
Flash Memory 32 KB
SRAM 2 KB
EEPROM 1 KB
Frequency (Clock Speed) 16 MHz

4.1.2 HC-05 Bluetooth Module


HC-05 is a full-duplex wireless Bluetooth module. This module is capable of establishing a
communication bridge between two microcontrollers or between the microcontroller and another device
like a phone, laptop. The module uses USART at 9600 baud rate. This helps to interface with any
microcontroller which supports USART. However, this module is not capable of transmitting multimedia
like Images and Videos.[14][13][12]

HC-05 Bluetooth module consists of two operating modes. Which are,

• Data Mode
• AT Command Mode

Figure 14-HC-05 Bluetooth Module

29
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
Data Mode can send and receive data from another Bluetooth device. Furthermore, AT command
mode use to change the default settings of the device. HC-05 uses Serial Port Protocol (SPP), and
this helps to control the module very quickly. Usually, this device use in,

• Wireless communication
• Data logging application
• Consumer application
• Home Automation
❖ Pin Configuration
• Enable Key: This pin used to toggle between data mode and command mode
• Vcc: 5V power supply connects to this module
• Ground: Ground pin of the module
• Transmitter: Transmitter pin used to transmit the Serial data
• Receiver: Grab serial data, and every serial data will be broadcast through Bluetooth.
• State: This connects to the onboard LED, and this can use to check if Bluetooth is
working correctly
• LED: Indicate the state of the module
▪ Blink once in every 2 second – Module is in command mode
▪ Repeated Blink – Waiting for connection
▪ Blink twice in one second – Module is connected with another device
• Button: Used to control the "Enable Pin" toggle between data and command mode

❖ HC-05 Default Settings


• Default Name – HC-05
• Default Password – 0000 or 1234
• Default communication – Slave
• Default Mode – Data mode
• Data mode Baud Rate – 9600

30
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
4.1.3 HLK-PM-01 AC to DC Power Module

Figure 15-HLK PM-01 Power Module

HLK-PM-01 power module is commonly used to power microcontrollers with AC mains. Since most of
the digital circuits are operates within the 5V range, this module is widely used in digital circuits. This
module is capable of converting AC mains to 5V DC with an efficiency rate of 70%. However, this is
only capable of supplying 600 mA as continuous current. This module has built-in short circuit protection
and over current protection.[15]

3.1.4 One Channel Relay Module


The supply voltage of this single module is between 3.75v to 6v, and the supply current is varying with
its state. If it is in the De-Energized state, the supply current will be 2mA, and if it is in an Energized
state, the supply current will be between 70 to 72mA. The maximum contact voltage is 250v AC or 30v
DC, and relays maximum contact current is 10A. Typically, these modules use an active low-level trigger
to control the input signal.

Figure 16- 5V Singla channel relay

31
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
4.1.5 2N222 NPN Transistor
2N2222 NPN transistor is commonly used for switching and amplifier applications. It is specially
designed for low voltage, low to medium current, and low power amplifier applications. It is capable of
sourcing 800mA continuous DC collector current.[16]

Figure 17-2N2222 Transistor

❖ Pin Configuration
• Emitter
Used to drain out the transistor current
• Base
Base pin used to control the emitter to base current
• Collector

The collector is the output pin, and it is used to supply transistor current to the output load.

4.2 Hardware Implementation


The integration part of the project is where the hardware implementation is combined with software
implementation. The hardware implementation is the physical construction of the circuit, which was
constructed in a PCB.

Relays
HLK PM-01

PCB

Arduino Uno
R3
HC-05

Figure 18-Prototype of the system

32
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
The circuit and component shown in figure 18 is the prototype of the actual product. It was quite
challenging to design and develop this prototype . Due to inexperience, it may look clumsy and untidy.

Considering the operation of the system, When the user gives instructions, the Bluetooth module will
transmit the user instructions to the microcontroller. The microcontroller will process the received
signals, and if it is matched with the system instruction, user commands will execute through relays.
Furthermore, HLK PM-01 was used to power up the system. Since, microcontroller's operating range
of 5v input current, HLK PM-01 will convert the 230V AC into 5V DC.

4.3 Software Description


This project used different software in order to develop PCB, Android Application, and to program the
microcontroller. The following section will briefly describe the uses of software in this project.

4.3.1 Arduino IDE


The Arduino Integrated Development Environment (IDE) is a cross-platform application that supports
Windows, macOS, and Linux. Arduino IDE is written in functions from C++ and C. The primary objective
of Arduino IDE is to write and upload programs to Arduino compatible boards. This contains a text editor
for writing codes, a text console, and a toolbar with buttons.

4.3.2 Proteus Design Suite


Proteus design suite is primarily used to design electronic automation. The developer of the Proteus
design suite is Labcenter Electronics. In this project, proteus was used to design the printed circuit
board layout design (PCB).

33
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
4.3.3 MIT App Inventor for Android
MIT App inventor has initially been provided by Google as a web application integrated development
environment. However, now this is maintained by the Massachusetts Institute of Technology (MIT). The
main objective of MIT App inventor is to develop applications based on the android platform. In this
project, the MIT app inventor was used to design and test the android application, which serves as the
bridge between the user and the device.

4.4 Software Implementation


Software implementation was consisting of two main phases.

I. Microcontroller Coding
II. Development of the Android application

Microcontroller coding – Approaching the first phase of the software implementation, phase one
consisted of three different stages. At first did some research about the primary coding mechanism.
This was helped to familiarize the elementary level parts of the IDE, which was used in the initial code.
Secondly, identify the basic requirements which system is expecting from the code. In this stage, the
main task of the initial code was to be identifying the user's instruction and executing it. Also, the code
must be capable of establishing a communicating link between the microcontroller and the Bluetooth
module. Additionally, source code must be capable of increasing the efficiency of the speech recognition
system. Finally, in the third stage of the microcontroller coding, the initial source code was developed
according to the needs identified in the previous stage.

Development of the Android application – When considering the second phase of the software
implementation, it was a bit challenging. However, after two months of hard works, the mobile
application was finally developed. The developing process consisted of a few stages. In the beginning,
did some deep learning about how to develop a mobile application by using MIT app inventor. After
that, the development process of the application was started, and as the first step, the requirement of
the application was identified, and according to that rough sketch, and flow chart was designed. One of
the essential aspects of the development process was to define the application's primary mechanism
and appropriately designing the user interface. After completing the stages mentioned above, the initial
mobile application was developed. However, after conducting a successful beta testing on the
application, there were some bugs which complete as the final step of this phase.

34
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

5. Results and Discussion


Several tests were conducted to analyze the performance of each component and how it will affect the
overall performance of the system. The following are the tests that were conducted.

5.1 HC-05 Bluetooth Module


HC-05 Bluetooth module plays an immense role within this device. So, it is necessary to evaluate the
module's actions when an input is provided by the user. Below the figure indicates the connection
between the Bluetooth module and the Android device. Bluetooth module tracks feedback voice
accurately according to performance.

Figure 19-Bluetooth module testing

5.1 Low power Amplifier and Switch


Since this project integrate more than two relays, and all of these relays are powered using the output
voltage of Arduino Uno, there might be a lack of current to energize the relays. To avoid this matter, the
system has used a low power amplifier to amplify the power. Moreover, the following circuit is used to
identify the minimum threshold current needed to energize the relays.

Low Power Amplifier and relay switch circuit can be designed by using NPN transistors. When the base
voltage of the transistor is 0v, then the transistor will remain in cut off region, and this is the reason to
base current not flowing through the transistor. Hence, the collector current will not flow, and the relay
will remain de-energized. However, when the base current provides sufficiently the maximum amount,
the collector current starts to flow, and this will energize the relay coil.

35
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 20-Driver circuit

Finding the threshold current required to energize the relay

Since the system is using a 5V DC relay, to find the minimum coil current, which is the collector current,
need to measure the resistance of the relay coil.

𝑀𝑒𝑎𝑠𝑢𝑟𝑒𝑑 𝑅𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑜𝑓 𝑅𝑒𝑙𝑎𝑦 𝐶𝑜𝑖𝑙 = 69.51Ω

𝐵𝑎𝑠𝑒 𝑉𝑜𝑙𝑡𝑎𝑔𝑒
𝑖𝑐 =
𝑅𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑟𝑒𝑙𝑎𝑦 𝑐𝑜𝑖𝑙

5
𝑖𝑐 =
69.51

𝑖𝑐 = 71.9𝑚𝐴

𝑖𝑐 ≈ 72𝑚𝐴

However, there is one more voltage drop that is needed to consider in calculations. This voltage drop
is known as the Collector-Emitter junction drop, which is between 300mV – 1V, according to the
datasheet. When considering the worst-case scenario, the base voltage must be increase by 1V to
maintain the threshold current.

According to the results, the maximum collector current of the transistor must be at least two times the
current required by the relay coil. Apart from this transistor,

Must be capable of supplying collector current at least greater than two times the current required by
relay coil.

The safe operating area of that transistor must match the environmental conditions.

36
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
Considering the requirements mentioned above, the 2N2222 transistor is the most suitable for this
project.

5.2 Beta Testing of Android Application


Some significant bugs were reported in the beta testing period.

The below figures show the results of the beta test. Due to limited time and recourses, only 32 tester
were participated in the beta test.

Figure 21- Android versions of beta testers

Figure 22-Feedbacks of the testers

01. Error 507 – Application is not connecting with the device. Unfortunately, the reason for that bug
could not find. However, this bug has occurred in old android versions.

02. Error 710 – Since most of the instruction was delivered via voice, and Sometimes the application
could not play MPEG Audio layer-3 files. This was occurred due to a compiling error.

37
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
03.Error 516 - If there is an error close to (ERROR 507 or 516 broken pipe), please try connecting a
couple of times. This is due to the broken communication between the Bluetooth module and the
Android application. To solve this, ensure the device is connected to the power source to allow serial
communication between the device and the application.

Apart from bug fixing, there were some significant changes in the application.

Bellow points show the significant changes done with the application after beta testing.

• The home page was added, and this will ease the navigation in the application
• Our website and help center was linked to the application. So, users can frequently engage
with developers.
• Most of the instructions were delivered via voice.

Figure 23-Interface face change

Figure 24-Features added into the mobile application

38
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
5.3 Range of the Device
According to the datasheet of the HC-05 Bluetooth module, it has a 10m range with Line of sight.
However, according to the test results, it can cover a house with an area of approximately 3,500 sq.
Feet. Since there were limited resources, the strength of the signal level was not measured. However,
as a solution, connectivity status was checked between the device and the application.

Distance Connectivity Latency


<1m Yes 2s
2m Yes 2s
3m Yes 2s
5m Yes 2s
10m Yes 3s
12m Yes 3s
14m Yes 4s
15m Yes 4s

Line of Sight Distance

Non-Line of Sight Distance


Table 6-Range of the device

5.4 Google Speech Recognizer


Most speech recognition systems, including google speech recognizer, comprise a set of acoustic
models. Such as HMMs. Moreover, the parameters of these models are calculated by using speech
data which gathers from a large set of speakers. Usually, two differences exist among speakers,

• Acoustic Differences – This determines the size and shape of the vocal tract.
• Pronunciation Difference – Generally, referred to as accent. Furthermore, the accent is often
geographically based.

Since this project uses English as its primary language, there is some pronunciation difference between
the user and the system. This causes a considerable problem in identifying the commands. As an
example, when the user input command, "Switch two on," command which used to turn on the switch
two does not identify appropriately by the system. The reason is for that is the difference between
accents.

39
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Identification Rate of Voice Commands


100
90
80
70
60
50
40
30
20
10
0
Switch One Switch Two Switch Three Switch One Switch Two Switch Three All On All Off
On On On Off Off Off

Success Rate Failure Rate

Figure 25-Identification rate of voice commands before the changes

According to the results for some commands success rate is below 90% (<90%), and this means the
efficiency of the system is too low. Unfortunately, my-self could not fix this problem. However, to
overcome this problem, some changes were made in the source code.

Changes done in
code

Figure 26-Changes done in the code

40
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
After these changes, the same test was conducted in order to get an idea about system efficiency.

Identification Rate of Voice Commands


100
90
80
70
60
50
40
30
20
10
0
Switch One Switch Two Switch Three Switch One Switch Two Switch Three All On All Off
On On On Off Off Off

Success Rate Failure Rate

Figure 27-Identification rate of voice commands after the changes

According to the results, the overall average success rate is now have increased, and this means the
efficiency and effectiveness of the system have increased.

Additionally, speech recognition success rate is varying with a noise level that the microphone detected.

5.5 Discussion
As stated above, there are four primary purposes for this project. Based on these four aims, the findings
and the implementation of this project were developed. However, testing sessions were conducted in
order to find the effectiveness of the system and how the system is influenced by the software and
hardware implementations. This chapter briefly describes the test, results, and how those results force
to change previous implementations on the system.

Since this project using multiple relays, the source voltage which supplying to the relays from Arduino
will not be sufficient to energize the relay. So, to avoid this matter system need a driver circuit, and it
must consist of a suitable transistor. Furthermore, this test was conducted to determine the minimum
current, which needs to energize the relays. According to the results and other aspects considered in
the system, the most suitable transistor was 2N2222.

Beta testing of the android application was the most vital. After all this the segment that straightly
engaging with the user. So, this must be almost ideal. The beta test was carried with 32 testers.
According to the testers, there were some significant bugs apart from that there was an issue in the
Google voice recognition system. However, these feedbacks results in significant changes in the mobile
application.

41
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
The next test was about the operating range of the system. The initial estimated maximum range was
10m. However, these results show that the device is capable of allowing remote access to an
approximate range of 20m.

The final test was carried to calculate the effectiveness of the voice recognition system. However,
according to the test results efficiency of the voice recognition system was not up to the expected mark.
So, in order to increase efficiency, some changes were made in the initial code.

42
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

6.Conclusions
Home automation systems had rapidly developed as an essential field. The implementation of such a
system in a modern house continuously getting higher and higher with the tendency to standardize their
process. So, this project was started to fulfill those demands for a low cost. Moreover, the main aim of
this project was to ease the day to day life of differently able people. To archive that this system is using
voice as its primary input. So, this will be a great help to disabled people. Additionally, this increases
the efficiency and effectiveness of the system. Moreover, remote access was established to ease the
day to day life of the consumers.

The system process is mainly depending upon an Arduino Uno board Since it acts as the core of the
system. Apart from that Bluetooth module, Android Application is the other essential part of the system.
The voice commands and natural language processing is influenced by the Google speech recognizer.
Furthermore, this device can cover a range of below fifteen meters easily. Since this project mainly
focused on disabled people, When compare the new system with the existing system, the specification
which this system provided to consumers will enough to compete along in the market. When considering
implementing this system into a house, this system can easily fit into both modern and old houses.

When considering all the works done in this project from the beginning to the end, the whole system
was built around the Arduino Uno microcontroller. However, there were some significant issues as well
as some minors in implementation in hardware components. However, in the end, all the issues were
solved. Moving into software implementation, there were no issues. Some changes were made in the
initial code to address the device's problems with Google speech recognition technology. The next
critical segment was designing the Android application. It was a little more challenging than expected
initially. It was designed and completed the beta test with success. Unfortunately, according to the beta
test reports, there were some significant issues in the program that existed in older versions of Android
OS. After finishing both hardware and software testing, while evaluating the project status,
unfortunately, there were some significant issues in the mobile application which did not de-bug. There
are some bugs with the speech recognition system, which is almost impossible to overcome. However,
as a temporary solution, some improvements were made in the microcontroller's code.

However, considering the overall performance system has archived the excepted threshold points. So,
it becomes a full product and finalizes. Furthermore, this system is capable of deploying into the market.
It is capable of working continuously for an extended period. However, it recommended to switch off for
a while after using it for a long time. The main reason for that is the efficiency of the components might
be reduced with the temperature.

In conclusion, When considering the outcome of the project, It can be concluded that Smart Lighting
System was a success in the archive of all of its aims and objectives.

43
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

7. Future Development
Home automation systems are built on different techniques and technologies. Each technology and
technique has its specifications. When considering future scopes for a Smart lighting system can make
a significant impact on society. Few areas can be used to make Smart Lighting System more effective
and more user friendly. However, these changes will have their own set of problems.

Future Recommendations,

• Replace single relays with relay modules.

As mentioned in Section 5.1, Arduino input and output ports cannot supply enough current to
energize the relay coil. However, to overcome this problem, the system needs a driver circuit
(2N2222 transistor was used in the current system.). So, each relay needs its driver circuit.
However, in relay modules, there is no such need to have a driver circuit for each relay.

• Amplify the Bluetooth module signal.

By amplifying the Bluetooth signal user can control it from a further distance. Also, it will give
more stable connectivity when there is no LOS communication.

• Improving Voice capturing.

The Android device's microphone can be replaced with a sensitive high noise-canceling
dedicated to microphones located in each room of the house. Then, the microphones can be
connected to an Android device via a Bluetooth radio or a Wi-Fi connection. That would remove
the user's need to have Android devices near them when providing voice commands.

• Scalability

As the Arduino platform is highly flexible and can connect to most of the hardware, which is
compatible with a microcontroller, attaching or developing more devices working with a Smart
lighting system would not be a problem. The type and amount of devices that can be compatible
with the new system are enormous. For example, the biometric ability can be provided by
attaching a fingerprint sensor to a Control Box, adding motorized devices like window blinds
controller, garage shutter door controller, and many more devices. Devices can be developed
with a general Arduino architecture in mind to make it work with the current system.

• Improving the logical algorithm

Considering the logical algorithm in the current system, it is using an elementary level of logical
algorithm. So, this cause limitation in system performances.

44
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

8.Project Management Review.


This chapter contains the project plan and the steps that were executed to reach the outcomes.
Furthermore, to visualize the project plan graphically, the Gantt chart was used. Apart from that, this
chapter will explain how Covid’19 pandemic affects the project.

In the pre-project feasibility study, the project plan and time plan was initialized. However, due to the
Covid '19 pandemic, there was a lockdown in the whole country, and this makes a massive difference
between the initial timeline and the actual timeline. Luckily, this situation did not make a considerable
impact on project cost and scope.

• Project Cost
As mentioned above, Due to the pandemic situation, Almost three months country was at
complete lockdown. This causes component unavailability. So, to overcome this, there were
small changes added to the project structure. Moreover, this results in small changes in the
overall estimated total cost.
❖ The following table shows the estimated cost, calculated before the pandemic situation.

No Required Hardware Component Quantity Estimated Cost(LKR)


01 Arduino UNO 1 1000.00
02 HC-05 Bluetooth Module 1 1000.00
03 Transistors (D400/2N2222)) 6 20.00
04 Resistors 6 27.00
05 Diode (1N4007) 6 20.00
06 AC to DC Converter (HLK-PM01) 1 1000.00
07 Relay 5V 4 300.00
Estimated Cost (LKR) ≈ 3,400.00

Table 7-Initial estimated cost

(Note:- Unfortunately, At first, when calculating the Estimated cost for a unit, I did not include the cost
of the enclosure. )

❖ The following table shows the estimated cost, calculated after the pandemic situation

No Component Quantity Estimated Cost (LKR)


1 Microcontroller 1 1050.00
HC-05 Bluetooth Module 1 1000.00
2 2N2222 Transistor 6 20.00
3 Resistor (1 kΩ) 6 27.00
5 HLK-PM01 AC to DC Converter 1 1000.00
6 Relays 3 450.00
7 Rocker Switch 1 20.00
8 Enclosure 2 2000.00

45
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
Estimated Cost (LKR) ≈ 5,600.00
Table 8-Actual cost

When considering both scenarios, there is a slight difference in the estimated cost per unit. It is mainly
due to the enclosure cost.

• Project Scope
With the help of the supervisor, the situation was managed, and I was able to remain and
archive the actual project scope without any deviations.

• Project Plan
As mentioned above, due to the situation escalated in late March, forced to make some
significant changes in the project plan. So, with guidance from the supervisor, slight changes
are done in the time plan and started the development of the Android application and,
simultaneously, started the coding part of the microcontroller. Finally, after two months of hard-
working, I was able to complete the software implementation of the project. At the time country
was re-opened, and I was able to find components and completed the entire project on 2nd
September 2020. So, overall this project took 239 days to complete.

❖ Initial Gantt Chart

Figure 28-Initial Gantt Chart

46
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
❖ Actual Gantt Chart

Figure 29-Actual Gantt Chart

❖ Initial milestone chart

Completing the Completing the Completing Project


Project Start Product Design Android Application Completing Testing Defence

2020.02.17 2020.04.17 2020.09.02 2020.09.25

2020.02.03 2020.03.16 2020.06.21 2020.06.30 2020.09.16

Submit the Project Completing Software Completing Hardware Completing Project


Plan & Feasibility Implementation Implementation Report
Study

Figure 30- Graphical representation of the initial milestone chart

47
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
❖ Final milestone chart

Completing the Completing the Completing Project


Project Start Product Design Android Application Completing Testing Defence

2020.02.17 2020.04.17 2020.09.02 2020.09.25

2020.02.03 2020.03.16 2020.06.21 2020.06.30 2020.09.16

Submit the Project Completing Software Completing Hardware Completing Project


Plan & Feasibility Implementation Implementation Report
Study

Figure 31-Graphical representation of final milestone chart

8.1 Comparison

When comparing the initial Gnat chart and the actual Gantt chart, as mentioned above, due to the
difficulties faced in that time period, there are massive changes in the project works. This thesis will
contain a detailed explanation of the comparison between main tasks built upon initial and the actual
Gantt charts.

48
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
1) Plan & Feasibility Study
Since the plan and feasibility study was completed before the pandemic situation, when
comparing both initial and actual feasibility studies, there is no any changes. Fifteen days were
allocated to complete this task. In the beginning, at first, initialize the possible solution for the
problem and identified the project aims and objectives and outcomes which needed to archive
at the end of this project. As the final step of this thesis, gathered data was analyzed and
prepared for the feasibility study for this project.

2) Product Design
This was about finalizing the product design and the schematic diagram of the control board.

3) Software implementation
Under software implementation, the primary task was to develop the microcontroller code. Apart
from that, there was one more task to complete. The additional task was to be finalizing the
software architecture. In the initial Gantt chart, this was planned after the hardware
implementation. However, due to the situation, the software implementation was to replace it.
Moreover, when comparing the actual and initial time period which was allocated to the
implementation of software is respectively 32 days and 14 days. The main reason for this is
because if the pandemic situation country was at complete lockdown. Because of this, there
was no way to find the remaining components. So, with the instructions of the supervisor,
hardware implementation was postponed.

4) Developing the android application


This section was not planned in the initial Gantt chart. Furthermore, the development of the
application was the hardest and one of the most time-consuming task. The primary purpose of
developing the mobile application was to establish a link between the user and the device.

5) Hardware implementation
Initially, hardware implementation was about start in the 17th match 2020. However, as
mentioned, it was delayed due to the covid’19 pandemic. However, integration of the hardware
was remained same. Since I was able to find the remaining components.
Hardware implementation was about testing the components, designing and building the PCB
layout, and integrating the hardware components in order to finalize the product.

6) Testing and Refitting


When comparing the initial Gantt chart and the actual Gantt chart, the only difference is that
the actual Gantt chart consists of beta testing of the mobile application. Apart from that, other
stages are almost similar. Moreover, in this stage, every functionality was tested to make sure
that the efficiency and the effectiveness of the system at the expected range.

49
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
7) Project Report
Approaching the later end of the project, this task was compressing the whole project into the
papers.

8) Project Defense
Project defence is one of the most important steps in this process. This is consisting of project
presentation, project demonstration, and finally with viva

50
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

References
[1] Basaninyenzi, U., 2020. Disability Inclusion Overview. [online] World Bank. Available at:
https://www.worldbank.org/en/topic/disability
[2] Unstats.un.org. 2020. Disability In Sri Lanka. [online] Available at:
https://unstats.un.org/unsd/demographic-social/meetings/2016/bangkok--disability-
measurement-and-statistics/Session-6/Sri%20Lanka.pdf
[3] Sultan, M. and Nabil, K., 2020. Smart To Smarter: Smart Home Systems History, Future And
Challenges. [ebook] Available at: https://mohamed-sultan.com/paper/6-HBI_Sultan2016.pdf
[4] Malik, N. and Bodwade, Y., 2017. Literature Review On Home Automation System. 6th ed.
[ebook] nternational Journal of Advanced Research in Computer and Communication
Engineering. Available at: https://ijarcce.com/upload/2017/march-17/IJARCCE%20173.pdf
[5] Katre, S. and Rojatkar, D., 2017. HOME AUTOMATION: PAST, PRESENT AND FUTURE.
4th ed. [ebook] International Research Journal of Engineering and Technology (IRJET).
Available at: https://www.irjet.net/archives/V4/i10/IRJET-V4I1061.pdf
[6] Baidya, N. and Kumar, P., 2018. A REVIEW PAPER ON HOME AUTOMATION. 4th ed.
[ebook] International Journal of Engineering and Techniques. Available at:
https://www.academia.edu/36679097/A_REVIEW_PAPER_ON_HOME_AUTOMATION
[7] Withanage, C., Ashok, R., Yuen, C. and Otto, K., 2014. A Comparison Of The Popular Home
Automation Technologies. [ebook] Available at:
https://www.researchgate.net/publication/269269896_A_comparison_of_the_popular_home_
automation_technologies
[8] 2015. Smart Lighting System Using Raspberry PI. 4th ed. [ebook] International Journal of
Innovative Research in Science, Engineering and Technology. Available at:
http://www.ijirset.com/upload/2015/july/11_Smart.pdf
[9] 2018. Development Of Wireless Home Automation System For The Disabled (Deaf, Dumb
And Alzheimer) People. 9th ed. [ebook] International Journal of Scientific & Engineering
Research. Available at: https://www.ijser.org/researchpaper/Development-of-Wireless-Home-
Automation-System-For-The-Disabled-People-Deaf-Dumb-And-Alzheimer.pdf
[10]Ltd, M., 2020. Madimack I Sustainable Pool Heating. [online] Madimack.com.au. Available at:
https://www.madimack.com.au/sustainable-energy-solutions-2
[11]Components101. 2020. Arduino Uno. [online] Available at:
https://components101.com/microcontrollers/arduino-uno
[12]Components101. 2020. HC-05 - Bluetooth Module. [online] Available at:
https://components101.com/wireless/hc-05-bluetooth-module
[13]TheServerSide.com. 2020. Master-Slave Terminology Alternatives You Can Use Right Now.
[online] Available at: https://www.theserverside.com/opinion/Master-slave-terminology-
alternatives-you-can-use-right-
now?sess=5996e32f6b86afcc966cb0c629d3f506#:~:text=In%20computer%20networking%2
C%20master%2Fslave,to%20the%20slave(s).

51
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
[14]Standards.ieee.org. 2020. 802.15.1-2005 - IEEE Standard For Information Technology--
Local And Metropolitan Area Networks-- Specific Requirements-- Part 15.1A: Wireless
Medium Access Control (MAC) And Physical Layer (PHY) Specifications For Wireless
Personal Area Networks (WPAN). [online] Available at:
https://standards.ieee.org/standard/802_15_1-2005.html#:~:text=(LR%2DWPANs)-
,The%20protocol%20and%20compatible%20interconnection%20for%20data%20communicat
ion%20devices%20using,defined%20in%20IEEE%20Std%20802.15.
[15]Components101. 2020. HLK-PM01 AC To DC 5V Power Module. [online] Available at:
https://components101.com/regulators/hlk-pm01-ac-dc-5v-power-module
[16]Microcontrollers Lab. 2020. 2N2222 Transistor Pinout Diagram, Examples, Applications And
Datasheet. [online] Available at: https://microcontrollerslab.com/2n2222-npn-transistor-pinout-
examples-applications-datasheet/

52
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Appendix A
Arduino IDE Code

String voice;

//----------defining pins----------

int Relay1 = 6;

int Relay2 = 7;

int Relay3 = 4;

// ----------Calling a function to turn on all 3 switches at ones----------

void allon()

digitalWrite(Relay1, HIGH);

digitalWrite(Relay2, HIGH);

digitalWrite(Relay3, HIGH);

//----------Calling functions to turn on switches one by one----------

void relay1On()

digitalWrite(Relay1, HIGH);

void relay2On()

digitalWrite(Relay2, HIGH);

void relay3On()

digitalWrite(Relay3, HIGH);

//----------Calling a function to turn off all 3 switches at ones----------

53
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
void alloff()

digitalWrite(Relay1, LOW);

digitalWrite(Relay2, LOW);

digitalWrite(Relay3, LOW);

//----------Calling a function to turn off switches one by one----------

void relay1Off()

digitalWrite(Relay1, LOW);

void relay2Off()

digitalWrite(Relay2, LOW);

void relay3Off()

digitalWrite(Relay3, LOW);

//----------------------------------------------------------------------

void setup()

Serial.begin(9600);

pinMode(Relay1, OUTPUT);

pinMode(Relay2, OUTPUT);

pinMode(Relay3, OUTPUT);

void loop()

54
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
{

while(Serial.available()) //Check if there is any available byte

delay(10); //Delay was added to make system stable

char c = Serial.read(); //Strat a serial reading

if(c=='#')

{break;} //If # detected after the word exit from the loop

voice+= c; //Shorthand for voice = voice + c

if(voice.length()>0)

Serial.println(voice);

if(voice== "all on" || voice== "on") //On the all Switches

allon();

else if(voice== "all off" || voice== "all of") //Off the all Switches

alloff();

else if(voice== "switch one on" || voice== "switch 1 on") //Relay one on

relay1On();

else if(voice== "switch one off" || voice== "switch one of") //Relay one off

relay1Off();

55
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
else if (voice== "switch to on" || voice== "switch tu on") //Relay two on

relay2On();

else if (voice== "switch to off" || voice== "switch tu off") //Relay two off

relay2Off();

else if (voice== "switch 3 on" || voice== "c") //Relay three on

relay3On();

else if(voice== "switch 3 off" || voice=="d") //Relay three off

relay3Off();

voice=""; //Reset the variable after initiating

}}

56
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Appendix B
Block structure of the android application

Figure 32- Appearance of the loading screen

Figure 33-Block structure of the code(loading screen)

57
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 34-Appearance of screen 2

58
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 35-Block structure of the code(Screen 2)

59
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 36-Appearance of the main menu

Figure 37-Block structure of the code (Main menu)

60
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 38-Appearance of the Screen 4

Figure 39-Block structure of the code(Screen 4)

61
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Appendix C
➢ Component Specification
❖ Arduino Uno R3

Figure 40-Pin diagram of Arduino Uno R3

Figure 41-Arduino Uno R3 dimensions

62
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
❖ HLK PM-01 AC to DC power converter

Figure 42-Pin diagram of HLK PM-01

Figure 43-HLK PM-01 dimensions

63
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
❖ HC 05 Bluetooth Module

Figure 44-Pin diagram of HC 05 Bluetooth module

Figure 45-HC 05bluetooth dimensions

64
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
❖ 2N2222 Transistors

Figure 46-Pin diagram of 2N2222 transistor

Figure 47-2N2222 transistor dimensions

65
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara
❖ Single-channel 5V relay

Figure 48-Pin diagram of relay

66
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Appendix D
➢ Printed Circuit Board

Figure 49-PCB(Top)

Figure 50-PCB(Bottom)

67
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Appendix E
➢ Enclosure Design

Figure 51-Dimensions of the enclosure (Bottom)

Figure 52-Dimensions of the enclosure (Top)

68
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Figure 53-Enclosure

69
VOICE CONTROLLED LIGHTING SYSTEM
UNIVERSITYOF HERTFORDSHIRE
Sri Lanka Telecom Training Centre - Welisara

Appendix F
➢ Final Product

Figure 54-Final Product

70
VOICE CONTROLLED LIGHTING SYSTEM

View publication stats

You might also like