HOME AUTOMATION 3 IN 1 PCB BOARD || BLYNK APP || MIT APP || HC-05 BLUETO...


HOME AUTOMATION 3 IN 1 PCB BOARD || BLYNK APP || MIT APP || HC-05 BLUETOOTH

COMPONENTS REQUIRED:-
  1. ZERO PCB BOARD.
  2. NODE MCU ESP8266 WIFI MODULE.
  3. HC-05 BLUETOOTH MODULE.
  4. IR-RECEIVER DIODE.
  5. IR-REMOTE.
  6. BLYNK APP.
  7. MIT APP INVENTOR FOR HOME AUTOMATION DESIGNED MY MKINVENTIONS.
  8. 5V RELAYS.
  9. ANDROID MOBILE.
A. HOME AUTOMATION WITH NODE-MCU ESP8266 WIFI MODULE:

1. CIRCUIT:

2. CODE:

APP:

B. HOME AUTOMATION WITH HC-05 BLUETOOTH MODULE:

1. CIRCUIT:

2. CODE:
//MKINVENTIONS MADHAN CHIRUGURI.
//HOME AUTOMATION WITH HC-05 BLUETOOTH MODULE.

char command; 

int LIGHT1  = 8;//LIGHT1
int LIGHT2  = 9;//LIGHT2
int LIGHT3  = 10;//LIGHT3
int LIGHT4  = 11;//LIGHT4

void setup() {       
  Serial.begin(9600); 

  pinMode(LIGHT1, OUTPUT);
  pinMode(LIGHT2, OUTPUT);
  pinMode(LIGHT3, OUTPUT);
  pinMode(LIGHT4, OUTPUT);
}

void loop(){
  if(Serial.available() > 0){ 
    command = Serial.read(); 

//digitalWrite(LIGHT1, LOW);
//digitalWrite(LIGHT2, LOW);
//digitalWrite(LIGHT3, LOW);
//digitalWrite(LIGHT4, LOW);

    switch(command){

    case 'A':  //LIGHT1 ON 
      digitalWrite(LIGHT1, HIGH);
      break;
      
    case 'a':  //LIGHT1 OFF
      digitalWrite(LIGHT1, LOW);
      break;


    case 'B':  //LIGHT2 ON 
      digitalWrite(LIGHT2, HIGH);
      break;
      
    case 'b':  //LIGHT2 OFF
      digitalWrite(LIGHT2, LOW);
      break;


     case 'C':  //LIGHT3 ON 
      digitalWrite(LIGHT3, HIGH);
      break;
      
    case 'c':  //LIGHT3 OFF
      digitalWrite(LIGHT3, LOW);
      break;   


    case 'D':  //LIGHT4 ON 
      digitalWrite(LIGHT4, HIGH);
      break;
      
    case 'd':  //LIGHT4 OFF
      digitalWrite(LIGHT4, LOW);
      break;     

         }
  }
  }



APP BY MKINVENTIONS: 

B. HOME AUTOMATION WITH IR-RECEIVER DIODE:

1. CIRCUIT:

2. CODE:


a.IR-REMOTE DECODER CODE:

//MKINVENTIONS MADHAN CHIRUGURI.
//HOME AUTOMATION WITH HC-05 BLUETOOTH MODULE.

char command; 

int LIGHT1  = 8;//LIGHT1
int LIGHT2  = 9;//LIGHT2
int LIGHT3  = 10;//LIGHT3
int LIGHT4  = 11;//LIGHT4

void setup() {       
  Serial.begin(9600); 

  pinMode(LIGHT1, OUTPUT);
  pinMode(LIGHT2, OUTPUT);
  pinMode(LIGHT3, OUTPUT);
  pinMode(LIGHT4, OUTPUT);
}

void loop(){
  if(Serial.available() > 0){ 
    command = Serial.read(); 

//digitalWrite(LIGHT1, LOW);
//digitalWrite(LIGHT2, LOW);
//digitalWrite(LIGHT3, LOW);
//digitalWrite(LIGHT4, LOW);

    switch(command){

    case 'A':  //LIGHT1 ON 
      digitalWrite(LIGHT1, HIGH);
      break;
      
    case 'a':  //LIGHT1 OFF
      digitalWrite(LIGHT1, LOW);
      break;


    case 'B':  //LIGHT2 ON 
      digitalWrite(LIGHT2, HIGH);
      break;
      
    case 'b':  //LIGHT2 OFF
      digitalWrite(LIGHT2, LOW);
      break;


     case 'C':  //LIGHT3 ON 
      digitalWrite(LIGHT3, HIGH);
      break;
      
    case 'c':  //LIGHT3 OFF
      digitalWrite(LIGHT3, LOW);
      break;   


    case 'D':  //LIGHT4 ON 
      digitalWrite(LIGHT4, HIGH);
      break;
      
    case 'd':  //LIGHT4 OFF
      digitalWrite(LIGHT4, LOW);
      break;     

         }
  }
  }

ANY TV REMOTE OR MUSIC PLAYER REMOTE : 










b. IR-REMOTE HOME AUTOMATION CODE:

#include <IRremote.h>

int IRpin = 12;
IRrecv irrecv(IRpin);
decode_results results;

int LIGHT1 = 8;
int LIGHT2 = 9;
int LIGHT3 = 10;
int LIGHT4 = 11;


void setup(){
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver

  pinMode(LIGHT1, OUTPUT);
  pinMode(LIGHT2, OUTPUT);
  pinMode(LIGHT3, OUTPUT);
  pinMode(LIGHT4, OUTPUT);
}  

void loop() {   
if (irrecv.decode(&results)) 
 {
 Serial.println(results.value); // Print the Serial 'results.value'
 delay(10);
  irrecv.resume();   // Receive the next value
 }


if(results.value == 584701991){
  digitalWrite(LIGHT1, HIGH);
}
if(results.value == 584687711){
  digitalWrite(LIGHT1, LOW);
}


if(results.value == 584708111){
  digitalWrite(LIGHT2, HIGH);
}
if(results.value == 584655071){
  digitalWrite(LIGHT2, LOW);
}


if(results.value == 584695871){
  digitalWrite(LIGHT3, HIGH);
}
if(results.value == 584663231){
  digitalWrite(LIGHT3, LOW);
}


if(results.value == 584685671){
  digitalWrite(LIGHT4, HIGH);
}
if(results.value == 584677511){
  digitalWrite(LIGHT4, LOW);
}


if(results.value == 584699951){
  digitalWrite(LIGHT1, LOW);
  digitalWrite(LIGHT2, LOW);
  digitalWrite(LIGHT3, LOW);
  digitalWrite(LIGHT4, LOW);
}

if(results.value == 1253111734){
  digitalWrite(LIGHT1, HIGH);
  digitalWrite(LIGHT2, HIGH);
  digitalWrite(LIGHT3, HIGH);
  digitalWrite(LIGHT4, HIGH);
}
}


    


Post a Comment

0 Comments