Arduino Interfacing IR Remote And four Relay Module

In this article we will learn how to interface ardino interfacing IR Remote And Four Relay Module.
In the last post we learn about ultrasonic sensor interface with buzzer and vibrator ,you can vist our website ,
Now a days i m busy in giving interviews thats why there was a little delay of making the projects ,i hope you appreciate my work ,lets discuss about todays project.

Component List.                                                                   

  1. Arduino Nano (1 Pcs)
  2. Bread Board (1 Pcs)
  3. LED         (4)
  4. Resister 100 Ohm (4)
  5. IR Reciver (1)
  6. IR Transmeter (1)
  7. Four Relay Module (1)
  8. Connecting Wire (As Req.)
  9. 9V Bettry
  10. LCD (16*2)
  11. Toggle switch

Aplication.

  • Automatic Fan Operating
  • Home lighting circuit
  • Automatic Car door open
  • Motor Control
  • Street Light
  • Industrial Lighting
  • Automatic Door Open

Construction.

  • Place ardinuo nano,IR reciver,LED’s, and Resistor’s on bread board according to diagram.
  • Connect midle wire of IR sensor to 3.3V of arduino nano.
  • Connect signal wire of IR sensor to digital pin(2)
  • Connect ground wire of IR sensor to GND
  • Connect D3,D4,D5,D6 to four module relay point’s IN1,IN2,IN3,IN4.
  • Connect VCC point of four relay module to 5V of (Arduino).
  • Connetc GND point of four relay module to GND of arduino.
  • Connect common point’s of four relay’s output to 5V of arduino.
  • Connect each relay NO point to LED’s through 100 Ω resistor.
  • Connect LCD point to arduino respectively RS to D8, EN to D9, D4 to D10, D5 to D11, D6 to D12, D7 to D13, K to GND, VDD to 5V, VO to GND.
  • Dress up the wire’s neat and tidy.

light detector circuit diagram in Proteus

Arduino  DHT11  4Relay and LCD display

Variable half wave power supply circuit using 7805 regulator in proteus

earthquake alarm project explanation

 

 

Working.

After connecting all the components according to given construction and diagram.

  1. Turn on the toggle switch
  2. When you give a signal to IR reciver by pressing button 1 of remote then relay 1 is operate.
  3. When you give a signal to IR reciver by pressing button 2 of remote then relay 2 is operate.
  4. When you give a signal to IR reciver by pressing button 3 of remote then relay 3 is operate.
  5. When you give a signal to IR reciver by pressing button 4 of remote then relay 4 is operate.
  6. For turning off the relay press power button of remote.

Advantages.

  1. We can automate home lightening system.
  2. We can automate car door.
  3. We can automate Home door.
  4. We can automate fan circuit.
  5. We can automate water pump.
  6. We can automate street lightening system.
  7. We can automate sign board.

light detector circuit diagram in Proteus

Arduino  DHT11  4Relay and LCD display

Variable half wave power supply circuit using 7805 regulator in proteus

earthquake alarm project explanation

 

 

Programing.

In this paragraph we will learn how to program this Arduino Nano four relay module.

#include <IRremote.h>
#include <LiquidCrystal.h>

int RECV_PIN = 2; // IR Receiver pin
IRrecv irrecv(RECV_PIN);
decode_results results;

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
“`
#define RELAY1 6
#define RELAY2 5
#define RELAY3 4
#define RELAY4 3

void setup() {
pinMode(RELAY1, OUTPUT);
pinMode(RELAY2, OUTPUT);
pinMode(RELAY3, OUTPUT);
pinMode(RELAY4, OUTPUT);

digitalWrite(RELAY1, HIGH); // Turn off relays initially
digitalWrite(RELAY2, HIGH);
digitalWrite(RELAY3, HIGH);
digitalWrite(RELAY4, HIGH);

lcd.begin(16, 2); // Adjust for your LCD type (cols, rows)
lcd.print(“IR Relay Control”);

irrecv.enableIRIn(); // Start the IR receiver
}

void loop() {
if (irrecv.decode(&results)) {
lcd.clear();

switch (results.value) {
case 0xFFA25D: // Button code 1 from your IR remote
digitalWrite(RELAY1, !digitalRead(RELAY1)); // Toggle relay state
break;
case 0xFF629D: // Button code 2 from your IR remote
digitalWrite(RELAY2, !digitalRead(RELAY2));
break;
case 0xFFE21D: // Button code 3 from your IR remote
digitalWrite(RELAY3, !digitalRead(RELAY3));
break;
case 0xFF22DD: // Button code 4 from your IR remote
digitalWrite(RELAY4, !digitalRead(RELAY4));
break;
default:
break;
}

lcd.setCursor(0, 0);
lcd.print(“Relay 1: “);
lcd.print(digitalRead(RELAY1) ? “Off” : “On”);

lcd.setCursor(0, 1);
lcd.print(“Relay 2: “);
lcd.print(digitalRead(RELAY2) ? “Off” : “On”);

delay(1000);
irrecv.resume(); // Receive the next value
}
}