led sensor.pdf_第1页
led sensor.pdf_第2页
led sensor.pdf_第3页
led sensor.pdf_第4页
led sensor.pdf_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、november 9, 2006 | EDN 125 readerS SOLVe deSIGN PrOBLeMS EditEd By Brad thompson and Fran GranvillE designideas In addition to their customary roles as indicators and illumi- nators, modern LEDs can also serve as photovoltaic detectors (references 1 and 2). Simply connecting a red LED to a multimete

2、r 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 capaci- tor that connects in parallel with a light-dependent current source (Ref- erence 1). Increasing the inci

3、dent light increases the current source and more rapidly discharges the equivalent capacitor to the supply voltage. Figure 2 shows a method of using an LED as a photovoltaic detector. Con- necting one of the microcontrollers outputs, Pin 2, to the LEDs cathode applies reverse bias that charges the L

4、EDs internal capacitance to the sup- ply voltage. Connecting the LEDs cathode to Input Pin 3 attaches a high-impedance load to the LED. Illu- minating the LED generates photocur- rent. Originally charged to the supply voltage, the LEDs internal capaci- tance discharges through the photo- current sou

5、rce, and, when the volt- age on the capacitor falls below the microcontrollers lower logic thresh- old voltage, Pin 3 senses a logic zero. Increasing the incident-light intensity more quickly discharges the capacitor, and lower light levels decrease the dis- charge rate. The microcontroller, an Atme

6、l AVR ATtiny15 (www.atmel. com/dyn/products/product_card. asp?part_id=2033), measures the time for Pin 3s voltage to reach logic zero and computes the amount of ambient light incident on the LED. In addi- tion, the microcontroller flashes the same LED at a frequency proportional to the incident ligh

7、ts intensity. Figure 3 shows a 3-mm, super- bright-red LED, D1, from Everlight Electronics Co Ltd (www.everlight. com), which comes in a water-clear encapsulant as an ambient-light sen- sor. Having only four components, the circuit operates from any dc- power source from 3 to 5.5V. The circuit uses

8、only three of six of the AVR ATtiny15s I/O pins, and the remaining pins are available to con- trol or communicate with external devices. The sensor LED connects to the AVR microcontrollers port pins PB0 and PB1; another port pin, PB3, produces a square wave with a fre- quency proportional to the inc

9、ident- light intensity. The circuit operates by LED senses and displays ambient-light intensity Figure 1 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 illumi

10、nating LED. edn061109d839801 DIANE DIGITAL VOLTMETERRED LED AS SENSOR V R RED LED AS EMITTER dhananjay v Gadre and sheetal vashist, ECE division, netaji subhas institute of technology, new delhi, india edn061109di39802 DIANE R LED PIN 2 PIN 3 PIN 1 VCC INPUT MICRO- CONTROLLER Figure 2 Connecting one

11、 of the microcontrollers outputs, Pin 2, to the LEDs cathode applies reverse bias that charges the LEDs inter- nal capacitance to the supply voltage. Connecting the LEDs cathode to Input Pin 3 attaches a high-impedance load to the LED. (Note that pin numbers are repre- sentative only and not actual

12、pin numbers.) DIs Inside 128 AC line powers microcon- troller-based fan-speed regulator 130 Simple circuits sort out the highest voltage EWhat are your design problems and solutions? Publish them here and receive $150! Send your Design Ideas to edndesignideas . 126 EDN | november 9, 2006 designideas

13、 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 recon- figures PB0 as an input pin. An inter- nal timing loop measures the interval, T, for the voltage you apply t

14、o PB0 to decrease from logic one to logic zero. Reconfiguring pins PB0 and PB1 to apply forward bias to the LED com- pletes 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 fre- quency, and, as the incident-

15、light inten- sity increases, the LED flashes more fre- quently to provide a visual indication of the incident-light intensity. For low values of forward current, an LEDs light-output intensity is fairly linear (Reference 2). To test the circuit, couple the light output of a second and identical LED

16、to the sensor LED, D1, in Figure 3. Ensure that external light doesnt strike the sensor LED by enclosing the LEDs in a sealed tube covered with opaque black tape. Varying the illuminating LEDs forward current from 0.33 to 2.8 mA produces a relatively linear sensor- flash-frequency plot (Figure 4). T

17、he efficiency of an LED as a sensor depends upon its reverse-biased inter- nal-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 apply- ing a constant level of illumination fro

18、m an external source. Replace the 1-MV resistor with 500- and 100-kV resistors and repeat the measurements. For a representative LED under con- stant illumination and shielded from stray ambient light, we measured a photocurrent of approximately 25 nA for all three resistor values. For the same leve

19、l of illumination applied to the sensor LED, measure the frequency generated at Pin PB3. To calculate the LEDs reverse- biased capacitance, substitute the delay-loop time, the LEDs photovol- taic current, and the microcontrollers logic-one and -zero threshold volt- ages into the equation and solve f

20、or C, the LEDs 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 LEDs internal capacitor, and I is the calculated value of LEDs photo- current source. The calculated values f

21、or 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 sources values. You can download the AVR microcontrollers assembly-lan- guage firmware, Listing 1, from this Design Ideas online version at www. Figure 3

22、 An LED doubles as a light-level sensor. Output PB3 delivers a square wave whose frequency increases as light intensity increases. edn061109di39803 DIANE VCC D1 GND PB0 PB1 PB3 R1 100 3 6 5 SQUARE-WAVE OUTPUT (FOUT) IC1 ATTINY15 4 8 C1 10 F 16V VCC 3 TO 5.5V 0 0 20 40 60 80 100 120 0.511.522.53 ILLU

23、MINATING LED FORWARD CURRENT (mA) IC1 PIN 3 OUTPUT FREQUENCY (Hz) EDN061109DI3980FIG4 MIKE RefeRences Dietz, Paul, William Yerazunis, and Darren Leigh, “Very Low-Cost Sens- ing and Communication Using Bi- directional LEDs,” Mitsubishi Re- search Laboratories, July 2003, www. 35.pdf. Petrie, Garry, “

24、The Perfect LED Light,” Resurgent Software, 2001, led_light.html. Miyazaki, Eiichi, Shin Itami, and Tsu- tomu Araki, “Using a Light-Emitting Diode as a High Speed, Wavelength Selective Photodetector,” Review of Scientific Instruments, Volume 69, No. 11, November 1998, pg 3751, . “Op

25、tocoupler Input Drive Circuits,” Application Note AN-3001, Fairchild Semiconductor, 2002, www.fairchild Figure 4 The frequency of the circuits square-wave output exhibits good linearity versus light level for identical sensor and source LEDs. 1 2 3 4 128 EDN | november 9, 2006 designideas A microcon

26、troller requires dc operating power in the 2 to 5.5V range, an amount that a battery or a secondary power source can easily supply. However, in certain situations, a microcontroller-based product must operate directly from a 120 or 220V-ac power outlet without a step-down trans- former or a heat-pro

27、ducing, voltage- decreasing resistor. As an alternative, a polyester/polypropylene film capaci- tor rated for ac-line service can serve as a nondissipative reactance (Figure 1). Capacitor C1, a 2-mF AVX (www. ) FFB16C0205K rated for 150V rms, provides a significant ac- voltage drop that reduces the

28、voltage you apply to a diode-bridge rectifier, D1. A flameproof metal-film resistor, R1, limits current spikes and transient voltages induced in the ac-power line by lightning strikes and abrupt load changes. In this application, the ac current does not exceed 100 mA rms, and a 51V, 1W resistor prov

29、ides ade- quate current limiting. R2, a 5W, 160V Yageo () type-J resistor, and D2, a 1N4733A zener diode, pro- vide 5V regulated power for the micro- controller, a Freescale (www.freescale. com) C68HC908QT2. The schematic shows a represen- tative circuit for a microcontroller- based fan-speed regula

30、tor in which a thermistor senses air temperature and the microcontroller drives a AC line powers microcontroller- based fan-speed regulator abel raynus, armatron international inc, malden, ma Figure 1 C1 provides capacitive reactance, which limits ac-input current without dissipating excessive heat

31、in this dc fan- speed controller. steve EDN061026DI3912 FIGURE 1 120V AC 120V AC RETURN C1 2 F 250V R1 51 R2 160 5W R4 10k R3 100k LED 1 8 7 3 3 1 2 2 TH1 D1 KB152 C2 100 F D2 1N4733A IC1 MC68HC908QT2 Q1 IRF520 DC LOAD DC LOAD _ + _ + + COOLING FAN Figure 2 A two-diode rectifier and lamp-control bid

32、irectional thyristor share a common return path to the ac line. steve EDN061026DI3912 FIGURE 2 120V AC 120V AC RETURN C1 3 F 250V R1 51 R2 330 5W PR1 VT90N1 R4 20k R3 470 Q1 LZ004F31 D4 1 8 7 LED 3 3 1 2 2 D1 1N4003 D2 1N4003 C2 100 F D3 1N4733A IC1 MC68HC908QT2 AC LOAD AC LOAD + 130 EDN | november

33、9, 2006 designideas fans motor. Figure 2 illustrates a light-intensity regulator based on an inexpensive two-diode rectifier and a bidirectional-thyristor-lamp con- troller that share a common ground. IC2, a Fairchild (www.fairchildsemi. com) MOC3021-M bidirectional- thyristor-driver optoisolator, s

34、epa- rates the lamp-return path from the microcontrollers ground return (Fig- ure 3). In each of the three circuits, the Kingbright () W934GD5V0 LED indicator includes a built-in current-limiting resistor (not shown).EDN The cIrcuIT deLIVerS aN aNaLOG-OuT- PuT VOLTaGe equaL TO The hIGheST Of Three I

35、NPuT VOLT- aGeS ThaT drIVeS a dISPLay fOr cONTIN- uOuS TeMPeraTure MONITOrING. Figure 3 An optoisolator separates the bidirectional thyristors high-current ac-line return path from the microcon- trollers power supply. steve EDN061026DI3912 FIGURE 3 PR1 VT90N1 R4 20k R3 470 R4 180 120V AC 120V AC RET

36、URN C1 2 F 250V R1 51 R2 160 5W LED 1 8 7 3 1 2 6 4 2 D1 KB152 C2 100 F D3 1N4733A IC1 MC68HC908QT2 IC2 MOC3021M AC LOAD AC LOAD 3 1 2 Q1 L2004F31 _ + + In a water-cooled power con- verter, analog-output sensors measure the cooling water tempera- ture at three locations. If any of the three temperat

37、ures rises above a pre- set threshold, an alarm sounds and attracts the attention of the systems operator. When the alarm activates, knowing which measurement site has reached the highest temperature saves troubleshooting time and prevents system damage. The circuit in Figure 1 delivers an analog-ou

38、tput voltage equal to the highest of three input voltages that drives a display for con- tinuous temperature monitoring. LED indicators identify which of three sen- sors shows the highest temperature. An external adjustable-threshold comparator (not shown) monitors the analog-voltage output and acti

39、vates an audible alarm. Each of three analog input signals spans a range of 0 to 10V. Driven by the highest-voltage input, which you apply at IN1 in this example, opera- tional amplifier IC1A functions as a voltage follower with diode D1 in its feedback path. The op amps open- loop gain divides the

40、diodes forward- voltage drop to a fraction of its nomi- nal value, producing an “ideal diode” with a voltage drop of millivolts. Op amps IC1B and IC1C function as high-input-impedance inverting com- parators. Each “sees” the highest input voltage on its inverting input and one of two lower input vol

41、tages, IN2 and IN3, on its noninverting input and delivers an output voltage near that of the negative-supply-voltage rail. Thus, only IC1A delivers a positive- voltage output to MOSFET Q1s gate, and IC1B and IC1C deliver negative outputs to the gates of Q2 and Q3. Q1 turns on, lighting LED D4 and d

42、rawing approximately 5 mA to develop 11V across R3, which guarantees that Q2 and Q3 and their corresponding LEDs remain off. The voltage that develops across R1 represents the largest voltage of the three inputs, and resistor R4 and Simple circuits sort out the highest voltage Ezio rizzo, nova snC,

43、Genoa, italy, and vincenzo pronzato, Felmi srl, Genoa, italy 132 EDN | november 9, 2006 designideas capacitor C1 form a lowpass filter that reduces high-frequency noise that the sensor cables pick up. Voltage follower IC1D buffers the filters output voltage. Figure 2 (pg 136) shows the results of an

44、 LTSpice simulation featuring three sinusoidal inputs and the resultant analog output summed with a small dc-offset voltage for clarity. The breadboarded circuit works as designed. Given its electrically noisy location near a 300-kHz, 30-kW switched-mode power converter, it uses slow-switching 1N4004 diodes to avoid malfunctions, which the rectifi- cation of stray high-frequency inter- ference introduces. In less noisy envi- ronments,

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论