Abstract:
A current sense circuit, including a voltage regulator, for detecting current conducted by a device under test (DUT) for a wide range of currents, while still providing fine granularity for detecting low/small currents. Two current branches/paths may be established to the supply terminal of the DUT. A switching device, e.g. a transistor device, may be operated to enable a first current branch of the two current branches, or both current branches to conduct current, responsive to the size of the current flowing in the first current branch. The total current conducted by the DUT may be equivalent to a sum of the respective currents flowing in the two current branches. When the switching device is turned off, very small currents conducted by the DUT may be measured with fine granularity. When the switching device is turned on, substantially larger currents conducted by the DUT may be measured.

Description:
BACKGROUND 
     1. Field of the Invention 
     This invention is related to the field of electrical measurements, more particularly, to current sensing. 
     2. Description of the Related Art 
     Measuring, sensing and/or controlling current flow into and out of electronic circuits is an important requirement in many electronic systems, spanning a wide range of applications. There are numerous different current sensing techniques, which are as diverse as the applications that require monitoring current flow. Examples of systems that may rely on current sensing to perform essential functions include programmable current sources, overcurrent-protection and monitoring devices, various low-current systems, battery chargers, various power supplies, and circuits where the ratio of output current to input current is of importance. In addition, portable applications may also require dedicated current monitors that fit in a small package and operate with low quiescent current. 
     The two most common current-measurement/current-sensing methods are low-side current sensing and high-side current sensing. In the case of low-side current sensing, the current is sensed in the ground return path of the power connection to the monitored load or device under test (DUT), and generally flows in just one direction. Any switching that is performed is on the load-side of the current sense circuit. In the case of high-side current sensing, the current is sensed in the supply path of the power connection to the monitored load (in other words, the sensing path in this case typically includes the supply terminal of the load). Current generally flows in just one direction, with switching performed on the load side of the current sense circuit. 
     The low-side and high-side configurations have trade-offs in different areas. For example, the low-side resistor adds undesirable extraneous resistance in the ground path, while circuitry associated with the high-side resistor has to withstand relatively large common-mode signals. Overall, advantages of low-side current sensing include low input common-mode voltage, ground referenced output voltage, and easy single supply design. Disadvantages of low-side current sensing include the load being lifted from direct ground connection. Overall, advantages of high-side current sensing include the load being grounded. Disadvantages of high-side current sensing include high input common-mode voltages, and the need to level shift the output down to system operating voltage levels. 
     Full-range (i.e. high and low side) current sensing configurations are also used, where a bidirectional current is sensed in a bridge driven load, or unidirectional high side connection with a supply side switch. While full-range current sensors may require only one current sense resistor for bidirectional sensing, and feature convenient sensing of load current on/off profiles for inductive loads, they&#39;re also prone to wide input common-mode voltage swings, with the common-mode rejection also limiting high frequency accuracy in PWM applications. Some applications may require current sensing over a wide range of current values, with increased resolution when measuring smaller currents. Many present solutions for sensing current over a wide dynamic range use two current sense amplifiers with two values of sense resistors and a comparator, to allow for higher sensitivity and resolution of measurement for low currents while also sensing higher currents. 
     SUMMARY 
     In one set of embodiments, a current sense circuit may be designed around a low dropout (LDO) linear voltage regulator, and may be configured to detect a current conducted by a device under test (DUT) or load for a wide dynamic range of currents, while still providing fine granularity when detecting low/small currents. Two current branches may be established in parallel to the supply terminal of the DUT. A switching device (e.g. a transistor device, such as a BJT or MOSFET) may be used to enable either only a first current branch of the two current branches, or both of the current branches to conduct current, depending on the size of the current flowing in the first current branch. In one embodiment, the switching device may operate to prevent the second current branch from conducting current, responsive to the current conducted (flowing) in the first current branch having a value below a specified current threshold. The switching device may also operate to enable the second current branch to conduct current when the current conducted in the first current branch reaches the specified current threshold. 
     The current sense circuit may be configured such that the total current conducted by the DUT at any time is equivalent to the sum of the respective currents conducted by the first current branch and the second current branch. Accordingly, when the switching device is turned off, the total current conducted by the DUT will be the same as the current conducted by the first current branch, and very small currents flowing in the DUT may be measured with fine granularity with an appropriately sized shunt resistor configured in the first current path. When the switching device is turned on, the current conducted in the second current branch will add to the current conducted by the first current branch to provide the total current to the DUT, and substantially larger currents flowing in the DUT may be measured with an appropriately sized shunt resistor configured in the second current path. 
     This provides a current sense configuration with the capability of measuring load currents within a wide dynamic range, while providing fine granularity when measuring low (e.g. under 100 mA) currents. The current sense circuit may also incorporate a voltage control circuit for directly setting the value of the voltage at the supply terminal of the DUT device by providing a feedback voltage to the voltage regulator. The voltage control circuit may include a capacitor for readjusting the phase margin and thus provide a better loop response during voltage regulation. 
     Current conducted by a load may therefore be sensed and/or measured by establishing a first current flowing through a first current path into a power terminal of the load, and responsive to the first current reaching a threshold value, establishing a second current flowing through a second current path into the power terminal of the load. The load would thereby conduct a total current equivalent to a sum of the currents flowing into the power terminal of the load, that is, a sum of the first current and the second current (when there is a second current flowing). The current paths may be configured such that the second current is one or more orders of magnitude higher than the first current, allowing for fine granularity in measuring lower currents (e.g. under 100 mA) when there is no current flow in the second current path, and enabling the circuit to allow for measurement of larger currents conducted by high current requirement loads. 
     In one set of embodiments, the current conducted by a device (with the device having a supply terminal configured to receive a supply voltage and further having a reference terminal) may be sensed by establishing a first current flowing through a first shunt element into the supply terminal of the device, and responsive to the first current reaching a threshold value, establishing a second current flowing through a second shunt element into the supply terminal of the device, with the first shunt element having a value at least one order of magnitude higher than the value of the second shunt element. The voltage across the first shunt element may then be measured to obtain the value of the first current, and the voltage across the second shunt element may be measured to obtain the value of the second current. The total current conducted by the device will be the sum of the first current and the second current. By establishing the first shunt element with a value at least one order of magnitude higher than the value of the second shunt element, and having a value suited to the expected regulated voltage at the supply terminal of the load, smaller load currents may be measured at a finer granularity. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The following detailed description makes reference to the accompanying drawings, which are now briefly described. 
         FIG. 1  is a block diagram of a current sense circuit using dual current paths with a switching element, according to various embodiments of the present invention; and 
         FIG. 2  is a circuit diagram of one embodiment of the current sense circuit of  FIG. 1 . 
     
    
    
     While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to. 
     Various units, circuits, or other components may be described as “configured to” perform a task or tasks. In such contexts, “configured to” is a broad recitation of structure generally meaning “having circuitry that” performs the task or tasks during operation. As such, the unit/circuit/component can be configured to perform the task even when the unit/circuit/component is not currently on. In general, the circuitry that forms the structure corresponding to “configured to” may include hardware circuits and/or memory storing program instructions executable to implement the operation. The memory can include volatile memory such as static or dynamic random access memory and/or nonvolatile memory such as optical or magnetic disk storage, flash memory, programmable read-only memories, etc. Similarly, various units/circuits/components may be described as performing a task or tasks, for convenience in the description. Such descriptions should be interpreted as including the phrase “configured to.” Reciting a unit/circuit/component that is configured to perform one or more tasks is expressly intended not to invoke 35 U.S.C. §112, paragraph six interpretation for that unit/circuit/component. 
     DETAILED DESCRIPTION OF EMBODIMENTS 
       FIG. 1  shows a current sense circuit  100  for measuring current conducted by a device under test (DUT)  122 , according to one set of embodiments. While load  122  is shown as being coupled to the current sense circuit, load  122  is not functionally a part of current sense circuit  100 , but is rather any device/load that may be coupled to current sense circuit  100  for the purpose of measuring the current conducted by load  122 . As shown in  FIG. 1 , current sense circuit  100  may be built around a voltage regulator  108 , which may be a linear low-dropout (LDO) voltage regulator, configured to receive an input voltage V in  at an input terminal and provide a regulated output voltage Vreg based on V in . As also shown in  FIG. 1 , a first current branch may be established from the output terminal of voltage regulator  108  through a first shunt element  130  to the supply terminal (at node  150 ) of the load device (or DUT)  122 . A second current branch may also be established, in parallel with the first current branch, through switch  134  and second shunt element  132 , to the supply terminal (at node  150 ) of load device  122 . When load  122  is coupled as shown, switch  134  may operate to enable current flow in the second current branch responsive to the current in the first current branch exceeding a specified threshold value. 
     The values of shunt elements  132  and  130  may be specified/set such that the current flowing through shunt element  130  is at least one order of magnitude lower than any current that may flow through shunt element  132 , when shunt element  132  is conducting current. For example, switch  134  may operate to turn on when the current flowing through shunt element  130  reaches 200 mA, which may occur when the voltage drop across shunt element  130  (i.e. Vreg−V out )reaches a specific value. Therefore, if load  122  is a circuit/component/device that conducts low currents during normal operation, the nominal value of the regulated output voltage V out  may be specified to be a lower voltage (e.g. 0.4V), to obtain a lower supply voltage established at node  150  to power load  122 . The nominal value (i.e. the desired value) of V out  may be set by configuring voltage control block  136 . As used herein, nominal value is meant to indicate a desired value, which may in practice differ from the actual value developed at the output of voltage regulator  108  due to various factors, though it may remain within a specified, typically acceptable margin of deviation from the desired nominal value. 
     As mentioned above, the value of V out  may be set using voltage control element  136 . In addition, voltage control element  136  may also be configured in the feedback path from V out  to the feedback terminal (ADJ) of voltage regulator  108 , to provide the feedback signal (Vadj) to voltage regulator  108  so that voltage regulator  108  may adjust the current it sources at its output (OUT), based on Vadj. As a result, Vreg may vary with the load current in a manner such that V out  is kept substantially constant as the load current varies. As previously mentioned, the respective values of shunt elements  130  and  132  may be specified to allow a load  122  coupled to current sense circuit  100  to conduct a relatively large current, while also enabling lower currents conducted by load  122  to be measured more accurately. For example, if shunt element  130  has a value at least one order of magnitude higher (e.g. 10×) than the value of shunt element  132 , whenever shunt element  132  does conduct current, the incremental current conducted by shunt element  132  (or flowing through shunt element  132 ) may be exponentially higher than the incremental current conducted by shunt element  130 , the actual current values determined by the actual values of Vreg and V out  for given values of shunt elements  130  and  132 . The total current conducted by load  122  would be the sum of the respective currents flowing through shunt element  130  and shunt element  132 . To better illustrate this configuration, one possible embodiment of current sense circuit  100  is shown in more detail in  FIG. 2 . 
     Turning now to  FIG. 2 , current sense circuit  200  may include a low dropout linear voltage regulator  138 , for example a Linear Technology LTC3025 voltage regulator. Detailed functionality of voltage regulator  138  and its various terminals/pins may be found in the Linear Technology parts documentation for LTC3025. The BIAS terminal is for providing internal power for circuitry of voltage regulator  138 , the GND terminal is for coupling voltage regulator  130  to a voltage reference (e.g. a ground plane), the IN terminal is for providing the input supply voltage, which may serve as the source voltage from which the output load current may be directly derived, the ADJ terminal is the input to the error amplifier of voltage regulator  138 , used in regulating the voltage provided at the OUT terminal by adjusting the current sourced at the OUT terminal. The output voltage V out  in current sense circuit  200  may be set at node  150  as shown, and the output voltage range may be 0.4V to 3.6V, typically set by connecting the ADJ terminal to a resistor divider from V out  to GND, as shown. Thus, a voltage divider with resistors R 1  and R 2  may be used to set the desired value for V out . 
     Shunt element  130  from  FIG. 1  may be implemented as resistor R 3  to effectively provide a first current path between the OUT terminal of voltage regulator  138  and the supply terminal of load  122  (at node  150 ). Similarly, shunt element  132  from  FIG. 1  may be implemented as resistor R 4  to effectively provide a second current path to the supply terminal of load  122 , through transistor  110  implementing switch  134  from  FIG. 1 . Therefore, when a load  122  is connected between node  150  and ground, a current may flow from voltage regulator  138  through the OUT terminal and through resistor R 3  and into the power terminal (at node  150 ) of load  122 , when voltage regulator  138  is powered up. Depending on its power/current requirements, load  122  may require relatively low currents, e.g. in the 200 mA and/or lower range, or larger currents, e.g. currents larger than 200 mA. The size of the currents may vary according to expected loads for which current is to be measured, thus many different embodiments may exist with different actual current values. In other words, in certain applications the current threshold considered to be the upper bound of low/small currents may be somewhat higher than 200 mA or somewhat lower than 200 mA. However, the respective values of R 3  and R 4 , and the relationship between the respective values of R 3  and R 4  may together determine the level of granularity at which the smaller currents conducted by load  122  may be measured (when R 3  is conducting current but R 4  is not conducting current), and the overall dynamic range of currents that current sense circuit  200  may be capable of measuring (when both R 3  and R 4  are conducting currents). 
     For example, R 3  may have a value that is two orders of magnitude higher than the value of R 4 . In the embodiment shown, R 3  may have a value of 5Ω, while R 4  may have 100 th  of that value, i.e. 0.05Ω. Transistor  110  may turn on depending on the value of the voltage Vreg at terminal OUT of voltage regulator  138  and the voltage V out  at terminal  150 . Typically, when load  122  is expected to conduct smaller currents, V out  may be set to a lower value using the voltage divider consisting of R 1  and R 2  (with exemplary values for R 1  and R 2  indicated in FIG.  2 —other embodiments may have different values as required). When the value of the current required by load  122  results in a voltage drop across R 3  that is below the required threshold value for transistor  110  to turn on, current will be conducted by R 3 , but no current will flow in the second current branch, that is, through R 4 . In this case the total current conducted by load  122  will be the same as the current conducted by R 3 . This current may be measured by simply measuring the voltage drop across the terminals of R 3 , and divide that voltage-drop by the value of R 3 . With R 3  having a sufficiently high value (5Ω in the example), even a small change in current may correspond to a noticeable difference in the voltage drop across resistor R 3 . For example, a 100 mA current would correspond to a 500 mV drop across R 3 , while an 110 mA current would correspond to a 550 mV drop across R 3 . Therefore, smaller currents may be measured more accurately, as even a small difference (e.g. 10 mA) between two currents may result in an appreciable voltage drop difference (50 mV) across resistor R 3 . The current I 1 =V R3 /R 3 , where V R3  represents the voltage drop across resistor R 3 . 
     When the value of the current required by load  122  results in a voltage drop across R 3  that exceeds the threshold voltage required for transistor  110  to turn on, current will be conducted through R 4 , and the total current conducted by load  122  will be the sum of the respective currents flowing through R 3  and R 4 . With the value of R 3  an order of magnitude (e.g. 10 times) or more higher than the value of R 4  (in the example shown, R 3  has a value 100 times the value of R 4 ), the incremental current conducted by R 4  will be exponentially higher than the incremental current conducted by R 3 . This enables load  122  to draw large currents in a range that voltage regulator  138  may not be able to source for the same value of R 3 . Thus, the total current conducted by load  122  may be measured by measuring the respective voltage drops across R 3  and R 4  to obtain the respective currents flowing through R 3  and R 4 , to obtain the total current I 1  according to:
 
 I   1   =I   R3   +I   R4 =( V   R3   /R 3)+( V   R4   /R 4),
 
where I R3  represents the current flowing through R 3 , I R4  represents the current flowing through R 4 , V R3  represents the voltage drop across resistor R 3 , and V R4  represents the voltage drop across resistor R 4 . Accordingly, there will be a specific current level of I R3  associated with the threshold voltage (required for transistor  110  to turn on), and thus transistor  110  will prevent current from flowing through resistor R 4  until the current flowing through R 3  reaches a specified current threshold corresponding to the value of resistor R 3  and the turn-on threshold voltage of transistor  110 .
 
     As also previously mentioned, coupling resistor R 1  between the ADJ terminal of voltage regulator  138  and measurement node  150  establishes a feedback loop from V out  to an error amplifier within voltage regulator  138  to allow for regulation of V out . In addition, a capacitor C 2  (having a value of 12 pF in the embodiment shown) may be added across the terminals of R 1  to readjust the phase margin and thus obtain a better loop response during voltage regulation. A bypass capacitor C 1  may also be configured across measurement terminal  150  and the voltage reference (in this case ground), acting as a “non-conducting load” when no actual load  122  is coupled between node  150  and ground. It should also be noted that while the embodiments discussed herein show the transistor receiving a supply voltage from the same source as the voltage regulator, alternate embodiments in which the transistor may be provided a supply voltage from a different source are possible and are contemplated. 
     Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.