Home Automation Using Arduino Uno

Now a days everyone wants to make own home automated and wants to control light, fan and other home appliance very easily. Home automation is a large project which can be developed using Arduino Uno and IR Remote. Let’s start, we are going to make home automation which can be controlled using the remote. This home automation can be built using different wireless technology like IR remote control, Bluetooth control and Wi-Fi control. Read our Article on Home Automation using Arduino Uno.

Component Requirement of Home automation

  • Arduino Uno
  • IR remote
  • Infrared receiver (TSOP1738)
  • Relay Module
  • Lamp and Lamp Holder
  • Breadboard

Circuit Diagram of Home automation

Circuit Diagram of Home Automation


Explanation of Home automation

Step-1: Infrared receiver (TSOP1738) connect to Arduino

TSOP17XX is an IR receiver for Infrared PCM remote control systems. In this home automation project, we have used in Infrared receiver (TSOP1738). The carrier frequency of TSOP1738 is 38KHz.

 Pinout of IR Receiver (TSOP1738):


  • Connect the output pin of  TOSP1738 IR Receiver to Arduino digital pin 9 to get the TV remote signal or IR remote signal
  • Download the IR Remote Library and place in Arduino/libraries folder.
  • Open the serial terminal at 9600 baud rate.
  • Press IR Remote button while pointing remote towards the IR Receiver
  • You will see some decimal value when pressing the button
  • Note Down
  • Repeat a few times and make sure you are getting the same decimal value for a single button press.
  • Repeat you are getting the decimal value for another button.

Step-2: – 4 channel Relay module is connected to Arduino Uno

Relay is one kind of electrically operated switch which is main part of Home automation. The relay has two different types of electrical contacts – normally open (NO) and normally closed (NC). The one you use will depend upon whether you want the 5V signal to turn the switch on or turn the switch off. The 120-240V supply current enters the relay at the common (C) terminal in both cases.

This is a 5V 4-channel relay interface board, and each channel needs 15-20mA driver current.

Pinout of 4 channel relay module:

Pinout of 4 channel relay module

we will connect 4 channel modules with the Arduino uno. Connect the module pins to the Arduino as follows –

Code of Home Automation

#include <IRremote.h>
#define irPin 9
IRrecv irrecv(irPin);
decode_results results;
#define r1 5
int relay1 = LOW;
#define r2 4
int relay2 = LOW;
#define r3 3
int relay3 = LOW;
#define r4 2
int relay4 = LOW;
void setup()
    pinMode(r1, OUTPUT);
    pinMode(r2, OUTPUT);
    pinMode(r3, OUTPUT);  
    pinMode(r4, OUTPUT);
void loop() {
   if (irrecv.decode(&results)) {
      switch (results.value) {
                  case 33441975:
            digitalWrite(r2,0);  //all off
                    case 33454215:
            digitalWrite(r2,1);  //all on
                       case 33444015:
            relay1 = ~ relay1;
            case 33478695:
            relay2 = ~ relay2;
            case 33486855:
            relay3 = ~ relay3;
             case 33435855:
            relay4 = ~ relay4;


Working Principle of Home Automation

In home automation project, an Arduino act as a controlling unit. A TSOP1838 IR Receiver is using for receiving signal from the IR remote. Output pin of IR receiver  is connected to the Arduino, when any button of the remote is pressed, IR LED of remote sends a unique encoded signal, this signal is received by receiver and sent to the Arduino, The Arduino decode the signal and turn on and off the lights or fan or AC according to the signal with the help of relay module.

Buy Home Automation Project Component 

Name of The Component

Arduino Uno

Infrared receiver (TSOP1738)

IR Remote

Relay Module



Read our more article

2 thoughts on “Home Automation Using Arduino Uno”

  1. At the very beginning of this write-up, you say, “In that time home automation is a large project which can be developed using Arduino.”

    I don’t know what you mean by “in that time” — you haven’t said what time you’re talking about. You can’t say “that time” when you haven’t mentioned a time.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.