|
LED senses and displays ambient-light intensity
LED 感受并显示周围光线的强度
Two identical LEDs, closely spaced in a light-shielded housing, form
a photovoltaic-characterization fixture. Choose resistor R and voltage source V
to apply nominal forward current to the illuminating LED.
两个相同的led近距离的摆放在一个光纤封闭的房间里,作为光伏转换的参照性特征。选择电阻和电源构建一个典型的Led发光电路。
Figure 2 Connecting one of the microcontroller’s outputs, Pin 2, to the LED’s cathode applies reverse bias that charges the LED’s internal capacitance to the supply voltage. Connecting the LED’s cathode to Input Pin 3 attaches a high-impedance load to the LED. (Note that pin numbers are representative only and not actual pinnumbers.)
连接单片机的输出引脚2到LED的阴极,用来提供方向偏置电压给LED的内部电容充电电压。链接LED的阳极至为高阻负载状态输入引脚3。记录中的引脚数仅仅是典型的,不是实际的引脚数
In addition to their customary roles as indicators and illuminators,modern LEDs can also serve as photovoltaic detectors (references 1 and 2). Simply connecting a red LED to a multimeter and illuminating the LED with a source of bright light, such as a similar red LED, produce a reading of more than 1.4V (Figure 1). One model for a reverse-biased LED comprises a charged capacitor that connects in parallel with a light-dependent current source (Reference 1). Increasing the incident light increases the current source and more rapidly discharges the equivalent capacitor to the supply voltage.
除了他们作为指示器和照明的普通用途外,现代的也能做为光点转换的检测器(参考1和2)。简单了连接一个红色LED到万用表,并点亮一个LED座位光源,例如一个红色LED,产生读数大于1.4V(图形1)。一个反向偏置LED的模型是包含一个充电的电容,并行于一个光源。增长的入射光增加电流源并使电容更迅速的放电到电源电压
Figure 2 shows a method of using an LED as a photovoltaic detector. Connecting one of the microcontroller’s outputs, Pin 2, to the LED’s cathode applies reverse bias that charges the LED’s internal capacitance to the supply voltage. Connecting the LED’s cathode to Input Pin 3 attaches a high-impedance load to the LED. Illuminating the LED generates photocurrent. Originally charged to the supply voltage, the LED’s internal capacitance discharges through the photocurrent source, and, when the voltage on the capacitor falls below the microcontroller’s lower logic threshold voltage, Pin 3 senses a logic zero. Increasing the incident-light intensity more quickly discharges the capacitor, and lower light levels decrease the discharge rate. The microcontroller, an Atmel AVR ATtiny15 (www.atmel.com/dyn/products/product_card. asp?part_id=2033), measures the time for Pin 3’s voltage to reach logic zero and computes the amount of ambient light incident on the LED. In addition, the microcontroller flashes the same LED at a frequency proportional to the incident light’s intensity.
图形 2 展示了一张使用一个LED作为光电传感器的方法。连接一个单片机的输出引脚2,至LED的阴极利用反向偏置,给LED内部电容充电至供给电压。连接LED的阳极到输入引脚3选用高阻负载到LED。当光照射这个LED时产生光电流。起初充至供给电压。LED内部电容通过光电流源放电,并且,当电容下落电压低于单片机低逻辑阀值电压时,PIN3检测到逻辑0,增加的入射光线强度将更快的释放电容。而低水平的光找水平减少释放速率。测量PIN3的电压到达逻辑0,并计算周围光照入射到LED的总量。此外,单片机以一个与入射管线强度成比例的频率闪烁同样的LED。
Figure 3 shows a 3-mm, super bright-red LED, D1, from Ever light Electronics Co Ltd (www.everlight.com), which comes in a water-clear encapsulant as an ambient-light sensor. Having only four components, the circuit operates from any dc power source from 3 to 5.5V. The circuit uses only three of six of the AVR ATtiny15’s I/O pins, and the remaining pins are available to control or communicate with external devices. The sensor LED connects to the AVR microcontroller’s port pins PB0 and PB1; another port pin, PB3, produces a square wave with a frequency proportional to the incidentlight intensity. The circuit operates by first applying forward bias to the LED for a fixed interval and then applying reverse bias to the LED by changing the bit sequences you apply to PB0 and PB1. Next, the microcontroller reconfigures PB0 as an input pin. An internal timing loop measures the interval, T, for the voltage you apply to PB0 to decrease from logic one to logic zero.
图3,展示了一个3-mm的超高亮度LED,D1, rom Ever light Electronics Co Ltd (www.everlight.com),其有水般透明的封装作为一个环境亮度传感器。尽有四个元件,这个电路能运行于任何3-5.5V数字电源.这个电路只用了AVRATtiny156个I/O引脚中的三个,并剩余的引脚控制或通信其他的外部器件。这作为传感器的LED连接在AVR单片机的端口引脚PB0,PB1;另一个引脚PB3,产生一个同入射光照强度成比例的频率方波。第一步,通过改变位序来你来控制PB0和PB1,施加正向偏置至LED用于修定间隔,而后施加反向偏执至LED。下一步,单片机重设置PB0最为输入引脚。一个内部的定时回路测量这个间隔,T,其为你施加在PB0上的电压冲逻辑1到逻辑0.
Reconfiguring pins PB0 and PB1 to apply forward bias to the LED completes the cycle. Time interval T varies inversely with the amount of ambient light incident on the LED. For lower light, the LED flashes at a lower frequency, and, as the incident-light intensity increases, the LED flashes more frequently to provide a visual indication of the incident-light intensity.
重定义引脚PB0和PB1来施加正向偏置到LED完成整个循环。时间间隔T与入射在LED上的环境光线总量是方向偏离的。当低光线时,LED闪烁在一个低的频率,那么,同样的入射光照强度增加,LED以一个更高的频率闪烁,(提供了)可视的展示出了入射光的强度
For low values of forward current,an LED’s light-output intensity is fairly linear (Reference 2). To test the circuit, couple the light output of a second and identical LED to the sensor LED, D1, in Figure 3. Ensure that external light doesn’t strike the sensor LED by enclosing the LEDs in a sealed tube covered with opaque black tape. Varying the illuminating LED’s forward current from 0.33 to 2.8 mA produces a relatively linear sensor flash-frequency plot (Figure 4).
低值的前向电流,一个LED光照输出强度是近似线性的(参考2).测试电流,用一个与图三中传感器LED,D1,相同的LED作为光线输出LED,通过在一个用黑色袋子密封的管子里包住LEDs,保证外部光线没有()干扰传感器LED。使用0.33到2.8Ma正向电流的驱动LED不同程度的光照强度,产生了一个相对线性的传感器闪烁频率曲线(图四)
The efficiency of an LED as a sensor depends upon its reverse-biased internal-current source and capacitance.To estimate the reverse photocurrent, connect a 1-MV resistor in parallel with a sensor LED and measure the voltage across the resistor while applying a constant level of illumination from an external source. Replace the 1-MV resistor with 500- and 100-kV resistors and repeat the measurements. For a representative LED under constant illumination and shielded from stray ambient light, we measured a photocurrent of approximately 25 nA for all three resistor values. For the same level of illumination applied to the sensor LED, measure the frequency generated at Pin PB3.
一个LED作为传感器的效率指望于它的方向偏置内部电流源和电容,预计逆转光电流,连接一个1兆欧并联与传感器的电阻,并测量流过电阻的电压在一个不断变化外部光照水平下。替换电阻500和100千欧电阻并重复测量。在典型的LED在变化的光照和隔离于杂乱的环境光线下,我们测量一个大约25nA的光电流在所有三种电阻值。为了同一水平的光照用于传感器LED,测量在引脚3产生的频率
To calculate the LED’s reversebiased capacitance, substitute the delay-loop time, the LED’s photovoltaic current, and the microcontroller’s logic-one and -zero threshold voltages into the equation and solve for C, the LED’s effective reverse-biased junction capacitance: (dV/dt)=(I/C), where dV is the measured logic-one voltage minus the logic-zero voltage, dt is the measured time to discharge the LED’s internal capacitor, and I is the calculated value of LED’s photocurrent source. The calculated values for the selected LED range from 25 to 60 pF. This range compares with the data in references 3 and 4, although Reference 3 reports only the current source’s values. You can download the AVR microcontroller’s assembly-language firmware, Listing 1, from this Design Idea’s online version at www. edn.com/061109di1.EDN
估计LED的反向偏置电容,置换延时循环时间,这LED的光电转换电流,单片机的逻辑1和逻辑0阀值电压持续到相等同解C,LED的有效反向节点电容:(dV/dt)=(I/C);在dV测量值 逻辑1电压小于逻辑0电压,dt是测量值 LED的内部电容放电时间。I是LED的光电流计算出来的值,计算出来的值,永续选择LED电容25pF到60pF。这范围比较数据在参考3,4.
原文----------------来源EDN-------------文中有--------------
点击此处打开ourdev_185626.pdf(文件大小:460K) |
|