Hey, guys welcome to meworkstelugu . friends in this article we will learn about Home Automation Using Arduino UNO, HC-05 Bluetooth ..this is a very interesting project so let's start and crack the project.
How this Home Automation Using Arduino UNO, HC-05 Bluetooth works:
I am telling you a simple way to understand how this project works. Using this project you can control your home applies like fan,light, TVs (on and off) using mobile (threw Bluetooth) it will works
components :
Below components are using to make this project
- Arduino uno BuyNow
- HC-05 Bluetooth module BuyNow
- Relay module BuyNow
- Bread board BuyNow
- connecting wires BuyNow
If you want to buy Arduino components, I am giving you my affiliate links. If you buy the components using my affiliate links, it will help our channel and website growth. so do this small help.
How to make this project?
If you want to know more details about this project watch the below video
Home Automation Using Arduino UNO, HC-05 BluetoothCircuit diagram:
this circuit diagram for the relay and bluetooth module
below circuit diagram will help to how to connect the LED bulb to the relay module
APP LINK:
Home Automation Using Arduino UNO, HC-05 Bluetooth CODE :
code for single relay :
String inputs;
#define relay1 6 //connect relat to arduino d6
void setup()
{
Serial.begin(9600);
pinMode(relay1, OUTPUT);
digitalWrite(relay1, LOW);
}
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);
}
inputs="";
}
}
code for 2 or more relays :
String inputs;
#define relay1 6
#define relay2 7
#define relay3 8
void setup()
{
Serial.begin(9600);
pinMode(relay1, OUTPUT);
pinMode(relay2, OUTPUT);
pinMode(relay3, OUTPUT);
digitalWrite(relay1, LOW);
digitalWrite(relay2, LOW);
digitalWrite(relay3, LOW);
}
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);
}
inputs="";
}
}
if you have any doubts about this project comment on my YouTube channel i will respond as well as possible
0 Comments