Patent Document

TECHNICAL FIELD 
     The present invention relates to a protection circuit and method, and in particular, but not exclusively, to a protection circuit and method for protecting a light source, for example an LED illuminated in a RGB (Red, Blue, Green) LED array used for illuminating a target object, light from the target object being detected by a sensor, for example a CIS/CCD imaging sensor, as used in imaging apparatus such as optical imagers, e.g. scanners, and the like. 
     BACKGROUND 
       FIG. 1  shows a basic diagram of a state of the art LED driver circuit that is used, for example, in an image reading apparatus in conjunction with a CIS or CCD image sensor device. An LED array L 1 -L 3  is coupled to switches S 1 -S 3  and resistors R 1 -R 3 . The LED array L 1 -L 3 , switching circuit S 1 -S 3 , and resistors R 1 -R 3  are arranged separately from the analogue front end (AFE) circuitry that is used to process image data received from the sensor device, such as a Photo Diode Array (PDA) for example. 
     In a colour image scanner, the LED array typically comprises Red (L 1 ), Green (L 2 ) and Blue (L 3 ) LEDs. Light of each colour emitted from the respective LED illuminates a portion of a target object that is to be scanned, and the light reflected by the object is incident on a sensor device. Typically, the sensor device comprises an array of sensors arranged linearly as a line image sensor, each element of the sensor array comprising a photoelectric conversion element, such as a photodiode and a capacitor for each pixel, which converts incident light into a current which is accumulated as a charge on the capacitor. The respective charges accumulated on the respective capacitors are converted into respective voltages that are then output from the sensor array (PDA). 
     The voltages output from the PDA are converted by an Analogue to Digital Converter (ADC) into digital signals for subsequent processing during generation of the image of the target object being scanned. 
     The scanning of an image is usually performed using a line scanning operation. For colour images, each line is scanned by the Red, Green and Blue light sources. That is, the Red LED L 1  is turned on to read one line in a scanning direction, thereby obtaining the Red component of that line. The Green LED L 2  is then turned on to obtain the Green component of that line, followed by the Blue LED L 3  being turned on to obtain the Blue component of that line. The LED array and sensor array are then typically moved on a carriage mechanism to align with the next line on the target object. Each LED L 1 -L 3  is turned on by switching on the respective switch S 1 -S 3 , using respective switch control signals CS 1 -CS 3  received from a switch controller logic circuit SC. 
     While one line is being scanned, image data received from the sensor array (PDA) relating to a previous line scan is read out serially and processed by the ADC. 
     The current flowing through each LED is defined by the current-voltage characteristics of the LED, by the resistance of the series resistor and by the voltage applied from the power supply, PSU, (the on-resistance of the switch usually being negligible). 
       FIGS. 2   a - 2   d  show the switch control signals CS 1 -CS 3  and the supply current IS drawn from the power supply PSU in a “constant current” mode. The ground current is substantially equal to the supply current. 
     In addition to each LED passing a respective constant current during illumination of the target object, it is also known to use Pulse Width Modulation (PWM) control signals for controlling the illumination of each LED, such that the illumination or intensity of the LED can be controlled by controlling the duty-cycle and/or frequency of the PWM control signals. The current though the LED may be subject to wide variation due to tolerances of the power supply voltage and the (temperature-dependent) I-V characteristic of the LEDs. 
       FIGS. 2   e - 2   h  show the switch control signals CS 1 -CS 3  and the supply current IS drawn from the power supply in such a PWM mode. 
     It will be appreciated that, in both the constant current and PWM modes of operation, the quality of the image data received from the PDA  3  is related to the intensity at which each LED L 1 -L 3  is illuminated during respective scan periods. In addition, it is noted that the brighter the LED is illuminated, the less the sampling (i.e. integration), and hence scanning, time is required which means that the scanner can operate quicker. Therefore, it is desirable to operate the LEDs at or near their maximum current ratings without damaging the LEDs. 
     According to one known system, the illumination of an LED L 1 -L 3  is controlled by passing a predetermined current through the LED, the predetermined current being chosen according to known characteristics of the LED, power supply or switch resistance. However, due to the above mentioned variations caused by tolerances of the power supply voltage and the (temperature-dependent) I-V characteristic of the LEDs, setting a predetermined maximum current in this way does not enable an LED to be illuminated at its absolute maximum intensity, since some degree of safety margin must be incorporated to allow for such tolerances. If this safety margin in made small (i.e. in order to obtain the maximum possible current), then the possibility of damaging an LED is increased, i.e. due to an over-current being passed through the LED. 
     It is also known to illuminate an LED L 1 -L 3  by directly monitoring the amount of current flowing through the LED, and adjusting the current flow accordingly such that it operates near its maximum intensity. This involves monitoring the actual current flowing through LED. Operating an LED near its maximum intensity in this way can also result in the LED being damaged by an over-current, particularly when switching from one LED to another. In other words, when switching from one LED to another, if the initial current exceeds the maximum rating of the LED, then the LED will be damaged before the current monitor can detect and adjust the current flow. 
     It is therefore an aim of the present invention to provide a protection circuit and method for protecting a light source such as an LED, without having the disadvantages mentioned above. 
     SUMMARY OF THE INVENTION 
     According to a first aspect of the invention, there is provided a protection circuit for protecting a light source. The protection circuit comprises: a shunt path, the shunt path being selectively coupled in parallel with the light source; a detection circuit provided in the shunt path for determining the amount of current that will flow in the light source, prior to the light source being illuminated by a power supply; and a comparator for preventing or limiting the flow of current through the light source when the detection circuit determines that the amount of current will exceed a predetermined threshold. 
     Thus, according to the invention, a current detector is provided for monitoring the flow of current in a shunt path, the current detector being configured to disable or limit the flow of current through a light source when a predetermined threshold is reached. This aspect of the invention has the advantage of enabling the current flowing through a light source to be controlled by monitoring the current in the shunt path rather than the path having the light source, thus enabling the maximum current to be controlled without potentially damaging the light source. 
     According to another aspect of the present invention, there is provided a method of protecting a light source from over-current. The method comprises the steps of: selectively coupling a shunt path in parallel with the light source, such that current is diverted away from the light source and through the shunt path; detecting the amount of current flowing in the shunt path; and determining whether the amount of current flowing in the shunt path exceeds a predetermined threshold and, if so, preventing or limiting the flow of current in the light source when the shunt path is disconnected from being in parallel with the light source. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       For a better understanding of the invention, and to show more clearly how it may be carried into effect, reference will now be made, by way of example only, to the following drawings in which: 
         FIG. 1  shows a basic block diagram of a prior art system; 
         FIGS. 2   a - 2   h  show the switch control signals and the current drawn in  FIG. 1  when switching between LEDs in both constant current and PWM modes; 
         FIG. 3  shows a basic block conceptual diagram of a driver apparatus for driving an LED array, as described in co-pending application Ser. No. 11/822,830 by the same applicant; 
         FIG. 4  shows the current drawn in the circuit of  FIG. 2  when switching between LEDs; 
         FIG. 5  shows a basic block conceptual diagram of a second arrangement for driving an LED array; 
         FIG. 6  shows a flow diagram relating to the switching sequence of switches S 1 -S 4  of  FIG. 5 ; 
         FIGS. 7   a  to  7   f  are signal diagrams illustrating the switching sequence of switches S 1 -S 4  of  FIG. 5 ; 
         FIG. 8  shows a basic block conceptual diagram of a third arrangement for driving an LED array; 
         FIGS. 9   a  to  9   f  are signal diagrams illustrating the switching sequence of switches S 1 -S 4  of  FIG. 8 , when switching between LEDs in constant current mode; 
         FIGS. 10   a  to  10   i  are signal diagrams illustrating the switching sequence of switches S 1 -S 4  of  FIG. 8 , when switching between LEDs in PWM mode; 
         FIG. 11   a  provides a more detailed illustration of  FIG. 8 , and in particular of the first current source IS 1 ; 
         FIG. 11   b  shows a further optional improvement to  FIG. 11   a;    
         FIG. 12(   a ) illustrates a simplified example of the current source IS 2  used in  FIG. 8 ; 
         FIG. 12(   b ) illustrates an embodiment of an implementation of a protection circuit according to the present invention; 
         FIG. 12(   c ) illustrates how the protection circuit of  FIG. 12(   b ) can be switched off; and, 
         FIG. 12(   d ) illustrates a more detailed example of the current source IS 2  described in  FIGS. 8 and 12(   a ). 
     
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In the following description of the preferred embodiments, reference is made to protecting a light source, the light source described in the context of an LED array comprising three LEDs, i.e. Red, Green and Blue. However, it will be appreciated that the invention is equally applicable to an LED array comprising two or more LEDs, or indeed any light source, including a single light source. Furthermore, any reference to LED is intended to cover any form of light source, not only visible light but non-visible light such as Ultra Violet (UV) and Infra Red (IR). Therefore, references to an LED or LED array in the preferred embodiments are intended to cover a light source or light source array more generally. 
     Prior to describing the protection circuit in detail with reference to  FIGS. 12   b  to  12   d , a description will first be given of the various arrangements for driving an LED array as illustrated in  FIGS. 3 to 11 , corresponding to the subject matter claimed in co-pending application Ser. No. 11/822,830 by the present applicant. 
       FIG. 3  illustrates a basic block conceptual diagram of an arrangement for driving an LED array. The LED array comprises Red, Green and Blue LEDs L 1 , L 2 , L 3 . The LED switching circuitry S 1 , S 2 , S 3  is placed on the same monolithic structure, i.e. integrated circuit, as the analogue front end circuitry (AFE), i.e. the analogue processing circuitry that processes the image data received from a sensor device. To reduce the problems associated with LED switching transients interfering with the ADC process, a current source IS 1  is provided in the current path, preferably between the switches S 1 , S 2 , S 3  and ground. The current source IS 1  controls the flow of current through the LEDs L 1 , L 2 , or L 3  according to the states of switches S 1 , S 2 , S 3 . 
     The provision of the current source IS 1  enables the current flow through an LED (L 1 -L 3 ) to be controlled, rather than being merely switched on and off as found with the arrangement of  FIG. 1 . The current through the LED is therefore defined by current source IS 1 , independently of the LED I-V characteristics or the supply voltage tolerance, so the LED current is as accurate as the accuracy of the current source. Adjustment of the current may be by direct adjustment of IS 1  or by PWM modulation of IS 1  and the switch signals. 
     The introduction of current source IS 1  also enables the rate of change of current (di/dt) through an LED to be controlled, for example by reducing the initial rate of change of current.  FIG. 4  shows the supply current IS drawn by the circuit during the operation of the embodiment of  FIG. 3 , when IS 1  is decreased in an S-shape fashion before each switch S 1 , S 2 , or S 3  is turned off, and increased in an S-shape fashion shortly after the next switch is turned on. As can be seen the current waveform IS has smoother S-shaped transitions than the current waveform IS of  FIG. 2 , thereby reducing unwanted transient signals. The ground return current waveform is similar. Such S-shape waveforms may be generated by known techniques. 
     Thus, it can be seen that in the arrangement of  FIG. 3 , the LED switches (S 1 -S 3 ) may be integrated on the same IC as the AFE processing circuitry, with the current source IS 1  being provided to reduce the generation of unwanted transient signals. 
       FIG. 5  shows a basic block diagram of a second arrangement for driving an LED array. 
     In a similar manner to  FIG. 3 , an LED array comprises Red, Green and Blue LEDs L 1 , L 2 , L 3 . The LED switching circuitry S 1 , S 2 , S 3  is placed on the same monolithic circuit as the analogue front end circuitry (AFE) that drives the switching circuitry. A current source IS 1  is provided in the current path between the switches S 1 , S 2 , S 3  and ground, for controlling the flow of current through the LEDs L 1 , L 2 , L 3 . 
     According to this second arrangement a shunt path  50  is provided. The shunt path  50  comprises a switching device S 4 . The shunt path  50  having the switching device S 4  is provided in parallel with the LED array and switching circuitry. The problem relating to the LED switching transients interfering with the ADC is reduced because, as will be explained below, the shunt path  50  enables harmful transitions in the ground current flow to be reduced. 
     The following text describes the operation of the switching device S 4  in the shunt path  50  for reducing transient signals when switching from one LED to another. 
     The shunt path  50  is enabled when switching device S 4  is switched on. S 4  is switched on in sequence with the operation of the LED switches S 1 -S 3  as will be described in the following. 
     Referring to the flow chart of  FIG. 6 , assume S 1  is switched on (i.e. S 1  is closed), step  61 , such that LED L 1  is passing a current I 1  from the positive supply VDD to ground GND via current source IS 1 . 
     During operation of a scanner, for example, once L 1  has achieved its task (e.g. used to illuminate the object while the red component of one line of its image is generated), L 1  has to be switched off by switching off S 1  (i.e. opening S 1 ), and S 2  has to be switched on (closed) so that L 2  passes its current I 2  (thus enabling L 2  to illuminate the object while the green component of one line of its image is generated). 
     According to this second arrangement, prior to switching off S 1 , switch S 4  is switched on, i.e. closed (step  63 ) such the Node A, on the high side of the current source IS 1 , is coupled to the supply voltage VDD. 
     Switching on S 4  has the effect of applying zero bias, or at least much reduced bias, to the LED L 1 . In other words, S 4  has the effect of steering the current away from the L 1 /S 1  current path. The current I 4  through S 4  is limited by the current source IS 1 , so the total supply or ground current is still IS 1 . 
     Even though the LED L 1  is effectively turned off, its associated switch S 1  is still however closed, i.e. switched-on. 
     S 1  can now be opened in step  65 , i.e. switched-off, thereby removing the LED L 1  from the circuit. The total supply or ground current is still IS 1 . 
     Switch S 2  is then closed, step  67 , thereby connecting LED L 2  to the circuit. Switch S 4  remains closed during this switching between L 1  and L 2 . 
     Once switch S 2  has been closed, S 4  can then be switched-off in step  69 , i.e. opened, thereby allowing LED L 2  to become forward biased such that a current I 2  passes from the positive supply VDD to ground GND via current source IS 1 . 
     This sequence is performed in a similar manner when changing from LED L 2  to another LED, for example L 3 , and so on. 
     It will therefore be realised that, rather than the power supply current IS having large switching current components being drawn in a disrupted, non-continuous manner from the power supply (i.e. corresponding to the currents I 1 , I 2  &amp; I 3  being drawn by the respective LEDs during operation), the power supply current IS remains constant instead. 
     The circuit arrangement of  FIG. 5  therefore performs differential current switching, such that current either flows through an LED (e.g. L 1 /S 1 ) and the current source IS 1 , or through the shunt path  50  and the current source IS 1 . 
     Thus, it will be appreciated that the circuit of  FIG. 5  enables a substantially constant current IS to be drawn from the supply, and the same substantially constant current to flow in the ground return path, which reduces or substantially eliminates the ADC interference problem associated with the switching transients, such that it is possible that the ADC is capable of being integrated on the same IC as the LED switching array (S 1 -S 3 ). Integrating the switches on the same IC as the processing circuitry has the effect of minimising the cost associated with such an application. 
       FIGS. 7   a - 7   d  provide a further illustration of the switching sequence of switches S 1 -S 4  of  FIG. 5 . Prior to time t 1  the LED L 1  of  FIG. 5  is being illuminated. In other words, switch S 1  is turned-on (i.e. due to the corresponding switch control signal CS 1  being high), while switches S 2 , S 3  and S 4  are turned-off (i.e. due to switch control signals CS 2 , CS 3  and CS 4  being low). The following operation is then performed in order to illuminate LED L 2  in place of LED L 1 . First, at time t, the switch S 4  is turned-on (i.e. by taking the switch control signal CS 4  high). This causes the shunt path  50  of  FIG. 5  to become operational. Next, at time t 2  the LED L 1  is removed from the circuit by turning off switch S 1  (i.e. by taking the switch control signal CS 1  low). It will be appreciated that the current IS drawn from the supply remains constant despite LED L 1  being turned off, due to the effect of the shunt path  50  and current source IS 1 . At time t 3  switch S 2  is turned-on (i.e. by taking switch control signal CS 2  high) such that LED L 2  is connected to the circuit. Finally, at time t 4  the shunt path is removed by turning off switch S 4  (i.e. by taking the switch control signal CS 4  low). 
     A similar procedure is performed when switching from LED L 2  to LED L 3 , or from LED L 3  to LED L 1 . 
       FIG. 7   e  illustrates the current IS drawn from the power supply of  FIG. 5  when performing the switching operation described above. As can be seen, the current IS remains substantially constant. 
     In contrast,  FIG. 7   f  illustrates what power supply current IS would be drawn from a power supply (or the corresponding ground return current) when performing a switching operation in an arrangement as shown in  FIG. 1 , i.e. if the shunt path  50  were absent. 
     Although not shown in  FIGS. 7   a  to  7   f , it will be appreciated that the arrangement of  FIG. 5  can also be used in a PWM mode of operation, whereby the respective switches are controlled by altering the duty-cycle and/or frequency of their control signals, for example toggling CS 4  during a time when one of S 1  to S 3  are on. 
     It should be noted that it is preferable to switch Node A in a controlled manner so that the rate of change of voltage (dv/dt) at Node A is not excessive. 
       FIG. 8  shows a basic diagram of a third arrangement for driving an LED array. 
     As with  FIGS. 3 and 5 , an LED array comprises Red, Green and Blue LEDs L 1 , L 2 , L 3 . The LED switching circuitry S 1 , S 2 , S 3  may form part of the same monolithic circuit as the analogue front end circuitry (AFE) that processes the image data received from the photo sensors. To reduce the problem associated with LED switching transients interfering with the ADC process, a current source IS 1  is provided in the current path between the switches S 1 , S 2 , S 3  and ground, for controlling the flow of current through the LEDs L 1 , L 2 , L 3 . A differential current path  50  (or shunt path) having a switching device S 4  is provided in parallel with the array of LEDs and corresponding switches S 1 -S 3 . 
     In addition, according to this arrangement, a second current source IS 2  is provided in the shunt path  50 . The second current source IS 2  enables the switching of the shunt path  50  to be performed in a more controlled manner. As will be described in greater detail below in relation to  FIGS. 12   a  to  12   d , there will be capacitance Cp associated with Node A, either parasitic capacitances or possibly an actual additional capacitor. 
     The second current source IS 2  is switched on by switching device S 4  in sequence with the LED switches S 1 -S 3  as was described above in connection with  FIGS. 5 ,  6  and  7 . The current drawn by the second current source IS 2  may be configured to be a predetermined amount greater than the current IS drawn through the LED L 1 , for example 5% greater. For example, it may be configured so that it can be switched between say 105% of IS 1  and 95% of IS 1 , for example by comprising a 95% current source and a 10% current source in parallel, separately switchable. 
       FIGS. 9   a - 9   d  illustrate the switching sequence of switches S 1 -S 4  of  FIG. 8 . Referring to  FIGS. 9   a - d , just before switch S 1  is switched off at time t 2 , current source IS 2  is switched on via switch S 4  at time t, and draws a slightly larger current IS from the supply than the current IS previously drawn by LED L 1  from current source IS 1 . The difference in current between IS 2  and IS 1  serves to charge up the capacitance Cp on node A, until node A has risen to the voltage compliance limit of current source IS 2  and the output current of IS 2  reduces to equal IS 1 . In other words, a slightly larger current IS equal to IS 2  is drawn for a short time after time t 1 , as shown in  FIG. 9   e . The modulation of the ground return current is substantially the same as that of the supply current IS. It is noted that the difference between IS 2  and IS 1  flows as a displacement current though Cp while node A is changing voltage. 
     When switching from using one LED, for example L 1 , to using another LED, for example L 2 , as before, S 1  can now be opened (switched off) at time t 2  so as to isolate LED L 1 , and S 2  can be closed at time t 3  to connect LED L 2 . During this switching operation switch S 4  remains closed. 
     Once switch S 2  is closed, current source IS 2  is reduced, to be less than IS 1 , and node A will decrease in voltage, at a rate determined by Cp and the difference between IS 1  and IS 2 . Node A will decrease in voltage until LED L 2  starts to take the difference current. Switch S 4  can then be switched off at time t 4 , i.e. opened, thereby stopping the current flow through IS 2  and fully forward biasing LED L 2  such that LED L 2  becomes illuminated and draws current from the supply driven by current source IS 1 . 
     This sequence is repeated when switching from LED L 2  to another LED. 
     Thus, it can be seen that, rather than the power supply having a large switching current IS being drawn from it as shown in  FIG. 9   f  (i.e. in a disrupted or non-continuous manner corresponding to the respective LED currents I 1 , I 2 , I 3 ), the power supply has a much smoother or continuous current IS drawn from it (as shown in  FIG. 9   e ). The ground current will be equal to the constant current source IS 1  plus any brief transient currents charging Cp, so in this case the ground current will be IS 1  plus or minus 5%, for example. The supply current modulation will be the same. In contrast,  FIG. 9   f  illustrates what current IS PRIOR ART  would be drawn in a prior art arrangement as shown in  FIG. 1 , i.e. if IS 2  and S 4  were absent. As shown in  FIG. 9   f , the current IS PRIOR ART  drawn from the supply would switch between IS PRIOR ART  and zero when switching from one LED to another. 
     The smaller switching current of the invention minimises the effect of switching transients such that the ADC is capable of being integrated on the same IC as the LED switching array and the IC can be placed on the scanner head. Such an integrated scheme has the effect of minimising the cost associated with such an application. 
     According to a further arrangement, the switches in the embodiment of  FIG. 8  can be controlled using pulse width modulation (PWM) control signals. This could be achieved by toggling CS 1  etc, but to reduce supply and ground current ripple, CS 4  would need to be toggled in anti-phase. However, it is preferable to apply PWM to the shunt path. In other words, while switch S 2  say is closed, switch S 4  is controlled using a PWM control signal, thereby indirectly controlling the current I 2  passing through LED L 2  and therefore the average intensity of LED L 2 .  FIGS. 10   a  to  10   i  show a PWM operation where L 1  is run at 100% duty cycle, L 2  at a small duty cycle and L 3  at an intermediate duty cycle. 
     According to a further embodiment, to allow variation of the LED currents without PWM switching, the current source IS 1  (and IS 2 ) can be varied in magnitude, by a common amount for all LEDs or differently for each LED. In other words, the current sources IS 1  and IS 2  can be fixed (i.e. set to operate in a predetermined mode of operation), or programmable, such that the operation of the current source is variable. Further discussion of this aspect of the invention will be provided after discussing the features of the current source IS 1  and the current source IS 2  in greater detail. 
       FIG. 11   a  illustrates a more detailed example of a current source IS 1  that may be used in the arrangements of  FIGS. 3 ,  5  and  8 . 
     Referring to  FIG. 11   a , a Current Reference Generator (CRG) basically sets the reference current Iref 1  for the whole circuit. 
     A reference voltage Vref supplied to an input of an amplifier in the CRG is preferably a bandgap reference voltage, thus being very accurate and stable. 
     In this particular example of the CRG, Vref is applied to the input of amplifier A 1 . Feedback around amplifier Al and transistor MN 0  forces the voltage on node Pin to equal Vref, and thus sets the current through the resistor Rext. This current passes through MN 0  to give the output current Iref 1 , equal to Vref/Rext. 
     “Pin” may represent an output pin on an IC. This allows a user to set the reference current Iref 1  to a desired value by altering the value of an external resistor, Rext. The ability of a user to set Iref 1  is preferable, since it relates to the type of LEDs (L 1 -L 3 ) that are used, with different LEDs having different characteristics. Alternatively Rext may be integrated with A 1 , possibly trimmable or digitally programmable to allow adjustment. 
     Current Source IS 1  comprises a series of controlled current sources MP 2 /MP 3  that define the currents Iref 2  and Iref 3  that are mirrored versions of Iref 1 . 
     Current source IS 1  comprises a variable current source, for example, a Current Digital-to-Analogue Converter (CDAC), which is made up of a series of 2 N−1  NMOS transistor and switch arrangements: where N is an integer greater than 1. It should be noted that Iref 2  &amp; Iref 3  set up the current sinking capabilities of the CDAC as will be described below. 
     Within the CDAC, each individual switch is controlled so as to allow its associated NMOS transistor to connect to node A, the low-side of switches S 1 -S 4 . It should be noted that the CDAC NMOS transistors MLSB, . . . , MMSB have W/L ratios that are binary-weighted such that the each successive transistor, when switched on, is capable of sinking twice as much current as its predecessor. This is denoted by the labels  1 ,  2 , . . .  2   N−1  close to each transistor MLSB, . . . , MMSB. Such an arrangement allows the current sunk by the CDAC to be accurately controlled over a wide range of current values. 
     As mentioned above, in operation the Red, Green and Blue LEDs L 1 -L 3  may require different current values to pass through them. This is in part due to the different characteristics of the LEDs, and also in part due to the required brightness of each LED during a scanning operation. The brighter the LED is made the less the sampling (i.e. integration), and hence scanning, time is required which means that the scanner can operate quicker. Therefore, it is desirable to operate the LEDs at or near their maximum current ratings without damaging the LEDs. 
     In the circuit of  FIG. 11   a , the current Iref 2  through MN 1  is mirrored by MN 2  and MLSB, . . . , MMSB. To maintain accuracy despite variation in the voltage of node A, amplifier A 2  is introduced. The voltage on the inverting input of the A 2  is that of node A and varies during operation. Negative feedback from the non-inverting input of A 2  via the voltage inversion and gain introduced by MN 1  causes the gate voltage of MN 1  to settle out to that voltage necessary to sink the current Iref 2  output from MP 2 . MN 2  and MP 3  are not essential, but are introduced to maintain feedback in the case where all the CDAC NMOS transistors (MLSB-MMSB) are turned off (i.e. zero output current). 
     Modern electronic systems, and scanners in particular, now operate at low supply voltages to reduce power consumption, power dissipation, and active and passive component cost. For low voltage applications, such as where VDD=5v, the current source IS 1  is therefore selected and designed such that the maximum possible voltage drop exists across the LEDs L 1 -L 3 , while the minimum possible voltage drop exists across the current source IS 1 . 
     Assuming the CDAC comprises 8 bits (N=8), there are then 256 discrete levels (since 2 8 =256) from zero to Imax 3  in 255 steps, so each step (I LSB ) is Imax 3 /255, where Imax 3  is the maximum output current of the CDAC. 
     Assume that the maximum desired current through any one of the LEDs is Imax 1  (allowing for tolerances in the LEDs). Then, allowing some margin, Imax 3 &lt;Imax 1 . 
     IS 2 , for correct operation, is configured to be capable of sourcing a current Imax 2  that is slightly greater, for reasons which will be apparent from the following description, than Imax 3 , such that:
         Imax 2 &gt;Imax 3         

     It is preferable to set the W/L ratio of MN 1  to be the same as that associated with the LSB NMOS transistor of the CDAC (as indicated by the number “1” just below the gate terminal). Therefore, MN 1  sinks a current Iref 2  that equals Imax 3 /255 which equals I LSB . It should be noted that Iref 2  can be scaled such that it is larger or smaller than Iref 1 , and this can be achieved by the sizing of the transistor W/L ratios of transistors MP 2  relative to transistor MP 1 . Also Iref 2  can be scaled with respect to Imax 3  by sizing MN 1  relative to the CDAC NMOS transistors MLSB, . . . , MMSB. 
     Transistor MN 2  is illustrated as having a parasitic Gate-Drain capacitance CGD. Such a capacitance exists in all of the NMOS transistors of the CDAC although they are not illustrated: such a parasitic capacitance is referred to as a Miller capacitance. 
     It should be noted that it is the combined Gate-Drain capacitance C GDTOT  of all these capacitances (for MN 2  and those NMOS transistors switched on in the CDAC and possibly input transistors of A 2 ) that provides one mechanism for exacerbating the supply and ground current transients referred to earlier, giving rise to the requirement to render small the slew rates of node A as mentioned above in relation to  FIG. 5 . 
     Referring to  FIG. 5 , the effect C GDTOT  has in the arrangement of  FIG. 5  is that as the shunt path is enabled, i.e. as S 4  switches-on, and connects the supply voltage VDD to the high sides of MN 2  and the enabled CDAC NMOS transistors, there is a large dv/dt on node A. This is a.c. coupled through C GDTOT  onto the gates of these transistors causing a spike in their currents, and these currents manifest as transients on the supply rails which will have an effect, to a greater or lesser effect depending on the value of C GDTOT , on the ADC. 
     A second effect, for example when using a current source IS 1  as shown in  FIG. 11   a , is that the transient kick on the gates of MN 2  and the other parallel NMOS transistors MLSB, . . . , MMSB disturbs the bias point set by amplifier A 2 . A 2  will have only a finite bandwidth, so may take some time to settle out and re-establish the steady-state bias point. During this time the current output from the CDAC will deviate from the nominal. Hence, there is the need to control the slew rate of the voltage at Node A. 
     It should be noted that S 4  illustrated in  FIG. 5  may be, in a very basic version of the invention, implemented as a variable resistor, resistive controlled switch etc., such that it is switched on in a controlled manner so as to avoid these high rates of change of voltage dv/dt on Node A. Similarly for IS 2  in the arrangement of  FIG. 8 . 
     Due to the requirement of having the maximum possible voltage drop across the LEDs, and the minimum voltage drop across the current source IS 1 , the circuit of  FIG. 11   a  is susceptible to damage due to the high voltage at Node A of  FIG. 5 . This is because the high voltage of Node A causes the voltage on the gate of MN 2  to rise due to Miller Capacitance effects, thus causing MN 2  to turn on. 
     In view of this possibility,  FIG. 11   b  shows an improvement in which a cascode transistor is connected to the drain of MN 2 , thereby shielding MN 2  from the voltage at Node A in  FIG. 5 . The cascode transistor is biased by a reference voltage Vbias that may, for example, be supplied by a current source arrangement as shown. 
     The cascode transistor illustrated in  FIG. 11   b  and associated with MN 2  is preferably used as the basis for the respective switches associated with each of the CDAC NMOS transistors (not illustrated). Each “cascode” switch in the CDAC is controlled independently by a control signal that biases its respective cascode switch. The advantage of utilising the cascode switches in the CDAC is that it helps to isolate the CDAC and the ground supply rail from transients. 
     As mentioned above, in low voltage applications, it is preferable to have the maximum possible voltage drop across each of the LEDs so as to maximise the current through the LEDs, which implies the minimum possible voltage drop across each of the switches S 1 -S 3  and the current source IS 1 . It is noted that the on-resistance of the switches is substantially negligible hence the voltage drop is low in comparison to that associated with the current source IS 1 . 
     In order to minimise the voltage drop across current source IS 1 , there needs to be a low Drain-Source voltage drop across MN 1  and as well as MN 2  and the CDAC transistor and switch elements. However, to keep MN 2  in its saturation region, thereby providing a good current source, the V DSsat  of these transistors must be kept low. 
     The transconductance (gm) of an NMOS transistor is given approximately by:
 
 gm= 2. IDS/V   DSsat  
 
     Therefore, gm is inversely proportional to V DSsat  and is therefore high for a low V DSsat . 
     Any mismatch in transistors MN 1  &amp; MN 2  will result in an effective offset voltage at the gate terminal of MN 2 . Such an offset will, because of the high gain (gm) of MN 2 , result in errors. From the above formula, an effective gate voltage offset ΔV will give a fractional error ΔI in output current Iref 3  compared to Iref 2  where
 
Δ I/IDS=gm.ΔV/IDS= 2 .ΔV/V   DSsat  
 
     This is especially true when the transistors within the CDAC are switched in as they too have high transconductances like MN 2  plus, they are binary-weighted and driven by the effective offset voltages of similar magnitude. 
     To achieve say 8-bit accuracy for say a 100 mV VDSsat of MN 1  requires sub-millivolt offsets. The random manufacturing offset voltage of a MOS transistor may be reduced by increasing its gate area. But since the offset is only inversely proportional to the square root of its gate area: this leads to impractically large devices for MN 1  and the CDAC devices. To overcome this, there may be provided a second, more accurate, current source, whereby the output of the first current source is calibrated against this second current source. In this arrangement, IS 2  comprises this second current source. IS 2  has much more headroom, almost all of VDD, so can include devices with much greater V DSsat  and hence much smaller area for the required accuracy. 
     To provide a more detailed explanation of the current source IS 2 , reference will now be made to  FIGS. 12   a  to  12   d  in which: 
       FIG. 12   a  illustrates a simplified example of the current source IS 2  used in  FIG. 8 , 
       FIG. 12   b  illustrates an implementation of a protection circuit for detecting a maximum current (Imax) according to the present invention, 
       FIG. 12   c  illustrates how the protection circuit of  FIG. 12   b  can be disabled, and 
       FIG. 12   d  illustrates a more detailed example of the current source IS 2  described in  FIGS. 8 and 12   a.    
     Referring to  FIGS. 12   b  and  12   d , and explanation will now be given concerning how the shunt path  50  comprises a protection circuit  120  for preventing an over current from passing through an LED L 1 -L 3 . In  FIG. 12   d : transistors MP 5 , MN 4  and MN 5  constitute the current source IS 3  in  FIG. 12   b ; transistors MP 4 , MN 3  and MN 6  constitute the current source IS 5  in  FIG. 12   b ; and transistors MP 10 , MP 11  and MN 7  constitute the current source IS 4  in  FIG. 12   b.    
     Referring to  FIG. 12   d , transistor MP 4  is driven from a suitable voltage, for example Node X of  FIG. 11   a , to deliver a current Iref 4 , another replica of Iref 1 . This is mirrored by transistors MN 3  and MN 6  and then mirrored again by transistors MP 9  and MP 8 . Most of MP 8 &#39;s output current is then output via MP 6  of the protection circuit  120  to provide an output current I 4  to deliver the current Imax 2  when the LEDs are shunted by current source IS 2 . 
     MP 7  of the protection circuit  120  mirrors the current Imax  2  flowing through transistor MP 6 . The W/L ratio of MP 7  may be, for example, 1/1000 of that of MP 6 . This means that the protection circuit  120  diverts only a small fraction of MP 8 &#39;s output current, and only consumes minimal power when performing its current detection function. 
     MP 5  is driven with the same gate voltage as MP 4  to give another replica current Iref 5 , which is then mirrored via MN 4  and MN 5 . MN 5  is connected to MP 7 : the voltage at their common drain node will go high if MP 7  carries more current than MN 5  and low if MP 7  carries less current than MN 5 . Since I(MP 7 ) is a known fraction (say 1/1000) of I(MP 8 ), this flags whether I(MP 8 ) is less than or greater than some predetermined threshold, this predetermined threshold being determined mainly by the transistor size ratios of mirrors MP 6 :MP 7 , MN 5 :MN 4 , and the ratio of MP 4 , MP 5  to say MP 1  of  FIG. 11   a.    
     The comparator Ca compares the voltage at this common drain node of transistors MP 7  and MN 5  with a reference voltage Vref. Thus if the maximum current flowing through MP 8  exceeds the predetermined threshold then the comparator output signal I LEDmax  is set so as to indicate this condition. 
     In operation, the output of MP 6  is connected to the output of IS 1  as shown and conducts the current I 4 . If IS 1  is less than I 4  (i.e. IMP 6 ) then node A will rise, until the source voltage of MP 6 , i.e. the drain voltage of MP 8  has risen enough to take MP 8  out of saturation into triode operation, i.e. past the output voltage compliance of MP 8  regarded as a current source. MP 7  will still output the same fraction of I 4  (IMP 6 ), so the comparator flags whether I(IS 1 ) is less than or greater than the predetermined threshold of I 4  (IMP 6 ). 
     If however IS 1  is greater than I 4  (IMP 6 ) then node A will fall until node A reaches the voltage compliance of IS 1  when delivering I 4  defined by MP 8 . The current through MP 7  will then be high, so the comparator Ca will flag this. This “flag” signal I LEDmax  can then be used to inhibit the turn-on of switches S 1 , . . . , S 3  to prevent the IS 1  current being steered to the LEDs, at least until the digital control to IS 1  CDAC has been adjusted to decrease to a desired safe level, thereby protecting the LED. 
     Thus, according to the invention, the protection circuit  120  enables the LEDs to be illuminated at their maximum intensity, while preventing an over-current from flowing through any of the LEDs L 1 -L 3 . 
     In this implementation of IS 2 , its output current I 4  is switched on and off by controlling the gate of MP 8  using a switch S 4 *. (Note that S 4 * open corresponds to S 4  being closed in previous diagrams, and vice versa.) 
     As discussed above, it is desirable to limit the voltage slew rate on node A. This is implemented with the aid of capacitor C and controlled charging currents from MN 6  and MP 11 . Referring to  FIG. 12   b , it should be noted that the current IIS 4  sourced by current source IS 4  (MP 11 ) is twice that of the current IIS 5  sourced by current source IS 5  (MN 6 ) such that: when S 4 * is open, current source IS 5  is sinking a current which pulls the gates of transistors MP 8  and MP 9 , as well as the low-side of capacitor C towards ground. Transistors MP 8  and MP 9  turn on, at a rate influenced by the capacitor C, and MP 8  mirrors a magnified version of the current flowing through transistor MP 9 . When S 4 * is closed current source IS 4  effectively pulls the gates of transistors MP 8  and MP 9 , as well as the low-side of capacitor C towards the supply VDD and transistors MP 8  and MP 9  turn off, at a rate influenced by the capacitor C, thereby gradually stopping the current (I 4 ) flowing to current source IS 1 . 
     The capacitor C, which is a relatively large capacitor, connected between the common gate terminals of transistors MP 8  and MP 9  acts to delay the rise in the gate voltages of transistors MP 8  and MP 9  such that rather than these two transistors turning hard on in a relatively short period, the turn-on time of these transistors is relatively slower. This has the effect of reducing the rate of change of voltage dv/dt at Node A. It will be appreciated that the sizes of transistors employed and the value of the capacitor, together with the LED current values can be altered so as to produce the desired effect, i.e. a reduced dv/dt at Node A, accordingly. 
     Referring to  FIG. 12(   c ), it is preferable to insert a switching mechanism, as illustrated by switches S 5  and S 6  into the protection circuit  120  (Imax Det.). By inserting these switches, the current that initially flows through the LED is indicative of the current flowing through the LED for the duration that it is conducting current such that the LED current monitoring can be disabled. S 5  and S 6  are driven by inverse signals such that when S 5  is closed, S 6  is open and vice-versa. 
     From the above it can be seen that the arrangement of the preferred current source shown in  FIGS. 12   b ,  12   c  and  12   d  allows the current set for each of the LEDs to be measured: if it exceeds a maximum then the LED is not connected, so the LED is protected. This is active whenever the shunt current path is enabled, either when switching between LEDs or in the “off” time between pulses in PWM mode. This has the advantage of enabling the current to be monitored and controlled in the shunt path, rather than in the path actually containing an LED. 
     It should be noted that the W/L ratio of MP 8  may be scaled if desired. For instance W/L for MP 8  may be scaled to be 2 N *1.2 times (i.e. for an 8 bit=256*1.2 times) that of MP 9 , to give a nominal IS 2  scaled by 1.2 over IS 1 . Similarly W/L of say MN 5  may be scaled to adjust the limit threshold. 
     In a further embodiment, rather than MP 8  being a fixed size, it can be broken into a number, say 256 segments, and controlled digitally to act as a current DAC. Since it has more available headroom, it can be physically small. With MP 8  CDAC set to the desired current, IS 1  can be iterated until it is within an LSB of I(MP 8 ) (strictly I(MP 6 )). In this way the accuracy requirements and hence the physical size of the CDAC in IS 1  can be kept within reasonable limits. 
     It will be appreciated that the embodiments described above offer the choice of PWM or absolute control of the LED current control. To control the brightness of illumination and so the imaging period, two techniques are therefore available, i.e. adjusting the absolute current or varying the on-time of a PWM control. 
     The protection circuit  120  for detecting a maximum LED current, enables scan time to be minimised, by maximising LED brightness. This is achieved by running the LED near it maximum current rating. To prevent damage to the LED, the LED current is checked to be within the maximum current rating of the LED, prior to connecting the LED to the power supply. 
     It is noted that, in the description of the above mentioned arrangements, it is assumed in  FIG. 9   e , for example, that LED L 2  and LED L 3  draw the same current as LED 1 , i.e. I 1 =I 2 =I 3 . It will be appreciated however that, in practice, the optimum operational current of each LED might be different. Also the operational currents may be required to be adjustable, perhaps to adjust the illumination of the object to match the sensitivity of a particular sensor or reflectance of the object. 
     It will also be appreciated that the current source IS 1  in each of the arrangements can be configured to provide a predetermined current profile, and/or configured such that the current profile is variable (for example depending upon which of the LEDs L 1 -L 3  is being switched). In other words, the current source IS 1  can be fixed (i.e. set to operate in a predetermined mode of operation), or programmable, such that the operation of the current source is variable. 
     It will also be appreciated that, while the preferred embodiment of the invention relates to providing a protection circuit when switching between LEDs in an LED array, the invention is equally applicable to providing a protection circuit for a single LED or light source, such that the single LED or light source is not damaged by an over-current. 
     It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims or drawings. The word “comprising” does not exclude the presence of elements or steps other than those listed in a claim, “a” or “an” does not exclude a plurality, and a single element or other unit may fulfil the functions of several units recited in the claims. Any reference signs in the claims shall not be construed so as to limit their scope.

Technology Category: 5