Make Arduino Based Home Automation Part-2 (wireless) Using ARDUINO UNO R3

Hello welcome back . This is second part of the wireless home automation . In previous part we have connected home applience with relay and controlled with arduino . In this part we are going to add wireless feature of that device . One arduino is acts as remote controller ie transmitter which transmit input signal from buttons and another arduino receives those signal and switch on home appiliences according to the button pressed . Now first of all connect the circuit as shown in circuit diagram above and upload the hex file after compiling the below code . Upload these code seperately , one code is for transmitter and another for receiver. The short description is shown below the code . You can download whole project from this link wireless home automation . RF module library for proteus can be download from this link Modulo .

Code for Transmitter part

created by prasant
you can do what ever you want with this piece of code
const int buttonPin1 = 14; // the number of the pushbutton pin
const int buttonPin2 = 15;
const int buttonPin3 = 16;
int buttonState1 = 0; // variable for reading the pushbutton status
int buttonState2 = 0;
int buttonState3 = 0;
void setup(){
pinMode(buttonPin1, INPUT);
pinMode(buttonPin2, INPUT);
pinMode(buttonPin3, INPUT);
void loop()
// read the state of the pushbutton value:
buttonState1 = digitalRead(buttonPin1);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState1 == HIGH) {
else if (buttonState2 == HIGH) {
else if (buttonState3 == HIGH) {

Code for Receiver part

created by prasant
you can do what ever you want with this piece of code
#include `
LiquidCrystal lcd(10, 9, 8, 7, 6, 5);
int incomingByte = 0; // for incoming serial data
const int relayPin1 = 13; // the number of the relay pin
const int relayPin2 = 12 ;
const int relayPin3 = 11;
void setup()
pinMode(relayPin1, OUTPUT);
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
lcd.begin (20, 4);
lcd.clear ();
lcd.setCursor (0, 0);
lcd.print ("WWW.ELECTRONIFY.ORG");
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte =;
lcd.setCursor (0, 1);
lcd.print("LAMP1 IS ON ");
digitalWrite(relayPin1, HIGH);
else if(incomingByte==2)
lcd.setCursor (0, 1);
lcd.print("FAN IS ON ");
digitalWrite(relayPin2, HIGH);
else if (incomingByte==3)
lcd.setCursor (0, 1);
lcd.print("LAMP2 IS ON ");
digitalWrite(relayPin3, HIGH);
lcd.setCursor (0, 1);
lcd.print("press button ");
digitalWrite(relayPin1, LOW);
digitalWrite(relayPin2, LOW);
digitalWrite(relayPin3, LOW);

Make Arduino Based Home Automation Part-2 (wireless) Using ARDUINO UNO R3 (Schematic Diagram)

Make Arduino Based Home Automation Part-2 (wireless) Using ARDUINO UNO R3 schematic diagram


Short Description

First of all I want to tell please make a habit of reading arduino official documentation . In this project I have referenced from aduino serial communication from this link . The code is very simple .

First of all the transmitter transmit a secret code to the next arduino according to the button pressed . Let’s say we are transmitting 1 if button 1 is pressed and similarly 2 if button 2 is pressed and so on using the function serial.write(int) . Then at the receiver side the second arduino detects these transmitted number comming from RF module and receive those numbers  and take action according to the received number . Let’s say first button 1 is pressed at transmitter side and is transmitted and the second microcontroller detect 1 and it thinks to turn on 1st relay . And similary if 2 is received then it turns on 2nd relay and so on . Using this simple concept we are finally able to make a wireless home automation . If you didnot understand what i mean please read these as shown in link below step by step and you will finally know what i meanRemote controlled Home automation without using microcontroller (Part-1)

  1. Remote controlled Home automation without using microcontroller (Part-2)
  2. Remote controlled Home automation without using microcontroller (Part-1) 
  3. AVR atmega32 chip to chip serial communication 

Leave a Comment

= 4 + 6

(Spamcheck Enabled)

Read previous post:
Easy Arduino Menus for Rotary Encoders
Easy Arduino Menus for Rotary Encoders

Rotary encoders with centre-push buttons are cool input hardware for projects, especially if you want to be able to scroll...

Scroll to top