搜索
bottom↓
回复: 19

[文档]LED 感受并显示周围光线的强度【ledtouch文档1】翻译稿。

[复制链接]

出0入0汤圆

发表于 2007-12-5 21:41:09 | 显示全部楼层 |阅读模式
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)

出0入0汤圆

发表于 2007-12-6 01:46:32 | 显示全部楼层
记号

出0入0汤圆

发表于 2007-12-6 03:30:25 | 显示全部楼层
标记

出0入0汤圆

发表于 2007-12-6 08:54:46 | 显示全部楼层
谢谢楼主

出0入0汤圆

发表于 2007-12-6 10:28:35 | 显示全部楼层
谢谢

出0入0汤圆

发表于 2007-12-6 17:25:17 | 显示全部楼层
谢谢楼主.是否有原稿呢?

出0入0汤圆

 楼主| 发表于 2007-12-6 18:32:32 | 显示全部楼层
末尾有链接啊。

出0入0汤圆

发表于 2007-12-6 18:36:52 | 显示全部楼层
标记

出0入0汤圆

 楼主| 发表于 2007-12-7 20:52:19 | 显示全部楼层
http://www.edn.com/article/CA6475381.html?text=&text=wimax%2C+%2C+%2C+wimax%2C+wimax%2C+wimax%2C+wimax&text=led
原文网页




Listing 1 AVR microcontroller抯 assembly-language firmware

.include "tn15def.inc"
.cseg
.org 0

;LED as light sensor...
;12th sept 2006


main:
                ldi r16, 255
                out DDRB, r16

                ldi r16, 0
                out PORTB, r16

                ldi r19, 1
       
                rcall delay
       
                ldi r19, 1

new_main:
                sbi DDRB, 0
                nop
                nop
                sbi PORTB, 1 ;LED forward bias
                cbi PORTB, 0
               
       
rcall delay

                sbi PORTB, 0
                cbi PORTB, 1 ; reverse bias

;rcall min_delay


                cbi DDRB, 0 ; LED discharge
                cbi PORTB, 0


; set registers for minimum delay
ldi r19, 1

wait_here:
                sbis PinB, 0
                        rjmp its_one
                        rcall min_delay
                inc r19
                brne dont_inc_r20
                rjmp over_flow
dont_inc_r20: rjmp wait_here


over_flow:
its_one:
                in r16, PORTB
                ldi r17, 0b00001000
                eor r16, r17 ; toggle PB3 to generate frequency prop to light

                out PORTB, r16

                mov r2, r19
                rcall delay
                mov r19, r2
                rjmp new_main


delay:                                                                       
                        ldi r20, 0
dec_r20:       
dec_r21:        dec r20
                        brne dec_r20
                        dec r19
                        brne dec_r20
                        ret


min_delay: in r0, SREG

                        ldi r18, 200
not_over:
                        dec r18
                        brne not_over
                        out SREG, r0
                        ret

出0入0汤圆

发表于 2007-12-7 22:26:30 | 显示全部楼层
谢谢楼主.

出0入0汤圆

发表于 2007-12-11 11:34:08 | 显示全部楼层
谢谢LZ

出0入0汤圆

发表于 2007-12-11 14:32:23 | 显示全部楼层
通俗易懂.

出0入0汤圆

发表于 2008-3-7 23:24:11 | 显示全部楼层
原来有人翻译过啦。。

自己翻了半天还没翻到正题,直接跳着去看了,不高兴翻了。

不过试着翻译了下,自己倒也看的仔细了。

出0入46汤圆

发表于 2008-3-8 11:23:37 | 显示全部楼层
不错

出0入0汤圆

发表于 2008-3-8 14:12:53 | 显示全部楼层
我们OEM的一个产品就是用到LED感光技术,当初老外说有感光功能都不相们,后来改了六次软件才可以.还是用ATTINY44做的..
透露一下,是一个密码开门器.

出0入0汤圆

发表于 2008-3-8 15:24:30 | 显示全部楼层
太好了

出0入0汤圆

发表于 2008-3-8 20:53:19 | 显示全部楼层
记号

出0入70汤圆

发表于 2008-3-10 21:10:02 | 显示全部楼层
to:【8楼】 mljda 一起长大
我照着试了一下,感觉不到输出频率变化啊

出0入0汤圆

发表于 2008-3-10 21:16:00 | 显示全部楼层
记下了

出0入0汤圆

发表于 2011-5-25 14:44:32 | 显示全部楼层
好文章!
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-6 06:26

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表