Patent Abstract:
The present invention relates to a method for biasing a photodiode ( 1 ) with a bias voltage (U B ) and to a photodiode bias circuit performing said method. The photodiode ( 1 ) is producing a photocurrent (I P ). According to the invention the following steps are performed: Reading a measurand (U 1 ) related to the photocurrent (I P ). Comparing the measurand (U 1 ) with a threshold (U th ). Giving the bias voltage (U B ) a magnitude depending on whether the measurand (U 1 ) is larger than the threshold (U th ) or smaller.

Full Description:
TECHNICAL FIELD OF THE INVENTION  
         [0001]    The present invention relates to a method for biasing a photodiode with a bias voltage and to a photodiode bias circuit performing said method.  
         DESCRIPTION OF RELATED ART  
         [0002]    When optical power is to be read and transformed into a current or a voltage, it is common to use a photodiode, e.g. of PN-type with the two layers positive and negative, or of PIN-type with the three layers positive, intrinsic and negative. The positive end of the diode is called an anode and the negative end is called a cathode. A phototransistor may be used in a way equivalent to the photodiode and when photodiodes are discussed below, phototransistors are considered to be included in the discussion.  
           [0003]    When a photodiode is used it is optimised either for high or low optical powers by using a constant bias voltage. As an example, if a photodiode of e.g. PIN-type is used and a low optical power, such as &lt;1 μW, is to be measured, then the photodiode should have a bias voltage of 0 V. This is due to the fact that photodiodes when biased normally has a so called dark current which may disturb. The photodiode may also be seen as having a shunt resistance that conducts when the bias voltage is not 0 V, but close to 0 V, and thus provides a current. The magnitude of said currents may be e.g. 25 nA at 70° C.  
           [0004]    If on the other hand said photodiode is to measure a high optical power, such as &gt;0,5 mW, the photodiode needs to be biased with e.g. 5 V or else the photodiode will become saturated and the photo current will thus become too small.  
           [0005]    A disadvantage with known circuits for photodiodes is thus that the range of the optical power cannot be too wide. An example of an application where the optical power range is wide is in systems using wavelength division multiplexing (WDM). This means that signals are transmitted in a line divided into channels with different wavelengths. The signals are amplified on the way and sometimes it is wished to be able to measure the total optical power before or after amplification. The development is going towards more channels in the same line, which of course leads to a higher maximum optical power and thus an urgent need exists for something that may measure a wide optical power range.  
           [0006]    Most often the signal from the photodiode needs to be amplified, linearly or logarithmically depending on the application. It is previously known to use the logarithmic characteristics of a diode or a transistor to accomplish a logarithmic amplifier. However, said logarithmic characteristics are highly dependent on temperature and thus logarithmic amplifier circuits have been developed to compensate for the temperature dependency. A good overview of different circuits may be found in “What&#39;s All This Logarithmic Stuff, Anyhow?”, Electronic design, Jun. 14, 1999, p 111-115.  
         SUMMARY  
         [0007]    The problem with known photodiode bias circuits is that they cannot be used when the range of the optical power is very wide.  
           [0008]    This is solved in the present invention in providing a photodiode circuit performing the following steps:  
           [0009]    reading a measurand related to the photocurrent of the photodiode,  
           [0010]    comparing the measurand with a threshold and  
           [0011]    giving the bias voltage of the photodiode a magnitude depending on whether the measurand is larger than then threshold or smaller.  
           [0012]    The advantage with this invention is that a photodiode bias circuit is achieved, wherein the generated photocurrent is linear in a wide range of optical power. Further, this is achieved with a simple circuit that also may be used for other purposes, which saves money, space and time.  
           [0013]    The invention will now be described in detail with reference to accompanying drawings. More advantages will follow from the different embodiments described. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0014]    [0014]FIG. 1 discloses a schematic overview of a photodiode bias circuit according to the present invention.  
         [0015]    [0015]FIG. 2 discloses an embodiment of the first differential amplifier shown in FIG. 1.  
         [0016]    [0016]FIG. 3 discloses an embodiment of the comparator shown in FIG. 1.  
         [0017]    [0017]FIG. 4 discloses another embodiment of the comparator shown in FIG. 1.  
         [0018]    [0018]FIG. 5 discloses an embodiment of the present invention including a charge compensation capacitor.  
         [0019]    [0019]FIG. 6 discloses an embodiment of FIG. 5.  
         [0020]    [0020]FIG. 7 discloses a photo amplifier in which the photodiode bias circuit according to the present invention may be used.  
         [0021]    [0021]FIG. 8 discloses a schematic view of an embodiment of FIG. 7.  
         [0022]    [0022]FIG. 9 discloses a schematic view of another embodiment of FIG. 7.  
         [0023]    [0023]FIG. 10 discloses an embodiment of a practical implementation of FIG. 9.  
         [0024]    [0024]FIG. 11 discloses an embodiment of the inverting amplifier shown in FIG. 10. 
     
    
     DETAILED DESCRIPTION OF EMBODIMENTS  
       [0025]    In FIG. 1 is shown a photodiode bias circuit according to the invention. A photodiode  1  gives out a photocurrent I P . The main idea is that said photocurrent I P  is to be measured and compared to a threshold and that the photodiode  1  is given a bias voltage U B  depending on if the photocurrent I P  is above or below said threshold. It is possible to measure the photocurrent I P  directly and to compare it to a threshold current. However, voltages are easier to measure and compare, so in the example in FIG. 1 the photocurrent I P  is transformed to a voltage. This is done by connecting the photodiode  1  in series with a first resistor R 1 . The first resistor R 1  may be connected either to the cathode or to the anode of the photodiode  1 . However, since the anode is more sensitive it is preferred to connect the first resistor R 1  to the cathode, as is shown in the figures.  
         [0026]    A first differential amplifier  2  or similar is connected with its negative input to one end of the first resistor R 1  and with its positive input connected to the other end of the first resistor R 1 . Thus, the differential amplifier  2  reads a voltage I P .R 1  over the first resistor R 1 .  
         [0027]    The first differential amplifier  2  gives out a first voltage U 1 , which in its turn is compared with a threshold voltage U th  in a comparator  3 , which then gives out a second voltage U 2 , which will affect the bias voltage U B . The anode of the photodiode  1  is in this example connected to a voltage at ground level, so called virtual ground.  
         [0028]    The first voltage U 1  is connected to the positive input of the comparator  3  and the threshold voltage U th  is connected to the negative input of the comparator  3 . Thus, if the first voltage U 1  is greater than the threshold voltage U th , then the second voltage U 2  from the comparator  3  becomes high, e.g. 5 V. Thus, the bias voltage U B  in this case becomes a little less than 5 V. If, on the other hand, the first voltage U 1  is smaller than the threshold voltage U th , then the second voltage U 2  from the comparator  3  becomes 0 V. Thus, the bias voltage U B  in this case becomes extremely close to 0 V. The magnitude of the high bias voltage is chosen to suit the particular photodiode  1  that is used, depending on its inner serial resistance. However, to simplify the description, the example 5 V will be used in the following.  
         [0029]    If the voltage of the anode of the photodiode  1  should have another magnitude than virtual ground, then the values of the second voltage U 2  given above should be changed accordingly to give the desired bias voltage U B .  
         [0030]    An advantage with the invention in FIG. 1 is that it is a photodiode bias circuit that works well when the photodiode is to measure low optical powers. This is because the bias voltage U B  in this case is 0 V, which minimises both dark current and the effects of the shunt resistance and thus improves linearity. Further, the invention in FIG. 1 is also a photodiode bias circuit that works well when the photodiode is to measure high optical powers. This is because the photodiode in this case gets a bias voltage U B  of e.g. 5 V, which prevents the photodiode from becoming saturated too quickly and thus improves linearity. Thus, a photodiode bias circuit is achieved that works linearly in a wide optical power range. The photodiode current may then be amplified in a photo amplifier  4  to for example an output voltage U out  for whatever uses it is further intended. In the examples below a logarithmic amplifier is used as an example. However, this photodiode circuit could also be used with linear or other amplifiers.  
         [0031]    In FIG. 2 is shown an example on how the first differential amplifier  2  may look. The main part includes a first operational amplifier  11  with a positive input, a negative input and an output, which gives out the first voltage U 1 . A second resistor R 2  is connected between the negative input of the first differential amplifier  2  and the negative input of the first operational amplifier  11 . A third resistor R 3  is connected between the negative input of the first operational amplifier  11  and the output of the first operational amplifier  11 . A fourth resistor R 4  is connected between the positive input of the first differential amplifier  2  and the positive input of the first operational amplifier  11 . A fifth resistor R 5  is connected between the positive input of the first operational amplifier  11  and a level adjust voltage U 0 . The level adjust voltage U 0  may be ground, but it may also be used to displace the whole voltage interval used. This applies to all places where the level adjust voltage U 0  is used. It is normal to choose the resistances so that the second resistor R 2  and the fourth resistor R 4  are equal, and so that the third resistor R 3  and the fifth resistor R 5  are equal. If the resistance of the first resistance R 1  is much smaller than the other resistances, then the first voltage U 1  may be written as:  
           U 1=( R 1 ·I   P )· R 3/ R 2+ U 0  (1)  
         [0032]    This is a simplified reasoning. In practise, when the first differential amplifier  2  is to be used in the circuit in FIG. 1, then the fourth resistor R 4  may be complemented with some other resistors to compensate for the resistive influence from the first resistor R 1 .  
         [0033]    In FIG. 3 is shown an embodiment of the comparator  3 . It is difficult to find a commercial comparator that has a swing between 0 V and 5 V. When low optical powers are to be measured, the closer the bias voltage U B , i.e. in this case also the second voltage U 2 , is to 0 V, the better, i.e. the more linear, this photodiode circuit will work. The second voltage U 2  should in that case preferably not be higher than a few mV. Commercial comparators often have difficulties in getting that close to 0 V.  
         [0034]    This can be solved with the embodiment in FIG. 3, where the comparator  3  includes an inverter  13  and an inner comparator  12  with a positive and a negative input and an output. The positive input of the inner comparator  12  is used as the negative input of the comparator  3  and vice versa, due to the following inverter  13 . If the inverter  13  is e.g. of CMOS-type it will have the same logical output as its supply voltage. Thus if the inverter  13  is supplied with 0 V and 5 V, its output will change between 0 V and 5 V, which is exactly what is wanted. Note that the main issue is not that it is an inverter, but that it has the output that is wanted. The same result could be achieved with e.g. another CMOS-circuit or with a comparator with CMOS-type output.  
         [0035]    A photodiode is normally sensitive to fast changes in its bias voltage, why it is a big advantage if the positive supply voltage to the inverter  13  is carefully filtered so that there are no disturbances on the output of the inverter  13 .  
         [0036]    If the first voltage U 1  happens to be close to the threshold voltage U th , frequent changes could occur in the second voltage U 2  and thus in the bias voltage U B . That is not desired. An improved solution would then be to introduce a hysteresis with two thresholds. This may e.g. be accomplished by using a comparator with a feedback also called a Schmitt trigger. This is represented in FIG. 4. A sixth resistor R 6  is connected between the power supply voltage V cc  and the positive input of the inner comparator  12 . A seventh resistor R 7  is connected between the level adjust voltage U 0  and the positive input of the inner comparator  12 . A eighth resistor R 8  is connected between the positive input and the output of the inner comparator  12 .  
         [0037]    The threshold voltage U th  is created on the positive input of the inner comparator  12  with a level adjustment from the level adjust voltage U 0 . If the circuit should be arranged so that the threshold voltage U th  feeds the negative input of the inner comparator  12 , then the positive input of the inner comparator  12  should be fed from a low-resistance source in order that the positive feedback is precisely determined, i.e. the resistances should be selected so that R 7 &lt;&lt;R 8 .  
         [0038]    When then the connection is as in FIG. 4 and the output of the inner comparator  12  changes state, then the positive feedback has the effect of changing the threshold voltage U th  slightly so that a relatively large change of input signal is then required to reverse the output state.  
         [0039]    It is possible to change the bias voltage both fast and slow. A photodiode have a certain capacitance between its anode and cathode. This leads to that when the voltage is changed over the photodiode, then a transient current is generated proportionally to the derivative of the voltage change. Thus, one would believe that it would be better to change the bias voltage slowly. However, if the bias voltage is changed slowly, then the total circuit will become slow and rapid changes in optical power will not be measured.  
         [0040]    Thus, the preferred embodiment is to change the bias voltage fast.  
         [0041]    When the bias voltage is raised, then said transient current will have a rather small influence compared to the large photo current. Instead there will be a problem when the optical power and thus the bias voltage is lowered. That is because the charge between the cathode and the anode of the photodiode will totally cut-off the photo amplifier. Thus, the photo amplifier will consider that it is measuring total darkness and will do that until the photocurrent has restored the real charge.  
         [0042]    A solution to this problem is shown in FIG. 5. A charge compensation capacitor C 1  is introduced between the anode of the photodiode  1  and the output of the comparator  3  over a second inverter  15 . The purpose is to generate a second transient current with the opposite sign as the first transient current produced by the photodiode  1  when the bias voltage is changed.  
         [0043]    Preferably, the capacitance of the charge compensation capacitor C 1  is somewhat larger than the capacitance of the photodiode  1 . What will happen is then this: When the bias voltage U B  suddenly goes down to 0 V, then a first transient current will come out from the input of the photo amplifier  4  through the photodiode. A few ns later a somewhat larger second transient current will be produced by the charge compensation capacitor C 1  in the opposite direction. If the photo amplifier  4  is normally slow it will only feel a small fast sum transient current in the right direction, i.e. into its input. This means that the output voltage U out  will experience a fast positive transient and then regain its correct value without ever going below said correct value. Thus, the photo amplifier  4  and subsequent circuits will never believe that it is dark simply because the bias voltage U B  suddenly is lowered.  
         [0044]    In the simplest version there is simply a direct connection between the charge compensation capacitor C 1  and the second inverter  15 . This means that the charge compensation capacitor C 1  always is connected with a low impedance to the second inverter  15 . In certain applications this is a disadvantage. As an example, the bandwidth of the total circuit with photodiode and photo amplifier may become deteriorated due to the extra input capacitance from the charge compensation capacitor C 1 .  
         [0045]    This may be solved by using an isolator  16  to isolate the charge compensation capacitor C 1  from the second inverter  15  e.g. with the aid of diodes. The isolator may be implemented in numerous ways and one alternative is shown in FIG. 6. The man skilled in the art can easily adopt other versions with equivalent function.  
         [0046]    A second capacitor C 2  is on one end connected to the output of the second inverter  15  and on its other end, at the first potential V 1 , to the anode of a first diode, to a ninth resistor R 9  and to a tenth resistor R 10 . The tenth resistor R 10  is further connected to ground. The cathode of the first diode D 1  is connected, at the second potential V 2 , to the charge compensation capacitor C 1  and to the anode of a second diode D 2 . The cathode of the second diode D 2  is further connected, at the third potential V 3 , to the ninth resistor R 9 .  
         [0047]    In a status quo case the three potentials V 1 , V 2 , V 3  will be 0 V since no currents are flowing. Further, the impedance over the isolator  16  will be high—with a low capacitance.  
         [0048]    If the photocurrent I P  decreases and the second voltage U 2  goes down to 0 V, then the second inverter  15  will go high and the second capacitor C 2  will be charged. Thus, the first potential V 1  will become high and the first diode D 1  starts to conduct, which means that the second potential V 2  will become high. This in its turn will charge the charge compensation capacitor C 1 , which will discharge through the input of the photo amplifier  4 , as mentioned earlier.  
         [0049]    The second capacitor C 2  should be chosen with a higher capacitance than the charge compensation capacitor C 1 , because in that case the second capacitor C 2  will discharge slower than the charge compensation capacitor C 1 . The second capacitor C 2  discharges over the tenth resistor R 10  to ground. When it is completely discharged, the first potential V 1  will once again become 0 V and the first diode D 1  will stop conducting. The second potential V 2  will discharge again over the second diode D 2  and the ninth resistor R 9 . Thus, the status quo is once again reached.  
         [0050]    If instead the photo current I P  increases and thus the second voltage U 2  increases and thus the second inverter goes low, then the second capacitor C 2  will be charged and the first potential V 1  will decrease to −5 V. The second capacitor C 2  will then charge and discharge much like in the previous example, but with the current in the opposite direction, and the first potential V 1  will return to 0 V.  
         [0051]    A preferred embodiment is that the transient current from the charge compensation capacitor C 1  should not be very high when the photo current I P  is high, as explained above. In that case the resistances of the ninth resistor R 9  and the tenth resistor R 10  should be rather high. That is because that leads to that only a small current flows from the second potential V 2  to the first potential V 1  over the second diode D 2  and the ninth resistor R 9 . Thus, the charge compensation capacitor C 1  is charged slower and a smaller transient current will occur.  
         [0052]    In prior art it is common to filter away disturbances with strong low-pass-filtering, which gives the effect that the bandwidth is narrowed and thus that fast changes in the optical power cannot be measured. An advantage with the last embodiments of the present invention is that the automatic change of the bias voltage is so smooth that it is possible to have a high bandwidth without getting problems with disturbances.  
         [0053]    The different embodiments of the photodiode bias circuit described above are all applicable in the following figures. They are however left out in those figures due to lack of space.  
         [0054]    The photo amplifier  4  used to amplify the photocurrent may look in different ways. One logarithmic version is shown in FIG. 7. The photo current I P  is fed into the negative input of a second operational amplifier  21 . The positive input of the second operational amplifier  21  is connected to ground and there is a first transistor T 1  connected between the negative input and the output of the second operational amplifier  21 .  
         [0055]    In FIG. 7 the first transistor T 1  is connected with its collector and base to the negative input of the second operational amplifier  21  and with its emitter to the output of the second operational amplifier  21 , but other connections are possible. Especially it is possible to instead connect the base to ground. It is also possible to use a diode instead of the first transistor T 1 . This connection of a transistor or a diode makes the output voltage of the second operational amplifier  21  a logarithmic function of any current, such as the photocurrent I P . It is of course possible to use an input voltage instead, together with an input resistor. Said output voltage will from now on be called the third voltage U 3  for short.  
         [0056]    Since an operational amplifier has a very large input impedance the current flowing through the first transistor T 1  is approximately equal to the photo current I P . If the first transistor T 1  has a first inherent temperature dependent constant k 1 , then the third voltage U 3  will become:  
           U 3=− k 1· ln ( I   P/   I   01 )  (2)  
         [0057]    where I 01  is the reverse leakage current for the first transistor T 1 . The formula applies only approximately and only for currents that are not very small or large.  
         [0058]    As an example, when the first transistor T 1  is connected as in FIG. 3, a behaviour in an ordinary transistor with a first constant k 1  of 0.06 V and a reverse leakage current I 01  of 10 −13  A could be that if the temperature is stable, then the voltage over the first transistor T 1  increases about 60 mV when the current flowing through it increases 10 times, which in this case corresponds to an increase in optical power of 10 dB.  
         [0059]    This alone makes up a logarithmic amplifier, however very temperature dependent. Firstly, the output voltage from the second operational amplifier  21  varies typically −2 mV/° C. Secondly, the voltage increase over the first transistor T 1  due to current increase varies proportional to the absolute temperature in Kelvin.  
         [0060]    To decrease the first temperature dependency the difference is taken between the third voltage U 3  and a fourth voltage U 4  that is used as a reference. If the fourth voltage U 4  have approximately the same temperature dependency as the third voltage U 3 , then they will be affected approximately equal from temperature changes and the difference between them will thus take away most of said temperature dependency.  
         [0061]    The fourth voltage U 4  may be accomplished by using a reference current I ref , which enters the negative input of a third operational amplifier  22  that has a second transistor or diode T 2  connected in the same way as the second operational amplifier  21  has. The fourth voltage U 4  is taken from the output of the third operational amplifier  22  and is thus a logarithmic function of the reference current I ref . If the second transistor T 2  has a second inherent temperature dependent constant k 2 , then the fourth voltage U 4  becomes:  
           U 4=− k 2· ln ( I   ref   /I   02 )  (3)  
         [0062]    where I 02  is the reverse leakage current for the second transistor T 2 . The second constant k 2  will have a value that is very close to the first constant k 1 . The same comments as for formula (2) apply.  
         [0063]    It is appropriate to chose the reference current I ref  in the middle of the interval where measuring is intended. This is because the measuring error due to temperature dependence will be smaller the closer the photocurrent I P  is to the reference current I ref . Thus, if it is a wish to measure photocurrents from 0,1 μA to 1 mA it is appropriate that the reference current Iref is approximately 10 μA.  
         [0064]    Further, the easiest way of implementing this circuit is to chose transistors T 1  and T 2  that have similar temperature characteristics and place them close together, so as to keep them in the same temperature. It is preferable to place them in the same integrated circuit.  
         [0065]    The third voltage U 3  and the fourth voltage U 4  enters a second differential amplifier  23 , which gives out a fifth voltage U 5 . Optionally, a sixth voltage U 6  may be entered into the differential amplifier if there is a wish to level adjust the interval within which the fifth voltage U 5  may be. The sixth voltage U 6  may be the same as the level adjust voltage U 0  or something else. The fifth voltage U 5  may then be used as the output voltage U out  directly or via other circuits. If the second differential amplifier has a third inherent constant k 3 , then the fifth voltage U 5  will become:  
           U 5=( U 4− U 3)· k 3+ U 6  (4)  
           U 5=[ k 1· ln ( I   P   /I   01 )− k 2− ln ( I   ref   /I   02 )]· k 3+ U 6  (5)  
         [0066]    In FIG. 7 is also shown an example on how the second differential amplifier  23  may look. The main part includes a fourth operational amplifier  24  with a positive input, a negative input and an output, which gives out the fifth voltage U 5 . An eleventh resistor R 11  is connected between the negative input of the second differential amplifier  23  and the negative input of the fourth operational amplifier  24 . A twelfth resistor R 12  is connected between the negative input of the fourth operational amplifier  24  and the output of the fourth operational amplifier  24 . A thirteenth resistor R 13  is connected between the positive input of the second differential amplifier  23  and the positive input of the fourth operational amplifier  24 . A fourteenth resistor R 14  is connected between the positive input of the fourth operational amplifier  24  and the sixth voltage U 6 .  
         [0067]    It is normal to choose the resistances so that the eleventh resistor R 11  and the thirteenth resistor R 13  are equal, and so that the twelfth resistor R 12  and the fourteenth resistor R 14  are equal. In this case the fifth voltage U 5  may be written as:  
           U 5=( U 4− U 3)· R 12/ R 11+ U 6  (6)  
         [0068]    Thus making:  
           k 3= R 12/ R 11  (7)  
         [0069]    A problem with transistors and diodes is that they normally have an inner serial resistance, e.g. 0,5 Ω, between collector and emitter or between anode and cathode, respectively. This may cause a notable error for currents larger than approximately 0,1 mA due to unwanted voltagedrop over the inner resistance. This may be compensated by subtracting a compensation voltage U C  from the output voltage U out .  
         [0070]    Said compensation voltage U C  should be proportional to the photocurrent I P  and when there is no photocurrent I P , then the compensation voltage U C  should be equal to zero. This can be accomplished in practise in many ways. An example is shown schematically in FIG. 8. Since the fifth voltage U 5  is level adjusted by the sixth voltage U 6 , see (4), said sixth voltage U 6  may be used to correct the fifth voltage U 5  and thus the output voltage U out  by taking:  
           U 6= U 0− U   C   (8)  
         [0071]    Thus, the fifth voltage U 5  becomes:  
           U 5=( U 4− U 3)· k 3+ U 0− U   C   (9)  
         [0072]    The first voltage U 1  is proportional to the photocurrent I P , however with a level adjustment U 0 , see (1), and the compensation voltage can thus be accomplished by:  
           U   C =( U 1− U 0)· k 4=( R 1· R 3/ R 2)· k 4· I   P   (10)  
         [0073]    where k 4  is a fourth constant.  
         [0074]    An advantage with this embodiment is that the same circuit the first differential amplifier  2 —may be used for two purposes, i.e. to create the bias voltage U B  for the photodiode and to create the compensation voltage U C . This saves components and space and further reduces the time for manufacturing. However, it would be equally possible to have separate circuits for the two purposes.  
         [0075]    A further alternative solution is to put an inverting amplifier  31  on the output of the second differential amplifier  23 , see FIG. 9, thus making the output voltage U out  the inverse of the fifth voltage U 5  according to:  
           U   out =( U 0− U 5)· k 5+ U 0  (11)  
         [0076]    where k 5  is a fifth constant inherent in the inverting amplifier  31 . This means that the compensation voltage U C  may instead be added to the level adjust voltage U 0 . To make the output voltage U out  correct the inputs to the second differential amplifier  23  should switch place and the result will then become:  
           U 6= U 0+ U   C   (12)  
           U 5=( U 3− U 4)· k 3+ U 6  (13)  
           U   out =( U 0− U 5)· k 5+ U 0=( U 4− U 3)· k 3· k 5+ U 0− U   C   ·k 5  (14)  
         [0077]    In FIG. 10 is shown a practical implementation of FIG. 9. To be able to trim the magnitude of the compensation voltage U C  a trimming potentiometer R tp  is connected with its ends between the first voltage U 1  and the level adjust voltage U 0 . A fifteenth resistor R 15  is connected between the sixth voltage U 6  and the middle connection of the trimming potentiometer R tp . A sixteenth resistor R 16  is connected between the sixth voltage U 6  and the level adjust voltage U 0 .  
         [0078]    To achieve the best result the twelfth resistor R 12  in the second differential amplifier  23  may then be complemented by a seventeenth resistor R 17  and a eighteenth resistor R 18  in order to compensate for resistive influence of the fifteenth resistor R 15  and the sixteenth resistor R 16 .  
         [0079]    The inverting amplifier  31  may be any inverting amplifier. However, even though the temperature dependence in the photo amplifier  4  partly is reduced by taking the difference between what is measured and a reference, there is still the second temperature dependency in the fifth voltage U 5  that is proportional to the absolute temperature T in Kelvin. Thus, it would be good to include a circuit with a temperature dependency that is proportional to the inverse of the absolute temperature and the inverting amplifier  31  may be used for that purpose.  
         [0080]    In FIG. 11 is shown an example of such an inverting amplifier. It includes a fifth operational amplifier  32  with a nineteenth resistor R 19  on its negative input, with the level adjust voltage U 0  on its positive input and a twentieth resistor R 20  between its negative input and its output. The use of only those resistors and with the fifth voltage U 5  connected to the nineteenth resistor R 19  would give an output voltage Uout of:  
           U   out =( U 0− U 5)· R 20/ R 19+ U 0  (15)  
         [0081]    Hence, if it were possible to find a nineteenth resistor R 19  that varied as R 19 =R 0 ·T, where R 0  is a constant, then our problems would be solved. However, that proves difficult to find in practise. This can be solved by adding a temperature dependent resistor R T  in series, before or after, the nineteenth resistor R 19 . Said temperature dependent resistor R T  is preferably a PRTD, i.e. a Resistance Temperature Detector made of platinum. This type of resistor is very well characterised and standardised since it is normally used as a temperature sensor. The nineteenth resistor R 19  and the twentieth resistor R 20  could then be normal resistors with no or at least low temperature dependency. Thus, the output voltage U out  becomes:  
           U   out =( U 0− U 5)· R 20/( R 19+ R   T )+ U 0  (16)  
         [0082]    If as an example a PRTD with 1000 Ω complying with the standard DIN EN 60751 according to IEC 751 is used, assuming nominal temperature dependence according to the standard, and the nineteenth resistor R 19  is chosen as 55.77 Ω, then the maximum deviation within 0-70° C. will become approximately 0.2° C. In order to achieve this the temperature dependent resistor R T  should have a temperature close to that of the transistors T 1 , T 2 . This is easiest implemented in practise if the temperature dependent resistor R T  and the transistors T 1 , T 2  are placed close to each other and if the circuit is so dimensioned that the power in the temperature dependent resistor R T  is not so high that self-heating occurs.  
         [0083]    Alternative and equivalent embodiments to those above arise if instead of the anode, the cathode of the photodiode is connected to the photo amplifier. Then all the signs in the rest of the circuits would have to change. E.g. would the second voltage U 2  then become −5 V at high optical powers.

Technology Classification (CPC): 7