Mini Project Report: Home Automation
Using NodeMCU (ESP8266)
1. Title:
Smart Home Automation System using NodeMCU and Wi-Fi
2. Objective:
To design and implement an IoT-based home automation system that allows users to
remotely control household appliances using a smartphone or web interface, using
NodeMCU as the core controller.
3. Problem Statement:
Traditional home automation systems are expensive, complex, and not easily customizable.
There is a need for an affordable, simple, and scalable solution that can automate and
remotely control home appliances, improving user convenience and energy efficiency.
4. Introduction:
The Internet of Things (IoT) has enabled a new generation of smart systems, and home
automation is a key application. In this project, we use the NodeMCU (ESP8266), a Wi-Fi-
enabled microcontroller, to control appliances via the internet. The system uses relays to
switch appliances and offers a user-friendly interface via a web dashboard or smartphone
app (e.g., Blynk or custom HTML).
5. Block Diagram:
[Smartphone/Web Interface] -> [Wi-Fi Network/Router] -> [NodeMCU (ESP8266)] ->
[Relay Module] -> [Appliances]
6. Hardware Components:
Component Quantity Description
NodeMCU ESP8266 1 Microcontroller with built-
in Wi-Fi
Relay Module (2/4 channel) 1 To switch home appliances
Appliances (bulbs, fans) 2–3 For demonstration
Power Adapter (5V) 1 Power supply for NodeMCU
Breadboard & Wires As needed Prototyping and
connections
LED (Optional) As needed For testing output
Smartphone 1 Interface for control
7. Software Components:
Software Purpose
Arduino IDE Programming the NodeMCU
Blynk App / Web Dashboard Remote control interface
HTML/CSS (Optional) Custom web control UI
ESP8266WiFi Library Wi-Fi communication
Blynk Library (if used) App control
8. Circuit Diagram:
[Insert circuit diagram image here if available]
9. Working Principle:
1. Wi-Fi Connection: NodeMCU connects to the local Wi-Fi.
2. Control Interface: The user opens a web page or app.
3. User Command: The user clicks buttons to turn appliances ON/OFF.
4. Command Received: NodeMCU receives the command via HTTP (or Blynk).
5. Relay Trigger: Corresponding GPIO pin is toggled.
6. Appliance Switches: Relay changes state, switching the device ON or OFF.
10. Program Code (Arduino IDE – Web Server Example):
#include <ESP8266WiFi.h>
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";
WiFiServer server(80);
void setup() {
Serial.begin(115200);
pinMode(D1, OUTPUT);
pinMode(D2, OUTPUT);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected. IP address: ");
Serial.println(WiFi.localIP());
server.begin();
}
void loop() {
WiFiClient client = server.available();
if (!client) return;
String request = client.readStringUntil('\r');
client.flush();
if (request.indexOf("/light/on") != -1) digitalWrite(D1, HIGH);
if (request.indexOf("/light/off") != -1) digitalWrite(D1, LOW);
if (request.indexOf("/fan/on") != -1) digitalWrite(D2, HIGH);
if (request.indexOf("/fan/off") != -1) digitalWrite(D2, LOW);
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("");
client.println("<h1>Home Automation</h1>");
client.println("<p><a href=\"/light/on\">Turn ON Light</a></p>");
client.println("<p><a href=\"/light/off\">Turn OFF Light</a></p>");
client.println("<p><a href=\"/fan/on\">Turn ON Fan</a></p>");
client.println("<p><a href=\"/fan/off\">Turn OFF Fan</a></p>");
}
11. Results:
The system was successfully deployed in a test environment. Lights and fans could be
controlled via smartphone using Wi-Fi. The response time was quick, and the interface was
user-friendly.
12. Advantages:
- Low-cost and energy-efficient solution.
- Easy to use and expand.
- No need for physical switches.
- Works on existing Wi-Fi infrastructure.
13. Limitations:
- Dependent on Wi-Fi availability.
- No feedback mechanism unless sensors are added.
- Limited number of GPIOs for appliance control.
14. Future Scope:
- Integration with voice assistants like Alexa/Google Assistant.
- Add sensor-based automation (temperature, motion, gas).
- Implement mobile notifications for activity.
- Build a dedicated Android/iOS app.
- Use cloud platforms like Firebase for data logging and history.
15. Conclusion:
This project successfully demonstrates a smart, Wi-Fi-enabled home automation system
using NodeMCU. It is a scalable, user-friendly, and cost-effective solution that can be easily
implemented in modern homes. It bridges the gap between basic electronics and smart IoT
infrastructure, making home control more accessible and intelligent.