Professional Documents
Culture Documents
LED lighting is an emerging lighting technique which is predicted to completely replace the present lighting techniques. There are several approaches to white light generation. One approach is to use a blue or UV LED to excite one or more phosphors to give white light. This method is not efficient. This project attempts to make white light from the basic colours Red, Green and Blue. The method followed is high frequency switching of these three colours to give a mixing effect. Conventional RGB LEDs available in the market is used for the same. The high frequency switching pulses for Red, Green and Blue LEDs are generated using PIC18F4550. This is used to drive an optocoupler that works as a relay to switch the corresponding colours giving a mixing effect.
Chapter 1 Introduction
White light is composed of all spectral contents in the visible region. The rapid development of light-emitting diodes (LEDs) over the last few years has opened up new opportunities in the general illumination market. The efficacy of white light from LEDs is now over 20 lm/W, which already exceeds that of incandescent lamps. It is forecast that LED efficacy will reach 50 lm/W in near future, which approaches that of compact fluorescent lamps. In addition, higher power packages are becoming available that enable compact lighting systems with LEDs. However, additional challenges remain. The general illumination market has strict requirements on the quality of white lightlamps of the same type must all appear to have the same colour point. There are several approaches using LEDs to achieve white light. One approach is to use a blue or UV LED to excite one or more phosphors to give white light. The focus here is on the use of red, green, and blue LEDs (RGB-LEDs) to produce white light. The advantages of RGB-LEDs are that they provide a light source that can have a variable color point, and theoretically can provide the highest efficiency LED-based white light. The ability to change the color point of the lamp provides a new feature to general illumination that has the potential to generate new applications and hence new market opportunities. A key challenge for RGB-LEDs is to maintain the desired white point within acceptable tolerances. This arises from the significant spread in lumen output and wavelength of manufactured LEDs, and the changes in LED characteristics that occur with temperature and time. Maintaining the desired white point can only be achieved with feedback schemes to control the relative contributions of red, green, and blue to the white light.
3.1 Super Flux RGB LED The RGB LED used in this project is the PIRANHA Super Flux RGB LED. It is a 7.6mmX7.6mm square LED. The materials used is
1. AlGaInP for Red colour 2. InGaN for Green
Some of the main features of this LED are 1. High Luminous output 2. Common anode 3. Superior weather resistance 4. Water clear lens 5. 5mm lens 6. Ultra brightness 7. Wide viewing angles
8. RoHs compliance
The rating and optical characteristics of Superflux RGB LED is give below.
standard set of 75 PIC18 core instructions, as well as an extended set of eight new instructions for the optimization of code that is recursive or that utilizes a software stack. Most of the standard instructions are a single program memory word (16 bits) but there are four instructions that require two program memory locations. Each single-word instruction is a 16bit word divided into an opcode, which specifies the instruction type and one or more operands, which further specify the operation of the instruction. Fig 4.1 shows the detailed pin diagram of pic18F4550 used in this project.
Fig 4.1 PIC18F4550 pin diagram A 5V supply is connected across VDD and VSS pin number 11 and 12 respectively and also to pin number 1 through a resistor. PIC18F4550 supports a total of 16384 instructions. It also has high current source/sink capability of 25mA.
4.2.2 MCT2E optocoupler The PIC produces a series of pulses for each of the three colours red, green and blue. Since the LEDs are common anode type, we need a switching circuit to convert the pulses to switching commands for the three LEDs. Here we are using an optocoupler MCT2E for this purpose. The optocoupler figure is given below.
Fig 4.2 Optocoupler MCT2E These are Standard Single Channel Phototransistor Couplers. The MCT2/ MCTE family is an Industry Standard Single Channel Phototransistor. Each optocoupler consists of gallium arsenide infrared LED and a silicon NPN phototransistor. This isolation performance is accomplished through double molding isolation manufacturing process. These isolation processes and the quality program results in the highest isolation performance available for a commercial plastic phototransistor optocoupler. Some of the characteristics of MCT2E optocoupler is given in the following tables. Table 4.1 Absolute Maximum Input Ratings Parameter Reverse voltage Forward current Surge current Power dissipation T <= 10 microsec Test condition Value 6 60 2.5 100 Unit V mA A mW
Table 4.2 Absolute Maximum Input Ratings Parameter Test condition Value Unit
9
Collector-emitter breakdown Emitter-base breakdown voltage Collector current Power dissipation T <= 10 ms
70
7 100 150
V mA mW
4.3 Circuit
Fig 4.3 Circuit Diagram The above figure shows the circuit diagram for this project. The LED switching pulses are generated at high frequency using a PIC18F4550. Port D of PIC18F4550 is configured as an output port first. Then, the pins 19, 20 and 21 corresponding to Port D RD0, RD1 and RD2 are programmed to output the pulse. Since we are using common anode type RGB LED, these pulses cannot be used to drive the LED array directly. For this , an optocoupler MCT2E is required. The pulses from the Port D pin RD0, RD1 and RD2 corresponding to red, green and blue are given to one input of the optocoupler each (pin number 1). Pin number 2 of all three optocouplers are shorted and grounded.
10
In the LED array, all the common anodes are shorted and connected to +5V supply. The anodes corresponding to red, green and blue from the array are given to pin number 5 of each of the 3 optocouplers. The pin 4 of all these are shorted and connected to ground through a pot. 4.4 Working When the program is run on the PIC (Refer Appendix for the program), it generates pulses of 7 milliseconds each. Each of these pulses are separated by 3 millisecond gap, before switching on the next. In this way it is assured that one set of colours is turned off before the next set is turned on. A total of 10 millisecond (7 ms for on and 3ms for off) is required for each of the three colours. This gives a total of 30 milliseconds duration for switching all three colours. This high frequency switching results in high speed on and off of red, green and blue LEDs giving an appearance of white light when viewed from a distance. This is because of the persistence of vision, or the retention of an image in the eye for 1/16th of a second. Since all the three colours switch within this time, it appears to be a mixture of these colours. As is obvious, the mixing of these three basic colours result in white light.
11
It is observed from the above figure that pulses are 5V pulses of duration 7 milliseconds, followed by a gap of 3 milliseconds, resulting in a total of 30 milliseconds duration for switching all 3 LEDs. White light was successfully obtained from RGB LEDs using a high frequency switching circuit using PIC18F4550. For better results, all LEDs have to be tested for luminous intensity of red green and blue colours and the LEDs with nearly the same output has to be selected to make the LED array. If there is a large variation in the colour output, the result will have a particular colour domination in the output. The following figure shows the output obtained.
13
The Program
CONFIG WDT=OFF; disable watchdog timer CONFIG MCLRE = ON; MCLEAR Pin on CONFIG DEBUG = ON; Enable Debug Mode CONFIG LVP = OFF; CONFIG FOSC = INTOSCIO_EC ;Reset vector ; This code will start executing when a reset occurs. RESET_VECTOR CODE 0x0000 goto Main ;go to start of main code
14
MOVLW 0x00 MOVWF TRISD,0 L1 MOVLW B'00000001' MOVWF PORTD,0 CALL DELAY1 MOVLW B'00000000' MOVWF PORTD,0 CALL DELAY2
MOVLW B'00000010' MOVWF PORTD,0 CALL DELAY1 MOVLW B'00000000' MOVWF PORTD,0 CALL DELAY2
MOVLW B'00000100' MOVWF PORTD,0 CALL DELAY1 MOVLW B'00000000' MOVWF PORTD,0 CALL DELAY2 GOTO L1
15
DELAY1 MOVLW 0X8F L2 DECFSZ WREG GOTO L2 RETURN DELAY2 MOVLW 0X0F L3 DECFSZ WREG GOTO L3 RETURN ;End of program END
16
References [1] Red, green, and blue LED based white light generation: issues and control, IEEE Journal 2002 Muthu, S. Schuurmans, F.J. Pashley, M.D. Philips Res., Briarcliff Manor [2] MCT2/MCT2E Datasheet, Vishal Semiconductors [3] PIC18F2455/2550/4455/4550 Data Sheet, Microchip [4] Programming and customizing the PIC microcontroller Michael Predko, Mike Predko
17