Sharifdeen Ashshak
Published

4 different system in one home (prototype)

Here I have made prototype of smart home. In this Smart home project I have used Arduino and Node Mcu to control the Hardware parts.

IntermediateFull instructions provided110
4 different system in one home (prototype)

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
Ultrasonic Sensor - HC-SR04
SparkFun Ultrasonic Sensor - HC-SR04
×2
PIR Motion Sensor (generic)
PIR Motion Sensor (generic)
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Buzzer
Buzzer
×1
Arduino 4 Relays Shield
Arduino 4 Relays Shield
×1
LED (generic)
LED (generic)
×1
12v dc fan
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×2
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk
Maker service
IFTTT Maker service

Story

Read more

Schematics

Arduino Circuit

Code

Arduino_Code

C/C++
/**************************************************************
 *for more project:
 *  website: www.blackkeyhole.com
 *  Youtube:Blackkeyhole
 *  Facebook page:Blackkeyhole
 *  Instagram:_ashshak_ahk
 **************************************************************/
#include <ESP8266WiFi.h>

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <BlynkSimpleEsp8266.h>
char auth[] = "65d9cf145e7a442291c612f24e1df68b";

/* WiFi credentials */
char ssid[] = "ROVAI TIMECAP";
char pass[] = "mjr747@1";

/* HC-SR501 Motion Detector */
#define ledPin D2 
#define pirPin D1 // Input for HC-S501
int pirValue; // Place to store read PIR Value
int motionDetected = 0;





void setup()
{
  Serial.begin(115200);
  delay(10);
  Blynk.begin(auth, ssid, pass);
  pinMode(ledPin, OUTPUT);
  pinMode(pirPin, INPUT);
  digitalWrite(ledPin, LOW);
  
}

void loop()
{
  getPirValue();
  Blynk.run();
  
}

/***************************************************
 * Get PIR data
 **************************************************/
void getPirValue(void)
{
  pirValue = digitalRead(pirPin);
  if (pirValue) 
  { 
    Serial.println("==> Motion detected");
    Blynk.notify("T==> Motion detected");  
  }
  
  digitalWrite(ledPin, pirValue);
}

Nodemcu code

C/C++
/**************************************************************
 *for more project:
 *  website: www.blackkeyhole.com
 *  Youtube:Blackkeyhole
 *  Facebook page:Blackkeyhole
 *  Instagram:_ashshak_ahk
 **************************************************************/
#include <ESP8266WiFi.h>

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <BlynkSimpleEsp8266.h>
char auth[] = "AlAVqXZvwRfRkUqO2fXIUB7RjDqHJy50"; //enter your auth sent by blynk

/* WiFi credentials */
char ssid[] = "ZTE WIFI";
char pass[] = "kl2229834";

/* HC-SR501 Motion Detector */
int ledPin= D2; 
int pirPin=D1; // Input for HC-S501
int pirValue; // Place to store read PIR Value
int motionDetected = 0;

void setup()
{
  Serial.begin(9600);
  delay(10);
  Blynk.begin(auth, ssid, pass);
  pinMode(ledPin, OUTPUT);
  pinMode(pirPin, INPUT);
  digitalWrite(ledPin, LOW);
}

void loop()
{
  getPirValue();
  delay(100);
  Blynk.run();
}

/***************************************************
 * Get PIR data
 **************************************************/
void getPirValue(void)
{
  pirValue = digitalRead(pirPin);
  if (pirValue==1) 
  { 
    Serial.println("==> Motion detected");
    Blynk.notify("T==> Motion detected");  
  }
  
  digitalWrite(ledPin, pirValue);

}

Credits

Sharifdeen Ashshak

Sharifdeen Ashshak

15 projects • 3 followers

Comments

Add projectSign up / Login