Nice
Nice
Nice
SYSTEM
COLLEGE OF ENGINEERING
UNIVERSITI TENAGA NASIONAL
2023
DEVELOPMENT OF AN IOT DUAL LIGHTING
SYSTEM
By
Project Supervisor:
SABARINA BINTI JAAFAR
COLLEGE OF ENGINEERING
UNIVERSITI TENAGA NASIONAL
2023
iii
DECLARATION
I hereby declare that this thesis, submitted to Universiti Tenaga Nasional as partial
fulfilment of the requirement of the degree of Bachelor of Electrical Power Engineering,
has not been submitted to any other university for any degree. I also certify that the
work described herein is entirely my own, except for quotations and summaries sources
which have been duly acknowledged.
This thesis may be available within the university library and may be
photocopied or loaned to other libraries for the purposes of consultation.
ACKNOWLEDGEMENT
Alhamdulillah, praise and thanks to Allah for His Almighty and His ultimate blessings,
I was able to complete this study within the timeframe specified. First and foremost, I
would like to thank my supervisor, Mrs. Sabarina Bte Jaafar, for mentoring me
throughout the semester in order to finish my final year project. All of this would not
have been possible without the assistance of Mrs Sabarina. Thank you for all of
sacrifices in terms of always being available for consultation and assisting me in
completing this assignment.
In addition, I would like to thank my beloved parents and friends for their
assistance, encouragement, and unwavering support from the commencement of this
project until its conclusion. Aside from that, I'd like to thank my friends who have been
there for me through thick and thin, and who have given me great advice. They are so
wonderful to have in my life, and I have no idea and cannot imagine what my dreary
existence would be like without them.
Finally, I want to thank to my whole family who have always been there for me
during my ups and most importantly during my downs while also given me a full
motivation psychologically and spiritually in completing my final year project. All
credits to every each of them! Thank you very much.
v
ABSTRACT
Internet of Things (IoT) has been growing in popularity in these recent years. With the
existence of IoT, it can help to connect most electrical device such as home appliances
to the internet and enabling seamless communication and data exchange. With that
being said, implementation of IoT towards this dual lighting system that has been
developed will help greatly. The development of an IoT dual lighting system main
purpose is to provide light to those areas which are affected by frequent power
disturbances in the area. IoT has been implemented in the system to provide many
features to users which will benefit user in terms of sustainability of the earth and safety
and security. This system configuration mostly done in Arduino IDE with all the source
code made there. With all the source code has been written, it then gets transferred to
ESP32 by connecting USB cable to the ESP32 to the computer with the source code.
The system interface to control the lighting system is made in Blynk app which offers
many features and is easy for beginner to make its first smart lighting interface. This
application supports both Android and IOS which gives users more flexibility to
implement this project. Lastly, main power used for this project will mainly be DC as
it is more compatible and easy to configure the system as a whole. Implementation of
AC has been considered and is not really practical as it requires an inverter which not
only take up more spaces but also will make the system more expensive.
vi
CONTENTS
Pages
DECLARATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
CONTENTS vi
LIST OF TABLES viii
LIST OF FIGURES ix
CHAPTER 1 INTRODUCTION 1
1.1 General Introduction 1
1.2 Problem Statement 2
1.3 Objective 3
1.4 Scope and Limitation of the Study 3
CHAPTER 2 LITERATURE REVIEW 5
2.1 Overview of Smart Light Implementation 5
2.1.1 Motion Sensing Light with Miniature Solar Panel 5
2.1.2 Indoor Lighting System with Motion Sensor 6
2.1.3 Smart Light Bulb 7
2.2 Advantages and Disadvantages of Different Type of Lighting System 8
2.3 Overview of an Internet of Things (IoT) 8
2.3.1 Blynk Application Software 9
2.3.2 Implementation of ESP32 to Blynk App 11
2.3.3 Direct Current as System Main Operation 12
CHAPTER 3 METHODOLOGY 14
3.1 Introduction 14
3.2 Flowchart 15
3.3 Hardware Specification 17
3.3.1 ESP32 Wi-Fi and Bluetooth Module 17
3.3.2 PWM Charge Controller 18
3.3.3 Lead Acid Battery 19
3.3.4 AC-DC Converter 20
3.3.5 4 Channel Relay Module 20
3.3.6 Components Overview 21
vii
LIST OF TABLES
LIST OF FIGURES
3.6 Converter 20
3.12 Newbot 25
3.14 IDBot 26
3.15 Bot ID 27
3.21 Parameter 32
CHAPTER 1
INTRODUCTION
The central control panel of smart lighting systems is typically a hub that can be
accessed via smartphone apps or voice commands. This hub connects to individual light
sources, such as LED bulbs and fixtures, allowing homeowners to control and
customize each light source according to their preferences [2]. With the ability to adjust
brightness, color temperature, and light settings, smart lighting systems offer an
unprecedented level of customization that is not possible with conventional lighting
systems.
One of the most well-known smart lighting systems on the market is the Philips
Hue system, which offers a range of bulbs and fixtures that can be controlled using
smartphone apps or voice commands. The Philips Hue system also integrates with other
smart home devices, such as Amazon Echo and Google Nest, allowing for seamless
control of home lighting [4]. Another popular option is the LIFX system, which features
bulbs and fixtures with adjustable color temperature and brightness. Similar to the
Philips Hue system, LIFX can be controlled via smartphone apps or voice commands
and is compatible with various smart home ecosystems.
While established brands such as Philips Hue and LIFX offer robust and reliable
smart lighting solutions, there are also many emerging companies in the smart lighting
market that offer innovative and customizable lighting options. These smaller
companies often specialize in specific aspects of smart lighting, such as personalized
lighting scenes or voice control, and may provide unique solutions that cater to specific
homeowner needs.
Inconsistent power supplies refer to the situation where the availability of electricity
fluctuates, leading to blackouts, brownouts, and voltage fluctuations. The problem is
widespread in Malaysia, affecting both urban and rural areas. According to the Energy
Commission of Malaysia, the national average power interruption duration per
customer was 263 minutes in 2019, which is significantly higher than the global average
of 84 minutes. The frequency of power outages in Malaysia has also increased in recent
years, with more frequent occurrences of blackouts and brownouts.
3
1.3 Objective
This project development will tremendously help those party that are affected with
power disturbances. Below are the objectives that required to be achieve.
1. To develop an IOT dual lighting system for consumers that are experiencing
frequent power outage.
2. To design a system that can store power in the device.
3. To design an application that can interface with the lighting system on a smart
device.
4. To create a prototype for the IoT dual lighting system and the system interface.
This study will concentrate on the implementation of IOT towards the development of
lighting system. With various software and components to be implemented with, the
4
connection of components will be done in real life prototype as most of the software or
application does not support ESP32 Wi-Fi and Bluetooth module. All the settings,
configurations and coding can be done in application that supports IOT such as Arduino
IDE and Blynk App.
5
CHAPTER 2
LITERATURE REVIEW
Due to technological breakthroughs and rising demand for practical and energy-
efficient solutions, smart lighting systems have seen tremendous growth in recent years.
To improve lighting economy, convenience, and personalization, smart lights make use
of cutting-edge sensors, wireless connection, and intelligent controls. Throughout the
development of this project, it gives a broad overview of the use of smart lights,
covering their advantages, features, technology, and difficulties.
An example of a motion sensing light with solar panel is seen in Figure 2.1. Typically,
the implementation of this device mainly is for security. This device is usually placed
outdoor at home and can tighten up the security in one residence due to its motion
sensing technology [6]. The solar panel harvest energy solely relying on the availability
of the sunlight at the area which make it not so efficient especially when solar PV
efficiency degrade due to dust deposition [7]. It was verified through test conducted
which researchers deposited samples ranging from (0 to 1.963mg/cm2). From the testing
made, it shows that degradation of short circuit current from 0 to 49% respectively.
Innovative solution to get overcome this problem is to apply electrodynamic screen
across PV panel. Dust particle accumulated are charge electrostatically and repelled by
electrostatic force which caused the deposited dust to dispersed [8].
6
Motion sensor lighting system is a type of lighting system that detects any form of
movement in order to get activated. It has many built structure and form available on
the market. An example of indoor lighting system with motion sensor can be seen in
Figure 2.2 below. The system is integrated with sensing, control and connectivity
settings. With additional smart technology implemented to the system, it can adapt to
any amount of artificial light output to changing it based on the occupancy and daylight
level. With this lighting system, it has been said that it can reduce energy usage of a
lighting system by 80% with installation of granular sensing with each luminaire
connected to lighting system [9]. Occupancy sensor can also be used on other appliances
such as fan, air conditioner, etc. There are few anomalies occur in implementing motion
sensor lighting system. First, it can give large number of false alarm due to
misconfiguration in detecting threshold. It also can give large number of missed
detection. Both problems are due to software issue and bad sensor placement [10].
7
Smart light bulb has been taking over the lighting industries by a storm. It comes with
a lot of promising features such as timer, remotely controllable, option for group
control, ability to change light temperature, color and brightness [11]. Many electrical
supplier brands such as Phillips, Xiaomi and Alexa has been making this type of light
bulb that comes with unique features. The only thing to consider is that implementing
the smart light bulb to home will cost a lot of money since each of the light bulb is
expensive by its own. Example of a smart light bulb can be seen in FIGURE 2.3 below.
TABLE 2.1 shows that the benefits and the drawbacks of various lighting system
installation configuration.
With the help of the Internet of Things (IoT), which links systems, devices, and sensors
to the internet and enables communication and data sharing amongst them, a disruptive
technology has evolved. This networked system of physical items has the power to
revolutionize a number of facets of our lives, from increasing ease and productivity to
promoting sustainability and safety [12].
The capacity of IoT to increase efficiency across several fields is one of its major
advantages. IoT offers process automation and optimization by combining devices and
9
systems [13]. IoT sensors, for instance, may gather real-time data on machinery
performance in industrial settings, enabling predictive maintenance and minimizing
downtime. IoT devices can monitor and modify energy use in smart homes, optimizing
consumption and lowering utility costs. IoT can help intelligent traffic control systems
in the transportation industry, which will ease congestion and improve the movement
of cars as a whole.
The Internet of Things (IoT) has completely changed how people think about
home security, bringing forth a number of breakthroughs and developments that
improve security and provide homeowners peace of mind. The Internet of Things (IoT)
has changed conventional home security systems into proactive and intelligent
guardians by utilizing interconnected gadgets and sensors [14].
The way we connect with and manage Internet of Things (IoT) devices has been
revolutionized by the flexible and approachable mobile application Blynk. Blynk has
gained popularity among IoT enthusiasts, developers, and hobbyists thanks to its user-
friendly interface and robust capabilities. In this part of, it will briefly explore the
features and benefits of Blynk app and its impact on the IoT field.
Blynk is primarily a platform that lets users design unique user interfaces and
manage Internet of Things (IoT) devices using a smartphone or tablet. Users may easily
connect a variety of IoT hardware, such as the Arduino, Raspberry Pi, ESP32, and many
more well-known microcontrollers, using Blynk. The program offers a straightforward
drag-and-drop interface builder that enables users to create their own distinctive
10
interfaces by including interactive widgets such as buttons, sliders, graphs, gauges, and
more [15].
The adaptability of the Blynk app is one of its main advantages. It is compatible
with a wide range of IoT devices and connectivity options since it supports a wide range
of communication protocols, including Wi-Fi, Bluetooth, Ethernet, and cellular
networks. Users can manage and keep an eye on their IoT devices from any location in
the world as long as they have an internet connection thanks to this flexibility [16].
In conclusion, the Blynk app has revolutionized how users engage with Internet
of Things (IoT) devices by providing a simple and flexible platform for managing and
watching linked devices. IoT fans favor it because of its user-friendly interface,
customization capabilities, large library of widgets, and friendly community. Blynk has
made a big contribution to extending the scope and usability of IoT technology by
enabling users to design personalized interfaces and automate their IoT devices.
Setting up the hardware elements is the first stage in creating a lighting system
using the ESP32 and the Blynk software. Using the proper interfaces and drivers, the
ESP32 microcontroller can be connected to a variety of light sources, including LEDs,
bulbs, or LED strips [18]. Additionally, sensors can be added to enable automation and
improve user convenience, such as ambient light sensors or motion detectors.
Once the hardware is configured, the ESP32 may be programmed to regulate the
behavior of the lighting system. Various light sources can be seamlessly integrated and
controlled by the ESP32's processing power and GPIO ports, enabling dynamic
alterations of brightness, color, and effects. Through the Blynk app, the lighting system
may be remotely managed by utilizing the ESP32's Wi-Fi connectivity.
Users can create their own unique interfaces with the help of the user-friendly
interface builder offered by the Blynk app. Button, slider, and other interactive widgets
can be added to the interface with drag-and-drop capabilities, giving users simple access
to the lighting system [15]. Real-time control and visualization of the state of the
lighting system are possible because to the widgets' ability to be linked to the necessary
functions or variables in the ESP32's code.
The ability to remotely control the lighting system is one of the key benefits of
combining the Blynk app and ESP32 [16]. Through the Blynk app, users can access and
manage their lighting system from anywhere in the globe as long as there is an internet
connection. Users can now modify the lighting even while they are away from their
home or place of business, adding a new degree of flexibility and convenience.
In conclusion, using the ESP32 to create a lighting system and combining it with
the Blynk app gives a variety of advantages and opportunities. Dynamic, adaptable, and
12
The decision between DC (Direct Current) and AC (Alternating Current) can have a big
impact on lighting systems that use backup power sources. While grid-connected
lighting typically uses AC power, DC lighting systems have a number of significant
advantages in situations when backup power is used. This section will cover the
advantages of DC vs AC for this project.
DC lighting systems are a perfect fit for backup power systems that include
renewable energy resources like solar panels. Direct connection of solar panels to DC
lighting systems is more effective because they produce DC power directly. The
system's lack of DC-to-AC conversion minimizes extra energy losses, maximizing the
effectiveness of renewable energy production overall and its integration with lighting
systems.
13
CHAPTER 3
METHODOLOGY
3.1 Introduction
This chapter describes the overall methodology used for the research, including a
detailed breakdown. The overall technique of the investigation was depicted in FIGURE
3.1.
In this part, the procedure of configuration and analysis setup will be illustrated
and preparation of using Arduino IDE and settings will be shown to give more in depth
understanding of the configuration of this project. All configurations and settings will
be discussed and break down one by one in this chapter.
15
3.2 Flowchart
As mentioned before, one of the primary objectives for this project is to be able to build
a prototype that fit for the project description in order for it to be fully operational.
Hardware selection in this project is one of the most important factor in determining
how this project will work if it were available on the market. There are few major
components for this project which result in the development of an IOT dual lighting
system.
There are a lot of Wi-Fi and Bluetooth Module out there such as HC-05 and Arduino
UNO itself. Considering ESP32 offered so much features to users and is very
compatible for this project, ESP32 is the best choice. It is cheaper and accessible in
18
terms of availability on the market. The configuration for this ESP32 can also be done
in Arduino IDE with few settings to implements [21], [22].
The purpose of using this device in this project is mainly to charge the lead acid battery.
Not only that, it offers a battery capacity indicator but is not very accurate. It has an
output current of 5A This device mainly used for solar panel charge controller but for
this project, it received electric power from the main supply and directly charge it to the
lead acid battery [23].
19
At the beginning of this project, so many considerations were put into the selection of
battery storage. Lithium polymer battery and lithium ion battery are the main choice
initially but both battery are not compatible for this project due to lack of output from
those batteries [24]. After few analysis, sealed lead acid battery is the best for this
project and is proven to be reliable for cases such as backup supply for lighting system.
Lead acid batteries also achieve higher discharge rate compared to the other two
batteries [25].
20
The device will operate fully using direct current (DC) with this converter. It received
alternating current (AC) the converted to direct current then get distributed throughout
the components. This made the PWM charge control easier to configure as it operates
using direct current.
Rated Voltage 5V
Load Current 70mA
Developing a smart light system in general requires a relay module which act as a switch
that can be accessed through smart devices. The selection of relay is pretty simple for
this project since it uses the relay as a switch and does not require a high amount of
voltage to be operated. Relay is very useful to implement on any smart appliances as it
helps to achieve smart system itself by providing an easy way for user to access the
switch without actually pressing the physical switch [26].
There are other components used in developing this project but the main components
used in order for the project to be fully functioning are as listed above. Below are the
lists of components that is used to improve this project quality:
The development of an IOT dual lighting system must have a system for users in order
to access the lighting system. There is other software such as Raspberry pi 4 and Google
Cloud that can be used to create a system for user’s interface but Blynk app offers so
many features and is compatible with both Android and IOS. Not only that, Blynk app
is also very useful to facilitate the monitoring and controlling of home-related
parameters [27].
23
The interfacing system is easy to understand and use. This is to ease users in every
layers and society so that users can understand and use the actual system. The activation
is also easy to provide users with an interfacing application which is user’s friendly.
With a press of a button, users can activate and turn on the lighting system.
Voice over IP and instant messaging are both available through Telegram Messenger, a
cloud-based platform. It's simple to install on a computer running Windows, Mac, or
Linux, as well as an Android or iPhone smartphone [28]. You can build chat bots on
Telegram and communicate with them. These features are the additional features that
created in case the users are far away from home. As informed, smart light system can
be accessed through smartphones from anywhere as long as there’s internet connection
in presence. With that being said, throughout the development of this project, there’s
several loopholes that are noticed and one of it is that if the users are far away from
home and there’s an issue with power that time, the users won’t be informed about it
24
unless notice were given by the electrical provider. Therefore, this feature will be of use
since it will inform users through Telegram Application that the power is out.
First of all, users must have an official account on Telegram by installing Telegram on
Play Store for Android and App Store for IOS devices.
To start creating bot in Telegram Application, user first need to search for “BotFather”
on Telegram. After identifying the bot, user can type “/start” to get further instructions.
25
Based on the instruction provided by the “BotFather”, user can identify what to do next
and for this case, it is to create a new bot. Therefore, user should type in “/newbot”.
User should also input the username for the bot created
After the steps were done, “BotFather” will give user the bot authentication token to
user which have to be input to the main source code in Arduino IDE. User should save
the authentication code given.
Bot token is an access code to be input to the main source code. To get bot token, user
need to search “IDBot” in Telegram this time.
3.5.5 Overview
The ESP32 microcontroller is a powerful and versatile platform that may be used for a
range of applications, including the control of sensors and home appliances. In this post,
we'll examine the various ways in which Telegram bots can work with an ESP32
microcontroller [30]. Together, Telegram bots and ESP32 microcontrollers may
provide a powerful tool for controlling and monitoring a wide range of gadgets and
sensors. By utilising the Bot API [31], programmers may create bots that provide
consumers with a simple interface for interacting with their ESP32 microcontrollers.
The ESP32's integrated Wi-Fi capabilities make it simple to link the microcontroller to
the internet and allow remote control and monitoring. Overall, an efficient and flexible
solution for IoT applications is provided by the combination of ESP32 microcontrollers
with Telegram bots.
Implementing this bot to the development of this project will be so much useful.
User will have a better security and monitoring system install in home. The ESP32 will
communicate with the Telegram bot to take messages, process them, and respond.
28
Popular microcontroller modules like the ESP32 are frequently employed in the creation
of IoT applications, robotics, and automation systems. The Arduino IDE, an open-
source programming platform that offers a user-friendly interface for generating and
uploading code to microcontrollers, can be used by developers to programme the
ESP32.
Installing the required board support package and setting the IDE to utilise the
right COM port are required when configuring the Arduino IDE for the ESP32. Once
configured, programmers can use the ESP32's familiar Arduino IDE interface to write
and upload code.
There are many internet resources that offer comprehensive instructions on how
to set up the Arduino IDE for the ESP32. The ESP32 board package installation through
uploading the code to the module are all covered in-depth instructions on the official
Arduino website. A thorough setup tutorial for the Arduino IDE for the ESP32 is also
available on the Espressif Systems website [32].
In this section, it will explain briefly on all the configuration and settings of
Arduino IDE that are made throughout the entire process of developing this project.
There’s not a lot to configure in this software since it provided a complete feature for
user’s interface but ESP32 board is not available to configure. With that being said,
extension is available provided by Espressif which is the manufacturer of the board.
The extension can be added to Arduino IDE since the link for the library can be add
through Arduino IDE settings. To add the extension, steps below can be follow:
Secondly, get the link provided by Espressif on its official website [34] and add it to
“Additional Boards Manager URLs”. After inputting the link to “Additional Boards
Manager URLs”, press “OK”.
After adding the link to “Additional Boards Manager URLs”, open “Board Manager”
by going to Tools > Board > Board Manager.
Then, the extension can be downloaded after inputting the link to “Additional Boards
Manager URLs”. Download the ESP32 library by Espressif System in the Board
Manager settings.
31
After a few seconds, the ESP32 board should be ready in user’s Arduino IDE software.
With that, user can use ESP32 board in Arduino IDE and can interface with real board
by connecting the board to the system. Coding can be input in the board so that the
project can be build.
In this part, it will briefly explain the source code or coding that has been written
for this project. Implementation of Telegram Bot, Blynk App and ESP32 towards the
development of this project will be mention in this part.
32
This section of the source code mainly discussed on the configuration of components.
All the settings were set based on the project description. This part of the source code
also shows all the Telegram Bot ID and authentication code obtained so that user can
link Telegram with the project to get notification. Not only that, Wi-Fi connection
setting also made here. Wi-Fi SSID and password also inputted in this part so that the
device can connect to the designated Wi-Fi to be access in Blynk App [36]. The lighting
system parameter has also been set based on the port used on ESP32.
33
Lighting system parameter on Blynk App is also set in this part of the source code. LCD
display indicating whether the system is currently using main power source or backup
power source also in this part.
34
CHAPTER 4
4.1 Introduction
A discussion of the findings and an examination of the discoveries that were found
during the development of this project will be discussed in this chapter. In order to
achieve goals on developing this project, the results and findings are discussed below.
In this project, liquid crystal display (LCD) is used to indicate the condition of supply
used. It is important to install display indicator so that user know what type of power in
use. LCD display used for this project is 2x16 LCD with I2C module which compatible
to implement in this project due to port availability [37]. This display indicates the
condition of the system, instructions and any necessary information. Without having the
LCD display, user won’t know what type of supply is currently in use. All of the settings
and configuration for the LCD display are made through Arduino IDE along with the
source code.
38
In FIGURE 4.1, it shows that after supplying the system with power, the system is
searching for Wi-Fi connection. The system will find the designated Wi-Fi to connect
with the system so that the ESP32 board can be to the actual system. After Wi-Fi is
connected, IP address of the Wi-Fi will be displayed on the LCD display indicating that
the system is already connected to Wi-Fi as shown in Figure 4.2. Network SSID and
password must be included in the source code for the ESP32 board to find the Wi-Fi
[38].
In FIGURE 4.3, after Wi-Fi connection is established, the system is now connected to
smart device in used. The display also indicates that the system is ready to receive signal
from the smart phone. Not only that, the LCD also indicate what type of supply the
system is currently using. From FIGURE 4.3, the system is supplied with main power
source.
FIGURE 4.4 System on Standby with Four Light Bulb Turned On During Main
Power
40
From FIGURE 4.5 above, for this case, the system is not getting power from the main
power source as the plug were turned off. Therefore, based on the source code, the LCD
will indicate that the system is not using main power source. It will indicate that power
cut currently occurring during that time and Telegram message will be sent to user’s
smart device.
FIGURE 4.6 System on Standby with Four Light Bulb Turned On During Backup
Power
After indicating the power cut has occurred, the system will get supply from the sealed
lead acid battery and continue its operation. Base on FIGURE 4.6, the system is back
on standby mode and ready to receive any signal from user’s smart devices. An
41
indication showing that the system is currently using backup power also being displayed
on the LCD.
When power disturbance occurred based on FIGURE 4.5, system will send signal to the
board indicating the it has loss the main power. Therefore, the ESP32 board will relay
a message to user through Telegram Application so that users are well informed about
the power cut [39].
The system is equipped with 4.5Ah sealed lead acid battery to supply the system during
power cut. The selection of this battery has been justified in methodology section.
Sealed lead acid battery is very compatible with the system due to its characters that
works really well in terms of power failure and for emergency [40].
42
Theoretical calculation has been done to check whether it matches up with the actual
test run that has been done. Therefore, theoretical calculation is very important so that
users can select the capacity of battery based on home preferences. Below is the
calculation that has been made:
Components used:
i) ESP32 – 100mA
ii) PWM Solar Charge Control – 10mA
iii) Light Bulb – 0.2A each (Total 0.8A)
iv) 4 Channel Relay Module – 280mA (Can be neglected)
System Longevity
4.5Ah
𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝐿𝑖𝑓𝑒 =
0.91A
= 4.95ℎ
= 297 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
= 4 ℎ𝑜𝑢𝑟𝑠 57 𝑚𝑖𝑛
Based on the calculation made, the system will last around 4 hours 57 minutes. Relay
module is neglected because relay module is only used for switching. Most of the
components that taken into account are fully operational when the system is in used.
43
The actual testing was done during the system is fully operational. The testing will be
observing the battery life of the system and how long the system will last with all lights
are turned on. Then, the result of multiple testing can be compared with the theoretical
testing to make sure the actual system can last long based on the theoretical calculation.
Based on the testing done, it can be concluded that the battery more than 4 hours. The
theoretical calculation shows that the battery will last for almost 5 hours neglecting the
current usage of 4 channel relay and others that does not consume power consistently.
With this test run results, the tests done are consistent on getting more than 4 hours of
supply from the battery.
The system is built with 4.5Ah battery capacity as its backup supply. The battery type
used is sealed lead acid battery which helps a lot in terms of delivering power and known
for its characteristic of being good in terms of backup power supply. Test usually being
done after testing the longevity of the system. The test done is to determine how long it
takes to fully charge the battery with the PWM solar charge controller with 5A output.
44
There are few things to consider when charging batteries and one of it is charge
efficiency of batteries. For lead acid battery, it has a charging efficiency of 98% [41].
Therefore, this should be taken into consideration when tabling the result of the battery
charge time. Not only that, lead acid batteries should only able to discharged up to 40%
to 50% of its capacity at most to preserve battery life [42].
The calculation for battery charging is made to table the result of charging time of the
lead acid battery. Few things to take into consideration such as battery capacity, charge
current and charge efficiency. With that being said, the formula that is used in this
calculation will be:
Battery capacity
𝐶ℎ𝑎𝑟𝑔𝑒 𝑡𝑖𝑚𝑒 =
Charge current × Charge efficiency
Calculation
Battery capacity
𝐶ℎ𝑎𝑟𝑔𝑒 𝑡𝑖𝑚𝑒 =
Charge current × Charge efficiency
4.5
𝐶ℎ𝑎𝑟𝑔𝑒 𝑡𝑖𝑚𝑒 = = 0.918 ℎ𝑜𝑢𝑟𝑠 = 55 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
5 × 98%
45
Based on the calculation that has been conducted to find out how long the battery is
fully charged; it can be concluded that the theoretical calculation and the testing is
nearly identical. Note that the testing was done is a different day right after the battery
was emptied after conducting the test to see how long the light can be operated using
backup supply.
4.5 Discussion
This development of IoT dual lighting system shows that the project can be
implemented anywhere. Therefore, application of this system in rural areas can be done.
There are few matters to be discussed in this part which will be elaborate more to give
a better understanding.
Other than that, there are few other similar projects which can be implement
such as solar lighting system. Comparing the IoT dual lighting system with the existing
system in the market, solar lighting system has few downsides to be implemented. As
well informed, solar requires sunlight to generate electrical power which tells that it will
be inconsistent in terms of power generating especially if the system is implemented in
closed area. Not only that, factor such as availability of sunlight should be highly
considered when implementing solar energy on home appliances. With that being said,
implementing the IoT dual lighting system is better than solar lighting system as the
IoT dual lighting system is more reliable in terms of providing supply to the lighting
system.
47
CHAPTER 5
5.1 Conclusion
In this part of the topic, it will briefly discuss on what can be concluded in this project.
Every observations are listed. The development of IoT dual lighting system will bring
benefit to user in terms of optimization of energy and sustainability.
The initial phase of this project is to try out the lighting system with the
implementation of ESP32 to the system. This project not only give user more access to
their home appliances, it also provided security for user. The implementation of ESP32
to this lighting system made it a smart home appliance which will help in terms of
energy sustainability. As informed, there are lots of electrical energy wastage that it gets
to the point where electrical distributor even offers reparation or rewards to those that
minimize electrical energy usage in certain time. Implementing this system, it allows
users to control home appliances and take advantage of the offers made by the electrical
power distributor.
REFERENCES
78432343&source=lnms&tbm=isch&sa=X&ved=2ahUKEwj5t7qyh5j_AhWxT
WwGHZIwDTUQ_AUoAnoECAEQBA&biw=1920&bih=937&dpr=1
(accessed May 28, 2023).
[12] “Analytics Steps | 404 Error.” https://www.analyticssteps.com/404 (accessed
May 28, 2023).
[13] “AIoT: The Power of Combining AI with the IoT.”
https://www.reliableplant.com/Read/31799/combining-ai-iot (accessed May 28,
2023).
[14] “Securing the Internet of Things in the smart home.”
https://www.kaspersky.com/resource-center/threats/secure-iot-devices-on-your-
home-network (accessed May 28, 2023).
[15] “blynkkk.github.io/gettingstarted.md at master · blynkkk/blynkkk.github.io ·
GitHub.”
https://github.com/blynkkk/blynkkk.github.io/blob/master/gettingstarted.md
(accessed May 29, 2023).
[16] E. Media’s, . S., and M. Rif’an, “Internet of Things (IoT): BLYNK Framework
for Smart Home,” KnE Social Sciences, vol. 3, no. 12, p. 579, Mar. 2019, doi:
10.18502/KSS.V3I12.4128.
[17] “Introduction - Blynk Documentation.” https://docs.blynk.io/en/ (accessed May
29, 2023).
[18] “IoT Controlled LED Using ESP32 with Blynk App.”
https://linuxhint.com/esp32-blynk-app-led-control-iot/ (accessed May 29, 2023).
[19] B. Glasgo, I. L. Azevedo, and C. Hendrickson, “How much electricity can we
save by using direct current circuits in homes? Understanding the potential for
electricity savings and assessing feasibility of a transition towards DC powered
buildings,” Appl Energy, vol. 180, pp. 66–75, Oct. 2016, doi:
10.1016/j.apenergy.2016.07.036.
[20] “Solar AC vs DC: Which Offers the Best ROI? - Novergy Solar.”
https://www.novergysolar.com/better-solar-dc-ac/ (accessed May 29, 2023).
[21] “Installing the ESP32 Board in Arduino IDE (Windows, Mac OS X, Linux) : 7
Steps - Instructables.” https://www.instructables.com/Installing-the-ESP32-
Board-in-Arduino-IDE-Windows-/ (accessed May 29, 2023).
[22] N. ABEKIRI, A. RACHDY, M. AJAAMOUM, B. NASSIRI, L. ELMAHNI, and
Y. OUBAIL, “Platform for hands-on remote labs based on the ESP32 and NOD-
red,” Sci Afr, vol. 19, p. e01502, Mar. 2023, doi: 10.1016/J.SCIAF.2022.E01502.
[23] S. Gowtham, M. Balaji, S. Harish, M. S. A. Pinto, and G. Jagadeesh, “Fault
Tolerant Single Switch PWM DC-DC Converters for Battery charging
Applications,” Energy Procedia, vol. 117, pp. 753–760, Jun. 2017, doi:
10.1016/J.EGYPRO.2017.05.191.
50
[36] “ESP32 Useful Wi-Fi Library Functions (Arduino IDE) | Random Nerd
Tutorials.” https://randomnerdtutorials.com/esp32-useful-wi-fi-functions-
arduino/ (accessed May 29, 2023).
[37] “I2C LCD with ESP32 on Arduino IDE - ESP8266 compatible | Random Nerd
Tutorials.” https://randomnerdtutorials.com/esp32-esp8266-i2c-lcd-arduino-ide/
(accessed May 29, 2023).
[38] “Connect to Wi-Fi networks with the ESP32.”
https://www.upesy.com/blogs/tutorials/how-to-connect-wifi-acces-point-with-
esp32 (accessed May 29, 2023).
[39] “Telegram: ESP32 Motion Detection with Notifications | Random Nerd
Tutorials.” https://randomnerdtutorials.com/telegram-esp32-motion-detection-
arduino/ (accessed May 29, 2023).
[40] “Lead Acid Battery : Working, Types, Construction, Life and Applications.”
https://www.elprocus.com/what-is-lead-acid-battery-types-working-its-
applications/ (accessed May 29, 2023).
[41] A. Degla, M. Chikh, M. Mzir, and Y. Belabed, “The State Of Charge estimating
methods for rechargeable Lead-acid batteries,” 2022 19th IEEE International
Multi-Conference on Systems, Signals and Devices, SSD 2022, pp. 496–502,
2022, doi: 10.1109/SSD54932.2022.9955864.
[42] “Battery Charge Time Calculator - Footprint Hero.”
https://footprinthero.com/battery-charge-time-calculator (accessed May 29,
2023).