Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Remote controlled LED lighting effects

Remote controlled LED lighting effects

LED’s have become most important component in lighting industry due to its miniature size and less power consumption. Also LED lights are lot more attractive than the primitive lights used once. This project focused on building an remote controlled LED with multiple lighting effects. Imagine setting the mood of your room using remote, will be cool isn’t it.

DESIGN OF RECEIVER AND CONTROLLER:

receiver-controller-remote-control-led-lightsThe receiver and Controller part comes with TSOP1738, a receiver capable of receiving IR beam of 38Khz which is the operating frequency of a normal household remote. This receiver acts as an activator for the controller connected to it. PIC12F1822, a 8 pin low end microcontroller is deployed as a controller in this project. Other low end microcontrollers can also be used for this purpose.

DESIGN OF LED DRIVER:

led-lighting-transistor-driversThe Microcontroller cannot produce enough current to drive a large set of transistors. So we are using a Transistors as a driver element in this circuit, RA2 pin from the controller feeds the signal to the base of these transistors. The reason for using two individual transistors is to create attractive effect when driven by a pulse from the Microcontroller. When the Pulse from MCU is Logic 1 Q1 will activate the LED’s connected to it, when it was logic 0 Q2 will activate all the LED’s connected to it.

TSOP 1738:

tspo-1738-pin-diagram

 

TSOP1738 is a simple IR receiver capable of receiving IR pulses of frequency 38Khz. The output of this component is active low which means that this component gives low output when IR beam is incident on it and high output in the absence of IR beam. Refer the “Datasheet” for more information about this component.

METHODS TO IMPLEMENT MULTIPLE EFFECTS IN LED LIGHTS:

We are going to add effects using two methods in this project. You can choose the method you find it comfortable to use.

1) USING INBUILT PWM:

This is a pretty old trick in sleeves of every designer when comes to controlling. The PIC12F1822 has an inbuilt PWM module using which we are going to control the illumination of led.

CODE:

#include <main.h>
#bit TRIS_PIN1=0x8C.0
#bit PIN1=0x0C.0
void main()
{
   int16 i=0;
   TRIS_PIN1=1;
   setup_timer_2(T2_DIV_BY_16,255,1);      //819 us overflow, 819 us interrupt
   setup_ccp1(CCP_PWM|CCP_SHUTDOWN_AC_L|CCP_SHUTDOWN_BD_L);
   while(TRUE)
   {    
      set_pwm1_duty(i);
      if((PIN1==0)&&(i<=600))
      {
        i=i+100;
       }
      else if((PIN1==0)&&(i>600))
        i=100;
   }
}

In the above code i varied the value of integer “i” based on the incident pulse on TSOP 1738. Thus with each press on the remote the duty cycle of PWM will alter thus making LED to glow in multiple effects.

2) USING VARIABLE DELAY:

In this method we are going add effects by altering the time delay manually between Logic 1 and Logic 0. This method will be useful when you want to do this project with even low end controllers with no inbuilt PWM.

CODE:

#include <main.h>
#bit TRIS_PIN1=0x8C.0
#bit TRIS_PIN2=0x8C.2
#bit PIN1=0x0C.0
#bit PIN2=0x0C.2
void main()
{
   int16 i=0;
   int16 j=0;
   TRIS_PIN1=1;
   TRIS_PIN2=0;
   while(TRUE)
   {    
     PIN2=1;
     delay_ms(i);
     PIN2=0;
     delay_ms(j);
      if(PIN1==0)
      {
      if(i<=600)
       {
        i=i+100;
        j=1000-i;
       }
      else 
        i=100;
      }
   }
}

In the above code i varied the “delay_ms()” value between On and Off time based on the incident pulse on TSOP 1738. Thus with each press on the remote the duty cycle of PWM will alter thus making LED to glow in multiple effects. Note that using variable delay may need the IR beam to be continuously incident on TSOP for some time since microcontroller will be busy executing the delay at the instant you press the button.

The post Remote controlled LED lighting effects appeared first on Gadgetronicx.

Read more Here







 

More Articles to Read

App note: SOLERIQ® L38
App note: SOLERIQ® L38
How to build a DIY Penta colored star LED light
How to build a DIY Penta colored star LED light
Keychainino: a programmable, playful Key Ring
Keychainino: a programmable, playful Key Ring
Accurately simulate an LED
Accurately simulate an LED
TritiLED – Multi-year always-on LED
TritiLED – Multi-year always-on LED
850nm infrared LED outputs 770mW at 1A
850nm infrared LED outputs 770mW at 1A
Wireless mood light with Arduino & BLYNK
Wireless mood light with Arduino & BLYNK
Stunning RGB light effects using Arduino Nano
Stunning RGB light effects using Arduino Nano
Smart LED Flashlight
Smart LED Flashlight
Proteus Tutorial – Light Emitting Diode (LED) and Bar Graph Display
Proteus Tutorial – Light Emitting Diode (LED) and Bar Graph Display
AVR vs PIC: The case of the candle
AVR vs PIC: The case of the candle
Arduino 8×8 LED Matrix using MAX7219
Arduino 8×8 LED Matrix using MAX7219
Dark Sensitive Switch – LED Light
Dark Sensitive Switch – LED Light
384:LED – Mini RGB LED array
384:LED – Mini RGB LED array
Sound to Light Effect
Sound to Light Effect
Making the threat of radiation visible with lightmapping
Making the threat of radiation visible with lightmapping
LED current regulator has low dropout
LED current regulator has low dropout
Interfacing 8×8 LED Matrix with Arduino
Interfacing 8×8 LED Matrix with Arduino
A Smart Night Lamp for Kids
A Smart Night Lamp for Kids
Researchers develop LED covering full visible light spectrum
Researchers develop LED covering full visible light spectrum

Top


Shares