Project tutorial
Remote Controlled Smart Lamp

Remote Controlled Smart Lamp © GPL3+

Control your home appliances through any remote very easily.Even you can use your old remote to control home appliances.

  • 3,856 views
  • 1 comment
  • 14 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
Infrared (IR) Proximity / Obstacle Detecting Sensor Module
×1

About this project

Idea Behind!

Wow! Its amazing that you can easily control any appliances through any of your old/new Remote. As we have developed this project cost effective too, so we've used relay and an IR sensor only, which costs less than $5.

Working!

First you need to go to this page and download the IR library. You just need to follow the read me file to install. I think that any IR remote control can do this, I’ll be using a Philips Universal one. The infrared receiver has 3 pins:

  • First pin: Vout, outputs HIGH when no signal is present and LOW when a mark is received.
  • Second pin: GND.
  • Third pin: Vcc.

Connect relay pins:

  • Gnd( A ) with Arduino Gnd
  • Middle pin(A/C) pole with AC power as given in circuit.
  • RELAY NO Pin with One lamp pin(wire)
  • RELAY ( B ) with lamp another pin(wire)

Now you will get two wires as shown in given below figure, one from relay side and another from lamp (bulb) side connect to ac (but wait here.). Circuit Diagram:

You need to wire your circuit something like this. And then COPY AND PASTE BELOW GIVEN CODE in Arduino then upload it:

/*Created By: Anshul Pareek
*usage : read IR SIGNALS AND PRINT ON SERIAL
*/
#include <boarddefs.h> 
#include <ir_Lego_PF_BitStreamEncoder.h> 
#include <IRremote.h> 
#include <IRremoteInt.h> 
int RECV_PIN = 9; 
IRrecv irrecv(RECV_PIN); 
decode_results results; 
void setup() 
{ 
 Serial.begin(9600); 
 irrecv.enableIRIn(); // Start the receiver 
} 
void loop() 
{ 
 if (irrecv.decode(&results)) 
   { 
     
    Serial.println(results.value); 
    
    irrecv.resume(); // Receive the next value 
   } 
   delay(000); 
} 

Open your serial port by going tools->serial monitor. When you run this code and pressing remote buttons you'll see some of the codes of your remote buttons like as. I've received POWER button code as: 490607474 VOLUME UP: 1053668050 Write these code somewhere for our upcoming code below. After remembering above code use in below given code in condition part:

/*Light on off code*/
#include <boarddefs.h> 
#include <ir_Lego_PF_BitStreamEncoder.h> 
#include <IRremote.h> 
#include <IRremoteInt.h> 
int RECV_PIN = 9; 
int OUT_PIN=8;
IRrecv irrecv(RECV_PIN); 
decode_results results; 
void setup() 
{ 
 pinMode(OUT_PIN,OUTPUT); 
 Serial.begin(9600); 
 irrecv.enableIRIn(); // Start the receiver 
} 
void loop() 
{ 
 if (irrecv.decode(&results)) 
   { 
    Serial.println(results.value); 
    if(results.value == 490607474){ //Please replace your remote button code for which you want to on the light
       digitalWrite(OUT_PIN,HIGH); 
       delay(1000); 
     }else{ 
       digitalWrite(OUT_PIN,LOW); 
     } 
     delay(1000); 
    irrecv.resume(); // Receive the next value 
   } 
   
   delay(000); 
} 

Now upload above code in Arduino and run this code. If everything is alright your lights will glow and off with your remote buttons. As I am controlling only one Bulb only but you can control more than one bulb using different pins and relays and please beware about the AC Connections. We are going to Launch more interesting clone of this project soon. Have query shout in comment box.You can check out our latest project by going below url: http://www.gadgetprogrammers.parikshacrack.com

Thanks for your time.

Code

Arduino check Remote CodeArduino
Check remote codes using this code
/*Created By: Anshul Pareek
*usage : read IR SIGNALS AND PRINT ON SERIAL
*/
#include <boarddefs.h> 
#include <ir_Lego_PF_BitStreamEncoder.h> 
#include <IRremote.h> 
#include <IRremoteInt.h> 
int RECV_PIN = 9; 
IRrecv irrecv(RECV_PIN); 
decode_results results; 
void setup() 
{ 
 
 Serial.begin(9600); 
 irrecv.enableIRIn(); // Start the receiver 
} 
void loop() 
{ 
 if (irrecv.decode(&results)) 
   { 
     
    Serial.println(results.value); 
    
    irrecv.resume(); // Receive the next value 
   } 
   delay(000); 
} 
Arduino Switch light on offArduino
Use this code to switch on off the light remember to replace remote button code.
/*Light on off code*/
#include <boarddefs.h> 
#include <ir_Lego_PF_BitStreamEncoder.h> 
#include <IRremote.h> 
#include <IRremoteInt.h> 
int RECV_PIN = 9; 
int OUT_PIN=8;
IRrecv irrecv(RECV_PIN); 
decode_results results; 
void setup() 
{ 
 pinMode(OUT_PIN,OUTPUT); 
 Serial.begin(9600); 
 irrecv.enableIRIn(); // Start the receiver 
} 
void loop() 
{ 
 if (irrecv.decode(&results)) 
   { 
    Serial.println(results.value); 
    if(results.value == 490607474){ //Please replace your remote button code for which you want to on the light
       digitalWrite(OUT_PIN,HIGH); 
       delay(1000); 
     }else{ 
       digitalWrite(OUT_PIN,LOW); 
     } 
     delay(1000); 
    irrecv.resume(); // Receive the next value 
   } 
   
   delay(000); 
} 

Schematics

Full Circuit Diagram
Circuit Diagram
Remote light s2vsby63kj

Comments

Team gadget programmers

Anshulpareek
anshulpareek
  • 5 projects
  • 63 followers

Additional contributors

Published on

November 5, 2017

Members who respect this project

Anshulpareek1061999AdambenzDudasertorio13177337 583621865141223 9043282528704070828 n11143226 395468583973521 5421431805042281329 nProfile eooucbil68Sagar73594

and 6 others

See similar projects
you might like

Similar projects you might like

Remote and Voice Controlled Smart Fan

Project tutorial by Paul Trebilcox-Ruiz

  • 4,049 views
  • 3 comments
  • 19 respects

TV remote controlled Light and Fan

Project tutorial by Rishabh

  • 17,118 views
  • 12 comments
  • 62 respects

Remote Lamp

Project tutorial by Kutluhan Aktar

  • 1,843 views
  • 0 comments
  • 7 respects

Multi-Source Controlled USB Lamp

Project tutorial by Amal Mathew

  • 2,932 views
  • 2 comments
  • 19 respects

Remote Controlled Bulb With Arduino

Project tutorial by muhammed shameel k.v

  • 1,774 views
  • 0 comments
  • 11 respects

Remote Controlled Jack-o-Lantern

Project tutorial by Josh From BreakoutBros.com

  • 1,563 views
  • 0 comments
  • 1 respect
Add projectSign up / Login