Easiest Home Automation Ever | Make Your Home "Smart" | Arduino Uno FULL Setup | Easy & Cheap

by KMTECH in Circuits > Electronics

410 Views, 4 Favorites, 0 Comments

Easiest Home Automation Ever | Make Your Home "Smart" | Arduino Uno FULL Setup | Easy & Cheap

Easiest Home Automation Ever | Make Your Home "Smart" | Arduino Uno FULL Setup | Easy & Cheap

Home Automation Using Arduino and Bluetooth Module - In this Blog I will show you home automation using Arduino, Relay and Bluetooth module to control the appliances with an android mobile.

COMPONENTS NEED

image_2021-03-10_105414.png
1-4-1.jpg

Components : Buy Links

1. Arduino Uno - https://amzn.to/3b3gUZ7

2. Relay Module - https://amzn.to/3rzm7yM

3. Bluetooth Module - https://amzn.to/3rzm7yM

4. Jumper Wires - https://amzn.to/3rzm7yM

Circuit Diagram -

WhatsApp Image 2021-03-09 at 7.37.20 PM.jpeg

Relay 1 connected to PinOut 4 Arduino

Relay 2 connected to PinOut 5 Arduino

Relay 3 connected to PinOut 6 Arduino

Relay 4 connected to PinOut 7 Arduino

Connect a piece of wire on normally open port & connect one output terminal of bulb on normally closed port of relay 1.

Give AC voltage to the remaining wires as shown in the circuit diagram.

Do this steps for all relays.

Programming - JUST COPY AND PASTE

<code style="box-sizing: border-box; font-family: monospace, monospace; font-size: 1em; position: relative; top: -1px; border-width: initial; border-style: none; background-color: rgb(241, 241, 241); padding: 2px 6px; overflow-wrap: break-word;">/*
Subscribe to KMTECH For More arduino related videos
Relay IN1 connected to PinOut 4 Arduino
Relay IN2 connected to PinOut 5 Arduino
Relay IN3 connected to PinOut 6 Arduino
Relay IN4 connected to PinOut 7 Arduino
--->you can connected to relay modul 4 channel
Serial data sending from Arduino Bluetooth Relay 4CH.apk
data '1'-'4' to on is Ralay CH 1-4
data 'A'-'D' to off is Ralay CH 1-4
data '9' to on ALL CH 1-4
data 'I' to off ALL CH 1-4
*/
int relay1=4;
int relay2=5;
int relay3=6;
int relay4=7;
char val;
void setup() {
pinMode(relay1,OUTPUT);
pinMode(relay2,OUTPUT);
pinMode(relay3,OUTPUT);
pinMode(relay4,OUTPUT);
digitalWrite(relay1,HIGH);
digitalWrite(relay2,HIGH);
digitalWrite(relay3,HIGH);
digitalWrite(relay4,HIGH);
Serial.begin(9600);
}
void loop() {//check data serial from bluetooth android App
while (Serial.available() > 0){
val = Serial.read();
Serial.println(val);
}
//Relay is on
if( val == '1' ) {
digitalWrite(relay1,HIGH); }
else if( val == '2' ) {
digitalWrite(relay2,HIGH); }
else if( val == '3' ) {
digitalWrite(relay3,HIGH); }
else if( val == '4' ) {
digitalWrite(relay4,HIGH); }
//relay all on
else if( val == '9' ) {
digitalWrite(relay1,HIGH);
digitalWrite(relay2,HIGH);
digitalWrite(relay3,HIGH);
digitalWrite(relay4,HIGH);
}
//relay is off
else if( val == 'A' ) {
digitalWrite(relay1,LOW); }
else if( val == 'B' ) {
digitalWrite(relay2,LOW); }
else if( val == 'C' ) {
digitalWrite(relay3,LOW); }
else if( val == 'D' ) {
digitalWrite(relay4,LOW); }
//relay all off
else if( val == 'I' ) {
digitalWrite(relay1,LOW);
digitalWrite(relay2,LOW);
digitalWrite(relay3,LOW);
digitalWrite(relay4,LOW);
}
}

Download Software -

6077cf400ddb2c75b282ddba0b03f241.jpg

Download a software to give commands to your Bluetooth module.You can download the software from play store & from App store.

After downloading Connect your mobile with Bluetooth module.

Now It's time for configuring the buttons.

Button 1 on = 1

Button 2 on = 2

Button 3 on = 3

Button 4 on = 4

Button 1 off = A

Button 2 off = B

Button 3 off = C

Button 4 off = D

For on all relay = 9

For off all relay = I