CURRENT MEASUREMENT CIRCUIT
20230184817 · 2023-06-15
Inventors
Cpc classification
International classification
Abstract
A circuit comprises a load transistor and a current measuring circuit that is coupled to the load transistor. The load transistor has a main current path, which is connected between a first supply node and an output pin for connecting a load. The current measuring circuit has a sense transistor coupled to the load transistor. The current measuring circuit is designed to deliver a measuring current that represents a load current flowing through the load transistor. The circuit also comprises an analog-to-digital converter with a current input, and a digital-to-analog converter. The analog-to-digital converter is designed to output a digital signal representing an input current of the analog-to-digital converter. The digital-to-analog converter is designed to output an output current that depends on the digital signal. A control circuit is designed to output the measuring current.
Claims
1. A circuit comprising: a load transistor including a main current path, wherein the load transistor is connected between a first supply node and an output pin for connecting a load; a current measuring circuit coupled to the load transistor wherein the current measuring circuit includes a sense transistor coupled to the load transistor, wherein the current measuring circuit is configured to supply a measuring current that represents a load current flowing through the load transistor; an analog-to-digital converter including a current input, wherein the analog-to-digital converter is configured to output a digital signal that represents an input current of the analog-to-digital converter; a digital-to-analog converter configured to output an output current that depends on the digital signal; and a control circuit configured to, using switches, in a first mode, output the measuring current at a sense pin, and in a second mode, feed the measuring current as an input current to the analog-to-digital converter and output the output current of the digital-to-analog converter at the sense pin.
2. The circuit of claim 1, further comprising: a current source configured to provide a reference current for the analog-to-digital converter.
3. The circuit of claim 1, wherein the control circuit is configured to select the first mode or the second mode depending on a diagnostic signal received at a diagnostic pin.
4. The circuit of claim 1, wherein the control circuit is configured to select the first mode or the second mode depending on a diagnostic signal received from an external controller via a communication link.
5. The circuit of claim 1, wherein the control circuit is configured to block output of a sensed current at the sense pin in a third mode.
6. The circuit of claim 5, wherein the control circuit is configured, in a fourth mode, to output a defined constant current independent of the load current at the sense pin.
7. The circuit of claim 1, wherein the sense transistor comprises one or more transistor cells and wherein the control circuit is configured to change a number of transistor cells of the sense transistor using switches.
8. The circuit of claim 7, wherein in the second operating mode, the sense transistor has more active transistor cells than in the first operating mode.
9. A method comprising: providing a measuring current using a current measuring circuit that includes a sense transistor coupled to a load transistor; outputting the measuring current at a sense pin in a first mode of an integrated circuit that includes the load transistor and the sense transistor; generating a digital value representing the measuring current in a second mode of the integrated circuit; and generating an output current depending on the digital value and outputting the output current at a sense pin in the second mode of the integrated circuit.
10. The method of claim 9, further comprising: receiving a diagnostic signal at a diagnostic pin; and changing to the first mode or second mode depending on the diagnostic signal.
11. The method of claim 9, further comprising: measuring a load current of the load transistor in an end-of-line test; measuring the output current output in the second mode; and adjusting the output current based on the measured load current.
12. The method of claim 11, wherein the output current is adjusted by calibrating a reference current of an analog-to-digital converter that generates the digital value.
Description
BRIEF DESCRIPTION OF THE FIGURES
[0011] In the following text, exemplary embodiments are described based on illustrations. The illustrations are not necessarily true to scale and the exemplary embodiments are not limited to the aspects presented. Rather, the emphasis is placed on the principles underlying the exemplary embodiments. In the drawings:
[0012]
[0013]
[0014]
[0015]
[0016]
DETAILED DESCRIPTION
[0017]
[0018] The load transistor T.sub.L is coupled to a current measuring circuit, which has a sense transistor T.sub.S coupled to the load transistor T.sub.L. The current measuring circuit is designed to deliver a measuring current i.sub.0 that represents a load current i.sub.L flowing through the load transistor T.sub.L. As mentioned above, the measuring current i.sub.0 is approximately proportional to the load current i.sub.L, i.e. i.sub.0=i.sub.L/K (proportionality factor K). For current measurement, the transistors T.sub.S and T.sub.L must have similar characteristics and operate (approximately) at the same operating point. Therefore, the gate electrodes and the drain electrodes of the two transistors T.sub.L and T.sub.S are connected together. In addition, the drain electrodes of the transistors T.sub.L and T.sub.S are connected to the supply terminal VS, to which a supply voltage V.sub.S is applied during operation. In order for both transistors T.sub.L and T.sub.S to operate at the same operating point, the drain-source voltages on both transistors T.sub.L and T.sub.S must also be equal. This is achieved with the help of the operational amplifier OA and the additional transistor T.sub.0, which together ensure that the source voltage on the sense transistor T.sub.S is regulated to the same value as the source voltage on the load transistor T.sub.L. This is only one example, however. The operational amplifier is not absolutely necessary. Other approaches are also known to ensure the (approximate) proportionality between the measuring current i.sub.0 and load current i.sub.L. The specific implementation will depend on the requirements of the application.
[0019] The sense transistor T.sub.S and the additional transistor T.sub.0 are connected in series, i.e. their drain-source current paths are connected in series and the same measuring current i.sub.0 flows through both transistors T.sub.S and T.sub.0. In the example shown, the transistor T.sub.0 is a p-channel transistor whereas the transistors T.sub.S and T.sub.L are n-channel transistors. The gate of transistor T.sub.0 is controlled by the output signal of the operational amplifier OA, while the inputs of the operational amplifier OA are connected to the source electrodes of the transistors T.sub.S and T.sub.L.
[0020] The operational amplifier OA has a feedback loop with the transistor T.sub.0. The inverting input of the operational amplifier OA is connected to the source electrode of the sense transistor T.sub.S, and the non-inverting input of the operational amplifier OA is connected to the source electrode of the power transistor T.sub.L. If the source voltage on the sense transistor T.sub.S is less than the source voltage on the power transistor T.sub.L, the voltage at the output of the operational amplifier amp OA then rises and thus the gate voltage on transistor T.sub.0 increases, which causes the on resistance of the transistor T.sub.0 to rise. The feedback loop of the operational amplifier OA is stable and hence the operational amplifier OA will drive the transistor T.sub.0 in exactly such a way that the voltages at the source electrodes of the transistors T.sub.L and T.sub.S are substantially the same.
[0021] In the example shown, the measuring current i.sub.0 is output at a sense pin IS. The output current is labeled in
[0022] Experiments have shown that as the drain-source voltages on the transistors T.sub.L, T.sub.S (which occur at low load current) decrease, the proportionality factor K increasingly deviates from its nominal value, causing measurement errors. A well-known approach to improving this situation is to set a lower limit on the drain-source voltage on the power transistor T.sub.L and to set the gate voltage such that the drain-source voltage does not fall below a minimum value. Such a concept is known as gate-back regulation (see
[0023] Gate-back regulation causes the gate voltage to be reduced at very low load currents (and consequently low drain-source voltage on transistor T.sub.L) in order to increase the on resistance R.sub.ON of the transistor. However, the latter has the effect that if the load current increases abruptly (e.g. when the load exits a standby mode) the voltage on the load can break down. Such an undervoltage event can lead to an unwanted shutdown or other faults in the load.
[0024] The example from
[0025] In the example shown, the control logic can operate the circuit in three different modes, which can be selected, for example, based on a diagnostic signal received at a diagnostic pin DEN. The control logic is designed to use the switches S1 and S2 to configure the current measuring circuit so that the measuring current i.sub.o is output at the sense pin IS in a first mode. In this mode, the switch S.sub.1 is closed (ON) and switch S.sub.2 is open (OFF). In this mode, the circuit operates essentially as the circuit from
[0026] The current measurement circuit can also be configured to redirect the measuring current i.sub.0 to the current input of the analog-to-digital converter iADC in a second mode. In this case, the input current i.sub.1 of the analog-to-digital converter iADC corresponds to the current i.sub.0. The analog-to-digital converter iADC generates a digital value that represents the measuring current i.sub.0. This digital value is fed to the digital-to-analog converter DAC, which again generates an analog output current i.sub.2, based on the digital value, which represents the digital value. This output current i.sub.2 is output at the sense pin IS (instead of the current i.sub.0). To ensure this, the switch S.sub.1 is closed and the switch S.sub.2 is open. In a third mode, both switches are open and the current output at the sense pin IS is blocked, i.e. no current is output.
[0027] The second mode is particularly suitable for measuring very low load currents i.sub.L. Any deviations between the actual proportionality factor K=i.sub.L/i.sub.0 and the ideal/nominal factor can be calibrated by adjusting/fine tuning the reference current i.sub.REF (controllable current source Q.sub.REF) which is used by the analog-to-digital converter iADC. The output current range of the DAC (output current i.sub.2) can be significantly greater than the input current range of the iADC (input current i.sub.1). This means that together the analog-to-digital converter iADC and the digital-to-analog converter DAC have a gain i.sub.2/i.sub.1 which can be significantly greater than one (e.g. i.sub.2/i.sub.1=100).
[0028] In some exemplary embodiments, the control logic can also be used to implement a fourth operating mode, in which a defined constant current is output at the sense pin IS. For this purpose, the control logic can open switches S.sub.1 and S.sub.2, for example. Thus the input current i.sub.1 of the analog-to-digital converter iADC is zero. At the same time, however, a digital input signal (which can be generated by the control logic, for example) is fed to the DAC, which results in the desired constant current i.sub.2 which is output at the pin IS. The constant current can help a user to determine a possible error (due to tolerances) in the resistance value R.sub.S.
[0029] The operating mode can be selected by the control logic based on a diagnostic signal that can be received at the diagnostic pin DEN or—in some exemplary embodiments—via any other communication link from an external controller. Suitable communication links can be, for example, serial data lines, such as those provided by an SPI bus (SPI=Serial Peripheral Interface). In the example shown, the third operating mode is selected when the diagnostic signal at the pin DEN is at a low level. In this case, the current output at pin IS is zero (i.sub.S=0). The first operating mode is selected when the diagnostic signal at the pin DEN has a constant high level. In this case, the current output at pin IS is equal to the measuring current i.sub.0 (i.sub.S=i.sub.0). The second operating mode (Low Current Mode) is selected when the diagnostic signal at the pin DEN switches between the low and high levels with a first specified first frequency f.sub.0. In this case, the current output at pin IS is equal to the output current i.sub.2 of the DAC (i.sub.S=i.sub.2) and this represents the measuring current i.sub.1=i.sub.0. The fourth operating mode can be selected when the diagnostic signal at the pin DEN switches between the low and high levels with a first specified second frequency f.sub.1.
[0030]
[0031] In the example shown in
[0032] In the example shown in
[0033]
[0034] According to
[0035] The second current mirror CM2 is designed to mirror the input current i.sub.1 from the input branch (transistor T.sub.10) into the four output branches (transistors T.sub.11-T.sub.14). In the example discussed here, the scaling (mirror ratio) in the current mirror CM2 is the same for each output branch. The transistors of the first current mirror CM1 are high-side transistors (e.g. p-channel MOSFETs) and the transistors of the second current mirror CM2 are low-side transistors (e.g. n-channel MOSFETs). The output branches of the first current mirror CM1 are connected to the corresponding output branches of the second current mirror, and the input of a comparator is connected to the common circuit node in each case. The comparators indicate whether the voltage at the common circuit nodes of the two current mirrors is high or low. The above-mentioned sequence of reference currents (e.g. 5 μA, 14 μA, 23 μA and 36 μA) can be seen as a sequence of threshold values. Essentially, the two current mirrors CM1 and CM2 together form four current comparators, wherein the threshold values can be adjusted by fine-tuning the reference current i.sub.REF.
[0036] The 2b binary output signals D0, D1, D2, D3 of the comparators represent the input current i.sub.1 and could theoretically be converted into a b-bit digital value, but this is not necessary. The output signals D0-D3 are respectively “1” (high level) if the input current i.sub.1 reflected in the respective output branch of the current mirror CM2 is greater than the associated threshold value (e.g. 5 μA, 14 μA, 23 μA and 36 μA) specified by the reference current i.sub.REF, and “0” otherwise (in this example, the comparators have an inverting characteristic).
[0037] The digital-to-analog converter DAC also has two current mirrors, namely the third current mirror CM3 and the fourth current mirror CM4. A further current source Q.sub.C generates a constant current i.sub.C (e.g. i.sub.C=10 μA), which is fed to the input branch (transistor T.sub.20) of the current mirror CM3 and mirrored in the four output branches (transistor T.sub.21-T.sub.24) (in each case with a scaling (mirror ratio) of one). The output branches of the current mirror CM3 can be activated and interrupted (deactivated) using switch S.sub.21 to S.sub.24 depending on the logic level of the signals D0-D3. For currents i.sub.C all active output branches in the circuit node S add up to the current i.sub.2′. In the example mentioned above (i.sub.C=10 μA), the current i.sub.2′ can assume the values 0 μA, 10 μA, 20 μA, 30 μA and 40 μA.
[0038] Due to the current mirror CM4 (transistors T.sub.30 and T.sub.31) the current i.sub.2 is further amplified by a factor G (mirror ratio G in the current mirror CM4). In the factor shown here, the factor G is e.g. 100. The output current i.sub.2=G.Math.i.sub.2′ of the current mirror CM4 is also the output current of the DAC.
[0039]
[0040] According to an exemplary embodiment, a diagnostic signal can be received at a diagnostic pin (see e.g.
[0041] To calibrate the current measurement in the second operating mode, both the load current i.sub.L of the load transistor can be measured in an end-of-line test, for example, and the output current i.sub.2 output in the second mode can be measured. The output current i.sub.2 can be adjusted based on the measured load current. This adjustment of the output current i.sub.2 can be carried out by calibrating the reference current i.sub.REF of the analog-to-digital converter iADC that generates the digital value (see