Home Automation using Audraino uno

           Hey friends I am here to introduce the 

                  Home Automation Sytem

                                Using Audraino uno

Required items :-
  1. Audraino uno https://amzn.to/3Rx021g
  2. Bluthooth module HC-05https://amzn.to/3aKDc5S
  3. D - type Cable https://amzn.to/3Rx021g
  4. phase and Netural wire 2-3 metre https://amzn.to/3O6ELsx
  5.  Male to female jumper wireshttps://amzn.to/3POUn5h
  6. Relay Modle (as per you home applinces) 
  • 1 channel relay https://amzn.to/3AUQKGE
  • 2 channel relay  https://amzn.to/3uRGo6i
  • 4 channel relay https://amzn.to/3uSF6rU
  • 8 channel relay https://amzn.to/3AUQS96`

    • Buy relay as per your need of applines and voltage ampere taken by applinces 

    Audraino code uploder application for windows and mac 

    Audraino uno ide computer application


    Codes :-

    String inputs;
    #define relay1 2 //Connect relay1 to pin 9
    #define relay2 3 //Connect relay2 to pin 8
    #define relay3 4 //Connect relay3 to pin 7
    #define relay4 5 //Connect relay4 to pin 6
    #define relay5 6 //Connect relay5 to pin 5
    #define relay6 7 //Connect relay6 to pin 4
    #define relay7 8 //Connect relay7 to pin 3
    #define relay8 9 //Connect relay8 to pin 2
    void setup()
    {
    Serial.begin(9600); //Set rate for communicating with phone
    pinMode(relay1, OUTPUT); //Set relay1 as an output
    pinMode(relay2, OUTPUT); //Set relay2 as an output
    pinMode(relay3, OUTPUT); //Set relay1 as an output
    pinMode(relay4, OUTPUT); //Set relay2 as an output
    pinMode(relay5, OUTPUT); //Set relay1 as an output
    pinMode(relay6, OUTPUT); //Set relay2 as an output
    pinMode(relay7, OUTPUT); //Set relay1 as an output
    pinMode(relay8, OUTPUT); //Set relay2 as an output
    digitalWrite(relay1, LOW); //Switch relay1 off
    digitalWrite(relay2, LOW); //Swtich relay2 off
    digitalWrite(relay3, LOW); //Switch relay1 off
    digitalWrite(relay4, LOW); //Swtich relay2 off
    digitalWrite(relay5, LOW); //Switch relay1 off
    digitalWrite(relay6, LOW); //Swtich relay2 off
    digitalWrite(relay7, LOW); //Switch relay1 off
    digitalWrite(relay8, LOW); //Swtich relay2 off
    }
    void loop()
    {
    while(Serial.available()) //Check if there are available bytes to read
    {
    delay(10); //Delay to make it stable
    char c = Serial.read(); //Conduct a serial read
    if (c == '#'){
    break; //Stop the loop once # is detected after a word
    }
    inputs += c; //Means inputs = inputs + c
    }
    if (inputs.length() >0)
    {
    Serial.println(inputs);

    if(inputs == "A")
    {
    digitalWrite(relay1, LOW);
    }
    else if(inputs == "a")
    {
    digitalWrite(relay1, HIGH);
    }
    else if(inputs == "B")
    {
    digitalWrite(relay2, LOW);
    }
    else if(inputs == "b")
    {
    digitalWrite(relay2, HIGH);
    }
    else if(inputs == "C")
    {
    digitalWrite(relay3, LOW);
    }
    else if(inputs == "c")
    {
    digitalWrite(relay3, HIGH);
    }
    else if(inputs == "D")
    {
    digitalWrite(relay4, LOW);
    }
    else if(inputs == "d")
    {
    digitalWrite(relay4, HIGH);
    }
    else if(inputs == "E")
    {
    digitalWrite(relay5, LOW);
    }
    else if(inputs == "e")
    {
    digitalWrite(relay5, HIGH);
    }
    else if(inputs == "F")
    {
    digitalWrite(relay6, LOW);
    }
    else if(inputs == "f")
    {
    digitalWrite(relay6, HIGH);
    }
    else if(inputs == "G")
    {
    digitalWrite(relay7, LOW);
    }
    else if(inputs == "g")
    {
    digitalWrite(relay7, HIGH);
    }
    else if(inputs == "H")
    {
    digitalWrite(relay8, LOW);
    }
    else if(inputs == "h")
    {
    digitalWrite(relay8, HIGH);
    }
    inputs="";
    }
    }

    1 Comments

    1. Hey Friends You will be getting a detailed tutorial about the home automation system this is not he full working in this post I will make a detailed tutorial about Home automation By Audraino soon in till October 10 to 25

      ReplyDelete
    Previous Post Next Post