Saran
Saran
Saran
of
MASTER OF TECHNOLOGY
in
MECHATRONICS ENGINEERING
of
January 2023
1
BONAFIDE CERTIFICATE
Certified that this project report titled “Smart light using IoT dashboard” is the
Bonafede work of SRI SARAN S (RA2212045010007), who carried out the project work
under my supervision. Certified further, that to the best of my knowledge the work reported
herein does not form any other project report or dissertation based on which a degree or
award was conferred on an earlier occasion on this or any other candidate.
SIGNATURE SIGNATURE
2
ABSTRACT
The project envisions a smart lighting solution using an IoT dashboard to control
and monitor lighting systems via an ESP32 microcontroller. The setup integrates a
PIR sensor for motion detection, with a relay module to toggle a 220-volt bulb. The
system remains in an energy-efficient standby mode until motion is detected,
triggering the light to turn on, thereby enhancing convenience and security while
promoting energy savings. The IoT dashboard facilitates remote monitoring and
control, offering a user-friendly interface for managing the smart light's operational
settings and observing real-time data. This project embodies the synergy between
IoT technology and energy management for smart home automation.
3
ACKNOWLEDGMENTS
My first and sincere gratitude goes to my mentor prof. Ranjith Pillai R, Assistant Professor,
Department of Mechatronics Engineering for his continuous support, motivational
encouragement, immense knowledge, and patience during my project. His guidance helped
meat all stages of this project and writing this report.
I am extremely grateful and indebted to our Head of Department Dr. G. Murali, M.E., Ph.D.
for providing all facilities and support to implement my idea practically as a part of my M.
Tech course.
I am taking this opportunity to thank prof. Ranjith Pillai R Sir from Mechatronics Lab and all
otherfaculty member of department for their constant support during my project. Also, thanks
to myparents for their unceasing encouragement and support.
(SRI SARAN S)
4
TABLE OF CONTENTS
CHAPTER NO. TITLE PAGE NO.
ABSTRACT 3
ACKNOWLEDGMENTS 4
LIST OF FIGURES 6
LIST OF TABLES 7
1 INTRODUCTION
1.1 Background
1.2 Advantages of internet of thing system
1.3 Objective of the Project
1.4 Organization of Report
2 LITERATRURE SURVEY
3 SYSTEM DESCRIPTION
3.1 Components
3.1.1 ESP32
3.1.2 Optocoupler relay
3.1.3 Table autocoupler relay
3.1.4 LED bulb
3.1.5 PIR sensor
3.2 Circuit Connections
3.2.1 PIR sensor connection
3.2.2 Autocoupler relay Connections
3.3 Circuit Diagram
3.4 Methodology
4 EXPERIMENTATION AND RESULT
5 CONCLUSION
6 REFERENCES
7 APPENDIX
5
LIST OF FIGURES
6
LIST OF TABLES
7
1 INTRODUCTION
1.1 Background
The concept of smart lighting using IoT (Internet of Things) technology stems from
the growing need for energy efficiency and improved home automation systems.
Traditional lighting solutions, which often rely on manual control, lack the ability to
adapt to environmental changes and user presence. The integration of IoT allows for
intelligent, automated control of lighting based on various sensors and data inputs.
The use of ESP32, a powerful microcontroller with Wi-Fi capabilities, along with PIR
(Passive Infrared) sensors, enables the development of smart systems that can detect
human presence and respond accordingly. This not only enhances user convenience
but also significantly reduces unnecessary power consumption, contributing to
energy-saving efforts in residential and commercial settings.
8
1.3 Objective of the Project:
The main objective of your Smart Light project using IoT is to enhance home
automation and energy efficiency. The sub-objectives include:
This project report is classified into five chapters. First chapter gives a brief
introduction with objective. Second chapter discusses the literature survey.
Followed by system design in third chapter. The experimental results of the
project are discussed in the fourth chapter. Finally, the fifth chapter with
conclusion.
9
2 LITERATURE SURVEY
This chapter discusses about the literature survey done and major inference made from
each paper for this project
1.“IoT-enabled smart lighting systems for smart cities” by A. K. Sikder, A. Acar, H. Aksu, A.
S.
Uluagac, K. Akkaya and M. Conti. The paper was published in the 2018 IEEE 8th Annual
Computing and Communication Workshop and Conference (CCWC) 1. The paper provides
an overview of the Smart Lighting System (SLS) and reviews different IoT-enabled
communication protocols that can be used to realize the SLS in the context of a smart city.
The paper analyzes different usage scenarios for IoT-enabled indoor and outdoor SLS and
provides an analysis of the power consumption. The authors conclude that IoT-enabled smart
lighting systems can reduce power consumption up to 33.33% in both indoor and outdoor
settings. The paper also discusses the future research directions in SLS in the smart city 1
2. “Smart lighting: Intelligent and weather adaptive lighting in street lights using
IOT” by A. K.
10
V. Jinny, presented at the 2017 IEEE International Conference on Circuits and Systems
(ICCS), the authors proposed a smart street light management system that uses IoT to
conserve energy by reducing electricity wastage and manpower. The system uses sensors to
detect the presence of vehicles and pedestrians and adjusts the brightness of the street lights
accordingly. The authors also proposed a remote-based system to monitor and control the
energy consumption of the street lights. The system consists of a microcontroller, sensors,
and a remote module installed on the pole lights 1.
4. According to the paper “An IoT Smart Lighting System for University
Classrooms” by F. J. Montalbo and E. Enriquez, presented at the 2020 International
Symposium on Educational Technology (ISET), the authors proposed a low-cost
smart lighting system that uses IoT concepts to control the operations of lights in
university classrooms. The system is designed to reduce energy consumption by
allowing the user to control the lights through a cloud-based system. The system uses
a NodeMCU V3 with Wi-Fi capabilities, a Passive-Infrared Sensor to detect room
occupancy, and a Relay Switch to operate the switching of lights. The controller
device can run using web and mobile applications over the internet using AJAX. The
developed applications not only serve as a controller but also as a management system
to set appropriate schedules for class hours, a monitoring system that indicates the
length of usage and the total amount of energy consumed from lights. The
management can set class schedules to allow the room to operate the lights on a given
period if there are occupants in the room. Failure to occupy the room even with a set
schedule, the lights will not turn ON, thus reducing excess energy consumption.
Furthermore, lights can still be controlled over a separate remote network through the
applications even beyond the given schedule 1.
11
3 SYSTEM DESCRIPTION
This chapter discusses about the components used for this project and the circuit design of
the final set up.
3.1 Components
3.1.1 ESP32
Arduino Mega 2560 specifications are listed in below in 3.1. The ultrasonic sensor, as
depicted in Figure 3.4the ESP32 is a popular and versatile microcontroller and Wi-Fi module
widely used in the field of Internet of Things (IoT) and embedded systems. Developed by
Espressif Systems, this compact and cost-effective chip offers built-in Wi-Fi connectivity,
making it easy for developers to connect their projects to the internet. The ESP32 supports
various communication protocols, making it suitable for a wide range of applications, from
simple sensor monitoring to home automation and IoT devices. It is known for its ease of
use, low power consumption, and a supportive community, which has contributed to its
widespread adoption in DIY projects and commercial products alike. Additionally, there are
various development platforms and programming languages, such as Arduino and Micro
Python, that can be used to program the ESP32. Arduino Mega 2560 specifications are listed
in below in 3.1.
ESP32 Specifications
Specification Detail
Operating Voltage 3.3V
16
Digital I/O Pins
Flash Memory 4 MB
12
Figure 3.1: ESP32Board
An optocoupler relay is a solid state device comprising an LED and a photo sensitive
semi-conductor, providing electrical isolation between input and output circuits.
These relays offer faster response times than mechanical relays give to their reliance
on light signals. They find use in applications requiring isolation, such as in high
voltage systems, medical equipment, and noise sensitive electronic circuits,
enhancing reliability and safety.
Optocoupler relay is shown in Figure 3.3 and key specification is listed in 3.2.
13
3.1.3Table 3.2: Optocoupler relay
Specification Value
Model name SRD-05VDC-SL-C
Number of Pins 5
Input voltage 5
Output Voltage (NO/NC) 10A 250VAC /
10A 30VDC
Switching speed 10ms
Operating Temperature Range -30°C to +85°C
14
temperatures for different ambient needs. They are known for their long lifespan,
often spanning thousands of hours, and some models offer features like
dimmability. LED bulbs are an eco-friendly choice due to their energy efficiency
and longer life, reducing waste and frequent replacements.. The Bulb
specifications are listed below Table 3.3. Table 3.3: Bulb Specifications
Type LED Bulb
Voltage 220v
Luminous Flux 400 - 1600 lumens
Power 20 Watts
Consumption
,,
15
3.1.3 PIR Sensor
Specification Detail
16
3.2 Circuit Connections:
17
Figure 3.6: optocoupler relay
Pin
18
3.3 Circuit Diagram:
3.4 Methodology:
19
CHAPTER 4
A smart light project utilizing an ESP32 and a relay module, the ESP32
microcontroller will be programmed to control the on/off state of a light bulb
based on input signals. This could be from a PIR motion sensor, scheduled
timings, or remote commands via an IoT platform. The relay module, interfaced
with the ESP32, acts as a switch for the high-voltage bulb, allowing the low-
voltage ESP32 to safely control a mains-powered light. This system combines
hardware
20
automation with software intelligence, enabling energy-efficient and user-
responsive lighting solutions in smart home or office environments., which
requires a higher voltage, through electrical isolation provided by the relay in
Figure 4.2
21
Figure 4.3: Dash board Diagram
d) Final setup
The final setup of a smart light project consists of a light bulb controlled by an
ESP32 microcontroller, connected to a relay module for safe operation with
mains power. A PIR sensor integrates with the ESP32 for motion-activated
lighting. The entire system is managed through the Blynk dashboard, allowing
remote control and monitoring of the light's status and sensor data. This setup
enables automated, energy-efficient lighting responsive to environmental
changes and user needs, epitomizing modern smart home technology.
Figure 4.6: Final Set-up
22
Figure 4.7: Final Set-up
23
CHAPTER 5
CONCLUSION
The Smart Light project epitomizes the seamless integration of IoT technology into home
automation, crafting a solution that is both energy-efficient and responsive to user needs.
Central to this initiative is the use of the ESP32 microcontroller, which serves as the
command center, orchestrating the system's overall functionality. In synergy with this, a PIR
sensor adds a layer of intelligence, enabling motion-activated control, thereby enhancing the
system's efficiency and user-friendliness. The incorporation of a relay module is a critical
aspect, ensuring safe interaction with the household's electrical system, particularly in
managing the 220V bulb.
The project takes a significant leap forward with the integration of the Blynk dashboard, a
pivotal component that offers users remote access and real-time monitoring capabilities. This
feature transforms the system from a simple automated setup to a smart, interactive, and user-
centric solution. Users can not only control the lighting system remotely but also customize
settings and receive instant feedback on the system's status, all through a user-friendly
interface.
This project is not just a standalone achievement; it represents a step towards the future of
smart home environments. By successfully combining hardware elements with sophisticated
software, it sets a precedent for what can be achieved in home automation. It's a testament to
how smart technology can be leveraged to not only simplify day-to-day tasks but also
contribute to broader objectives like energy conservation.
Moreover, the project serves as a blueprint for future innovations in the realm of smart
homes. It illustrates the potential of IoT in transforming ordinary household systems into
smart, connected, and highly efficient units, paving the way for more advanced, intuitive, and
sustainable living environments. This initiative, thus, stands as a beacon, highlighting the
24
transformative power of technology in enhancing the quality of life while prioritizing
environmental sustainability.
25
REFERENCES
26
APPENDIX
a) S M A R T L I G H T P R O G R A M
const int relayPin = 13; // Define the pin for the relay module const
int pirPin = 12;// Define the pin for the PIR motion sensor bool
void setup() {
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
timer.setInterval(1000L, checkMotion);
}
27
}
BLYNK_WRITE(V0) {
int buttonState = param.asInt(); if (buttonState ==
1) { // Button pressed, toggle the light lightState = !
lightState; digitalWrite(relayPin, lightState ? HIGH
: LOW); Blynk.virtualWrite(V1, lightState ? 255 :
0);
}
}
28