This shows you the differences between two versions of the page.
Previous revision | |||
— | university:courses:electronics:text:light-sensors-photodiodes [09 Aug 2014 16:37] (current) – [Photodiodes & Phototransistors] Doug Mercer | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Photodiodes and other Light Sensors====== | ||
+ | |||
+ | **By James Bryant** | ||
+ | |||
+ | This article has been written to answer a number of questions that the author has encountered, | ||
+ | |||
+ | For the purposes of this article light consists of electromagnetic radiation in the visible (wavelengths approximately 400-800 nm), near infrared< | ||
+ | |||
+ | We shall mostly discuss photodiodes, | ||
+ | |||
+ | =====Vacuum Photocells===== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | The first such sensor was the " | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | =====Photoresistors===== | ||
+ | |||
+ | Another type of light sensor uses the variation of electrical resistance with illumination exhibited by some materials (the most usual are Cadmium Sulphide [CdS]and Cadmium Selenide/ | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | Photoresistors are still commonly used in combination with a variable light source (originally an incandescent bulb - now almost invariably an LED) as isolated variable resistors< | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | Photoresistors using more exotic materials (lead sulphide [PbS], indium antimonide [InSb] and copper doped germanium) are invaluable and at present unreplaceable as photodetectors in the mid- and far-infrared. | ||
+ | |||
+ | The conductance< | ||
+ | |||
+ | In addition to their photoresistance there is also a very high (megohms or tens of megohms) " | ||
+ | |||
+ | =====Photodiodes & Phototransistors===== | ||
+ | |||
+ | The majority of this article concerns photodiodes. A semiconductor diode is a crystalline piece of semiconductor material containing a p-n junction with connections to the P and N regions - its operation is discussed in Appendix A. All semiconductor diodes are, to some extent, photodiodes, | ||
+ | |||
+ | For the purposes of simplified analysis we can model a photodiode as an ideal (non-photosensitive) diode in parallel with a light-dependent current source. This current source is quite linear - the current is more or less proportional to the incident light over a range of 1000:1 or better - but the range of wavelengths to which it is sensitive depends on the material of which the diode is made. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | <WRAP centeralign> | ||
+ | |||
+ | An ideal diode with reverse bias (i.e. its anode is negative with respect to its cathode) acts as an insulator, but has a small temperature dependent leakage current, largely independent of the reverse bias voltage< | ||
+ | |||
+ | With forward bias (anode positive) the diode current increases exponentially with voltage (see Appendix A for the equations), but from a practical point of view the current is too small to matter until a " | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | An illuminated photodiode contains an ideal diode and a light dependent current source (and some voltage variable capacitance). The photocurrent is KL where K is a constant depending on the photodiode and the light wavelength(s) and L is the light intensity (note that K is a characteristic of the particular photodiode, it is not k, which is Boltzmann' | ||
+ | |||
+ | There are two practical modes of photodiode operation - photoconductive mode and photovoltaic mode. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | If the photodiode is reverse biased its current will be the sum of its leakage and its photocurrent and its capacitance will be lower than when it is forward biased - which is convenient when measuring HF modulated light. The associated circuitry is designed to amplify this current. This is the photoconductive mode of operation. (It is possible to amplify the photocurrent of an unbiased photodiode by injecting it into an op-amp summing junction but its capacitance is slightly higher in this " | ||
+ | |||
+ | Not only are diodes light sensitive - most transistors, | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | A phototransistor is a transistor with its base-collector junction deliberately made more strongly light sensitive. Often it has no external base connection. The photocurrent of the diode flows in the base-emitter circuit and is amplified by the transistor current gain, ß. The sensitivity of a phototransistor is therefore ß (~30-200) times greater than that of a similar diode. However the switching times of phototransistors with an unconnected base are slow (typical phototransistors have rise and fall times of the order of 10-20 µs, and the fastest only 500-1000 ns). They are always used in the photoconductive mode described above, and may be convenient when a single photosensing device is required to operate a relay. If the base connection is available, connecting a resistor from base to emitter reduces photosensitivity and increases the turn-on threshold, but does improve desaturation time and therefore speeds up the transistor turn-off. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | If a photodiode is shunted with a resistor, chosen so that when the maximum expected< | ||
+ | |||
+ | If we go to the websites of the major electronic component distributors we find that the cheapest photodiodes cost some 15¢ and are infra-red (IR) sensitive silicon with a threshold voltage of about 700 mV whereas the cheapest LEDs are under 4¢ and have a threshold 2-5 times larger. These inexpensive LEDs are sensitive to visible light, and are, in many cases, as sensitive as purpose-made photocells when used as such. Of course purpose-made photodiodes are characterised and tested for photodiode specifications and are likely to have faster response times than LEDs - but LEDs are not hard to characterise, | ||
+ | |||
+ | LEDs used as photodiodes are insensitive to wavelengths longer than their own peak output wavelength. Of course if they are encapsulated in coloured plastic their response will be affected by this, but LEDs in clear plastic< | ||
+ | |||
+ | Single coloured LEDs are simple diodes and have more or less monochromatic light output< | ||
+ | |||
+ | Appendix B contains a brief discussion of the photocell measurement techniques which allow simple characterization of an LED as a photodiode. | ||
+ | |||
+ | **Lab Activity: [[university: | ||
+ | |||
+ | =====Photocell Applications===== | ||
+ | |||
+ | In this section we shall discuss the interface between a photosensor and its associated electronics. There are really just two photocell applications - light measurement, | ||
+ | |||
+ | When we measure light we may be measuring its intensity, or we may simply be detecting if it is present. We have seen that photodiodes have photocurrent and photoresistors have conductance proportional to the light falling on them (in this section we shall not discuss varying spectral sensitivity). If we measure the photocurrent (in the case of the photoresistor with a defined bias voltage) we can measure the incident light. | ||
+ | |||
+ | For photometry (lux meters, exposure meters, closed-loop light control systems, etc.) we may wish to do this accurately, for many photocell applications we simply need to know if light is present or not - although, almost always, " | ||
+ | |||
+ | The classical photodetector uses a photocell (photodiode in current mode or photoresistor), | ||
+ | |||
+ | The transistor may be a bipolar junction transistor (BJT), a Darlington transistor, or a MOSFET. In the past BJTs were often used as being cheaper than MOSFETs but this no longer the case and the best choice actually is a MOSFET. Its output may be a relay, or a resistor with a logic output taken from the drain/ | ||
+ | |||
+ | It is quite difficult to write an algorithm to determine the value of R< | ||
+ | |||
+ | The threshold voltage, V< | ||
+ | |||
+ | A BJT turns on when its base-emitter voltage is about 700 mV, a bipolar Darlington transistor at around 1300 mV, and a small-signal MOSFET will usually have V< | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | (Diagram shows the possible devices which might be used) </ | ||
+ | |||
+ | The commoner arrangement has the transistor conduct in the presence of light, turning on a relay load or producing logic 0 on an N-channel/ | ||
+ | |||
+ | < | ||
+ | |||
+ | but with a photoresistor | ||
+ | |||
+ | < | ||
+ | |||
+ | or | ||
+ | |||
+ | < | ||
+ | |||
+ | where V< | ||
+ | |||
+ | < | ||
+ | |||
+ | or | ||
+ | |||
+ | < | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | (Diagram shows the possible devices which might be used) </ | ||
+ | |||
+ | The other arrangement (the inverting photodetector) has the transistor turned off in the presence of light, turning off a relay load or producing logic 1 on an N-channel/ | ||
+ | |||
+ | < | ||
+ | |||
+ | but with a photoresistor | ||
+ | |||
+ | < | ||
+ | |||
+ | or | ||
+ | |||
+ | < | ||
+ | |||
+ | where V< | ||
+ | |||
+ | < | ||
+ | |||
+ | or | ||
+ | |||
+ | < | ||
+ | |||
+ | A photodiode working in photovoltaic mode will also act as a photodetector. Its shunt resistor R< | ||
+ | |||
+ | < | ||
+ | |||
+ | Obviously the photodiode material selected for this application must have a conduction threshold voltage which is larger then V< | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | V< | ||
+ | (Diagram shows the possible devices which might be used - it does not work with a photoresistor.) </ | ||
+ | |||
+ | If a bipolar device - a BJT or even a Darlington - is used in any of the circuits in Figs 9-11 its minimum base current when the load is turned fully on should be no more than 20% of I< | ||
+ | |||
+ | < | ||
+ | |||
+ | otherwise the base current required to switch the bipolar device may be too large for the network formed by the photocell and R< | ||
+ | |||
+ | The problem with all these circuits is that if the light value is close to the threshold the transistor acts as a (fairly) linear amplifier and produces small changes in output in response to electrical or optical noise. If the optical part of the system has a large light change and no delays close to the threshold this is unlikely to be a problem - but otherwise a different circuit is necessary. | ||
+ | |||
+ | The simplest circuit uses a Schmitt trigger input logic gate. These are logic circuits with analog positive feedback on their input stages such that as the input voltage on a logic input increases from zero there is no change of logic output until the input is (very roughly) around 50-60% of the supply voltage when the output changes its logic state. Many logic gates have a linear region where they act as (poor quality) amplifiers but these devices switch very quickly from one state to the other when the input reaches a threshold value. If the input is now reduced the output does not change back until the input has reduced by approximately 30% of the supply voltage. (Note that these values vary quite widely with device types, the supply voltage used, and even from device to device - these devices have excellent hysteresis but are not precision level sensors.) | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | (This diagram shows the possible input device configurations and an optional relay driver.) </ | ||
+ | |||
+ | Such Schmitt input logic gates are available with supply ranges between 2 V and 18 V (no single part has this wide a range - but parts are available that may be used with any supply from 3 V to 18 V). They are available in traditional DIL and SOT packages with 4 or 6 gates in a package (the "4000 Series" | ||
+ | |||
+ | The range of threshold voltages for different supplies will be given on the data sheet and can be used in equations [1] [4] [5] [6] [9] [10] & [11] to calculate suitable values of R< | ||
+ | |||
+ | These Schmitt gates are inexpensive, | ||
+ | |||
+ | Where we need greater accuracy a comparator (or an ADC - see below) is necessary. A comparator is a device with two inputs and a logic output< | ||
+ | |||
+ | Comparators sometimes have built-in hysteresis and can almost always have hysteresis added by simple additional circuitry. Fig 13 shows this done with two resistors (which may be omitted if hysteresis is not needed). The articles referred to in the footnote< | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | (Diagram shows the possible configurations which might be used) </ | ||
+ | |||
+ | The equations relating the photocell characteristics, | ||
+ | |||
+ | The best way to measure a range of photocell outputs accurately is with an analog interface circuit, either using an operational amplifier, or driving a suitable analog-digital converter (ADC) directly from a photocell. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | The outputs of the photodiode circuits in Fig 14 are voltages, proportional to incident light, which may be amplified by an operational amplifier or sent directly to the input of an ADC with a large enough Z< | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | The voltage outputs of the photoresistor circuits in Fig 15, while quite predictable, | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | The input of many, if not most, ADCs contains switched capacitors which draw high frequency (HF) currents. The input should therefore have a small capacitor to ground very close to the ADC to ensure that these HF currents flow to local ground and not to the photocell, buffer amplifier or elsewhere in the system< | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | Read the ADC data sheet and any application notes for discussion of suitable values and their effect on the performance of the ADC and of the system where it is used. | ||
+ | |||
+ | The best interface between a photodiode and an op-amp is a current to voltage converter, which works with a photoresistor as well, provided the photoresistor bias voltage is maintained constant. This is shown in Fig 18. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | The current from the photocell flows into the summing junction at the op-amp' | ||
+ | |||
+ | If we wish to measure AC photocurrent but are not interested in the DC or randomly varying photocurrent due to ambient light there are two possible techniques. The simplest is to limit the gain of the amplifier in Fig 18 by reducing R< | ||
+ | |||
+ | Or we can connect the photocell in series with a suitable inductor which will ground the DC component of its signal. We then connect the AC signal to an amplifier. If the signal bandwidth is narrow the inductor can be shunted with a capacitor to make a parallel-tuned LC circuit of suitable Q to give narrow bandwidth and high in-band gain. If a tuned circuit is used it should drive a voltage amplifier with high input impedance so as not to degrade the Q. This amplifier should not drive an inductive load or the interaction of the load and the feedback (" | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | If an untuned inductor is used as a simple high AC/low DC impedance the variation of impedance with frequency can be avoided by using an AC current-voltage converter (transimpedance amplifier) rather than a voltage amplifier. This effectively short-circuits the inductor at AC (which is why it does not work with a tuned circuit) as the AC current from the photocell flows to the virtual ground of the amplifier inverting input. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | Inductors for the applications in Figs 19 & 20 must be chosen so that they can carry the maximum expected photocurrent without saturation - this is unlikely to be a problem, but should not be overlooked. | ||
+ | |||
+ | Photodetectors using a modulated signal source, which I mentioned earlier in this article, can detect the modulation using one of the above amplifier schemes and some sort of frequency detector. There is plenty of tone detection software available if the signal is digitized, but the simple NE567 PLL IC, first manufactured nearly forty years ago by Signetics and still available from a number of manufacturers, | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | The values of C1 and C2 in the above diagram depend on the tone frequency to be detected. For more detail consult the 567 data sheet, but with AC input = 200 mV rms the tone frequency F is determined by C1 and the detection bandwidth by C2. The equations are: | ||
+ | |||
+ | <m>F = 1/2.42 C1</ | ||
+ | |||
+ | <m>BW = 1070sqrt(1/ | ||
+ | |||
+ | (BW is calculated as a percentage of F.) | ||
+ | |||
+ | There are innumerable other applications of photosensors, | ||
+ | |||
+ | James Bryant\\ | ||
+ | Calshot - England\\ | ||
+ | August 2014 | ||
+ | |||
+ | **Return to [[university: | ||
+ | |||
+ | **Go to [[university: | ||
+ | |||
+ | **Return to [[university: | ||
+ | |||
+ | ====APPENDIX A - Semiconductor Diodes==== | ||
+ | |||
+ | In a semiconductor P-N junction mobile electrons (conduction-band electrons) from the N region diffuse into the P region and " | ||
+ | |||
+ | If a negative external bias voltage (often called //reverse bias//) is applied to the P region it reinforces the depletion zone, which remains an insulator, but a positive bias voltage (//forward bias//) allows recombination to continue and a current flows in the junction. The equation< | ||
+ | |||
+ | <m>I = I_s{e^{-v/ | ||
+ | |||
+ | where // | ||
+ | |||
+ | <m> kT/q </m> is not the only term in the equation which is temperature dependent - the scale current, // | ||
+ | |||
+ | With negative (reverse) bias (i.e. -V is positive and the electron charge is negative, so the exponent is large and negative) the exponential term is very small and <m>I approx -I_s</ | ||
+ | |||
+ | Since the exponent is so much larger than 1 the equation for the forward current can be simplified to | ||
+ | |||
+ | <m>I = I_s { e^{-v/ | ||
+ | |||
+ | The forward current is therefore exponentially related to the forward voltage - quite small voltage changes produce large current changes. In practice this means that the voltage drop across a normal small diode or LED at operating currents between 50 µA and 20 mA will increase with current but will remain reasonably close to the potential in the depletion zone as mentioned above, i.e. 700 mV for simple silicon junctions, 300 mV for germanium diodes, 200 mV for silicon schottky diodes, and between 1.8 V (IR & red) and 4 V (blue & UV) for LEDs of different colours. At high currents, of course, the ohmic resistance of the semiconductor and its connections increases the voltage expected for a given current above that predicted by the equation. | ||
+ | |||
+ | ====APPENDIX B - Measuring Photodiodes==== | ||
+ | |||
+ | The basic principle of measuring a photodiode' | ||
+ | |||
+ | But some photocells are quite well characterized and it is possible to compare the response of an unknown photocell with the response of a well-characterized one to the same light sources. It is cheap and easy to obtain high intensity LEDs of a variety of colours from UV to IR and some manufacturers' | ||
+ | |||
+ | If the calibration and tested photocells are both in 5mm packages too this is easily done: drill a 5mm hole in a small piece of ebony, black ABS, carbon fibre block or other dark material. Insert the LEDs in turn at one end and the photocells at the other and make your comparisons. If your photodiode under test is some other diameter try and find a calibration photodiode of the same diameter and drill an appropriate diameter hole 10 mm deep into a co-axial 10 mm deep 5mm LED hole. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | <WRAP centeralign> | ||
+ | |||
+ | In addition to measurement of spectral sensitivity it may be advisable to measure leakage current, threshold voltage and, possibly, switching speed. All can be done with a mid-range DVM, a fast pulse generator, an LED known to have fast switching time, and a 100 MHz oscilloscope. The procedures are left as an exercise for the student. | ||
+ | |||
+ | ====Foot Notes==== | ||
+ | |||
+ | [1]The International Commission on Illumination (CIE) recommends the division of infrared & ultraviolet radiation into the following six bands: | ||
+ | **Infrared**\\ | ||
+ | • IR-A: 700 nm – 1400 nm (215 THz – 430 THz)\\ | ||
+ | • IR-B: 1400 nm – 3000 nm (100 THz – 215 THz)\\ | ||
+ | • IR-C: 3000 nm – 1 mm (300 GHz – 100 THz)\\ | ||
+ | **Ultraviolet**\\ | ||
+ | • UV-A: 315 nm – 400 nm (750 THz – 950 THz)\\ | ||
+ | (Subdivided into UV-A1 (315 nm – 340 nm) & UV-A2 (340 nm – 400 nm)\\ | ||
+ | • UV-B: 280 nm – 315 nm (950 THz – 1070 THz)\\ | ||
+ | • UV-C: 100 nm – 280 nm (1070 THz – 3000 THz)\\ | ||
+ | |||
+ | [2]The characteristics of photoresistors are discussed in some detail on the Selco Products website at\\ | ||
+ | http:// | ||
+ | |||
+ | [3]There are a number of ROHS compliant CdS & Cd2SeS photocells but many older types are not compliant. | ||
+ | |||
+ | [4]The same arrangement was once used for digital isolators as well, but today these almost always use photodiodes or phototransistors. | ||
+ | |||
+ | [5]The electrical conductance of a conductor is the ease with which an electric current passes through that conductor. The (commoner) inverse quantity is its resistance - the opposition to the passage of an electric current. The official SI unit of conductance is the Siemens (S) but the older name, “mho”, and symbol (Ʊ) are still quite widely used because the older symbol is less likely to be confused with the symbol for a second (s). The unit of resistance is the ohm (Ω). The relationships between voltage (V), current (I), resistance (R) and conductance (G) are:-\\ | ||
+ | <m> R = V/I </m> <m> G = I/V </m> <m> G = 1/R </m> | ||
+ | |||
+ | [6] Read the Friendly Data Sheet (RTFDS). The RAQ on this topic can be found at\\ | ||
+ | http:// | ||
+ | and the longer discussions at\\ | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | http:// | ||
+ | |||
+ | [7]Sometimes there is a very high resistance in parallel with the current sources so that there is a slight change of leakage with applied voltage, but the effect is generally negligible. | ||
+ | |||
+ | [8]Mullard was a company manufacturing thermionic valves (" | ||
+ | |||
+ | [9]Or, in some circumstances, | ||
+ | |||
+ | [10]August 2014 | ||
+ | |||
+ | [11]Plastic that appears clear to the eye may not transmit wavelengths outside the visible spectrum (UV or IR). If this matters in your application read the data sheet (or, if necessary, perform a simple experiment or two) to discover if this is the case. | ||
+ | |||
+ | [12]I have done some on-line research on this and obtained conflicting " | ||
+ | |||
+ | I intend to make more measurements and will modify this footnote when I have done so. Please email me [A] if you are getting tired of waiting, or, [B] if you have good spectral response measurements on one or more types of LED. | ||
+ | |||
+ | [13]The RAQ 45" | ||
+ | |||
+ | [14]The output spectrum of a simple LED is not a single narrow line like the spectral lines in a gas discharge but a rather wider (but still relatively narrow – bandwidth a few percent of the peak) band of wavelengths with a Gaussian distribution around the nominal peak wavelength. | ||
+ | |||
+ | [15]A simple integral series resistor in an LED does not affect its use as a photodiode - but most other built-in circuitry does. This includes current limiters with active devices, diode bridges, integral dimmers and flashers. | ||
+ | |||
+ | [16]A silicon photodiode with a threshold of 700 mV used in this way may be able to drive an exceptionally low threshold MOSFET or a Schmitt input gate using a very low supply voltage. | ||
+ | |||
+ | [17]A discussion of comparator characteristics is in the article accompanying RAQ 11 " | ||
+ | http:// | ||
+ | The article is at\\ | ||
+ | http:// | ||
+ | It is possible to use an operational amplifier as a comparator but there are problems, which are also discussed in this article. Despite being written to discuss a particular application problem, it is a useful short background note on the properties and uses of comparators. | ||
+ | |||
+ | [18]Read RAQ 22 on ADC inputs.\\ | ||
+ | http:// | ||
+ | |||
+ | [19]This equation is often written with respect to the bias being on the N region, in which case the polarity of V is reversed and the equation becomes <m> I = I_s {e^{v/ | ||
+ | |||
+ | |||