Wifi Based Home Automatoin Black Book Ok
Wifi Based Home Automatoin Black Book Ok
A
PROJECT REPORT
Wi-Fi-Based Home Automation
Submitted in the partial fulfillment of the requirement for the award of the diploma
in
ELECTRICAL ENGINEERING
Submitted by,
RUPESH D. SURYARAO
ADESH G. BHOIR
PRANAV P. CHAUDHARI
AMOL M. ZUGARE
SHIVAJIRAO.S.JONDHLE, POLYTECHNIC
ASANGAON
[2024-25]
Shivajirao S. jondhle polytechnic, asangaon
Vighnaharata Trust’s
Vighnaharata Trust’s
SHIVAJIRAO S. JONDHLE POLYTECHNIC, ASANGAON
Institute Code: 0935
Affiliated to Maharashtra State Board of Technical Education, Approved by AICTE)
Vighnaharata Trust’s
Vighnaharata Trust’s
INDEX
6.2 result 26
6.3 Application 26
7 Chapter 7 : Conclusion 27
8 Chapter 8: Reference 28
9 Actual Project 29
Shivajirao S. jondhle polytechnic, asangaon
LIST OF FIGURE
Page No
Fig.no. Name Of Figure
Fig.no.5 10
Resistor and Resistor symbol
Fig.no.7 15
Circuit Board (PCB)
ACKNOWLEDGEMENT
I am also very much thankful to Principal, who has been a constant source of
inspiration to complete the work.
Shivajirao S. jondhle polytechnic, asangaon
ABSTRACT
The quick development of Internet of Things (IoT) technology has opened up the
possibility for fresh approaches to home automation, bringing greater convenience,
security, and energy savings. This paper provides a thorough review of a Wi-Fi-based
home automation system that uses wireless connectivity to monitor and control
household appliances from anywhere. The suggested system unifies different
components, such as smart lighting, climate control, security cameras, and household
appliances, through a common centralized mobile application.The system
architecture is developed to provide end- to-end communication among devices
through Wi-Fi protocols, where users can control their home setup from anywhere
across the globe with internet access. User-friendly interfaces and automation
algorithms enable custom settings, like scheduling, remote control, and real-time
alerts, to improve user experience and interaction.Security features, such as
encryption and authentication mechanisms, are integrated to safeguard user
information and bar unauthorized access. The system's scalability also facilitates the
incorporation of new devices with ease, rendering the system responsive to changing
user demands.Through a sequence of case studies and user opinions, the viability
and usability of the Wi-Fi- based home automation system are analyzed, showcasing
enhanced energy management, security, and overall quality of life. The study
identifies the potential of Wi-Fi technology to revolutionize conventional homes into
intelligent living spaces and ultimately towards the larger vision of smart cities and
sustainable living.
Shivajirao S. jondhle polytechnic, asangaon
CHAPTER-1
INTRODUCTION
In the era of the Internet of Things (IoT), home automation has emerged as a
transformative technology that enhances the comfort, security, and energy efficiency
of modern households. With the increasing availability of affordable
microcontrollers and wireless communication modules, homeowners can now
control and monitor electrical appliances remotely with ease. This project introduces
a Wi-Fi-based home automation system built around the ESP32 microcontroller,
designed to manage and control home appliances from any device connected to the
internet.
1
Shivajirao S. jondhle polytechnic, asangaon
OBJECTIVE
.
The primary objective of this project is to develop a reliable and efficient home
automation system
2
Shivajirao S. jondhle polytechnic, asangaon
BLOCK DIAGRAM
Fig No.1
Microcontroller: ESP32
Wi-Fi Module: Integrated in ESP32
Optoisolator: MOC3020
Driver Circuit: ULN2003
Switching Device: TRIAC (BT41600B)
Power Supply: 12V AC to DC conversion
Loads: 3 AC appliances
3
Shivajirao S. jondhle polytechnic, asangaon
COMPONENTS USED
Microcontroller
Microcontroller (ESP32)
The ESP32 is a powerful, low-cost, and energy-efficient microcontroller with integrated
WiFi and Bluetooth capabilities. Developed by Espressif Systems, it is widely used in IoT
applications, automation, smart devices, and wireless communication projects.
Features of ESP32
Processor: Dual-core Xtensa LX6 (or single-core in some variants)
Clock Speed: Up to 240 MHz
Memory:
520 KB SRAM
External flash memory support (SPI Flash)
Wireless Connectivity:
Wi-Fi: 802.11 b/g/n (2.4 GHz) • Bluetooth: BLE 4.2 & Classic Bluetooth
I/O Ports:
Up to 34 GPIOs (depending on the module)
ADC (12-bit, up to 18 channels)
DAC (8-bit, 2 channels)
SPI, I2C, UART, PWM, I2S, CAN, and SDIO interfaces
Power Supply:
Operating Voltage: 3.0V – 3.6V • Deep sleep power consumption: ~10 µA
Security Features:
Secure boot
Flash encryption
AES, RSA cryptographic support
Operating Temperature: -40°C to 125°C
ESP32 is available in different SMD module variants, commonly used in embedded systems:
1. ESP32-WROOM-32
Most commonly used module
4
4
Shivajirao S. jondhle polytechnic, asangaon
5
Shivajirao S. jondhle polytechnic, asangaon
15-ESP32-WROOM-32 Microcontroller
Fig.no.2
6
Shivajirao S. jondhle polytechnic, asangaon
Solid State Relay (SSR) is an electronic switching device that operates without
mechanical contacts. Unlike traditional electromechanical relays (EMR), SSRs use
semiconductor components such as triacs, thyristors, or MOSFETs to switch
electrical loads. SSRs offer silent operation, fast switching, and long lifespan,
making them ideal for industrial and automation applications.
• Working Principle
• An SSR consists of three main sections:
• Input Circuit (Control Side):
• Accepts a low-voltage DC or AC signal (e.g., from a microcontroller, PLC, or sensor).
• Uses an optocoupler to electrically isolate the input from the output.
• Isolation Stage (Optocoupler):
• Ensures electrical isolation between input and output.
• Uses an LED and a phototransistor or photothyristor inside the SSR to
activate switching.
• Output Circuit (Load Side):
• Uses a semiconductor switch (e.g., TRIAC, MOSFET, or SCR) to control the
highpower AC or DC load.
• Works in either Zero-Crossing Mode (switches at AC zero voltage to reduce noise) or
Random Turn-On Mode (switches immediately when triggered).
7
7
Shivajirao S. jondhle polytechnic, asangaon
• Types of SSRs
• SSRs are classified based on their output type:
• AC SSR
• Uses triacs or thyristors for switching.
• Designed for AC loads (e.g., heaters, motors, lighting).
• DC SSR
• Uses MOSFETs or IGBTs to switch DC loads.
• Used in applications like solar power, batteries, and automation.
• Hybrid SSR
• Combines a mechanical relay and SSR for improved efficiency.
• Suitable for high-power applications with frequent switching.
• Electrical Specifications
Parameter
Typical Value
8
Shivajirao S. jondhle polytechnic, asangaon
• Pin Configuration
• Most SSRs have four terminals:
• Input Side (Control Signal)
• + (Vcc): Connects to microcontroller or DC power source.
• - (GND): Connects to ground.
• Output Side (Load Switching)
• Load Input (L1 or A1): Connects to AC/DC live wire.
• Load Output (L2 or A2): Connects to the load.
• int SSR_Pin = 7; // SSR connected to pin 7
• void setup() {pinMode(SSR_Pin, OUTPUT);}void loop()
{digitalWrite(SSR_Pin, HIGH); // Turn ON AC load
• delay(5000);// Wait for 5 sec
• digitalWrite(SSR_Pin, LOW); // Turn OFF AC load
• delay(5000);// Wait for 5 sec
9
Shivajirao S. jondhle polytechnic, asangaon
Resistor
A resistor is a passive electrical component that resists or limits the flow of electric current in a
circuit. It is one of the most commonly used components in electronics, primarily for current
limiting, voltage division, and signal processing.
Resistor Symbol
Fig.no.5
Circuit Symbol:
There are two standard resistor symbols used in circuit diagrams:
IEC Standard (Europe & Asia):
A simple rectangle ( )▭
ANSI Standard (USA):
A zig-zag line (Ω)
Both symbols represent the same component.
10
Shivajirao S. jondhle polytechnic, asangaon
Unit of Resistance
Resistance is measured in Ohms (Ω).
Ohm’s Law states: V=I×RV = I \times RV=I×R where:
V = Voltage (Volts)
I = Current (Amperes)
R = Resistance (Ohms)
11
Shivajirao S. jondhle polytechnic, asangaon
CHAPTER-2
Power Rating of Resistors
Every resistor has a power rating, which defines how much power it can handle before overheating.
Capacitor
A capacitor is a passive electronic component that stores and releases electrical energy in a circuit. It
consists of two conductive plates separated by an insulating material called a dielectric. Capacitors are
commonly used for energy storage, filtering, and signal coupling in electronic circuits.
22 12
Shivajirao S. jondhle polytechnic, asangaon
Capacitor Symbol
Fig.no.6
Circuit Symbols:
Polarized Capacitor (Electrolytic/Tantalum): “ |”⊥ (One side marked for polarity)
Non-Polarized Capacitor (Ceramic/Film): “||” (Two parallel lines)
Unit of Capacitance
Capacitance is measured in Farads (F) and represents the ability of a capacitor to store charge.
The relationship is given by:
13
Shivajirao S. jondhle polytechnic, asangaon
Types of Capacitors
A. Fixed Capacitors
These have a constant capacitance value.
Descripti
Ceramic Capacitor Small, non-polarized, stable High-frequency circuits, RF
Electrolytic Capacitor Large capacitance, polarized Power supply filtering
Tantalum Capacitor Stable, high capacitance, Compact circuits, timing
polarized applications
Film Capacitor Durable, stable, non-polarized Audio, motor circuits
B. Variable Capacitors
These allow capacitance adjustment.
14
Shivajirao S. jondhle polytechnic, asangaon
CHAPTER-3
LED Electrical Characteristics
A. Forward Voltage (Vf)
• The voltage required to turn the LED on.
• Example: A red LED has a typical forward voltage of 1.8V to 2.2V.
C. Power Consumption
P=Vf×IfP = V_f \times I_fP=Vf×If where:
• P = Power in watts
• Vf = Forward voltage
If = Forward current
Fig.no.7
15
Shivajirao S. jondhle polytechnic, asangaon
Layer Description
Substrate (Base Material)
Provides structural support (FR4, CEM-1, PTFE).
16
Shivajirao S. jondhle polytechnic, asangaon
17
Shivajirao S. jondhle polytechnic, asangaon
CHAPTER-4
CIRCUIT DESIGN AND WORKING PRINCIPLE
The system consists of an ESP32 microcontroller, which receives user commands via Wi-Fi. These
commands activate the optoisolator (MOC3020), which triggers the ULN2003 driver circuit. The
driver then activates the TRIAC (BT41600B) to control AC loads.
Components Required
Component Specification Function
Step-down Transformer 230V AC to 15V AC, 3A Reduces high voltage AC to lower
189
Shivajirao S. jondhle polytechnic, asangaon
Working Principle
1. Step-Down Transformer
The step-down transformer reduces 230V AC to 15V AC, 3A to ensure sufficient input for rectification.
5. Protection Circuit
• Fuse (3A, 250V): Prevents damage in case of a short circuit.
• MOV (275V): Protects against voltage spikes.
• Diode (1N4007): Prevents reverse polarity issues.
• 0.1µF Ceramic Capacitor: Reduces noise and improves stability.
19
Shivajirao S. jondhle polytechnic, asangaon
CHAPTER-5
SOFTWARE IMPLEMENTATION
Arduino IDE
Used for programming the ESP32
code:-
#include <WiFi.h> #include
<WebServer.h>
#define LIGHT1_PIN 23
#define LIGHT2_PIN 22
#define LIGHT3_PIN 21
#define PWM_PIN 27
void setup() {
Serial.begin(115200); //
Set pins as output
pinMode(LIGHT1_PIN,
OUTPUT);
0 20
Shivajirao S. jondhle polytechnic, asangaon
pinMode(LIGHT2_PIN, OUTPUT);
pinMode(LIGHT3_PIN, OUTPUT);
pinMode(PWM_PIN, OUTPUT);
// Start WiFi as Access Point WiFi.softAP(ssid, password);
Serial.println("WiFi Access Point started"); Serial.print("IP Address: ");
Serial.println(WiFi.softAPIP());
// Handle Web Requests server.on("/", handleRoot);
server.on("/light1", handleLight1); server.on("/light2",
handleLight2); server.on("/light3",
handleLight3);server.on("/fan", handleFanSpeed);//
Start Server
server.begin();}voidloop(){server.handleClient();}
// Serve HTML Web Page void handleRoot()
{server.send(200, "text/html", getHTML()); }
// Control Light 1 void handleLight1()
{int state = server.arg("state").toInt();
digitalWrite(LIGHT1_PIN, state); server.send(200,
"text/plain", "OK"); }// Control Light 2 void handleLight2()
{int state = server.arg("state").toInt(); 31
21
Shivajirao S. jondhle polytechnic, asangaon
32
22
Shivajirao S. jondhle polytechnic, asangaon
h1
{font-size: 36px; margin- bottom: 20px;}
.container {display:
flex;flex-direction:column;align-items:
center;justify- content: center;}
.control {background: rgba(255, 255, 255, 0.2); padding: 20px;
border-radius:15px;margin:
15px;width: 80%; max-
width:400px;}
h2 {font-size: 24px; margin- bottom: 15px; }
.button {padding:
15px;width: 150px; margin:
10px;font- size: 20px;font- weight:
bold; border: none;border-radius:
10px; cursor: pointer; transition:
0.3s; display: inline- block;}
.on {background:#28a745;color:white;
box-shadow: 2px 2px 10px rgba(0, 255, 0, 0.6);
23
Shivajirao S. jondhle polytechnic, asangaon
.off {background:
#dc3545;color:white;
box-shadow: 2px 2px 10px rgba(255, 0, 0, 0.6);}
.button:hover { transform:scale(1.05);}
.slider {width: 90%; height: 15px;
background: #ddd; outline: none; opacity:
0.9;border-radius:10px; transition:
opacity 0.2s;}
.slider:hover { opacity: 1;}
.slider::-webkit-slider- thumb {-webkit-
appearance: none;
appearance:nonwidth:30px;
height: 30px; background: #ffc107;
border-radius: 50%; cursor: pointer;
box-shadow: 2px 2px 10px rgba(255, 193, 7, 0.6);}
</style>
<script>
function toggleLight(light, state) { fetch(`/${light}?state=${state}`)
.then(response => console.log(response));}
function setFanSpeed()
{ let speed = document.getElementById("fanSpeed").value;
\fetch(`/fan?speed=${speed}`).then(response => console.log(response));} 34
24
Shivajirao S. jondhle polytechnic, asangaon
, ,,25
Shivajirao S. jondhle polytechnic, asangaon
CHAPTER-6
Wi-Fi Connectivity
• ESP32 connects to a Wi-Fi network
• User commands sent via HTTP requests
Mobile/Web Interface
• Developed using HTML, CSS, and JavaScript
RESULTS
• The system successfully controls three loads remotely.
• Response time is minimal.
• The circuit operates efficiently with proper isolation.
• Power consumption is minimal due to efficient components.
APPLICATIONS
• Smart Home Automation
• Industrial Load Control
• Office Automation Systems
26
Shivajirao S. jondhle polytechnic, asangaon
CHAPTER-7
CONCLUSION
This project demonstrates a cost-effective and efficient Wi-Fi-based home
automation system using ESP32. The integration of optoisolators and TRIACs
ensures safety and reliability. Wi-Fi home automation provides a simple, efficient,
and scalable solution for smart living in the modern era. Utilizing existing Wi- Fi
infrastructure, users can remotely control and monitor home appliances using
smartphones or voice assistants, improving comfort, energy efficiency, and security.
The system does not require complicated wiring and is easy to integrate with other
smart devices. As technology continues to evolve, Wi-Fi home automation will keep
changing, providing even smarter and more seamless experiences in the smart home
environment.
27
Shivajirao S. jondhle polytechnic, asangaon
CHAPTER-8
REFERENCES
1. ESP32 Documentation
2. TRIAC BT41600B Datasheet
3. ULN2003 Datasheet
4. MOC3020 Datasheet
28
Shivajirao S. jondhle polytechnic, asangaon
ACTUAL PROJECT
Fig.no.8
29