This document describes an IoT home project that allows controlling and monitoring home appliances via the internet from anywhere in the world. It uses a NodeMCU microcontroller connected to home appliances like lights, fans, and sockets. The NodeMCU is connected to the Blynk cloud platform, which provides an app to control devices and monitor temperature and humidity sensors. Pressing buttons in the Blynk app sends commands over the internet to the NodeMCU to turn appliances on and off remotely.
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
IoT Home project by MADHAV
1. ECE
IOT HOME
BY
K.V.SAI MADHAV
Mail ID :venkatasaimadhav999@gmail.com
LinkedIn Profile : https://www.linkedin.com/in/k-v-sai-madhav-a93707152/
2. IOT HOME
Abstract:
The Aim of this project is to control and monitor our Home appliances
through internet from anywhere in the world.
Description:
Internet of Things(IoT) means connecting all devices to the
Internet and to control them from anywhere in the world.
The project is about controlling home appliances through the
Internet Using Blynk Cloud .
We interfaced home appliances to NODEMCU .
Then we connected NODEMCU (Micro Controller) to Blynk Cloud
through the Internet.
We used Blynk Mobile Interface to connect to Blynk Cloud. By
this, we can communicate with our devices(Appliances).
Blynk Cloud provides high security by providing us a Master Key.
We can ON/OFF appliances(light,fan,socket..) by using mobile as
shown in the mobile interface.
When we press ON/OFF in mobile app, then it sends data to
NODEMCU through Blynk Cloud.
We can also monitor Temperature and Humidity in the house as
shown in mobile interface.
This is not a prototype. This is real application.
3. IOT HOME
3
IOT HOME
MOBILE INTERFACE
Components Used:
NODEMCU, DHT11 SENSOR , RELAYS, H-BRIDGE DRIVER , DC MOTORS , BULBS
WITH SOCKETS , SERVO MOTOR , BREADBOARD , 9V BATTERIES, 230V AC
SUPPLY , CONNECTING WIRES ,JUMPERWIRES , 7805 VOLTAGE REGULATOR .
4. CODE:
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h> // THESE 3 LIBRARIES FOR USING BLYNK CLOUD
#include <SimpleTimer.h>
#include <SPI.h>
#include<Servo.h> // SERVO MOTOR LIBRARY
#include <ESP8266WiFi.h> //NODEMCU WIFI MODULE LIBRARY
#include <DHT.h> //DHT11 SENSOR LIBRARY
char auth[] = "mswM-7r5JXmiRFHoFYWYKmxOsglX4rL1"; //AUTHENTICATION KEY PROVIDED BY BLYNK CLOUD
char ssid[] = "naani"; //WIFI SSID
char pass[] = "12345677"; //WIFI PASSWORD
#define DHTPIN 2 //DHT 11 - TEMPERATURE AND HUMIDITY SENSOR
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
SimpleTimer timer; //SIMPLE TIMER
void Sensor() //FUNTION TO READ DHT11 SENSOR VALUES
{
int h = dht.readHumidity();
int t = dht.readTemperature();
if (isnan(h) || isnan(t))
{
Serial.println("Failed to read from DHT sensor!");
return;
}
5. IOT HOME
5
Serial.println(h); //TO PRINT HUMIDITY VALUES ON SERIAL MONITOR
Serial.println(t); //TO PRINT TEMPERATURE VALUES ON SERIAL MONITOR
Blynk.virtualWrite(V7,h); //TO PUBLISH HUMIDITY VALUES TO BLYNK CLOUD
Blynk.virtualWrite(V8,t); //TO PUBLISH TEMPERATURE VALUES TO BLYNK CLOUD
}
Servo servo; //TO DECLARE SERVO
void setup()
{
Serial.begin(9600); //TO BEGIN SERIAL MONITOR
Blynk.begin(auth, ssid, pass);//TO BEGIN BLYNK CLOUD CONNECTION
dht.begin(); // TO BEGIN DHT11 SENSOR
timer.setInterval(1000L,Sensor); //TO EXECUTE THE FUNTION Sensor FOR EVERY SECOND
servo.attach(D8); //TO DECLARE THAT THE SERVO IS CONNECTED TO PIN D8
servo.write(0);
}
void loop()
{
Blynk.run(); //TO START PUBLISHING DATA TO BLYNK CLOUD
timer.run(); //TO START TIMER
}
BLYNK_WRITE(V1) //THIS FUNCTION IS TO WRITE THE VALUES OF SERVO FROM BLYNK MOBILE INTERFACE
{
servo.write(param.asInt());
}