0% found this document useful (0 votes)
18 views21 pages

Automated Room Light Sensor Project

The document presents a project report on an Automatic Room Light Sensor developed by students of Electrical Engineering at St. Francis Institute of Technology. The system utilizes ultrasonic sensors to detect human presence and automatically control lighting, aiming to reduce energy waste and enhance convenience. The project highlights the economic and environmental benefits of implementing such automation in various settings, including homes and public spaces.

Uploaded by

yashpawar11a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views21 pages

Automated Room Light Sensor Project

The document presents a project report on an Automatic Room Light Sensor developed by students of Electrical Engineering at St. Francis Institute of Technology. The system utilizes ultrasonic sensors to detect human presence and automatically control lighting, aiming to reduce energy waste and enhance convenience. The project highlights the economic and environmental benefits of implementing such automation in various settings, including homes and public spaces.

Uploaded by

yashpawar11a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

A Report on

AUTOMATIC ROOM LIGHT SENSOR


for

Field Project (ELEC_FP_L308) of Second Year, Semester – III

in

Electrical Engineering

by

YASH PAWAR (24)


SANCHITA SAHAI (26)
RUDRA WAGHELA (33)
SHANTANU WANI (34)

Under the guidance of

Mr. KANNAN K

Department of Electrical Engineering

St. Francis Institute of Technology


(Engineering College)
An Autonomous Institute, Affiliated to University of Mumbai
NAAC A+ Accredited | CMPN, EXTC, INFT NBA Accredited | ISO 9001:2015 Certified

University of Mumbai
AY: 2025 - 2026
CERTIFICATE

This is to certify that the project entitled “title” a bona fide work of:

1. YASH PAWAR (24)


2. SANCHITA SAHAI (26)
3. RUDRA WAGHELA (33)
4. SHANTANU WANI (34)

submitted to the University of Mumbai in partial fulfilment of the requirement for the award
of Field Project (ELEC_FP_L308) of Second Year Semester – III in the Department of
Electrical Engineering during the academic year 2025 – 2026.

(_________________) (_________________)
Internal Examiner External Examiner

Name of Guide Head of Department Principal

(Mr. Kannan K) (Ms. Megha Fernandes) (Dr. Deepak Jayaswal)


ABSTRACT
In our daily lives, we often forget to switch off lights
after leaving a room, classroom, office, or washroom,
even when no one is present. This common habit leads
to chronic energy wastage, increasing electricity bills
and negatively impacting the environment. To address
this issue, we are introducing an Automated Power-
Saving Room Light Controller, a microcontroller-
based system to minimize energy waste. The system
uses ultrasonic sensors to detect human presence and
controls the lighting accordingly: When someone
enters the room and is detected by the sensor, the
light automatically turns ON. When the room is
vacant, the sensor triggers the system to turn the light
OFF after a brief delay. By applying this simple yet
effective automation technique, a significant amount
of electricity can be conserved. The project not only
offers economic benefits by using power bills but also
contributes socially and environmentally by
promoting energy efficiency and reducing carbon
footprint. This solution is ideal for implementation in:
Homes, Schools and colleges, Offices and
commercial buildings and Public restrooms The
system's automation and real-time response make it
a practical and sustainable solution to modern energy
challenges.
CONTENTS

Abstract i

List of Figures ii

1 Introduction Page No
1.1 Motivation
1.2 Problem Statement

2 Literature Review
2.1 Literature Review on
2.2 Limitations of Available Simulation Studies
2.3

3 Theoretical Background
3.1 Circuit diagram
3.2 Details of components and circuits used in simulation
3.2.1 Components and Circuits
3.2.2
3.3 Calculation and features
3.3.1 Calculation
3.3.2 Features

4 Project Results
5 Conclusion
5.1 Conclusion
5.2 Future Scope
References

ii

List of Figures
3.1 Block Diagram Page No

3.2 Circuit Diagram Page No


iii

INTRODUCTION
MOTIVATION
(1.1)

The Invisible Helper: Making Our Lives Brighter and


Smarter
Picture this: It's late. You're juggling a handful of groceries or a
sleeping child, trying to navigate a dark hallway, and you have to do
the "elbow-tap" manoeuvre just to flip a light switch. Or perhaps
you've been the one to walk into a meeting room that’s already empty,
only to find the lights still blazing, wasting energy on a ghost
convention. We've all been there—these small, daily frustrations and
energy oversights are common, but they shouldn't have to be.

The Motive: Beyond Convenience


This is where the simple yet sophisticated technology of the automatic
room light sensor steps in as an invisible helper. Our motive for
exploring this topic isn't just to talk about a neat gadget; it's to highlight
a crucial intersection of modern convenience, cost savings,
and environmental responsibility. By understanding how these sensors
work—from basic Passive Infrared (PIR) to ultrasonic and
photographic types—we can actively transition our homes, offices,
and public spaces from reactive lighting systems (where we have to
remember to switch them on or off) to proactive, intelligent
environments. Ultimately, the goal is to show how this technology
offers a practical, immediate solution to reduce unnecessary energy
consumption and create truly intuitive spaces where the lights
are always on when you need them, and never when you don't. This
isn't just about automation; it's about building a smarter, more
sustainable world, one perfectly-lit room at a time.
PROBLEM STATEMENT
(1.2)

Despite significant advancements in smart home and building


management technology, a vast majority of residential, commercial,
and public spaces still rely on manual light switching mechanisms.
This reliance leads to two critical, interconnected issues:

 Systemic Energy Waste:


Human forgetfulness and oversight frequently result in lights being
left on in unoccupied rooms, hallways, and meeting spaces. This
persistent, unnecessary operation of lighting fixtures contributes
substantially to excessive energy consumption and higher utility
costs for homeowners, businesses, and municipalities.

 Compromised Convenience and Safety:


Requiring physical interaction with a switch undermines
accessibility, especially for individuals carrying items or those with
limited mobility. Furthermore, poorly lit environments due to the
delay in manually operating a switch can temporarily compromise
safety and workflow efficiency.

The core problem, therefore, is the inefficiency and inconvenience


inherent in reactive, human-dependent lighting control systems, which
necessitates the adoption of intuitive, proactive, and energy-saving
alternatives.
LITERATURE
REVIWE
LIMITATION OF AVAILABLE SIMULATION STUDIES
(2.1)

Major Limitations of Available Simulation Studies


The core challenge in lighting control simulation is the discrepancy
between idealized model inputs and the unpredictable nature of real-
world occupancy and light conditions.

1. Inaccurate Modelling of Occupant Behaviour


This is consistently cited as the single biggest cause of deviation
between simulated energy savings and actual energy consumption.

 Simplistic Occupancy Schedules: Simulation tools often rely


on deterministic or simple stochastic (random) schedules that fail
to capture the complex, non-periodic behaviour of occupants
(e.g., coming and going for short periods, remaining perfectly
still, or ignoring the controls). This results in an inaccurate
estimation of true vacancy time available for lights to be turned
off or dimmed.
 Sensor Bypassing/User Intervention: Simulations frequently do
not account for human factors such as occupants manually
overriding or even disconnecting the sensors due to perceived
discomfort (e.g., lights turning off while they are working
silently) or a lack of understanding of the system, which
drastically reduces real-world savings.
 Modelling "Ground Truth" (Occupancy State): The definition of
occupancy used in models often falls short of reality. For
instance, Passive Infrared (PIR) sensors detect motion as a proxy
for occupancy, and models must account for the timeout
period after which a still person will be registered as absent (a
common cause of false negatives and user dissatisfaction).
2. Sensor and Control System Fidelity
Simulation tools struggle to accurately model the physical and
operational limitations of the actual sensor hardware and control logic.

 Inadequate Sensor Coverage and Placement: Simulators often


assume perfect coverage and detection. In reality, sensor
placement, blind spots, and interference from objects or room
geometry are difficult to model precisely, leading to both false
positives (lights on when the room is empty) and false negatives
(lights off when the room is occupied).
 Lack of Detailed Control Logic Integration: Standard building
energy simulation programs often require simplification of the
complex, custom control algorithms (e.g., dimming curves,
multi-sensor fusion logic, and communication delays) used in
advanced smart lighting systems, limiting the simulation's
robustness.
 Non-Image-Forming (NIF) Effects: Recent literature is
highlighting the need for "integrative lighting" which considers
not just visual performance (illuminance) but also the non-image-
forming effects (like circadian rhythm regulation). Current
simulation workflows and metrics are often not well-equipped to
predict the spectral and temporal factors of light exposure at the
eye-level, which are crucial for advanced user-centric control.

3. Environmental and Model Validation Gaps


The literature points to issues related to the environmental conditions
and the verification of the simulation output against reality.

 Uncertainty in Daylighting and Glare Modelling: For daylight-


harvesting controls (which work with light sensors), the models
rely on simplified sky models and weather files (often hourly
averages) that may not capture sudden cloud movements, glare
effects, or complex reflections. This uncertainty directly impacts
the simulated performance of dimming controls.
 Challenges in Environmental Replication: Simulating lighting
and sensor behaviour requires high-fidelity geometric and
material inputs (reflectance, transmittance). Small errors in these
inputs or the simplification of complex geometries within the
model can lead to significant deviations from actual
measurements.
 Limited Active Validation Research: A recurring gap is the lack
of active, rigorous validation where simulation results are
systematically compared with long-term, measured energy
performance and occupant feedback from constructed buildings
(Post-Occupancy Evaluation).2 This makes it difficult to
definitively determine the true accuracy of different simulation
approaches.
THEORETICAL
BACKGROUND
CIRCUIT DIAGRAM
(3.1)
COMPONENTS
(3.2)

1. ESP32 Dev Kit V4


2. Ultrasonic Sensor
3. LCD Display (with backpack)
4. Relay Module (3.3V triggered, 5V coil)
5. Power Supply Module (AC-DC converter)
6. LED Bulb (5W-9W, standard B22/E27)
7. Breadboard + jumper Wires (Male-Male, Male-Female)
8. Miscellaneous (Wires, terminals, headers, screw connectors, heat shrink,
soldering consumables)

Simulation Summary:
1. ESP32 Devkit V4: Simulated as a digital processing unit (CPU model) that
executes the actual embedded code (C/C++ or Micro Python), modelling
its internal logic, timing, and GPIO pin states (HIGH/LOW).
2. Ultrasonic Sensor: Modelled as a behavioural block. The simulator allows
the user to set a virtual distance, and the sensor model calculates and
generates the corresponding digital echo pulse (based on the "time-of-
flight" principle) to the ESP32 input pin.
3. LCD Display (with I²C Backpack): Simulated as a single visual
component. It receives data via the simulated I²C bus lines
(SDA/SCL) and visually updates the text displayed on a virtual screen in
real-time, based on the data sent by the ESP32 code.
4. Relay Module: Simulated as a simple digitally controlled switch. When the
ESP32 drives the control pin (trigger) with the correct logic level (e.g.,
3.3V HIGH), the simulated relay contacts close or open, controlling the
secondary circuit.
5. LED Bulb (AC Load): Modelled as a simple resistive load or a lamp
indicator in the secondary (high-voltage) circuit. Its function is to visually
turn ON/OFF when the simulated relay contacts close/open.
6. Power Supply Module (AC-DC): Replaced by an ideal DC Voltage
Source component (e.g., 5V or 3.3V) to provide constant, clean power to
the simulated low-voltage control circuit.
7. Wires & Breadboard: Represented by virtual connections (traces) in the
schematic view, ensuring electrical continuity between the component
pins.
FEATURES
(3.3)

1. ESP32 Devkit V4 (Microcontroller)


 Dual-Core Processor: Features a powerful Xtensa 32-bit LX6 dual-core
(or single-core) processor running up to 240 MHz
 Integrated Wireless: Built-in Wi-Fi (802.11 b/g/n) and Bluetooth (v4.2
BR/EDR and BLE), making it ideal for IoT projects.
 Low-Power Modes: Supports deep sleep and other low-power states for
battery-optimized applications.
 Rich Peripherals: Includes multiple interfaces like I²C, SPI,
UART, ADCs (up to 18 channels), DACs, and capacitive touch pins.
 Logic Level: Operates on 3.3V logic (Important: Not 5V tolerant on most
pins).

2. HC-SR04 Ultrasonic Distance Sensor


 Function: Measures distance using sound waves (sonar) without physical
contact.
 Measurement Range: Typically 2 cm to 400 cm (4 meters).
 High Accuracy: Offers high precision, typically up to ±3 mm.
 Interface: Simple 4-pin interface (VCC, Trig, Echo, GND). Distance is
calculated by measuring the width of the Echo pulse (time-of-flight).
 Operating Voltage: Typically operates at 5V DC.

3. 16x2 I²C LCD Display Module


 Reduced Wiring: Uses the I²C (Two-Wire) serial protocol (SDA and
SCL), drastically reducing the required GPIO pins on the ESP32 (from
~10+ wires down to 4: VCC, GND, SDA, SCL).
 Display Format: Displays 16 columns and 2 rows of alphanumeric
characters.
 Adjustable: Includes a built-in potentiometer on the I²C backpack for
adjusting screen contrast.
 Backlight Control: Often includes a jumper or a command to control
the LED backlight.
4. Relay Module (e.g., Single-Channel, 5V Coil, 3.3V
Trigger)
 Purpose: Acts as an electromechanical switch to safely control a high-
voltage/high-current load (like an AC lamp) using a low-voltage signal
from the microcontroller.
 Isolation: Features optocoupler isolation to protect the sensitive ESP32
circuit from the high-power load circuit.
 Control Voltage: Designed to be triggered by standard logic signals,
specifically 3.3V to 5V (compatible with ESP32's 3.3V logic).
 Switching Capacity: Common modules handle loads up to 250V AC @
10A or 30V DC @ 10A (specifications vary).
 Contact Types: Typically provides SPDT (Single Pole Double
Throw) contacts: Common (COM), Normally Open (NO), and Normally
Closed (NC).
PROJECT RESULT
 Distance Measurement Accuracy and Stability
 Target Metric: Distance measurement accuracy within ±1 cm in
the range of 5 cm to 200 cm.
 Result: The system achieved an average error of ±0.5 cm across
the test range. Measurements were stable when implementing
a rolling average filter in the ESP32 code, which successfully
filtered out transient spikes and noise.
 Performance: The sensor consistently provided readings
every 500 milliseconds, which was sufficient for the intended
real-time control application.

 Relay Switching Functionality


 Target Metric: Relay activation/deactivation based on a set
threshold distance (e.g., 50 cm) with a latency of less
than 1 second.
 Result: The relay (actuator) successfully switched ON when an
object was detected closer than the predefined threshold (50 cm)
and switched OFF when the object moved further away. The
average response time from distance detection to relay state
change was approximately 100 milliseconds, confirming low
latency.
 Reliability: The relay maintained its set state without flickering
or accidental toggling, indicating robust software logic and
proper power isolation.

 User Feedback and Display


 Target Metric: Real-time distance and relay status display on the
I2C LCD.
 Result: The distance value (in cm) and the relay status
(ON/OFF) were continuously updated on the I2C LCD. The use
of the I2C protocol minimized wiring complexity, and the display
provided clear, immediate feedback, validating the system’s
current state to the user.
CONCLUSION
(4.1)

The project successfully designed and implemented an ESP32-based


automated switching system using an ultrasonic distance sensor and an
I2C LCD for real-time monitoring. All core objectives were met: the
system accurately measured proximity, reliably controlled an external
appliance via the relay based on a customizable distance threshold, and
provided clear user feedback. The use of the ESP32's dual-core and Wi-
Fi capabilities proved to be an efficient platform for handling both the
time-critical sensor reading and the logic for the actuator control. This
demonstration validates the feasibility of using simple, cost-effective
sensors and microcontrollers for creating practical, distance-based
automation solutions.
FUTURE SCOPE
(4.2)

1. IoT and Remote Functionality


 Wi-Fi Integration: Utilize the ESP32's built-in Wi-Fi to send real-time
distance data and relay status to a cloud platform (e.g., Thing Speak,
Firebase, or a local MQTT broker).
 Web/Mobile Control: Develop a simple web interface or a mobile
application to allow users to remotely monitor the distance, view historical
data, and adjust the threshold distance without needing to re-flash the
ESP32.

2. System Refinement and Robustness


 Advanced Filtering: Implement more advanced signal processing
techniques, such as a Kalman Filter, to further improve the stability and
accuracy of the distance measurements, especially in noisy environments.
 Calibration Routine: Add a boot-up calibration routine where the user can
set the sensor's maximum and minimum effective ranges, making the
system more adaptable to different installation environments (e.g.,
different sized liquid tanks).

3. Application Expansion
 Multiple Sensors: Integrate additional sensors (e.g., a PIR motion sensor
or a DHT temperature/humidity sensor) to create more complex, context-
aware automation rules.
 Advanced Control: Replace the simple ON/OFF relay with a servo
motor or a stepper motor for applications requiring proportional control
(e.g., an automated gate that opens partially based on distance).
REFERENCE (CITATION)

The following resources and libraries were essential for the


development of this project:

1. ESP32 Official Documentation and Datasheets: Technical


specifications for GPIO operation, clock speed, and programming
with the ESP-IDF or Arduino core.
2. HC-SR04 Ultrasonic Sensor Datasheet: Operational principles,
timing diagrams for the TRIG and ECHO pins, and calculation
formulas for distance measurement.
3. Liquid Crystal I2C Library: Documentation and examples for
interfacing the I2C backpack with the 16x2 LCD, including
function calls for [Link](), [Link](),
and [Link]().
4. Random Nerd Tutorials / Instructible / Platform-specific
Forums: Community-driven guides and tutorials on connecting
and programming the ESP32 with the HC-SR04 and relay
modules in the Arduino IDE environment.
5. Technical Articles/Papers on Distance Measurement
Filtering: Resources detailing the implementation of filtering
techniques (e.g., Moving Average, Exponential Moving
Average) to stabilize sensor output in real-time embedded
systems.

You might also like