A Mini Project Report
on
“Smart Door Identification system”
A Mini Project Report Submitted
In Partial Fulfillment for the Requirement
for the Degree of
BACHELOR OF TECHNOLOGY
in
ELECTRICAL ENGINEERING
(Session 2024-2025)
Submitted by
Saurabh Singh (2207340200047)
Saurabh Yadav (2207340200048)
Shani Kumar (2207340200049)
Shivam Kumar (2207340200051)
Shivam Kushwaha (2207340200052)
Under the Supervision of
MR. ASHISH SRIVASTAVA
(Assistant Professor)
RAJKIYA ENGINEERING COLLEGE BANDA
(Affiliated to Dr. A. P. J. Abdul Kalam Technical University, Lucknow (U.P.), India)
1
ACKNOWLEDGEMENT
It gives us a great sense of pleasure to present the report of the B. Tech Mini Project. I
would special debt of gratitude to designation, Mr. Ashish Srivastava , Department of
Electrical Engineering, Rajkiya Engineering College Banda for his constant support and
guidance throughout the course of our work.
We also do not like to miss the opportunity to acknowledge the contribution of all faculty
members of the department for their kind assistance and cooperation during the
development of our project. Last but not least we acknowledge our family and friends for
their contribution in the completion of the project.
Name-
Sign.-
Saurabh Singh (2207340200047)
Saurabh Yadav (2207340200048)
Shani Kumar (2207340200049)
Shivam Kumar (2207340200051)
Shivam Kushwaha (2207340200052)
Date-
ii
CERTIFICATE
On the basis of a declaration submitted by Saurabh Singh(2207340200047), Saurabh Yadav
(2207340200048), Shani Kumar(2207340200049), Shivam Kumar(2207340200051), Shivam
Kushwaha(2207340200052), student of (3rd Semester) B. Tech (EE), I hereby certify that the
report titled “Smart Door Identification System” which is submitted to the Department of
ELECTRICAL ENGINEERING, is an original contribution with the exciting knowledge and
faithfully record of research carried out by them under my guidance and supervision. To the best
of my knowledge this work has not taken submitted in part or full for any Degree to this
University or elsewhere.
Place-Banda Mr. Ashish
Srivastava
Date-
iii
ABSTRACT
The intensity control system presented in this project offers an innovative approach to
managing AC loads, emphasizing precision, scalability, and cost-effectiveness. Utilizing a 4-
channel relay module, the system supports independent control of multiple loads, providing
flexibility in applications. The integration of voltage and current sensors enables accurate real-
time measurement of electrical parameters, such as voltage, current, and power consumption.
These parameters are processed by the ESP32 microcontroller, which acts as the system's central
processing unit, coordinating sensor inputs and controlling outputs to achieve desired intensity
levels.The real-time data captured by the sensors is displayed on an OLED screen, ensuring an
intuitive user interface for monitoring system performance and making informed decisions about
power usage.
The system’s scalability is one of its most significant strengths. By leveraging the
processing power of the ESP32, additional sensors or load channels can be integrated with
minimal modifications. The ESP32 also enables wireless connectivity through Wi-Fi and
Bluetooth, paving the way for remote monitoring and control. This capability enhances the
system’s versatility, making it suitable for both residential and industrial environments.By
providing precise control over power delivery to loads, the system minimizes energy wastage
and optimizes consumption. This is particularly relevant in scenarios where energy conservation
is a priority, such as in green buildings or energy-conscious industrial operations. The continuous
monitoring and reporting of power parameters also help identify inefficiencies, enabling
proactive measures to reduce consumption. The choice of components further underscores the
cost-effective nature of the design. The 4-channel relay module, and sensors are all readily
available and affordable, making the system accessible for widespread adoption.
0
TABLE OF CONTENT
Chapter 1. Introduction 1
Chapter 2. Hardware Description 2-7
2.1 ESP 32 2
2.2 Solenoid Lock 3
2.3 NPN Transistor 3- 4
2.4 Voltage Regulator 4
2.5 Resistor 4-5
2.6 Capacitor 5
2.7 Push Bootton 6
2.8 12V DC Adaptor 6
2.9 Bread Board 7
2.10 Connection Diagram 7
Chapter 3. Principle or Methodology & Advantages 8
Chapter 4. Result & Conclusion , Output and Estimate 9-10
4.1 Result&Conclusion 9
4.2 Output 10
4.3 Estimate 10
Chapter 5. Reference 11
Annexure 12-14
1
CHAPTER-1
INTRODUCTION
Energy efficiency and precise load control are fundamental requirements in modern
electrical and electronic systems. These features are particularly critical in applications like smart
lighting, where the ability to finely tune intensity contributes to both user comfort and energy
conservation. Similarly, industrial automation systems rely on precise control mechanisms to
optimize operational efficiency and reduce energy consumption. This report introduces an
innovative intensity control system designed to meet these demands effectively.The growing
emphasis on sustainability and energy conservation has increased the need for systems capable
of real-time monitoring and adaptive control.This control system addresses these needs by
offering a sophisticated platform that can measure and adjust power delivery dynamically.
Such capabilities are vital in maintaining the balance between performance and energy
efficiency. A distinctive feature of this system is its ability to continuously monitor power
parameters, such as voltage, current, and power consumption, ensuring accurate feedback for
load adjustments. Furthermore, the system supports multi-load configurations, allowing it to
manage several devices simultaneously. This flexibility makes it suitable for a wide range of
applications, from residential energy management to industrial process control.Through the
integration of real-time data processing and precise load control, this system demonstrates a
significant leap forward in the management of electrical loads, paving the way for smarter and
more sustainable energy usage. The system’s scalability is one of its most significant strengths.
By leveraging the processing power of the ESP32, additional sensors or load channels can be
integrated with minimal modifications.
2
CHAPTER 2
HARDWARE DESCRIPTION
2.1 ESP 32
The ESP32 microcontroller is a powerful and versatile platform, central to the design and
implementation of modern intensity control systems. Known for its robust processing
capabilities and wireless connectivity options, the ESP32 enables precise load
management and real-time data monitoring. This system leverages the ESP32 to handle
critical tasks such as data acquisition from sensors, processing of power parameters, and
seamless control of connected loads. It offers wireless connectivity for remote monitoring
and control via Wi-Fi or Bluetooth.
How to Program ESP 32.
Our preferred method to program the ESP32 is with C/C++ “Arduino programming
language”. We also have some guides and tutorials using MicroPython Firmware.
Fig.2.1 ESP 32
2.2 Current and Voltage Sensor
2.2.1 ACS712- The ACS712 is a fully integrated, hall effect-based linear current sensor
with 2.1kVRMS voltage isolation and a integrated low-resistance current conductor.
Technical terms aside, it’s simply put forth as a current sensor that uses its conductor to
calculate and measure the amount of current applied.
3
Fig.2.2 ACS712
2.2.1 ZMPT101B- ZMPT101B AC Single Phase voltage sensor module is crafted
around the high-precision ZMPT101B voltage transformer, making it an exceptional
choice for DIY projects that demand accurate AC voltage measurements.
Fig.2.3 ZMPT101B
2.3 Channel Relay Module
A versatile 4-channel isolated relay module designed for easy control by various
microcontrollers like Arduino, AVR, PIC, ARM, and more. With a maximum contact capacity of
AC250V 10A and DC30V 10A, it can efficiently handle a variety of appliances and equipment
with high current requirements.
4
Fig.2.4 4 Channel Relay Module
2.4 OLED Display
An OLED (Organic Light-Emitting Diode) display module is a screen technology known for its
vibrant colors, deep blacks, and energy efficiency. Unlike traditional LCDs, OLED displays do
not require a backlight because each pixel emits its own light. This enables thinner, more flexible
displays and enhances contrast and viewing angles.
Fig.2.5 OLED Display
2.5 Jumper Wire
A jumper wire is a short length of wire used to make electrical connections between different
points in a circuit. It's commonly used in prototyping and for connecting components in a
breadboard or circuit without the need for soldering. Jumper wires typically have connectors at
both ends that fit into a breadboard or the pins of electronic components.
5
CHAPTER 3
PRINCIPLE OR METHODOLOGY
3.1 Methodology
This methodology outlines the design and implementation of an intensity control system
for AC loads with power measurement capabilities. The system uses an ESP32 microcontroller
as the central processing unit, a 4-channel relay module for controlling multiple loads, voltage
and current sensors for real-time power measurement, and an OLED display for visual
feedback.
Power consumption of each load is measured using voltage and current sensors. The
ESP32 microcontroller coordinates the system's functions, and an OLED display provides
real-time power measurements and system status.
3.1.1 Voltage and Current Measurement:
Program the ESP32 to read data from the voltage and current sensors. The ESP32 will
sample these sensors at regular intervals to determine the real-time voltage and current.
The voltage measurement will be used to calculate the instantaneous voltage, while the
current measurement will be used to calculate the instantaneous current.
3.1.2 Power Calculation:
The power consumption Power of the load is calculated using the formula:
P=V×I×cos(ϕ)
o V is the measured voltage across the load.
o I is the measured current through the load.
o Cos(ϕ) is the power factor
3.1.3 OLED Display Interface:
The ESP32 will display real-time information on the OLED display. This will include:
o The measured voltage and current.
o The calculated power consumption.
o The current intensity control setting (e.g., percentage of maximum intensity).
6
CHAPTER 4
CIRCUIT DIAGRAM
4.1 Explanation
The system leverages an ESP32 microcontroller as the central processing unit. The ESP32
coordinates all tasks, including data acquisition, processing, and load control. A 4-channel relay
module is connected to the ESP32, enabling it to switch and control multiple AC loads
independently. This modular approach offers flexibility in managing various devices or systems.
To measure power consumption, voltage and current sensors are used. These sensors capture
real-time data on electrical parameters, including voltage and current levels for each load. The
ESP32 processes this data to calculate power consumption, providing an accurate representation
of the system's energy usage. An OLED display serves as the user interface, presenting real-time
information about system status and power measurements. The display ensures that users can
monitor the operation and make informed decisions, such as adjusting the intensity of loads or
identifying inefficient devices.
Fig.4.1 Circuit Diagram
7
CHAPTER 5
ADAVANTAGES AND APPLICATIONS
5.1 Advantages
5.1.1 Precise Control of AC Load Intensity:
The Capacitor allows for smooth phase angle control of the AC load, enabling precise
control over the intensity (brightness, speed, etc.) of the connected devices.
5.1.2 Real-time Power Measurement:
With the integration of voltage and current sensors, real-time power consumption can
be measured accurately. This provides valuable feedback on energy usage, helping users
optimize their consumption.
5.1.3 Cost-Effective and Efficient:
ESP32, a low-cost microcontroller with built-in Wi-Fi, enables easy integration into
existing systems, and the use of the 4-relay module allows control of multiple loads,
making the system scalable and cost-effective.
5.1.4 Energy Efficiency:
The ability to measure and control the power consumption of various loads can lead to
better energy management, contributing to energy savings and optimized usage of
electrical devices.
5.1.5 Safety and Protection:
The system can incorporate overload protection and safety features. For instance,
voltage and current sensors can help detect dangerous conditions like overcurrent or
overvoltage, allowing the system to automatically cut power or provide warnings.
8
5.1.6 User-Friendly Interface:
The OLED display provides an intuitive and easily readable interface, allowing users to
monitor the system’s performance in real time. The display shows power usage, intensity
levels, and other critical data.
5.2 Applications
5.2.1 Lighting Control Systems:
Application: This system can be used for dimming lights in residential, commercial, or
industrial environments. The phase control through the Capacitor allows for smooth
adjustment of light intensity, while the voltage and current sensors provide feedback on
power consumption.
5.2.2 Motor Speed Control:
Application: By adjusting the intensity (voltage) supplied to motors (e.g., fans, pumps,
or fans), this system can regulate motor speeds. It ensures efficient energy consumption
and proper operation across varying load conditions.
5.2.3 Energy Monitoring Systems:
Application: This system can be applied in smart homes or industrial setups to monitor
energy usage across multiple loads. By continuously measuring voltage, current, and
power, the system can track energy consumption and offer insights into usage patten.
CHAPTER 6
9
CONCLUSION
In conclusion, the ESP32-based intensity control system using the voltage and current
sensors, and the 4-relay module provides a highly efficient solution for controlling and
monitoring the power consumption of AC loads. The system successfully demonstrated precise
phase angle control to adjust the intensity of the load, offering smooth and continuous
variations in power. Real-time power measurement, achieved through the voltage and current
sensors, enabled accurate tracking of energy usage, which was displayed on the OLED screen
for user convenience. The use of the ESP32 microcontroller allowed for remote control and
monitoring, enhancing the system's flexibility and scalability for multiple applications such as
lighting control, motor speed regulation, and energy monitoring.
With its ability to provide both control and real-time feedback on energy consumption,
the system is well-suited for integration into smart home and industrial automation
environments, offering both energy efficiency and user convenience. Overall, the project
highlights the potential of combining modern microcontroller technology with power
measurement and control for optimizing energy usage and improving the functionality of
everyday electrical system. This system can be used for dimming lights in residential,
commercial, or industrial environments.The voltage and current sensors provide feedback on
power consumption.
10
CHAPTER 7
REFERENCES
1. P. Mircea and C. Costin, "Energy Consumption Saving Solutions Based On Intelligent Street
Lighting Control System", U. P.B. Sci. Bull. Series C, vol. 73, no. 4, pp. 297-308, 2011.
2. G.R.N. Anca, D. Galasiu, Cristian Suvagau and Daniel M. Sander, "Energy saving lighting
control systems for open-plan offices: a field study", vol. 4, pp. 7-29, July 2007.
3. Frank Lautner, Mark-M. Bakran “Optimisation and Real Life Challenges of an Integrated
Parasitics Based Current Measurement System”2019 21st European Conference on Power
Electronics and Applications (EPE '19 ECCE Europe).
4. Bhushan Chaudhari, Nachiket Shinde, Gitesh Yelave, Ganesh Sonawane, Kushal Borse”
Real-Time Electricity Bill Management System Using IoT” 2023 International Conference on
Emerging Smart Computing and Informatics (ESCI).
5. D.S. Kim, S.Y. Son and J. Lee, "Developments of the in-home display systems for
residential energy monitoring", IEEE Trans. Consumer Electron, vol. 59, no. 3, pp. 492-498,
August 2013.
11
ANNEXURE I
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <WiFi.h>
#include <ESPAsyncWebServer.h>
// Pin definitions
#define CURRENT_SENSOR_PIN 35 // ACS712
#define OLED_SDA_PIN 21 // I2C SDA
#define OLED_SCL_PIN 22 // I2C SCL
// GPIO pins for LEDs
const int led1 = 2;
const int led2 = 4;
// Constants for current calculation
#define CURRENT_OFFSET 2.5 // Offset for ACS712 (2.5V corresponds to 0A)
#define CURRENT_CALIBRATION 30.0 // Calibration factor for current (can be adjusted)
// Fixed voltage (in this case, 220V for display)
#define FIXED_VOLTAGE 220.0 // Fixed AC voltage for display (in Volts)
// Wi-Fi credentials
const char *ssid = "oooooooo"; // Replace with your network SSID
const char *password = "000000000"; // Replace with your network password
// Create an instance of the OLED display
Adafruit_SSD1306 display(128, 64, &Wire, -1); // OLED display initialization
// Web server setup
AsyncWebServer server(80);
// Global variables to hold data
float currentValue = 0.0;
float powerValue = 0.0;
int sliderValue = 0; // Slider value
void updateLEDStates(int value) {
if (value >= 0 && value <= 20) {
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
} else if (value > 20 && value <= 70) {
digitalWrite(led1, HIGH);
digitalWrite(led2, LOW);
} else if (value > 70 && value <= 100) {
digitalWrite(led1, LOW);
12
digitalWrite(led2, HIGH);
}
}
void setup() {
// Initialize Serial Monitor
Serial.begin(115200);
// Initialize OLED display
Wire.begin(OLED_SDA_PIN, OLED_SCL_PIN);
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
while (1); // Halt if OLED fails
}
display.display();
delay(2000); // Wait for the display to initialize
// Display startup message on OLED
display.clearDisplay();
display.setTextSize(1.7);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 0);
display.println("Initializing...");
display.display();
// Initialize LEDs
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("\nConnected to Wi-Fi");
// Set up the web server to serve the dashboard
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
String html = "<html><head>";
html += "<style>";
html += "body { font-family: Arial, sans-serif; background-color: #f4f4f4; text-align: center; }";
html += ".dashboard { max-width: 1200px; margin: auto; padding: 20px; background: #fff;
border-radius: 8px; }";
html += ".indicator { display: inline-block; width: 30%; margin: 10px; padding: 20px;
background: #eaeaea; border-radius: 8px; }";
html += ".indicator h2 { margin: 0; font-size: 1.5em; }";
13
html += ".indicator p { margin: 5px 0; font-size: 1.2em; color: #333; }";
html += ".circle { display: inline-block; width: 100px; height: 100px; border-radius: 50%; line-
height: 100px; font-size: 1.5em; font-weight: bold; background: #4CAF50; color: #fff; }";
html += ".slider-container { margin: 20px; }";
html += ".slider { width: 300px; }";
html += "</style></head><body>";
html += "<div class='dashboard'>";
html += "<h1>Real-Time Monitoring Dashboard</h1>";
html += "<div class='indicator'>";
html += "<h2>Voltage</h2>";
html += "<div class='circle' id='voltage'>" + String(FIXED_VOLTAGE) + " V</div>";
html += "</div>";
html += "<div class='indicator'>";
html += "<h2>Current</h2>";
html += "<div class='circle' id='current'>" + String(currentValue, 2) + " A</div>";
html += "</div>";
html += "<div class='indicator'>";
html += "<h2>Power</h2>";
html += "<div class='circle' id='power'>" + String(powerValue, 2) + " W</div>";
html += "</div>";
html += "<div class='slider-container'>";
html += "<input type='range' min='0' max='100' value='" + String(sliderValue) + "' class='slider'
id='ledSlider'>";
html += "<p>Slider Value: <span id='sliderValue'>" + String(sliderValue) + "</span>%</p>";
html += "</div>";
html += "</div>";
html += "<script>";
html += "setInterval(() => {";
html += " fetch('/data').then(res => res.json()).then(data => {";
html += " document.getElementById('voltage').textContent = data.voltage + ' V';";
html += " document.getElementById('current').textContent = data.current + ' A';";
html += " document.getElementById('power').textContent = data.power + ' W';";
html += " });";
html += "}, 1000);";
html += "const slider = document.getElementById('ledSlider');";
html += "const sliderValue = document.getElementById('sliderValue');";
html += "slider.addEventListener('input', () => {";
html += " sliderValue.innerText = slider.value;";
html += " fetch('/update?value=' + slider.value);";
html += "});";
html += "</script>";
html += "</body></html>";
request->send(200, "text/html", html);
});
// Endpoint to send real-time data in JSON format
server.on("/data", HTTP_GET, [](AsyncWebServerRequest *request) {
String json = "{\"voltage\": \"" + String(FIXED_VOLTAGE) + "\"," +
"\"current\": \"" + String(currentValue, 2) + "\"," +
14
"\"power\": \"" + String(powerValue, 2) + "\"}";
request->send(200, "application/json", json);
});
// Handle slider updates
server.on("/update", HTTP_GET, [](AsyncWebServerRequest *request) {
if (request->hasParam("value")) {
sliderValue = request->getParam("value")->value().toInt();
updateLEDStates(sliderValue);
request->send(200, "text/plain", "OK");
} else {
request->send(400, "text/plain", "Missing value");
}
});
// Start the server
server.begin();
}
void loop() {
// Read the analog value from the current sensor (ACS712)
int currentRaw = analogRead(CURRENT_SENSOR_PIN);
// Convert the raw ADC value to voltage (using 3.3V reference and 12-bit resolution)
float currentVoltage = (currentRaw / 4095.0) * 3.3; // Range: 0 to 3.3V
// Convert the voltage to current (subtract the 2.5V offset for zero current)
float current = (currentVoltage - CURRENT_OFFSET) * CURRENT_CALIBRATION;
// Ensure that the current is non-negative and close to zero when no current is flowing
if (current < 0.0) {
current = 0.0; // Ensure current reads 0 when there's no load
}
// Update global current value and calculate power
currentValue = current;
powerValue = FIXED_VOLTAGE * current;
// Display the results on the OLED screen
display.clearDisplay();
display.setCursor(0, 0);
display.setTextSize(1.7);
display.print("Voltage: ");
display.print(FIXED_VOLTAGE, 2);
display.println(" V");
display.print("Current: ");
display.print(current, 2); // Display current in Amperes
display.println(" A");
15
display.print("Power: ");
display.print(powerValue, 2); // Display power in Watts
display.println(" W");
display.display();
// Delay for a short period before reading again
delay(500); // Update every 500ms
}
16