Browse over 10,000 Electronics Projects

Arduino based remote controlled lights

Arduino based remote controlled lights

Christmas is just around the corner and its time to start planning things to lighten up this festive season. Today you are about to see building of Arduino based Remote controlled lights with adjustable lighting effects. The coolest thing about this project is controlling the effects of LED lighting using a typical household Remote and Arduino. This eliminates the primitive way of using pot to control LED effects and go wireless.

PARTS REQUIRED:

  1. TSOP1738
  2. Arduino Uno
  3. LEDs
  4. Transistors

DESIGN:

arduino-remote-controlled-effect-lights

Arduino forms the heart of this system where a simple blink code with varied time delays is used to produce the lighting effect. Two NPN transistors was used here as a switch to turn the LED’s ON and OFF since the Arduino cannot source large current to power up the LED’s by itself. And TSOP1738 IR receiver to receive the IR beam from the remote and send signals to the Arduino.

TSOP 1738:

TSOP1738-pin-diagram

TSOP1738 is a simple IR signal receiver that is capable of receiving IR signals of frequency 38Khz at which most of our household remotes work. This made the project fit to be controlled with any remotes we use in our house. This is an active low sensor which gives low output when IR signal incident and high in absence of IR signal. We have to program Arduino accordingly to receive this TSOP1738 input accordingly.

WORKING EXPLANATION:

The Arduino acts as a simple activator and a delay generator for the effects. Meanwhile the transistor is to switch the LED sets connected to the pin 7 of the LED. The IR receiver receives the incoming IR signal and triggers interrupt to the Arduino. So when user presses any button in the remote facing the sensor it give low signal in its output pin which in turn create an interrupt in Arduino. With each encountered interrupt the Arduino uses set of delay value between the ON and OFF state of the LED which will be predefined in the code. This way the LED blink will overall looks like a beautiful effect to the user.



Advertisement1


This makes the two set of LED’s to turn on and off at the same time. And varying time delay will take care of creating attractive effect.

MAKING IT MORE ATTRACTIVE:

arduino-alternate-led-effects-remote-control

Now take a look at this design, can you point out the difference between these two designs given above. Yes, you are right i have replaced the NPN transistor Q2 with PNP transistor  which only lights up when there is a low signal that <0.7v in the base.  Now our light effects turns out even more attractive with a Set of LED’s glow when 7th pin is high and other set glows when 7th pin is low. This gives an alternate lighting effect and the varying delay makes it even more attractive with every remote key press.

You can decrease of increase the LED’s in each set by managing the current and voltage supplied. Alter the above designs accordingly to meet your requirements.

ALGORITHM TO CODE:

  1. Declare the Time delay for ON and OFF time in separate arrays.
  2. Define Pin 7 as output and attach interrupt to pin 3 of the Arduino.
  3. Write the LED blink routine in the infinite loop with delay values fetched from the array.
  4. Inside the ISR (interrupt routine) force the delay values to increment with each occurrence of interrupt to Arduino.

WORKING VIDEO:

CODE:

int effects_on[5]={300,600,1250,1600,2000};      //Delay for On time
int effects_off[5]={100,300,675,800,1000};       //Delay for Off time
short int i;

void setup() {
  pinMode(7,OUTPUT);
  i=0;
  attachInterrupt(digitalPinToInterrupt(3), value,LOW);       //External low trigger interrupt in pin 3
}

void loop() {
  digitalWrite(7,HIGH);
  delay(effects_on[i]);
  digitalWrite(7,LOW);
  delay(effects_off[i]);
}

void value()                //ISR to vary delay with each interrupt occurrence
{
  if(i<4)
  i=i+1;
  else 
  i=0;
}

 NOTE:

  • Increase/Decrease the LED’s with power considerations in your mind.
  • Source the Arduino and LED sets from the same power source.
 


Top