Project tutorial

Remote Controlled Smart Lamp © GPL3+

Remote control your home appliances through any remote very easily. You can use your old remote to control home appliances.

  • 1,495 views
  • 0 comments
  • 10 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.

Schematics

Full Circuit Diagram
Circuit Diagram
Remote light s2vsby63kj

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); 
} 

Comments

Similar projects you might like

Version 2.0 Advanced Attendance System (Without Ethernet)

Project tutorial by GadgetProgrammers

  • 2,482 views
  • 5 comments
  • 42 respects

Get The Arduino Dice

by Ingo Lohs

  • 222 views
  • 0 comments
  • 4 respects

Control LED Using Your Voice Command

by IoTBoys

  • 512 views
  • 0 comments
  • 7 respects

Critter: Crawling Arduino Robot

Project showcase by Slant Concepts

  • 4,753 views
  • 10 comments
  • 30 respects

Musical Fairy Lights

Project tutorial by Ian Cumming

  • 418 views
  • 0 comments
  • 4 respects

Cloud Costume

Project tutorial by Monica Houston

  • 1,002 views
  • 3 comments
  • 10 respects
Add projectSign up / Login