Arduino 4 Channel Infra-Red Remote Controlled ON/OFF Switch

The project published here allows turning ON and OFF  lights fans using infra red remote.  Project consist 4 channel Nano relay shield, low cost infra-red remote.  The project can control Fan, AC lamps AC230V/AC110V or DC load upto 7Amps.

Features

  • Supply 12V DC
  • Current consumption 250mAmps ( When All Relays are in On State)
  • Relay Switch Load 7Amps AC /DC

Arduino Pins

  • 4 Relay: Arduino Pin D2, D3, D4, D5
  • Infra-Red Receiver TSOP1838: Arduino Pin D6


Arduino Code Github

Download Arduino Code

Download PDF Schematic

Download Infra Red Library


Decoding the IR code is important to pair any Infra-Red transmitter with the receiver, check bellow link to understand the decoding of IR signal from various infra-red remote protocols.

How to Setup the IR Remote ( Link)

Adafruit Receving and Decoding Infra Red Code (Link)


Infra-Red Code Decoder (Arduino Code)


#include <IRremote.h>

int IRPIN = 6;

IRrecv irrecv(IRPIN);

decode_results result;

void setup()
{
Serial.begin(9600);
Serial.println(“Enabling IRin”);
irrecv.enableIRIn();
Serial.println(“Enabled IRin”);
}

void loop()
{
if (irrecv.decode(&result))
{
Serial.println(result.value, HEX);
irrecv.resume();
}
delay(500);
}


Leave a Reply

Your email address will not be published. Required fields are marked *