Saran

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 28

SMART LIGHT USING IOT DASHBOARD

MINOR PROJECT REPORT


Submitted by

SRI SARN S [RA2212045010007]

Under the guidance of

Mr. RANJITH PILLAI R

(Assistant Professor, Department of Mechatronics Engineering)

in partial fulfilment for the award of the degree

of

MASTER OF TECHNOLOGY

in

MECHATRONICS ENGINEERING

of

FACULTY OF ENGINEERING AND TECHNOLOGY

S.R.M. Nagar, Kattankulathur, Kancheepuram District

January 2023

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY


(Under section 3 of UGC Act, 1956)

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

Mr. RANJITH PILLAI R Dr. G. MURALI, M.E., Ph.D.


Guide, Professor & Head of the
Department,
Assistant Professor, Dept. of Mechatronics Engineering
Dept. of Mechatronics Engineering

Signature of the Internal Examiner Signature of the External Examiner

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

FIGURE NO. TITLE PAGE NO.

3.1 ESP32 Board 13


3.2 ESP32 Board pins 13
3.3 Optocoupler Relay 14
3.4 Ultrasonic sensor 16
3.5 Motor Driver Pin Diagram 17
3.6 Optocoupler Relay pin 18
3.7 Circuit diagram 19
4.1 Diagram for ESP32 with PIR sensor 20
4.2 Diagram of relay control 21
4.3 Dashboard diagram 22
4.4 Final set-up 23
4.5 Final set-up 23
4.6 Result Plotted from Various Trials 23

6
LIST OF TABLES

TABLE NO. TITLE PAGE NO.

3.2 Optocoupler relay 14


3.3 Bulb specifications 15
3.4 PIR sensor 16

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.

1.2 Advantages of Internet of Things System

IOT, or the Internet of things, represents a transformative in which everyday


Objects and devices are connected to the internet, allowing them to collect,
Exchange, and process data

Advantages of using this systemmaire as follows:

a) Real-time Monitoring: IoT-enabled systems provide real-time data on water levels,


allowing users to receive immediate updates and make informed decisions.
b) Remote Accessibility: Users can monitor and control water levels from anywhere
with an internet connection, enhancing convenience and accessibility.
c) Data Analysis: IoT technology can collect and analyze historical data, helping users
identify trends and optimize water resource management.
d) Energy Efficiency: IoT-based control systems can optimize pump operation,
reducing energy consumption and operational costs.

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:

 Automated Lighting Control: Implementing IoT and PIR sensor technology to


enable automatic light activation in response to motion, thereby improving energy
usage and convenience.

 Real-time Monitoring and Remote Accessibility: Utilizing IoT capabilities to allow


users to monitor and control their lighting systems remotely, offering enhanced
accessibility and user control.

 Energy Efficiency: Reducing unnecessary power consumption by ensuring lights are


only active when needed, contributing to environmentally friendly and cost-effective
home management.

1.4 Organization of Report:

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.

Tripathy, A. K. Mishra, and T. K. Das, presented at the 2017 International Conference on


Intelligent Computing, Instrumentation and Control Technologies (ICICICT), the authors
proposed a smart road lighting framework that conforms to light output based on usage and
occupancy, i.e., automating the classification of pedestrians, cyclists, cars, and public
transport. The smart road light administration proposes the establishment of a remote-based
framework to remotely track and control the actual energy consumption of the road lights and
take appropriate energy consumption reduction measures through power conditioning and
control. The road light controller should be installed on the pole lights, which consist of a
microcontroller along with other sensors and a remote module1

3. “IOT based smart street light management system” by P. P. F. Dheena, G. S.


Raj, G. Dutt, and

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

Clock Speed 80 MHz

Microcontroller Ten silica 32-bit RISC CPU Xtensa LX106

12
Figure 3.1: ESP32Board

Figure 3.2: ESP32 Board Pins

3.1.2 Optocoupler relay:

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

• Figure 3.3: Optocoupler relay

3.1.2 LED Bulb

A 220V LED bulb is a high-efficiency lighting solution designed for standard


household and commercial electrical systems. It converts electrical energy into
light with minimal energy loss, resulting in lower power consumption compared
to traditional incandescent bulbs. These bulbs are available in various power
ratings, typically ranging from 5W to 20W, and offer a wide spectrum of color

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

A PIR (Passive Infrared) sensor is designed to detect motion by measuring the


infrared light emitted from objects in its field of view. Typically operating within a
voltage range of 5V to 12V DC, these sensors are capable of detecting motion up to
20 feet away within a 120° angle. When motion is detected, they output a digital
HIGH/LOW signal. They are known for their low power consumption and adjustable
sensitivity, making them suitable for various applications including security systems,
automatic lighting, and energy-efficient home automation solutions.

Figure 3.4: Ultrasonic sensor:

Specification Detail

Operating Voltage +5V

Detective Range 6 meters


Sensitivity Adjustable

Operating Current 15mA

Operating Frequency 40Hz


Table 3.4: ultrasonic sensor

16
3.2 Circuit Connections:

3.2.1 PIR Sensor Connection


To connect a PIR (Passive Infrared) sensor, typically you need to connect three pins:

VCC: Connects to the power supply (often 5V).


GND: Connects to the ground.
OUT: Connects to a digital input pin on a microcontroller (like an Arduino).

Figure 3.5: Motor Driver Pin Diagram

3.2.2 Optocoupler relay Connections

Optocoupler relay is connected to ESP8266 board. Relay pin i s shown in


Figure3.6 Connections are as follow:

a) Relay GND pin to ESP8266 board GND pin


b) Relay VCC pin to ESP8266 board VIN pin
c) Relay IN pin to ESP8266 board RX pin

17
Figure 3.6: optocoupler relay
Pin

18
3.3 Circuit Diagram:

Connections are made as mentioned in section 3.2. ESP32 Board is attached to


bread board. PIR sensor, relay and Bulb are then connected using jumper wires.
Circuit diagram for the final set up is shown below in Figure 3.7.

Figure 3.7: Circuit Diagram

3.4 Methodology:

The methodology of smart light project involves integrating an ESP32 micro


controller with a PIR sensor and a relay module to control a 220b bulb, all
coordinator through the Blynk IOT dashboard for remote monitoring and
control. The setup careful hardware assembly, programming of ESP32 and
sensor based and remote triggered lighting control, and configuring the Blynk
dashboard to enable user interaction. The system is rigourously tested and
calibrated for reliable operation before being deployed in a real-world setting,
where its performance and effectiveness in enhancing energy efficiency and
user convenience are continuously monitored.

19
CHAPTER 4

EXPERIMENTATION AND RESULT

This chapter explains how it works.

a) Interfacing PIR sensor with ESP32

PIR (Passive Infrared) sensor is connected to an ESP32 microcontroller, creating a smart


system for motion detection. The ESP32, known for its Wi-Fi capabilities, can process the
signal from the PIR sensor and perform actions or send alerts based on motion detection. This
setup is ideal for applications such as automated lighting, security systems, or energy-saving
solutions in smart homes or buildings. The integration of the PIR sensor with the ESP32
allows for both local processing and remote monitoring or control via the internet, harnessing
the power of IoT (Internet of Things). connection is shown in Figure 4.1

Figure 4.1 Diagram for ESP32 with PIR sensor:


b) Bulb Control

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

Figure 4.2: Diagram of relay Control


b) Dashboard connection the Blynk dashboard serves as a user-friendly interface
for remote control and monitoring. Blynk, a popular IoT platform, allows you to
create custom dashboards with widgets to control and display data from your
ESP32-connected devices. In your project, you can use Blynk to turn the light
on or off, adjust settings, and monitor the system's status, such as whether the
light is currently on or if motion has been detected. This interactive dashboard
enhances the usability and accessibility of your smart lighting system, offering
real-time control from any location with an internet connection. .dash board
shown in fig 4.3

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

[1]. A. K. Sikder, A. Acar, H. Aksu, A. S. Uluagac, K. Akkaya and M. Conti, "IoTenabled


smart lighting systems for smart cities," 2018 IEEE 8th Annual Computing and
Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 2018, pp.
639645, doi: 10.1109/CCWC.2018.8301744.
[2]. A. K. Tripathy, A. K. Mishra and T. K. Das, "Smart lighting: Intelligent and weather
adaptive lighting in street lights using IOT," 2017 International Conference on Intelligent
Computing, Instrumentation and Control Technologies (ICICICT), Kerala, India, 2017, pp.
1236-1239, doi: 10.1109/ICICICT1.2017.8342746.
[3]. P. P. F. Dheena, G. S. Raj, G. Dutt and S. V. Jinny, "IOT based smart street light
management system," 2017 IEEE International Conference on Circuits and Systems (ICCS),
Thiruvananthapuram, India, 2017, pp. 368-371, doi: 10.1109/ICCS1.2017.8326023.
[4]. F. J. Montalbo and E. Enriquez, "An IoT Smart Lighting System for University
Classrooms," 2020 International Symposium on Educational Technology (ISET), Bangkok,
Thailand, 2020, pp. 3-7, doi: 10.1109/ISET49818.2020.00011.
[5]. O. Ayan and B. Turkay, "IoT-Based Energy Efficiency in Smart Homes by Smart
Lighting Solutions," 2020 21st International Symposium on Electrical Apparatus &
Technologies (SIELA), Bourgas, Bulgaria, 2020, pp. 1-5, doi:
10.1109/SIELA49118.2020.9167065.
[6]. S. Nagamani, J. M. Reddy, G. Lavanya and A. L. Hari Chandana, "Smart Street Light
Management System Using Internet of Things," 2019 International Conference on Intelligent
Computing and Control Systems (ICCS), Madurai, India, 2019, pp. 103-107, doi:
10.1109/ICCS45141.2019.9065477.

26
APPENDIX

a) S M A R T L I G H T P R O G R A M

#define BLYNK_PRINT Serial


#define BLYNK_TEMPLATE_ID "TMPL3HiFfrjqK"
#define BLYNK_TEMPLATE_NAME "Quickstart Template"
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>

char auth[] = "zgs-fuD1amG-AKHyL57w_bGnioNvxwYD"; // Replace with your Blynk auth


token char ssid[] = "Aldoo"; // Replace with your WiFi SSID char pass[] = "123456788";
// Replace with your WiFi password

const int relayPin = 13; // Define the pin for the relay module const

int pirPin = 12;// Define the pin for the PIR motion sensor bool

lightState = false; BlynkTimer timer;

void setup() {
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);

pinMode(relayPin, OUTPUT); pinMode(pirPin,


INPUT);

Blynk.virtualWrite(V1, lightState ? 255 : 0); // Initialize the LED widget

timer.setInterval(1000L, checkMotion);
}

void loop() { Blynk.run();


timer.run();

27
}

void checkMotion() { int motion =


digitalRead(pirPin); if (motion ==
HIGH) { if (!lightState) {
// Motion detected, turn on the light
digitalWrite(relayPin, HIGH); lightState
= true; Blynk.virtualWrite(V1, 255);
Blynk.virtualWrite(V0, 1);
}
} else {
if (lightState) {
// No motion, turn off the light
digitalWrite(relayPin, LOW); lightState
= false; Blynk.virtualWrite(V1, 0);
Blynk.virtualWrite(V0, 0);
}
}
}

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy