Project showcase
IR Home Automation With Intelligent Lighting

IR Home Automation With Intelligent Lighting © GPL3+

With help of this device we can control multiple household appliances with help of an IR remote.

  • 2,546 views
  • 0 comments
  • 5 respects

Components and supplies

Apps and online services

About this project

I began my project by tinkering around with an old IR receiver which I salvaged from an old CRT TV (coz the one I brought from store gave me random readings).

Each button in an IR remote corresponds to a unique set of hexadecimal codes, so in order to know which is which attach your IR sensor to Arduino (plz refer the sensors data sheet for the pin layout)

Further details on the project is available on this link.

Now to the intelligent lighting part.

Intelligent lighting is a lighting technology designed for energy efficiency. This may include high efficiency fixtures and automated controls that make adjustments based on conditions such as occupancy or daylight availability. Lighting is the deliberate application of light to achieve some aesthetic or practical effect. It includes task lighting, accent lighting , and general lighting. Solar streetlights can be easily integrated with a dusk-dawn controller by simply employing a PNP transistor and a few resistor. The unit is compact and has a rich light output, the system is an improved version of the classic ambient-light sensor circuitry.

I bypassed the connection to a DUSK-DAWN Controller to one of the relays attached to the circuit. Such that when the relay is in high state instead of Lighting the LED it goes to a Controller which measures the light ambiance of the room and decides whether to turn the LED on or off.

Schematics

Schematics of the circuit is given below:

The circuit needs a supply voltage of 12V, but care should be taken to ensure that adequate current is available for the whole system

Circuit of the light unit is built around light dependent resistor, op-amp LM358, transistor BC547,LEDs, 12V DC power supply . The LDR has very low resistance when exposed to high-intensity light and very high resistance when it is in the dark, LDR and resistor form a voltage divider connected at the inverting (IN-) input of IC, Non-inverting (IN+) input of IC is connected to 10K potmeter VR to adjust the switching-threshold level as desired If ambient lights level is sufficient the circuit id in quiescent state. When the light level decreases, resistance of LDR increases, which causes volt age across resistor to decrease, hence the circuit becomes active.

Code

Arduino CodeC/C++
#include<LiquidCrystal.h>
#include <IRremote.h>
const int RECV_PIN=14;
IRrecv irrecv(RECV_PIN);
decode_results results;
#include<LiquidCrystal.h>
LiquidCrystal lcd(6,7,8,9,10,11);
#define Fan 3
#define auto 2
#define Light 4
#define TV 5
int a = 12;
//const int LED=13;
int val=0;
int i=0,j=0,k=0,p=0,q=0,r=0,n=0;
void setup()
{
  Serial.begin(9600);
  lcd.begin(16,2);
  pinMode(Fan, OUTPUT);
  pinMode(Light, OUTPUT);
  pinMode(TV, OUTPUT);
  pinMode(auto, OUTPUT);
  pinMode(a, OUTPUT);
  //pinMode(LED,OUTPUT);
  //digitalWrite(13,HIGH);
  lcd.print("Remote Controlled"); 
  lcd.setCursor(0,1);
  lcd.print("Home Automation"); 
  delay(2000);
  lcd.clear();
  lcd.print("INTRODUCTION TO");
  lcd.setCursor(0,1);
  lcd.print("SUSTAINABLE ENGG");
  delay(2500);
  lcd.clear();
  lcd.print("**** ADERSH ****");
  lcd.setCursor(0,1);
  delay(2500);
  lcd.print("System Ready...");
  delay(1000);
  irrecv.enableIRIn(); // Start the receiver
  irrecv.blink13(true);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Fan   Light  LED ");
  lcd.setCursor(0,1);
  lcd.print("OFF   OFF    OFF");
}
void loop() 
{
   
   val= analogRead(1);
  //Serial.println(results.value,DEC);
  
  if (irrecv.decode(&results)) 
   {
     Serial.println(val);
    
   Serial.println(results.value,DEC);
     delay(100);
     lcd.setCursor(0,0);
     lcd.print("Fan   Light  LED"); 
     if(results.value==2640478335)
     {
        i++;
        int x=i%2;
        digitalWrite(Fan, x);
        lcd.setCursor(0,1);
        if(x)
        lcd.print("ON  ");
        else
        lcd.print("OFF ");
       // delay(200);
     }
    
     else if(results.value==2640462015)    //  key 1 
     {
        j++;
        int x=j%2;
        digitalWrite(Light, x);
        lcd.setCursor(6,1);
        if(x)
        lcd.print("ON   ");
        else
        lcd.print("OFF  ");
       // delay(200);
     }
   
    else if(results.value==2640494655)
     {
        k++;
        //int x=k%2;
       // int h=(k/3);
        //Serial.println(k);
       // digitalWrite(TV, x);
        lcd.setCursor(12,1);
        if(k==1)
        {
          lcd.print(" ON ");
          digitalWrite(TV, k);
        }
        else if(k==2)
        {
          
          lcd.print("AUTO");
          digitalWrite(a, HIGH);
          digitalWrite(auto, 1);
          digitalWrite(TV, 0);
          
          
         
         //Serial.println(val);
          }
          
          
        
        else if(k==3)
        {
          lcd.print(" OFF");
          k=0;
          digitalWrite(auto, k);
          digitalWrite(a, 0);
          digitalWrite(TV, k);
          
        }
       
           
       
       // delay(200);
     }
       
       
       else if(results.value==2640474255)
       {
        n++;
        int x=n%2;
        digitalWrite(TV, x);
        digitalWrite(Fan,x);
        digitalWrite(Light,x);
        lcd.setCursor(0,1);
        if(x)
        lcd.print("ON     ON    ON ");
        else
        lcd.print("OFF    OFF   OFF");
        //delay(200);
       }
       
       /*else if(results.value==2640474255)
       {
        p++;
        int x=k%2;
        //digitalWrite(TV, x);
        lcd.setCursor(13,1);
        if(x)
        lcd.print("AUTO");
        else
        lcd.print("OFF");
       }*/
     irrecv.resume(); // Receive the next value
     //delay(100);
   }
}

Schematics

CIRCUIT DIAGRAM
COMPONENTS:
Arduino UNO × 1
16×2 LCD display × 1
5V Relay × 3
IC ULN2003 × 1
TSOP1738 (IR RECEIVER) × 1
10K POT × 1
JUMPERS, BATTERY, AC SOURCE... so on.
Ir remote controlled home automation circuit diagram

Comments

Similar projects you might like

IR Remote Controlled Home Automation

Project tutorial by suhail jr

  • 10,454 views
  • 7 comments
  • 17 respects

Android App-Based Home Automation System Using IOT

Project tutorial by Team Autoshack

  • 24,826 views
  • 17 comments
  • 75 respects

Arduino: Switching ON/OFF Appliances Using IR Remote

Project showcase by Naman Chauhan

  • 8,509 views
  • 0 comments
  • 117 respects

Simple IR Reciver

by Treebug842

  • 899 views
  • 0 comments
  • 7 respects
Add projectSign up / Login