• 沒有找到結果。

LED light output feedback control system is going to be established by combining several devices. According to the device functionalities and requirements, the whole system is divided into 7 sections shown in the system block diagram (Fig.

3-1). The setup value block represents that the desired color of LEDs is set up by adjusting the external variable resistor. Meanwhile, the system is initiated and begins to function. As soon as sensor senses the color variation in spite of manmade or naturally decayed and transfers electric digital signal into central processor through analog to digital converter, the feedback recursive function will be initiated and begin to run. Comparator program processor runs the recursive program and triggers the PWM signal generator and constant current driver to obtain the desired LED color.

Fig.3-1 System block diagram of LED light output feedback control system

3.1.1 Setup Value

The desired colors of RGB LEDs are set up by adjusting the external 10KΩ variable resistors of LED driver to change the driving current of LEDs. Because LED is a current-driven device, the color of LED will vary when the driving current is changed.

3.1.2 LED Array

(a) (b)

Fig. 3-2(a) Photograph and (b) Structure of LED [18]

Diameter 5mm RGB LEDs (Fig. 3-2) are used to conduct this experiment because of convenience of availability and ease of sensing the color variation (Bottom Emitting) without light guide structure. Optical characteristics of LEDs are shown in Table. 3-1. However, the choice of sensor is dependent on the optical characteristics of LEDs.

Table. 3-1 Optical Characteristics of LEDs

Red Green Blue

Wavelength (nm) 625 525 460

( x , y ) (0.68, 0.30) (0.18, 0.71) (0.12, 0.06)

3.1.3 Sensor

In order to fit the spectral sensitivity of LEDs and simplify the system complexity, 3-channel (R, G, B) photodiode color sensor is chosen to sense the color variation of LED array. The spectral response of sensor is shown in Fig.3-3. This photodiode color sensor features no sensitivity in the near infrared region. Its spectral response range is close to the human eye sensitivity. Therefore, such sensor is appropriate for the color sensing of LED array.

(a) (b)

Fig. 3-3 (a) Photograph and (b) Spectral Response of Photodiode Color Sensor [18]

Table. 3-2 Optical Characteristics of Photodiode Color Sensor [18]

Blue 400 to 500 nm

Green 480 to 600 nm Spectral Response Range(λ)

Red 590 to 720 nm

Blue 460 nm

Green 540 nm

Peak Sensitivity Wavelength(λp)

Red 620 nm

Undoubtedly, Photo Sensor and RGB LEDs are indispensable in this experiment, 3-in-1 high sensitivity photo diode and 5mm Lamp LEDs are chosen because their wavelengths correspond to each other (Tables. 3-1 and 3-2).

3.1.4 ADC (Analog to Digital Converter)

The purpose of the A/D converter (ADC0804) is to take analog input of senor signal in the range of 0 to 5V and digitize it into 8-bits to transfer into the Lattice microprocessor. Though the A/D converter is designed with clock inputs for a synchronous connection to a microprocessor, A/D converter can be used freely in color feedback control system. Fig. 3-4 shows the configuration of the ADC0804 in free-running mode.

To configure the ADC0804 to function in free-running mode, CS* and RD* are grounded and WR* and INTR* are tied together. The N.O. on the WR* and INTR*

pins stands for normally open. When the A/D is first turned on, the WR* and INTR*

must be momentarily grounded. CLK R is tied back to CLK IN. V+(VREF) is set as 5V and determines the input voltage range. AGND and DGND are tied together on the same ground plane. In this mode, the A/D will convert its input at pin 6 to the outputs DB0-DB7 within 135 ns.

In free running mode, only 8 output pins are connected to the Lattice microprocessor, freeing up pins that would have been used for clocking, chip select, etc, for use in other modules. In addition, free-running mode eliminates complicated synchronization and timing issues with the Lattice microprocessor has existed to run the chip at another sampling rate.

Fig. 3-4 Schematic for A/D Converter in Free-Running Mode

Fig. 3-5 Analog to Digital Bits Arrangement

Four 8-bits A/D converters are used to quantize the analog signals of photo sensor. Totally there are 32 bits to process, and the arrangement of 32 bits for color resolution is shown in Fig. 3-5. Two black solid circles represent unused empty bits,

whereas the other six white circles denote the bits shared in common by RGB color.

Consequently, 14 bits resolution for single color can be achieved.

3.1.5 Central Processor

Fig. 3-6 Functional Block diagram of Central Processor

Control processor (Fig. 3-6) is the kernel of the whole feedback control system, and it collects all electric digital signals to process.

While ( sensor_signal != setup_value) {

If (sensor_signal < setup_value) PWM_intensity = PWM_intensity + 1;

Else

PWM_intensity = PWM_intensity – 1;

}

The code shown above denotes the function of recursive program. Actually, central processor not only links the sensor signals to PWM generator, it also compares

sensor signal to setup value and decides the feedback signal. While loop begins to run when sensor_signal doesn’t equal setup_value. After that, when the sensor_signal is lower than the setup_value, the LED light output is getting weaker. At this moment, the PWM_intensity signal of LED driving current is assigned to be another increased one to enhance LED light output as feedback, and vice versa. As sensor_signal is higher than setup_value, the LED light output is getting brighter. At this moment, the PWM_intensity signal is assigned to be lower to decrease LED light output as feedback.

3.1.6 LED Driver

DD313 is a constant current driver designed for LED lighting application. This current driver incorporates three-channel constant current circuitry with current value set by three external resistors. The three enable pins are specifically designed for independent control over each of the three output terminals, which are R, G, B LED channels in the experiment. The fast response of the output current can adapt to high dimming resolution and high refresh rate applications up to 1MHz. The pin connection and description data of LED driver, DD313, are shown in Appendix (a).

The schematic diagram of LED driver, DD313, is shown in Fig. 3-7. 18V is applied to VLED. Five, Seven, and Nine LEDs are driven in series connection for Blue, Red, and Green color separately. The Constant-Current Outputs of DD313 for RGB LEDs are adjustable. Constant-current value of each output channel is set by an external resistor connected between the REXT(R, G, B) pin and GND individually.

Besides, varying the resistor value can adjust the current up to 500mA. The equation of REXT(R, G, B) and Output current is shown as follows:

Eq. (3-1) Iout(R,G,B) (A) = 0.5 (V) / REXT(R,G,B) (Ω)

Fig. 3-7 Schematic Diagram of LED driver, DD313 [19]

3.1.7 PWM Generator

PWM generator is used to switch Enable-Pins(ENR, ENG, and ENB) of LED driver to accomplish dimming function. DM413 is a PWM enabled LED driver specifically designed for LED lighting or display applications. DM413 incorporates shift registers, data latches, 3-channel constant current circuitry with current value set by 3 external resistors, and built-in oscillator for PWM functioning. Data and clock buffer outputs are designed for cascading another chip. Additionally the Output Polarity Reverse function is designed to adapt to high power LED applications. The pin connection and description data of PWM Generator, DM413, are shown in Appendix (b).

Configuration of PWM generator and LED driver is shown in Fig. 3-8. 5V is applied to VCC. The Duty Ratio of PWM signal can be adjusted by changing Pull-High Resistance. Due to 400 Hz of PWM wave, flicker can be avoided. Because 14 bits PWM generator is utilized, the driving current of LED is divided by 14 bits. If the driving current were 20 mA, then the PWM recursive current scale would be 1.2 μA.

20 (mA) ÷ 214 = 1.2 (μA) Eq. (3-2)

Fig. 3-8 Configuration of PWM generator and LED driver [20]

3.2 Measurement

相關文件