Current detection circuit and current detection method
By introducing the current loop of the sampling and operation unit into the class-AB amplifier output stage circuit, the nonlinear influence of quiescent current is eliminated, the current detection accuracy is improved and the normal operation of the circuit in different output voltage scenarios is ensured.
Patent Information
- Application Number
- CN202411218088.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-06
AI Technical Summary
The traditional class-AB amplifiers are degraded due to the nonlinearity of quiescent current during current detection, and the series resistance at the output end will affect the output voltage, which cannot meet the normal operation in high and low output voltage scenarios.
A current detection circuit is designed, by introducing the first and second sampling units into the output stage circuit, forming a current loop using the calculation unit, mirroring the current of the output tube, and quantizing the process through the acquisition and processing unit to eliminate the quiescent current and improve detection accuracy.
It effectively eliminates the nonlinear impact of the quiescent current of the class-AB amplifier on current detection, improves the detection accuracy, and ensures the normal operation of the circuit under different output voltage scenarios.
Smart Images

Figure CN119087027A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of integrated circuits, and in particular relates to a current detection circuit and a current detection method. Background Art
[0002] The traditional class-AB amplifier is a commonly used architecture. There is often a need to detect the source current (pulling current) / sink current (imparting current) at the voltage output end of the output stage circuit of the class-AB amplifier. The conventional practice is to connect a resistor in series at the output end for detection, but in some scenarios, the output voltage requirement for normal operation of the circuit cannot be met after the resistor is connected in series. For example, in the scenario of high / low output voltage, the output port is connected in series with a resistor. When the source current (pulling current) / sink current (imparting current) is large, it is easy for the voltage drop caused by the resistor to directly swallow up the voltage VDS between the drain and source of the output stage P-type MOS tube / N-type MOS tube (it can also be said that the headroom and footroom are small), making the class-AB amplifier unable to work normally.
[0003] In some applications, analog-to-digital converters are also used to sample and quantize source current (pulling current) / sink current (imparting current), so there are certain requirements for the linearity of the collected current. However, the static current of the class-AB amplifier is large and due to some factors, such as the channel length modulation effect of the output tube, the static current is nonlinear, which will introduce nonlinearity into the source current (pulling current) / sink current (imparting current), affecting the current detection accuracy.
[0004] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0005] The object of the present invention is to provide a current detection circuit and a current detection method, which can improve and optimize the nonlinearity introduced during current detection.
[0006] In order to achieve the above-mentioned purpose, a specific embodiment of the present invention provides a current detection circuit, which is used for an output stage circuit. The output stage circuit includes a first output tube and a second output tube. The first end of the first output tube is connected to a power supply voltage, the second end of the first output tube is connected to the second end of the second output tube to form an output end, the first end of the second output tube is connected to a ground voltage, the control end of the first output tube and the control end of the second output tube are connected to a previous stage circuit, and the current detection circuit includes: a first sampling unit, a second sampling unit and a computing unit.
[0007] The first sampling unit is connected to the first output tube to collect the current on the first output tube to obtain a first sampling current; the second sampling unit is connected to the second output tube to collect the current on the second output tube to obtain a second sampling current; the operation unit is connected to the output end, the first sampling unit and the second sampling unit to obtain a detection current proportional to the sink current flowing into the output end from the outside or the pull current flowing from the output end to the outside based on the first sampling current and the second sampling current.
[0008] In one or more embodiments of the present invention, the first sampling unit includes a first transistor, a first terminal of the first transistor is connected to a power supply voltage, a control terminal of the first transistor is connected to a control terminal of a first output tube, and a second terminal of the first transistor is connected to an operation unit; and / or
[0009] The second sampling unit includes a second transistor, a first terminal of the second transistor is connected to the ground voltage, a control terminal of the second transistor is connected to the control terminal of the second output tube, and a second terminal of the second transistor is connected to the operation unit.
[0010] In one or more embodiments of the present invention, the operation unit includes a third transistor and an operational amplifier, the first end of the third transistor is connected to the first sampling unit, the second sampling unit and the first input end of the operational amplifier, the control end of the third transistor is connected to the output end of the operational amplifier, the second input end of the operational amplifier is connected to the output end, and the second end of the third transistor is used to output the detection current.
[0011] In one or more embodiments of the present invention, the first sampling unit and the second sampling unit perform sampling at the same ratio.
[0012] In one or more embodiments of the present invention, the current detection circuit further includes a collection and processing unit, which is connected to the operation unit and is used to collect and convert the detection current to generate a characterization signal for characterizing the detection current.
[0013] In one or more embodiments of the present invention, the acquisition processing unit includes a conversion resistor, a first end of the conversion resistor is connected to the operation unit to receive the detection current and generate the characterization signal, and a second end of the conversion resistor is connected to the power supply voltage or the ground voltage; or
[0014] The acquisition processing unit includes a conversion resistor and an analog-to-digital converter, wherein the first end of the conversion resistor is connected to the operation unit to receive the detection current, the second end of the conversion resistor is connected to the power supply voltage or the ground voltage, the input end of the analog-to-digital converter is connected to the first end of the conversion resistor to receive the conversion signal generated by the conversion resistor, and the analog-to-digital converter is used to quantize the conversion signal to generate a characterization signal.
[0015] In one or more embodiments of the present invention, the current detection circuit also includes a switching unit and an acquisition processing unit. The first input terminal and the second input terminal of the operational amplifier are connected to the output terminal and the first terminal of the third transistor through the switching unit. The switching unit is used to control the on-off switching between the first input terminal and the output terminal of the operational amplifier and the on-off switching between the first input terminal and the first terminal of the third transistor, and control the on-off switching between the second input terminal and the output terminal of the operational amplifier and the on-off switching between the second input terminal and the first terminal of the third transistor. The acquisition processing unit is connected to the second terminal of the third transistor. The second end of the third transistor outputs a detection current corresponding to the switching of the switching unit. The acquisition processing unit performs synchronous acquisition processing on the detection current based on the switching of the switch unit to generate a characterization signal for characterizing the detection current.
[0016] In one or more embodiments of the present invention, the acquisition processing unit includes a resistor unit, an analog-to-digital converter and a digital signal processor, the first end of the resistor unit is connected to the second end of the third transistor, the second end of the resistor unit is connected to the power supply voltage or the ground voltage, the resistor unit generates a corresponding detection voltage based on the corresponding detection current, the input end of the analog-to-digital converter is connected to the first end of the resistor unit to receive the corresponding detection voltage, the analog-to-digital converter is used to quantize the detection voltage to generate a corresponding digital signal, the digital signal processor is connected to the analog-to-digital converter, and the digital signal processor is used to perform an average operation on the digital signal to obtain a characterization signal; or
[0017] The acquisition and processing unit includes a filtering unit and an analog-to-digital converter, the first end of the filtering unit is connected to the second end of the third transistor, the second end of the filtering unit is connected to the power supply voltage or the ground voltage, the second end of the third transistor outputs a detection current corresponding to the switching of the switching unit, the filtering unit generates a corresponding filtering signal based on the detection current, the input end of the analog-to-digital converter is connected to the first end of the filtering unit, and the analog-to-digital converter is used to quantize the filtered signal to generate a characterization signal.
[0018] In one or more embodiments of the present invention, the operation unit further includes a calibration unit, the calibration unit is connected to the operational amplifier, and the calibration unit is used to calibrate the offset error of the operational amplifier.
[0019] The present invention also discloses a current detection method, which is used for current detection of an output stage circuit. The output stage circuit includes a first output tube and a second output tube. The first end of the first output tube is connected to a power supply voltage. The second end of the first output tube is connected to the second end of the second output tube to form an output end. The first end of the second output end is connected to a ground voltage. The control end of the first output tube and the control end of the second output tube are connected to a front stage circuit. Based on the current detection circuit, the current detection method includes:
[0020] The first sampling unit collects the current on the first output tube to obtain a first sampling current;
[0021] The second sampling current is obtained by collecting the current on the second output tube through the second sampling unit;
[0022] A detection current proportional to a sink current flowing from the outside into the output terminal or a source current flowing from the output terminal into the outside is obtained by the operation unit based on the first sampling current and the second sampling current.
[0023] Compared with the prior art, the current detection circuit and current detection method of the present invention perform mirror sampling on the current on the first output tube through the first sampling unit, perform mirror sampling on the current on the second output tube through the second sampling unit, and introduce them into the current loop formed by the operation unit, thereby eliminating the influence of the static current of the class-AB amplifier in the obtained detection current, thereby improving and optimizing the nonlinearity introduced by the static current of the class-AB amplifier during current detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 4 is a circuit schematic diagram of the current detection circuit in the first embodiment.
[0026] Figure 2 This is a circuit schematic diagram of the current detection circuit in the second embodiment.
[0027] Figure 3 This is a circuit schematic diagram of the current detection circuit in Example 3.
[0028] Figure 4 This is a circuit schematic diagram of the current detection circuit in Example 5.
[0029] Figure 5 This is a circuit schematic diagram of the current detection circuit in Example 6.
[0030] Figure 6 This is a circuit schematic diagram of the current detection circuit in Example 7. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] "Coupled" or "connected" or "connected" in the specification includes both direct connection and indirect connection. Indirect connection is a connection through an intermediate medium, such as a connection through an electrically conductive medium, which may have parasitic inductance or parasitic capacitance; indirect connection may also include connection through other active or passive devices on the basis of achieving the same or similar functional purposes, such as connection through circuits or components such as switches and follower circuits. In addition, in the invention, words such as "first" and "second" are mainly used to distinguish one technical feature from another technical feature, and do not necessarily require or imply that there is a certain actual relationship, quantity or order between these technical features.
[0033] In the detailed description of the specification, reference is made to the accompanying drawings forming a part thereof, wherein like reference numerals refer to like parts throughout, and wherein are shown by way of exemplary embodiments that may be implemented. It should be understood that other embodiments may be utilized and structural or logical changes may be made without departing from the scope of the present disclosure. Therefore, the following detailed description should not be considered in a limiting sense.
[0034] The various operations in the specification may be described in turn as multiple discrete actions or operations in a manner that is most helpful in understanding the claimed subject matter. However, the order of description should not be interpreted as implying that these operations must be order-dependent. Specifically, these operations may not be performed in the order presented. The described operations may be performed in an order different from the described embodiments. Various additional operations may be performed and / or the described operations may be omitted in additional embodiments.
[0035] For purposes of this disclosure, the phrase "A and / or B" means (A), (B), or (A and B). For purposes of this disclosure, the phrase "A, B and / or C" means (A), (B), (C), (A and B), (A and C), (B and C), or (A, B and C).
[0036] Various components and devices may be referred to or shown in the singular form herein (e.g., "transistor," "transistor," "switch," etc.), but this is merely for ease of discussion, and any element referred to in the singular form may include multiple such elements in accordance with the teachings herein.
[0037] The specification describes the use of the phrases "in one embodiment" or "in other embodiments" or "in some embodiments", which may each refer to one or more of the same or different embodiments. In addition, the terms "including", "comprising", "having", etc. used in relation to the embodiments of the present disclosure are synonymous.
[0038] Example 1
[0039] like Figure 1 As shown, a current detection circuit in an embodiment of the present invention is used in an output stage circuit, and the output stage circuit is an output stage circuit of a class-AB amplifier.
[0040] The output stage circuit includes a first output tube Mp and a second output tube Mn, wherein a first end of the first output tube Mp is connected to a power supply voltage VDD, a second end of the first output tube Mp is connected to a second end of the second output tube Mn to form an output end Vout, a first end of the second output tube Mn is connected to a ground voltage, and a control end of the first output tube Mp and a control end of the second output tube Mn are connected to a previous stage circuit.
[0041] The current detection circuit includes: a first sampling unit, a second sampling unit and a calculation unit 10 .
[0042] Specifically, the first sampling unit is connected to the first output tube Mp to collect the current I1 on the first output tube Mp to obtain the first sampling current I11. The second sampling unit is connected to the second output tube Mn to collect the current I2 on the second output tube Mn to obtain the second sampling current I21. The operation unit 10 is connected to the output terminal Vout, the first sampling unit and the second sampling unit to obtain the detection current Isense proportional to the sink current Isink flowing from the outside into the output terminal Vout based on the first sampling current I11 and the second sampling current I21.
[0043] like Figure 1 As shown, the first sampling unit includes a first transistor M1, a first end of the first transistor M1 is connected to the power supply voltage VDD, a control end of the first transistor M1 is connected to the control end of the first output tube Mp, and a second end of the first transistor M1 is connected to the operation unit 10.
[0044] The second sampling unit includes a second transistor M2 , a first end of the second transistor M2 is connected to the ground voltage, a control end of the second transistor M2 is connected to the control end of the second output tube Mn, and a second end of the second transistor M2 is connected to the operation unit 10 .
[0045] The operation unit 10 includes a third transistor M3 and an operational amplifier OP, wherein the first end of the third transistor M3 is connected to the second end of the first transistor M1 of the first sampling unit, the second end of the second transistor M2 of the second sampling unit, and the first input end of the operational amplifier OP, the control end of the third transistor M3 is connected to the output end of the operational amplifier OP, the second input end of the operational amplifier OP is connected to the output end Vout, and the second end of the third transistor M3 is used to output the detection current Isense. In one embodiment, the first input end of the operational amplifier OP is a negative input end, and the second input end of the operational amplifier OP is a positive input end. In other embodiments, the first input end of the operational amplifier OP may be a positive input end, and the second input end of the operational amplifier OP may be a negative input end.
[0046] The first output tube Mp and the first transistor M1 are P-channel MOS tubes, and the second output tube Mn, the second transistor M2 and the third transistor M3 are N-channel MOS tubes. The first end of the first output tube Mp, the first end of the first transistor M1, the first end of the second output tube Mn, the first end of the second transistor M2 and the first end of the third transistor M3 are sources, the second end of the first output tube Mp, the second end of the first transistor M1, the second end of the second output tube Mn, the second end of the second transistor M2 and the second end of the third transistor M3 are drains, and the control end of the first output tube Mp, the control end of the first transistor M1, the control end of the second output tube Mn, the control end of the second transistor M2 and the control end of the third transistor M3 are gates.
[0047] In one embodiment, the first sampling unit and the second sampling unit perform sampling at the same ratio, that is, the ratio of the width-to-length ratio of the first output tube Mp to the width-to-length ratio of the first transistor M1 is M:1, and the ratio of the width-to-length ratio of the second output tube Mn to the width-to-length ratio of the second transistor M2 is also M:1, and M can be 1, 2, or other various values selected as needed.
[0048] Based on the above circuit structure, based on the current I1 on the first output tube Mp, the first sampling current I11=I1 / M can be obtained, and combined with the injection current Isink flowing into the output terminal Vout from the outside, the current I2=I1+Isink on the second output tube Mn can be obtained, and further the second sampling current I21=(I1+Isink) / M can be obtained, and finally the detection current Isense=I21-I11=(I1+Isink) / M-I1 / M=Isink / M can be obtained.
[0049] In the above scheme, since the quiescent current of the class-AB amplifier is relatively large, it cannot be eliminated by using a traditional current buffer structure, and the quiescent current will have a relatively large nonlinear effect on the traditional detection of the injection current Isink as the injection current Isink increases.
[0050] By mirroring the current of the first output tube Mp and introducing it into the current loop formed by the operational amplifier OP, the influence of the static current is eliminated in the obtained detection current Isense. The current I1 of the first output tube Mp can be accurately mirrored and copied by using the virtual short of the operational amplifier OP.
[0051] After obtaining the detection current Isense, the subsequent circuit needs to collect and read it, such as Figure 1 As shown, the current detection circuit further includes a collection and processing unit, which is connected to the operation unit 10 for collecting and converting the detection current Isense to generate a characterization signal for characterizing the detection current Isense.
[0052] Specifically, the acquisition and processing unit includes a conversion resistor R and an analog-to-digital converter ADC, the first end of the conversion resistor R is connected to the second end of the third transistor M3 of the operation unit 10 to receive the detection current Isense, the second end of the conversion resistor R is connected to the power supply voltage VDD, the input end of the analog-to-digital converter ADC is connected to the first end of the conversion resistor R to receive the conversion signal generated by the conversion resistor R, the analog-to-digital converter ADC is used to quantize the conversion signal to generate a characterization signal, at this time the conversion signal is a voltage signal, and the characterization signal is a digital signal generated by quantizing the conversion signal.
[0053] In other embodiments, the analog-to-digital converter ADC may not be provided, that is, the acquisition processing unit includes a conversion resistor R, and the conversion resistor R converts the detection current Isense into a voltage signal as a characterization signal of the detection current Isense.
[0054] The present invention also discloses a current detection method, which is used for current detection of an output stage circuit. The output stage circuit includes a first output tube Mp and a second output tube Mn. The first end of the first output tube Mp is connected to a power supply voltage VDD, the second end of the first output tube Mp is connected to the second end of the second output tube Mn to form an output terminal Vout, the first end of the second output terminal Vout is connected to a ground voltage, the control end of the first output tube Mp and the control end of the second output tube Mn are connected to a front stage circuit. Based on the above current detection circuit, the current detection method includes:
[0055] The first sampling unit collects the current on the first output tube Mp to obtain a first sampling current I11;
[0056] The second sampling unit collects the current on the second output tube Mn to obtain a second sampling current I21;
[0057] The detection current Isense proportional to the sink current Isink flowing from the outside into the output terminal Vout is obtained by the operation unit 10 based on the first sampling current I11 and the second sampling current I21 .
[0058] Example 2
[0059] like Figure 2 As shown, compared with Example 1, a current detection circuit in this embodiment further provides a switch unit and changes the structure of the acquisition processing unit.
[0060] The first input terminal and the second input terminal of the operational amplifier OP are connected to the output terminal Vout and the first terminal of the third transistor M3 through a switching unit. The switching unit is used to control the on-off switching between the first input terminal of the operational amplifier OP and the output terminal Vout and the on-off switching between the first input terminal of the operational amplifier OP and the first terminal of the third transistor M3, and control the on-off switching between the second input terminal of the operational amplifier OP and the output terminal Vout and the on-off switching between the second input terminal of the operational amplifier OP and the first terminal of the third transistor M3. The acquisition processing unit is connected to the second terminal of the third transistor M3. The second terminal of the third transistor M3 outputs a detection current Isense corresponding to the switching of the switch unit. The acquisition processing unit performs synchronous acquisition processing on the detection current Isense based on the switching of the switch unit to generate a characterization signal characterizing the detection current Isense.
[0061] Figure 2 The specific structure of a switch unit is shown, and the switch unit includes a first switch S1, a second switch S2, a third switch S3 and a fourth switch S4. The first end of the first switch S1 and the first end of the third switch S3 are connected to the output end Vout, the second end of the first switch S1 is connected to the first end of the second open transistor S2 and the first input end of the operational amplifier OP, the second end of the third switch S3 is connected to the first end of the fourth switch S4 and the second input end of the operational amplifier OP, and the second end of the second switch S2 and the second end of the fourth switch S4 are connected to the first end of the third transistor M3.
[0062] The first switch S1 and the fourth switch S4 can be selected to be closed, and the second switch S2 and the third switch S3 can be opened, so that the first input terminal of the operational amplifier OP is connected to the output terminal Vout, and the second input terminal of the operational amplifier OP is connected to the first terminal of the third transistor M3; the second switch S2 and the third switch S3 can also be selected to be closed, and the first switch S1 and the fourth switch S4 can be opened, so that the second input terminal of the operational amplifier OP is connected to the output terminal Vout, and the first input terminal of the operational amplifier OP is connected to the first terminal of the third transistor M3, thereby achieving the purpose of switching the switch unit. In other embodiments, the switch unit can be other circuit structures as long as the switching can be achieved.
[0063] The acquisition and processing unit includes a resistor unit R, an analog-to-digital converter ADC and a digital signal processor (not shown in the figure). The first end of the resistor unit R is connected to the second end of the third transistor M3, the second end of the resistor unit R is connected to the power supply voltage VDD, the resistor unit R generates a corresponding detection voltage based on the corresponding detection current Isense, the input end of the analog-to-digital converter ADC is connected to the first end of the resistor unit R to receive the corresponding detection voltage, the analog-to-digital converter ADC is used to quantize the detection voltage to generate a corresponding digital signal, the digital signal processor is connected to the analog-to-digital converter ADC, and the digital signal processor is used to perform an average operation on the digital signal to obtain a characterization signal.
[0064] When the sink current Isink is fixed, considering the consumption of system area, the second output tube Mn will not be biased in the saturation region all the time, which means that the fixed lower margin (footroom) is small. When the sink current Isink is large, the second output tube Mn and the second transistor M2 are usually biased in the linear region. When the sink current Isink is small, the second output tube Mn and the second transistor M2 are usually biased in the saturation region, which means that the transconductance gd of the second output tube Mn and the second transistor M2 under different sink currents Isink will be different, and because the operational amplifier OP has an offset error VOS, the transconductance gd and the offset error VOS will introduce nonlinearity to the current detection.
[0065] Therefore, the nonlinear effects of transconductance gd and offset error VOS on current detection are removed by setting a switch unit and an acquisition processing unit. Each time the switch unit is switched, a corresponding detection voltage will be generated on the resistor unit R, and the analog-to-digital converter ADC will generate a corresponding digital signal. Generally, the switch unit only needs to be switched twice. At each switch, the analog-to-digital converter ADC samples the detection voltage. Finally, the digital signal processor averages the digital signals obtained by the two switches to obtain a characterization signal representing the size of the detection current Isense. The nonlinear effects of transconductance gd and offset error VOS on current detection can be offset by averaging the digital signals obtained by the two switches.
[0066] Further, a deeper understanding can be obtained based on the current changes in the second transistor M2 and the third transistor M3 when the switch unit is switched. When the second input terminal of the operational amplifier OP is connected to the output terminal Vout and the first input terminal of the operational amplifier OP is connected to the first terminal of the third transistor M3, the analog-to-digital converter ADC performs the first sampling, at which time the second sampling current I21 on the second transistor M2 is equal to (I1+Isink) / M+gd*Vos, and the detection current Isense on the third transistor M3 is equal to Isink / M+gd*Vos; when the first input terminal of the operational amplifier OP is connected to the output terminal Vout and the second input terminal of the operational amplifier OP is connected to the first terminal of the third transistor M3, the analog-to-digital converter ADC performs the second sampling, at which time the second sampling current I21 on the second transistor M2 is equal to (I1+Isink) / M-gd*Vos, and the detection current Isense on the third transistor M3 is equal to Isink / M-gd*Vos. After averaging the two quantization results of the analog-to-digital converter ADC, a quantization value of the detection current Isense=Isink / M is obtained, thereby eliminating the nonlinear influence of the transconductance gd change and the offset error VOS on the current detection.
[0067] Example 3
[0068] On the basis of Example 2, Figure 3 As shown, the acquisition processing unit in this embodiment includes a filtering unit and an analog-to-digital converter ADC. The first end of the filtering unit is connected to the second end of the third transistor M3, the second end of the filtering unit is connected to the power supply voltage VDD, the second end of the third transistor M3 is based on the detection current Isense corresponding to the switching output of the switch unit, the filtering unit generates a corresponding filtering signal based on the detection current Isense, the input end of the analog-to-digital converter ADC is connected to the first end of the filtering unit, and the analog-to-digital converter ADC is used to quantize the filtering signal to generate a characterization signal.
[0069] In one embodiment, the filter unit includes a resistor R and a capacitor C, a first end of the resistor R and a first end of the capacitor C are connected to form a first end of the filter unit, and a second end of the resistor R and a second end of the capacitor C are connected to form a second end of the filter unit.
[0070] During the continuous switching of the switch unit, the filter unit will continuously filter the output. Finally, the filter signal generated by the filter unit based on the detection current Isense will be close to a mean value. The analog-to-digital converter ADC quantizes the mean value to obtain the quantized value of the detection current Isense = Isink / M, thereby eliminating the nonlinear effects of the transconductance gd change and the offset error VOS on the current detection.
[0071] Example 4
[0072] In one embodiment, a calibration unit may be provided in the operation unit 10 . The calibration unit is connected to the operational amplifier OP, and the offset error VOS of the operational amplifier OP is calibrated by the calibration unit.
[0073] Example 5
[0074] For the source current Isource flowing from the output terminal Vout to the outside, it can be Figure 4 The current detection circuit shown in the figure is used for detection. Because the directions of the source current Isource and the sink current Isink are different, Figure 1 The present embodiment is improved on the basis of the embodiment 1. The difference between the present embodiment and the embodiment 1 is that:
[0075] Specifically, the operation unit 10 includes a third transistor M3 and an operational amplifier OP, wherein the first end of the third transistor M3 is connected to the second end of the first transistor M1 of the first sampling unit, the second end of the second transistor M2 of the second sampling unit, and the first input end of the operational amplifier OP, the control end of the third transistor M3 is connected to the output end of the operational amplifier OP, the second input end of the operational amplifier OP is connected to the output end Vout, and the second end of the third transistor M3 is used to output the detection current Isense. In one embodiment, the first input end of the operational amplifier OP is a positive input end, and the second input end of the operational amplifier OP is a negative input end. The third transistor M3 is a P-channel MOS transistor, the first end of the third transistor M3 is a source, the second end of the third transistor M3 is a drain, and the control end of the third transistor M3 is a gate.
[0076] Based on the current I1 on the first output tube Mp, the first sampling current I11=I1 / M can be obtained, and combined with the source current Isource flowing from the output terminal Vout to the outside, the current I2=I1-Isource on the second output tube Mn can be obtained, and further the second sampling current I21=(I1-Isource) / M can be obtained, and finally the detection current Isense=I11-I21=I1 / M-(I1-Isource) / M=Isource / M can be obtained.
[0077] The acquisition processing unit includes a conversion resistor R and an analog-to-digital converter ADC. The first end of the conversion resistor R is connected to the second end of the third transistor M3 of the operation unit 10 to receive the detection current Isense, the second end of the conversion resistor R is connected to the ground voltage, and the input end of the analog-to-digital converter ADC is connected to the first end of the conversion resistor R to receive the conversion signal generated by the conversion resistor R. The analog-to-digital converter ADC is used to quantize the conversion signal to generate a characterization signal. At this time, the conversion signal is a voltage signal, and the characterization signal is a digital signal generated by quantizing the conversion signal.
[0078] In other embodiments, the analog-to-digital converter ADC may not be provided, that is, the acquisition processing unit includes a conversion resistor R, and the conversion resistor R converts the detection current Isense into a voltage signal as a characterization signal of the detection current Isense.
[0079] The present invention also discloses a current detection method, which is used for current detection of an output stage circuit. The output stage circuit includes a first output tube Mp and a second output tube Mn. The first end of the first output tube Mp is connected to a power supply voltage VDD, the second end of the first output tube Mp is connected to the second end of the second output tube Mn to form an output terminal Vout, the first end of the second output terminal Vout is connected to a ground voltage, the control end of the first output tube Mp and the control end of the second output tube Mn are connected to a front stage circuit. Based on the above current detection circuit, the current detection method includes:
[0080] The first sampling unit collects the current on the first output tube Mp to obtain a first sampling current I11;
[0081] The second sampling unit collects the current on the second output tube Mn to obtain a second sampling current I21;
[0082] The detection current Isense proportional to the source current Isource flowing from the output terminal Vout to the outside is obtained by the operation unit 10 based on the first sampling current I11 and the second sampling current I21 .
[0083] Example 6
[0084] like Figure 5 As shown, compared with Example 5, a current detection circuit in this embodiment further provides a switch unit and changes the structure of the acquisition processing unit.
[0085] The first input terminal and the second input terminal of the operational amplifier OP are connected to the output terminal Vout and the first terminal of the third transistor M3 through a switching unit. The switching unit is used to control the on-off switching between the first input terminal of the operational amplifier OP and the output terminal Vout and the on-off switching between the first input terminal of the operational amplifier OP and the first terminal of the third transistor M3, and control the on-off switching between the second input terminal of the operational amplifier OP and the output terminal Vout and the on-off switching between the second input terminal of the operational amplifier OP and the first terminal of the third transistor M3. The acquisition processing unit is connected to the second terminal of the third transistor M3. The second terminal of the third transistor M3 outputs a detection current Isense corresponding to the switching of the switch unit. The acquisition processing unit performs synchronous acquisition processing on the detection current Isense based on the switching of the switch unit to generate a characterization signal characterizing the detection current Isense.
[0086] Figure 5The specific structure of a switch unit is shown, and the switch unit includes a first switch S1, a second switch S2, a third switch S3 and a fourth switch S4. The first end of the first switch S1 and the first end of the third switch S3 are connected to the output end Vout, the second end of the first switch S1 is connected to the first end of the second open transistor S2 and the first input end of the operational amplifier OP, the second end of the third switch S3 is connected to the first end of the fourth switch S4 and the second input end of the operational amplifier OP, and the second end of the second switch S2 and the second end of the fourth switch S4 are connected to the first end of the third transistor M3.
[0087] The first switch S1 and the fourth switch S4 can be selected to be closed, and the second switch S2 and the third switch S3 can be opened, so that the first input terminal of the operational amplifier OP is connected to the output terminal Vout, and the second input terminal of the operational amplifier OP is connected to the first terminal of the third transistor M3; the second switch S2 and the third switch S3 can also be selected to be closed, and the first switch S1 and the fourth switch S4 can be opened, so that the second input terminal of the operational amplifier OP is connected to the output terminal Vout, and the first input terminal of the operational amplifier OP is connected to the first terminal of the third transistor M3, thereby achieving the purpose of switching the switch unit. In other embodiments, the switch unit can be other circuit structures as long as the switching can be achieved.
[0088] The acquisition and processing unit includes a resistor unit R, an analog-to-digital converter ADC and a digital signal processor (not shown in the figure). The first end of the resistor unit R is connected to the second end of the third transistor M3, the second end of the resistor unit R is connected to the ground voltage, the resistor unit R generates a corresponding detection voltage based on the corresponding detection current Isense, the input end of the analog-to-digital converter ADC is connected to the first end of the resistor unit R to receive the corresponding detection voltage, the analog-to-digital converter ADC is used to quantize the detection voltage to generate a corresponding digital signal, the digital signal processor is connected to the analog-to-digital converter ADC, and the digital signal processor is used to perform an average operation on the digital signal to obtain a characterization signal.
[0089] When the source current Isource is fixed, considering the consumption of system area, the second output tube Mn will not be biased in the saturation region all the time, which means that the fixed lower margin (footroom) is small. When the source current Isource is large, the second output tube Mn and the second transistor M2 are usually biased in the linear region. When the source current Isource is small, the second output tube Mn and the second transistor M2 are usually biased in the saturation region, which means that the transconductance gd of the second output tube Mn and the second transistor M2 under different source currents Isource will be different, and because the operational amplifier OP has an offset error VOS, the transconductance gd and the offset error VOS will introduce nonlinearity to the current detection.
[0090] Therefore, the nonlinear effects of transconductance gd and offset error VOS on current detection are removed by setting a switch unit and an acquisition processing unit. Each time the switch unit is switched, a corresponding detection voltage will be generated on the resistor unit R, and the analog-to-digital converter ADC will generate a corresponding digital signal. Generally, the switch unit only needs to be switched twice. At each switch, the analog-to-digital converter ADC samples the detection voltage. Finally, the digital signal processor averages the digital signals obtained by the two switches to obtain a characterization signal representing the size of the detection current Isense. The nonlinear effects of transconductance gd and offset error VOS on current detection can be offset by averaging the digital signals obtained by the two switches.
[0091] Further, a deeper understanding can be obtained based on the current changes in the second transistor M2 and the third transistor M3 when the switch unit is switched. When the second input terminal of the operational amplifier OP is connected to the output terminal Vout and the first input terminal of the operational amplifier OP is connected to the first terminal of the third transistor M3, the analog-to-digital converter ADC performs the first sampling, at which time the second sampling current I21 on the second transistor M2 is equal to (I1-Isource) / M+gd*Vos, and the detection current Isense on the third transistor M3 is equal to Isource / M+gd*Vos; when the first input terminal of the operational amplifier OP is connected to the output terminal Vout and the second input terminal of the operational amplifier OP is connected to the first terminal of the third transistor M3, the analog-to-digital converter ADC performs the second sampling, at which time the second sampling current I21 on the second transistor M2 is equal to (I1-Isource) / M-gd*Vos, and the detection current Isense on the third transistor M3 is equal to Isource / M-gd*Vos. After averaging the two quantization results of the analog-to-digital converter ADC, a quantization value of the detection current Isense=Isource / M is obtained, thereby eliminating the nonlinear influence of the transconductance gd change and the offset error VOS on the current detection.
[0092] Example 7
[0093] On the basis of Example 6, Figure 6 As shown, the acquisition processing unit in this embodiment includes a filtering unit and an analog-to-digital converter ADC. The first end of the filtering unit is connected to the second end of the third transistor M3, the second end of the filtering unit is connected to the ground voltage, the second end of the third transistor M3 is based on the detection current Isense corresponding to the switching output of the switch unit, the filtering unit generates a corresponding filtering signal based on the detection current Isense, the input end of the analog-to-digital converter ADC is connected to the first end of the filtering unit, and the analog-to-digital converter ADC is used to quantize the filtering signal to generate a characterization signal.
[0094] In one embodiment, the filter unit includes a resistor R and a capacitor C, a first end of the resistor R and a first end of the capacitor C are connected to form a first end of the filter unit, and a second end of the resistor R and a second end of the capacitor C are connected to form a second end of the filter unit.
[0095] During the continuous switching of the switch unit, the filter unit will continuously filter the output. Finally, the filter signal generated by the filter unit based on the detection current Isense will be close to a mean value. The analog-to-digital converter ADC quantizes the mean value to obtain the quantized value of the detection current Isense = Isource / M, thereby eliminating the nonlinear effects of the transconductance gd change and the offset error VOS on the current detection.
[0096] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0097] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A current detection circuit, characterized in that: Used in an output stage circuit, the output stage circuit includes a first output tube and a second output tube, the first end of the first output tube is connected to the power supply voltage, the second end of the first output tube is connected to the second end of the second output tube to form an output end, the first end of the second output tube is connected to the ground voltage, the control end of the first output tube and the control end of the second output tube are connected to the front stage circuit, and the current detection circuit includes: A first sampling unit, connected to the first output tube to collect the current on the first output tube to obtain a first sampling current; A second sampling unit connected to the second output tube to collect the current on the second output tube to obtain a second sampling current; and The operation unit is connected to the output terminal, the first sampling unit and the second sampling unit to obtain a detection current proportional to the sink current flowing from the outside into the output terminal or the source current flowing from the output terminal into the outside based on the first sampling current and the second sampling current.
2. The current detection circuit according to claim 1, characterized in that: The first sampling unit includes a first transistor, a first end of the first transistor is connected to a power supply voltage, a control end of the first transistor is connected to a control end of a first output tube, and a second end of the first transistor is connected to a calculation unit; and / or The second sampling unit includes a second transistor, a first terminal of the second transistor is connected to the ground voltage, a control terminal of the second transistor is connected to the control terminal of the second output tube, and a second terminal of the second transistor is connected to the operation unit.
3. The current detection circuit according to claim 1, characterized in that: The operation unit includes a third transistor and an operational amplifier, the first end of the third transistor is connected to the first sampling unit, the second sampling unit and the first input end of the operational amplifier, the control end of the third transistor is connected to the output end of the operational amplifier, the second input end of the operational amplifier is connected to the output end, and the second end of the third transistor is used to output the detection current.
4. The current detection circuit according to claim 1, characterized in that: The first sampling unit and the second sampling unit perform sampling at the same ratio.
5. The current detection circuit according to claim 1, characterized in that: The current detection circuit also includes a collection and processing unit, which is connected to the operation unit and is used to collect and convert the detection current to generate a characterization signal for characterizing the detection current.
6. The current detection circuit according to claim 5, characterized in that: The acquisition processing unit includes a conversion resistor, a first end of the conversion resistor is connected to the operation unit to receive the detection current and generate a characterization signal, and a second end of the conversion resistor is connected to a power supply voltage or a ground voltage; or The acquisition processing unit includes a conversion resistor and an analog-to-digital converter, wherein the first end of the conversion resistor is connected to the operation unit to receive the detection current, the second end of the conversion resistor is connected to the power supply voltage or the ground voltage, the input end of the analog-to-digital converter is connected to the first end of the conversion resistor to receive the conversion signal generated by the conversion resistor, and the analog-to-digital converter is used to quantize the conversion signal to generate a characterization signal.
7. The current detection circuit according to claim 3, characterized in that: The current detection circuit also includes a switch unit and an acquisition processing unit. The first input terminal and the second input terminal of the operational amplifier are connected to the output terminal and the first terminal of the third transistor through the switch unit. The switch unit is used to control the on-off switching between the first input terminal and the output terminal of the operational amplifier and the on-off switching between the first input terminal and the first terminal of the third transistor, and control the on-off switching between the second input terminal and the output terminal of the operational amplifier and the on-off switching between the second input terminal and the first terminal of the third transistor. The acquisition processing unit is connected to the second terminal of the third transistor. The second terminal of the third transistor outputs a detection current corresponding to the switching of the switch unit. The acquisition processing unit performs synchronous acquisition processing on the detection current based on the switching of the switch unit to generate a characterization signal for characterizing the detection current.
8. The current detection circuit according to claim 7, characterized in that: The acquisition processing unit includes a resistor unit, an analog-to-digital converter and a digital signal processor, the first end of the resistor unit is connected to the second end of the third transistor, the second end of the resistor unit is connected to the power supply voltage or the ground voltage, the resistor unit generates a corresponding detection voltage based on the corresponding detection current, the input end of the analog-to-digital converter is connected to the first end of the resistor unit to receive the corresponding detection voltage, the analog-to-digital converter is used to quantize the detection voltage to generate a corresponding digital signal, the digital signal processor is connected to the analog-to-digital converter, and the digital signal processor is used to average the digital signal to obtain a characterization signal; or The acquisition and processing unit includes a filtering unit and an analog-to-digital converter, the first end of the filtering unit is connected to the second end of the third transistor, the second end of the filtering unit is connected to the power supply voltage or the ground voltage, the second end of the third transistor outputs a detection current corresponding to the switching of the switching unit, the filtering unit generates a corresponding filtering signal based on the detection current, the input end of the analog-to-digital converter is connected to the first end of the filtering unit, and the analog-to-digital converter is used to quantize the filtered signal to generate a characterization signal.
9. The current detection circuit according to claim 3, characterized in that: The operation unit further includes a calibration unit, which is connected to the operational amplifier and is used to calibrate the offset error of the operational amplifier.
10. A current detection method, characterized in that: For current detection of an output stage circuit, the output stage circuit includes a first output tube and a second output tube, the first end of the first output tube is connected to a power supply voltage, the second end of the first output tube is connected to the second end of the second output tube to form an output end, the first end of the second output end is connected to a ground voltage, the control end of the first output tube and the control end of the second output tube are connected to a previous stage circuit, based on the current detection circuit according to any one of claims 1 to 9, the current detection method includes: The first sampling unit collects the current on the first output tube to obtain a first sampling current; The second sampling current is obtained by collecting the current on the second output tube through the second sampling unit; A detection current proportional to a sink current flowing from the outside into the output terminal or a source current flowing from the output terminal into the outside is obtained by the operation unit based on the first sampling current and the second sampling current.
