CN118330297A - Current detection circuit, current detector and electronic device - Google Patents
Current detection circuit, current detector and electronic device Download PDFInfo
- Publication number
- CN118330297A CN118330297A CN202310076679.1A CN202310076679A CN118330297A CN 118330297 A CN118330297 A CN 118330297A CN 202310076679 A CN202310076679 A CN 202310076679A CN 118330297 A CN118330297 A CN 118330297A
- Authority
- CN
- China
- Prior art keywords
- resistor
- voltage
- current
- unit
- load
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 122
- 230000001105 regulatory effect Effects 0.000 claims description 46
- 238000005070 sampling Methods 0.000 abstract description 55
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 23
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 5
- 230000001276 controlling effect Effects 0.000 description 4
- 238000000034 method Methods 0.000 description 4
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000005669 field effect Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R19/00—Arrangements for measuring currents or voltages or for indicating presence or sign thereof
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R15/00—Details of measuring arrangements of the types provided for in groups G01R17/00 - G01R29/00, G01R33/00 - G01R33/26 or G01R35/00
- G01R15/04—Voltage dividers
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05F—SYSTEMS FOR REGULATING ELECTRIC OR MAGNETIC VARIABLES
- G05F1/00—Automatic systems in which deviations of an electric quantity from one or more predetermined values are detected at the output of the system and fed back to a device within the system to restore the detected quantity to its predetermined value or values, i.e. retroactive systems
- G05F1/10—Regulating voltage or current
- G05F1/46—Regulating voltage or current wherein the variable actually regulated by the final control device is DC
- G05F1/56—Regulating voltage or current wherein the variable actually regulated by the final control device is DC using semiconductor devices in series with the load as final control devices
- G05F1/561—Voltage to current converters
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Electromagnetism (AREA)
- Radar, Positioning & Navigation (AREA)
- Automation & Control Theory (AREA)
- Measurement Of Current Or Voltage (AREA)
Abstract
本申请公开了一种电流检测电路、电流检测器及电子设备,涉及电路技术领域。所述的电流检测电路包括第一分流单元、第二分流单元、电压调节单元、第一电阻和处理单元。该电流检测电路工作时,第一电阻为采样电阻,第一电阻的电流小于负载的电流。处理单元用于根据第一电阻的电压确定第一电阻的电流,再根据第一电阻的电流、第一分流单元的电流与第二分流单元的电流之比确定负载的电流。如此,即可在保证电流检测电路的检测精度的前提下,通过使采样电阻的电流小于负载的电流来减小采样电阻带来的电能损耗,从而提升电子设备的续航能力。
The present application discloses a current detection circuit, a current detector and an electronic device, and relates to the field of circuit technology. The current detection circuit includes a first shunt unit, a second shunt unit, a voltage adjustment unit, a first resistor and a processing unit. When the current detection circuit is working, the first resistor is a sampling resistor, and the current of the first resistor is less than the current of the load. The processing unit is used to determine the current of the first resistor according to the voltage of the first resistor, and then determine the current of the load according to the current of the first resistor, the current of the first shunt unit and the ratio of the current of the second shunt unit. In this way, the power loss caused by the sampling resistor can be reduced by making the current of the sampling resistor less than the current of the load while ensuring the detection accuracy of the current detection circuit, thereby improving the endurance of the electronic device.
Description
技术领域Technical Field
本申请涉及电路技术领域,特别涉及一种电流检测电路、电流检测器及电子设备。The present application relates to the field of circuit technology, and in particular to a current detection circuit, a current detector and an electronic device.
背景技术Background technique
诸如手机、平板电脑、笔记本电脑等电子设备中通常具有电流检测电路,电流检测电路用于检测如中央处理器、图形处理器、基带处理器等负载的电流。Electronic devices such as mobile phones, tablet computers, and laptop computers usually have current detection circuits, which are used to detect the current of loads such as central processing units, graphics processors, and baseband processors.
相关技术中,电流检测电路通常包括采样电阻和处理单元。采样电阻与负载串联。处理单元通过检测采样电阻的电压,并根据采样电阻的电压和采样电阻的阻值得到采样电阻的电流,也就得到了负载的电流。一般地,为保证电流检测电路的检测精度,采样电阻的阻值不能过小。In the related art, the current detection circuit usually includes a sampling resistor and a processing unit. The sampling resistor is connected in series with the load. The processing unit detects the voltage of the sampling resistor and obtains the current of the sampling resistor according to the voltage of the sampling resistor and the resistance value of the sampling resistor, thereby obtaining the current of the load. Generally, in order to ensure the detection accuracy of the current detection circuit, the resistance value of the sampling resistor cannot be too small.
然而,相关技术中,若采样电阻的阻值较大,则会带来较大的电能损耗,影响电子设备的续航能力。However, in the related art, if the resistance of the sampling resistor is large, it will cause a large power loss and affect the endurance of the electronic device.
发明内容Summary of the invention
本申请提供了一种电流检测电路、电流检测器及电子设备,既可以保证电流检测电路的检测精度,又可以减小采样电阻带来的电能损耗,从而提升电子设备的续航能力。所述技术方案如下:The present application provides a current detection circuit, a current detector and an electronic device, which can not only ensure the detection accuracy of the current detection circuit, but also reduce the power loss caused by the sampling resistor, thereby improving the endurance of the electronic device. The technical solution is as follows:
第一方面,提供了一种电流检测电路,包括第一分流单元、第二分流单元、电压调节单元、第一电阻和处理单元。In a first aspect, a current detection circuit is provided, comprising a first shunt unit, a second shunt unit, a voltage regulating unit, a first resistor and a processing unit.
第一分流单元用于与负载串联于第一电压端和第二电压端之间。其中,第一电压端的电压大于第二电压端的电压,以形成从第一电压端开始,经第一分流单元、负载到达第二电压端的第一电流通路。在一些具体的实施例中,第二电压端可以是地线。The first shunt unit is used to be connected in series with the load between the first voltage terminal and the second voltage terminal. The voltage of the first voltage terminal is greater than the voltage of the second voltage terminal to form a first current path starting from the first voltage terminal, passing through the first shunt unit and the load to the second voltage terminal. In some specific embodiments, the second voltage terminal can be a ground line.
第二分流单元的第一端与第一分流单元的第一端连接,以使第二分流单元的第一端的电压与第一分流单元的第一端的电压相等。第一分流单元的第二端与电压调节单元的第一端连接,第二分流单元的第二端与电压调节单元的第二端连接。电流检测电路工作时,电压调节单元的第一端和第二端的电压相同,也即第一分流单元的第二端的电压与第二分流单元的第二端的电压相等。The first end of the second shunt unit is connected to the first end of the first shunt unit, so that the voltage of the first end of the second shunt unit is equal to the voltage of the first end of the first shunt unit. The second end of the first shunt unit is connected to the first end of the voltage regulating unit, and the second end of the second shunt unit is connected to the second end of the voltage regulating unit. When the current detection circuit is working, the voltage of the first end and the second end of the voltage regulating unit are the same, that is, the voltage of the second end of the first shunt unit is equal to the voltage of the second end of the second shunt unit.
第一电阻连接于第二分流单元的第二端与第二电压端之间,以形成从第一电压端开始,经第二分流单元、第一电阻到达第二电压端的第二电流通路。第二电流通路也可以进一步包括负载。处理单元与第一电阻连接,以检测第一电阻的电压。处理单元工作时用于:根据第一电阻的电压以及目标比值确定负载的电流。目标比值为电流检测电路工作时第一分流单元的电流与第二分流单元的电流之比。第二分流单元与负载并联时,即第二电流通路不包括负载时,目标比值大于1;第二分流单元与负载串联时,即第二电路通路包括负载时,目标比值大于0。The first resistor is connected between the second end of the second shunt unit and the second voltage end to form a second current path starting from the first voltage end, passing through the second shunt unit and the first resistor to reach the second voltage end. The second current path may also further include a load. The processing unit is connected to the first resistor to detect the voltage of the first resistor. When the processing unit is working, it is used to: determine the current of the load according to the voltage of the first resistor and the target ratio. The target ratio is the ratio of the current of the first shunt unit to the current of the second shunt unit when the current detection circuit is working. When the second shunt unit is connected in parallel with the load, that is, when the second current path does not include the load, the target ratio is greater than 1; when the second shunt unit is connected in series with the load, that is, when the second circuit path includes the load, the target ratio is greater than 0.
在本申请中,电流检测电路包括第一分流单元、第二分流单元、电压调节单元、第一电阻和处理单元,所形成的电流通路包括第一电流通路和第二电流通路。第一电流通路包括串联的第一分流单元和负载,第二电流通路包括串联的第二分流单元和第一电阻。第一电阻为采样电阻。电压调节单元用于使第一分流单元两端的电压与第二分流单元两端的电压相同,从而使电流检测电路工作时第一分流单元的电流与第二分流单元的电流具有目标比值。处理单元工作时可以根据第一电阻的电压确定第一电阻的电流,再根据第一电阻的电流和目标比值来确定负载的电流,从而达到电流检测的目的。在此,当第二电流通路不包括负载,即第二分流单元与负载并联时,目标比值大于1。此时,第二分流单元的电流等于第一电阻的电流,并且小于第一分流单元的电流,也即小于负载的电流。当第二电流通路包括负载,即第二分流单元与负载串联时,目标比值大于0。此时,负载的电流等于第一分流单元的电流加上第二分流单元的电流,因此同样有第二分流单元的电流等于第一电阻的电流,并且小于负载的电流。如此,即可在保证电流检测电路的检测精度的前提下,通过使采样电阻的电流小于负载的电流来减小采样电阻带来的电能损耗,从而提升电子设备的续航能力。也就是说,相较于相关技术,在采样电阻的阻值不变的情况下,本申请通过减小采样电阻的电流来减小采样电阻带来的电能损耗。In the present application, the current detection circuit includes a first shunt unit, a second shunt unit, a voltage regulating unit, a first resistor and a processing unit, and the current path formed includes a first current path and a second current path. The first current path includes a first shunt unit and a load connected in series, and the second current path includes a second shunt unit and a first resistor connected in series. The first resistor is a sampling resistor. The voltage regulating unit is used to make the voltage at both ends of the first shunt unit the same as the voltage at both ends of the second shunt unit, so that the current of the first shunt unit and the current of the second shunt unit have a target ratio when the current detection circuit is working. When the processing unit is working, the current of the first resistor can be determined according to the voltage of the first resistor, and then the current of the load can be determined according to the current of the first resistor and the target ratio, so as to achieve the purpose of current detection. Here, when the second current path does not include the load, that is, when the second shunt unit is connected in parallel with the load, the target ratio is greater than 1. At this time, the current of the second shunt unit is equal to the current of the first resistor, and is less than the current of the first shunt unit, that is, less than the current of the load. When the second current path includes the load, that is, when the second shunt unit is connected in series with the load, the target ratio is greater than 0. At this time, the current of the load is equal to the current of the first shunt unit plus the current of the second shunt unit, so the current of the second shunt unit is also equal to the current of the first resistor, and is less than the current of the load. In this way, the power loss caused by the sampling resistor can be reduced by making the current of the sampling resistor less than the current of the load while ensuring the detection accuracy of the current detection circuit, thereby improving the endurance of the electronic device. In other words, compared with the related art, when the resistance value of the sampling resistor remains unchanged, the present application reduces the power loss caused by the sampling resistor by reducing the current of the sampling resistor.
在一些实施例中,第一分流单元包括多个晶体管。多个晶体管的第一极均与第二分流单元的第一端连接。多个晶体管的第二极均与电压调节单元的第一端连接。处理单元具有多个输出端,处理单元的多个输出端与多个晶体管的控制极一一对应连接,以控制多个晶体管中每个晶体管的导通与关断。处理单元还用于:根据多个晶体管中处于导通状态的晶体管的个数,确定目标比值。In some embodiments, the first shunt unit includes a plurality of transistors. The first electrodes of the plurality of transistors are connected to the first end of the second shunt unit. The second electrodes of the plurality of transistors are connected to the first end of the voltage regulating unit. The processing unit has a plurality of output terminals, and the plurality of output terminals of the processing unit are connected to the control electrodes of the plurality of transistors one by one to control the on and off of each of the plurality of transistors. The processing unit is further used to determine the target ratio according to the number of transistors in the on state among the plurality of transistors.
进一步地,处理单元还用于:根据第一电阻的电压调整多个晶体管中处于导通状态的晶体管的个数。也就是说,在这一实施例中,处理单元可以根据第一电阻的电压调整第一分流单元的多个晶体管中处于导通状态的晶体管的个数,从而调整第一分流单元的电流与第二分流单元的电流之比。具体来说,处理单元内可以设有预设电压范围。处理单元工作时用于:若第一电阻的电压大于预设电压范围的最大值,则增加第一分流单元的多个晶体管中处于导通状态的晶体管的个数,从而使第一电阻的电压处于预设电压范围内。以及,若第一电阻的电压小于预设电压范围的最小值,则减少第一分流单元的多个晶体管中处于导通状态的晶体管的个数,从而使第一电阻的电压处于预设电压范围内。如此,无论负载的电流较大还是较小,都可以使第一电阻的电压保持在预设电压范围内,从而一方面可以保证电流检测精度,另一方面可以减小采样电阻带来的电能损耗。Further, the processing unit is also used to: adjust the number of transistors in the on state among the multiple transistors according to the voltage of the first resistor. That is to say, in this embodiment, the processing unit can adjust the number of transistors in the on state among the multiple transistors of the first shunt unit according to the voltage of the first resistor, thereby adjusting the ratio of the current of the first shunt unit to the current of the second shunt unit. Specifically, a preset voltage range can be provided in the processing unit. When the processing unit is working, it is used to: if the voltage of the first resistor is greater than the maximum value of the preset voltage range, increase the number of transistors in the on state among the multiple transistors of the first shunt unit, so that the voltage of the first resistor is within the preset voltage range. And, if the voltage of the first resistor is less than the minimum value of the preset voltage range, reduce the number of transistors in the on state among the multiple transistors of the first shunt unit, so that the voltage of the first resistor is within the preset voltage range. In this way, whether the current of the load is large or small, the voltage of the first resistor can be kept within the preset voltage range, so that the current detection accuracy can be guaranteed on the one hand, and the power loss caused by the sampling resistor can be reduced on the other hand.
在一些具体的实施例中,第一分流单元中多个晶体管中的每个晶体管的沟道宽度与沟道长度之比均相等。In some specific embodiments, the ratio of the channel width to the channel length of each transistor in the plurality of transistors in the first shunting unit is equal.
在一些实施例中,第二分流单元包括第一晶体管。第一晶体管的第一极与第一分流单元的第一端连接,第一晶体管的第二极与电压调节单元的第二端连接。电流检测电路工作时,第一晶体管导通。In some embodiments, the second shunt unit includes a first transistor. A first electrode of the first transistor is connected to a first end of the first shunt unit, and a second electrode of the first transistor is connected to a second end of the voltage regulating unit. When the current detection circuit is working, the first transistor is turned on.
在一些实施例中,电压调节单元包括:运算放大器和开关晶体管。运算放大器的第一输入端与第一分流单元的第二端连接,运算放大器的第二输入端与第二分流单元的第二端及第一电阻的第一端连接,运算放大器的输出端与开关晶体管的控制极连接。第一电阻的第二端与开关晶体管的第一极连接,开关晶体管的第二极用于与第二电压端连接。In some embodiments, the voltage regulating unit includes: an operational amplifier and a switching transistor. The first input terminal of the operational amplifier is connected to the second terminal of the first shunt unit, the second input terminal of the operational amplifier is connected to the second terminal of the second shunt unit and the first terminal of the first resistor, and the output terminal of the operational amplifier is connected to the control electrode of the switching transistor. The second terminal of the first resistor is connected to the first electrode of the switching transistor, and the second electrode of the switching transistor is used to be connected to the second voltage terminal.
下面从三种可能的实现方式,对本申请提供的电流检测电路进行解释说明。The current detection circuit provided in the present application is explained below from three possible implementation methods.
在第一种可能的实现方式中,第一分流单元的第一端用于与第一电压端连接,第一分流单元的第二端用于与负载的第一端连接,负载的第二端与第二电压端连接。第一电阻的第一端与第二分流单元的第二端连接,第一电阻的第二端用于与负载的第二端连接。这种情况下,第二电流通路不包括负载,即第二分流单元与负载并联。此时,处理单元用于:根据第一电阻的电压和第一电阻的阻值确定第一电阻的电流;将第一电阻的电流与目标比值相乘,得到负载的电流。In a first possible implementation, the first end of the first shunt unit is used to connect to the first voltage end, the second end of the first shunt unit is used to connect to the first end of the load, and the second end of the load is connected to the second voltage end. The first end of the first resistor is connected to the second end of the second shunt unit, and the second end of the first resistor is used to connect to the second end of the load. In this case, the second current path does not include the load, that is, the second shunt unit is connected in parallel with the load. At this time, the processing unit is used to: determine the current of the first resistor according to the voltage of the first resistor and the resistance value of the first resistor; multiply the current of the first resistor by the target ratio to obtain the current of the load.
在第二种可能的实现方式中,第一分流单元的第一端用于与第一电压端连接,第一分流单元的第二端用于与负载的第一端连接,负载的第二端与第二电压端连接。第一电阻的第一端与第二分流单元的第二端连接,第一电阻的第二端用于与负载的第一端连接。这种情况下,第二电流通路包括负载,即第二分流单元与负载串联。此时,处理单元用于:根据第一电阻的电压和第一电阻的阻值确定第一电阻的电流。将第一电阻的电流与K+1的乘积确定为负载的电流,K为目标比值。In a second possible implementation, the first end of the first shunt unit is used to be connected to the first voltage end, the second end of the first shunt unit is used to be connected to the first end of the load, and the second end of the load is connected to the second voltage end. The first end of the first resistor is connected to the second end of the second shunt unit, and the second end of the first resistor is used to be connected to the first end of the load. In this case, the second current path includes the load, that is, the second shunt unit is connected in series with the load. At this time, the processing unit is used to: determine the current of the first resistor based on the voltage of the first resistor and the resistance value of the first resistor. The product of the current of the first resistor and K+1 is determined as the current of the load, and K is the target ratio.
在第三种可能的实现方式中,电流检测电路还包括:第二电阻。负载的第一端用于与第一电压端连接,第一分流单元的第一端用于与负载的第二端连接,第一分流单元的第二端与第二电阻的第一端连接,第二电阻的第二端用于与第二电压端连接。第一电阻的第一端与第二分流单元的第二端连接,第一电阻的第二端与第二电阻的第二端连接。这种情况下,第二电流通路包括负载,即第二分流单元与负载串联。此时,处理单元用于:根据第一电阻的电压以及第一电阻的阻值确定第一电阻的电流。将第一电阻的电流与K+1的乘积确定为负载的电流,K为目标比值。In a third possible implementation, the current detection circuit further includes: a second resistor. The first end of the load is used to be connected to the first voltage end, the first end of the first shunt unit is used to be connected to the second end of the load, the second end of the first shunt unit is connected to the first end of the second resistor, and the second end of the second resistor is used to be connected to the second voltage end. The first end of the first resistor is connected to the second end of the second shunt unit, and the second end of the first resistor is connected to the second end of the second resistor. In this case, the second current path includes the load, that is, the second shunt unit is connected in series with the load. At this time, the processing unit is used to: determine the current of the first resistor according to the voltage of the first resistor and the resistance value of the first resistor. The product of the current of the first resistor and K+1 is determined as the current of the load, and K is the target ratio.
第二方面,提供了一种电流检测器,包括如第一方面任意一项中的电流检测电路。In a second aspect, a current detector is provided, comprising a current detection circuit as in any one of the first aspect.
第三方面,提供了一种电子设备,包括如第一方面任意一项中的电流检测电路或第二方面中的电流检测器。In a third aspect, an electronic device is provided, comprising the current detection circuit in any one of the first aspect or the current detector in the second aspect.
上述第二方面、第三方面所获得的技术效果与上述第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。The technical effects obtained by the above-mentioned second and third aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是相关技术中电子设备的外观示意图;FIG1 is a schematic diagram of the appearance of an electronic device in the related art;
图2是相关技术中电流检测电路的电路结构图;FIG2 is a circuit structure diagram of a current detection circuit in the related art;
图3是本申请实施例提供的第一种电流检测电路的电路结构图;FIG3 is a circuit structure diagram of a first current detection circuit provided in an embodiment of the present application;
图4是本申请实施例提供的第二种电流检测电路的电路结构图;FIG4 is a circuit structure diagram of a second current detection circuit provided in an embodiment of the present application;
图5是本申请实施例提供的第三种电流检测电路的电路结构图;FIG5 is a circuit structure diagram of a third current detection circuit provided in an embodiment of the present application;
图6是本申请实施例提供的第一种电流检测电路的电路图;FIG6 is a circuit diagram of a first current detection circuit provided in an embodiment of the present application;
图7是本申请实施例提供的第二种电流检测电路的电路图;7 is a circuit diagram of a second current detection circuit provided in an embodiment of the present application;
图8是本申请实施例提供的第三种电流检测电路的电路图;FIG8 is a circuit diagram of a third current detection circuit provided in an embodiment of the present application;
图9是本申请实施例提供的第四种电流检测电路的电路图;9 is a circuit diagram of a fourth current detection circuit provided in an embodiment of the present application;
图10是本申请实施例提供的第五种电流检测电路的电路图;FIG10 is a circuit diagram of a fifth current detection circuit provided in an embodiment of the present application;
图11是本申请实施例提供的一种第一晶体管及第一电阻的电压仿真图。FIG. 11 is a voltage simulation diagram of a first transistor and a first resistor provided in an embodiment of the present application.
其中,各附图标号所代表的含义分别为:The meanings of the figures are as follows:
相关技术:Related technologies:
10、电子设备;10. Electronic equipment;
110、电流检测电路;110. Current detection circuit;
112、处理单元;112. Processing unit;
120、负载;120, load;
本申请:This application:
20、电流检测电路;20. Current detection circuit;
210、第一分流单元;210, first diversion unit;
220、第二分流单元;220, second diversion unit;
230、电压调节单元;230. Voltage regulating unit;
240、处理单元;240, processing unit;
30、负载。30. Load.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请的实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
应当理解的是,本申请提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,比如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,比如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请的技术方案,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.
在对本申请实施例提供的电流检测电路进行详细的解释说明之前,先对电流检测电路的应用场景予以说明。Before explaining the current detection circuit provided in the embodiment of the present application in detail, the application scenario of the current detection circuit is first explained.
电子设备包括智慧屏(即电视)、手机、平板电脑、笔记本电脑等。以电子设备是手机为例,图1是相关技术中电子设备10的外观示意图。电子设备10中通常具有电流检测电路,电流检测电路用于检测电子设备中如中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、基带处理器等负载的电流。Electronic devices include smart screens (i.e., TVs), mobile phones, tablet computers, laptop computers, etc. Taking the mobile phone as an example, FIG1 is a schematic diagram of the appearance of an electronic device 10 in the related art. The electronic device 10 usually has a current detection circuit, which is used to detect the current of loads such as a central processing unit (CPU), a graphics processing unit (GPU), a baseband processor, etc. in the electronic device.
图2是相关技术中电流检测电路110的电路结构图。如图2所示,相关技术中,电流检测电路110包括采样电阻R1和处理单元112。采样电阻R1与负载120串联于电压端V1与地线GND之间。处理单元112工作时,可以检测采样电阻R1的电压,并根据如下公式计算得到采样电阻R1的电流。FIG2 is a circuit diagram of a current detection circuit 110 in the related art. As shown in FIG2, in the related art, the current detection circuit 110 includes a sampling resistor R1 and a processing unit 112. The sampling resistor R1 and the load 120 are connected in series between the voltage terminal V1 and the ground line GND. When the processing unit 112 is working, the voltage of the sampling resistor R1 can be detected, and the current of the sampling resistor R1 can be calculated according to the following formula.
其中,Udrop为处理单元112检测的采样电阻R1的电压,R为采样电阻R1的阻值,I为处理单元计算得到的采样电阻R1的电流。采样电阻R1的阻值可以预设在处理单元112中。由于采样电阻R1与负载120串联,因此处理单元计算得到的采样电阻R1的电流即等于负载120的电流。 Wherein, U drop is the voltage of the sampling resistor R1 detected by the processing unit 112, R is the resistance value of the sampling resistor R1, and I is the current of the sampling resistor R1 calculated by the processing unit. The resistance value of the sampling resistor R1 can be preset in the processing unit 112. Since the sampling resistor R1 is connected in series with the load 120, the current of the sampling resistor R1 calculated by the processing unit is equal to the current of the load 120.
在相关技术中,若采样电阻R1的阻值过小,这种情况下根据Udrop=IR可知采样电阻R1的电压过小,这会影响电流检测电路110的检测精度。因此为保证电流检测电路110的检测精度,采样电阻R1的阻值不能过小。In the related art, if the resistance of the sampling resistor R1 is too small, according to U drop =IR, the voltage of the sampling resistor R1 is too small, which will affect the detection accuracy of the current detection circuit 110. Therefore, to ensure the detection accuracy of the current detection circuit 110, the resistance of the sampling resistor R1 cannot be too small.
然而,根据P=I2R,P为采样电阻R1的工作功率可知,若采样电阻R1的阻值较大,那么采样电阻R1就会带来较大的电能损耗,从而影响电子设备10的续航能力。However, according to P=I 2 R, where P is the working power of the sampling resistor R1 , if the resistance of the sampling resistor R1 is large, the sampling resistor R1 will cause a large power loss, thereby affecting the endurance of the electronic device 10 .
为此,本申请实施例提供了一种电流检测电路、电流检测器及电子设备,既可以保证电流检测电路的检测精度,又可以减小采样电阻带来的电能损耗,从而提升电子设备的续航能力。To this end, the embodiments of the present application provide a current detection circuit, a current detector and an electronic device, which can not only ensure the detection accuracy of the current detection circuit, but also reduce the power loss caused by the sampling resistor, thereby improving the endurance of the electronic device.
下面对本申请实施例提供的电流检测电路进行详细的解释说明。本申请实施例提供的电流检测电路可以应用于电子设备,以检测电子设备中如CPU、GPU、基带处理器等负载的电流。在本申请实施例中,两个电子器件或/和电学单元之间的连接均为电连接,这里的电连接是指这两个电子器件或/和电学单元之间通过导线连接,以进行电信号的传输。另外,两个电子器件或/和电学单元之间的电连接可以是通过导线直接连接,也可以是通过其他电子器件或/和电学单元间接连接。The current detection circuit provided in the embodiment of the present application is explained in detail below. The current detection circuit provided in the embodiment of the present application can be applied to electronic devices to detect the current of loads such as CPU, GPU, baseband processor, etc. in electronic devices. In the embodiment of the present application, the connection between two electronic devices or/and electrical units is an electrical connection, and the electrical connection here refers to the connection between the two electronic devices or/and electrical units through a wire to transmit electrical signals. In addition, the electrical connection between the two electronic devices or/and electrical units can be a direct connection through a wire, or it can be an indirect connection through other electronic devices or/and electrical units.
图3是本申请实施例提供的一种电流检测电路20的电路结构图。如图3所示,电流检测电路20包括第一分流单元210、第二分流单元220、电压调节单元230、第一电阻R1和处理单元240。FIG3 is a circuit structure diagram of a current detection circuit 20 provided in an embodiment of the present application. As shown in FIG3 , the current detection circuit 20 includes a first shunt unit 210 , a second shunt unit 220 , a voltage adjustment unit 230 , a first resistor R1 and a processing unit 240 .
第一分流单元210和第二分流单元220用于对电流检测电路20的干路电流进行分流。其中,第一分流单元210与负载30串联于第一电压端V1和第二电压端V2之间。在本申请实施例中,第一电压端V1的电压大于第二电压端V2的电压。如此,可以形成从第一电压端V1开始,经第一分流单元210、负载30到达第二电压端V2的第一电流通路。在一些实施例中,第一电压端V1的电压可以是5V(伏特)、8V或10V;第二电压端V2的电压可以是2V、0或-2V。在一些具体的实施例中,第二电压端V2可以是地线GND,即第二电压端V2的电压是0。The first shunt unit 210 and the second shunt unit 220 are used to shunt the main current of the current detection circuit 20. Among them, the first shunt unit 210 and the load 30 are connected in series between the first voltage terminal V1 and the second voltage terminal V2. In an embodiment of the present application, the voltage of the first voltage terminal V1 is greater than the voltage of the second voltage terminal V2. In this way, a first current path can be formed starting from the first voltage terminal V1, passing through the first shunt unit 210 and the load 30 to reach the second voltage terminal V2. In some embodiments, the voltage of the first voltage terminal V1 can be 5V (volts), 8V or 10V; the voltage of the second voltage terminal V2 can be 2V, 0 or -2V. In some specific embodiments, the second voltage terminal V2 can be a ground wire GND, that is, the voltage of the second voltage terminal V2 is 0.
第二分流单元220的第一端与第一分流单元210的第一端连接,从而使第二分流单元220的第一端的电压与第一分流单元210的第一端的电压相等。电压调节单元230具有第一端a和第二端b,电压调节单元230工作时,电压调节单元230的第一端a和第二端b的电压相等。第一分流单元210的第二端与电压调节单元230的第一端a连接,第二分流单元220的第二端与电压调节单元230的第二端b连接。也就是说,电压调节单元230工作时,第一分流单元210的第二端的电压与第二分流单元220的第二端的电压相等。如此,在电流检测电路20工作时,第一分流单元210两端的电压等于第二分流单元220两端的电压。The first end of the second shunt unit 220 is connected to the first end of the first shunt unit 210, so that the voltage of the first end of the second shunt unit 220 is equal to the voltage of the first end of the first shunt unit 210. The voltage regulating unit 230 has a first end a and a second end b. When the voltage regulating unit 230 is working, the voltages of the first end a and the second end b of the voltage regulating unit 230 are equal. The second end of the first shunt unit 210 is connected to the first end a of the voltage regulating unit 230, and the second end of the second shunt unit 220 is connected to the second end b of the voltage regulating unit 230. That is, when the voltage regulating unit 230 is working, the voltage of the second end of the first shunt unit 210 is equal to the voltage of the second end of the second shunt unit 220. In this way, when the current detection circuit 20 is working, the voltage across the first shunt unit 210 is equal to the voltage across the second shunt unit 220.
这种情况下,第一分流单元210的电流为:其中,Ia为第一分流单元210的电流,U为第一分流单元210两端的电压,Ra为第一分流单元210的电阻。In this case, the current of the first shunt unit 210 is: Wherein, Ia is the current of the first shunt unit 210 , U is the voltage across the first shunt unit 210 , and Ra is the resistance of the first shunt unit 210 .
第二分流单元220的电流为:其中,Ib为第二分流单元220的电流,U为第二分流单元220两端的电压,且等于第一分流单元210两端的电压,Rb为第二分流单元220的电阻。The current of the second shunt unit 220 is: Wherein, I b is the current of the second shunt unit 220 , U is the voltage across the second shunt unit 220 and is equal to the voltage across the first shunt unit 210 , and R b is the resistance of the second shunt unit 220 .
此时,第一分流单元210的电流和第二分流单元220的电流之比为:为便于描述,将“第一分流单元210的电流和第二分流单元220的电流之比”称为目标比值。也就是说,根据第二分流单元220的电流及目标比值,即可得到第一分流单元210的电流;且目标比值仅与第一分流单元210的电阻、第二分流单元220的电阻相关。At this time, the ratio of the current of the first shunt unit 210 to the current of the second shunt unit 220 is: For ease of description, the "ratio of the current of the first shunt unit 210 to the current of the second shunt unit 220" is referred to as a target ratio. That is, the current of the first shunt unit 210 can be obtained according to the current of the second shunt unit 220 and the target ratio; and the target ratio is only related to the resistance of the first shunt unit 210 and the resistance of the second shunt unit 220.
第一电阻R1为采样电阻。第一电阻R1连接于第二分流单元220的第二端与第二电压端V2之间。如此,可以形成从第一电压端V1开始,经第二分流单元220、第一电阻R1到达第二电压端V2的第二电流通路。需要注意的是,在本申请的一些实施例中,如图3所示,第二分流单元220、第一电阻R1与负载30之间的连接关系可以是并联。这种情况下,第二电流通路不包括负载30。具体来说,在图3所示的实施例中,电流可以从第一电压端V1输出,先后经第二分流单元220、第一电阻R1流入第二电压端V2,不经过负载30。在本申请的另一些实施例中,也可以如图4所示,第二分流单元220、第一电阻R1与负载30之间的连接关系是串联。这种情况下,第二电流通路包括负载30。具体来说,在图4所示的实施例中,电流可以从第一电压端V1输出,先后经第二分流单元220、第一电阻R1和负载30流入第二电压端V2。The first resistor R1 is a sampling resistor. The first resistor R1 is connected between the second end of the second shunt unit 220 and the second voltage terminal V2. In this way, a second current path can be formed starting from the first voltage terminal V1, passing through the second shunt unit 220 and the first resistor R1 to reach the second voltage terminal V2. It should be noted that in some embodiments of the present application, as shown in FIG3, the connection relationship between the second shunt unit 220, the first resistor R1 and the load 30 can be in parallel. In this case, the second current path does not include the load 30. Specifically, in the embodiment shown in FIG3, the current can be output from the first voltage terminal V1, and flow into the second voltage terminal V2 through the second shunt unit 220 and the first resistor R1 successively, without passing through the load 30. In some other embodiments of the present application, as shown in FIG4, the connection relationship between the second shunt unit 220, the first resistor R1 and the load 30 is in series. In this case, the second current path includes the load 30. Specifically, in the embodiment shown in FIG. 4 , the current may be output from the first voltage terminal V1 , and flow into the second voltage terminal V2 via the second shunt unit 220 , the first resistor R1 , and the load 30 .
如图3和图4所示,处理单元240与第一电阻R1连接,以检测第一电阻R1的电压。在此,处理单元240可以具有检测端c1和检测端c2,处理单元240的检测端c1与第一电阻R1的第一端连接,处理单元240的检测端c2与第一电阻R1的第二端连接,以使处理单元240工作时可以检测第一电阻R1的电压。在一些具体的实施例中,处理单元240可以包括比较放大器、数模转换器(digital to analog converter,DAC)、模数转换器(analog to digitalconverter,ADC)、处理器等,不再赘述。As shown in FIGS. 3 and 4 , the processing unit 240 is connected to the first resistor R1 to detect the voltage of the first resistor R1. Here, the processing unit 240 may have a detection terminal c1 and a detection terminal c2, the detection terminal c1 of the processing unit 240 is connected to the first end of the first resistor R1, and the detection terminal c2 of the processing unit 240 is connected to the second end of the first resistor R1, so that the processing unit 240 can detect the voltage of the first resistor R1 when working. In some specific embodiments, the processing unit 240 may include a comparison amplifier, a digital to analog converter (DAC), an analog to digital converter (ADC), a processor, etc., which will not be repeated.
处理单元240工作时用于:根据第一电阻R1的电压以及目标比值确定负载30的电流。具体来说,根据如上描述可知,第一电阻R1与第二分流单元220串联,且第一电阻R1不与其他电子器件并联。基于此可以得到,电流检测电路20工作时,第二分流单元220的电流等于第一电阻R1的电流。第一电阻R1作为采样电阻,是一个固定阻值的电阻。处理单元240中可以预先存储有第一电阻R1的阻值。如此,处理单元240检测得到第一电阻R1的电压后,即可得到第一电阻R1的电流为:其中,IR1为第一电阻R1的电流,UR1为第一电阻R1的电压,R为第一电阻R1的阻值。从而可以得到第二分流单元220的电流为:Ib=IR1。When the processing unit 240 is working, it is used to: determine the current of the load 30 according to the voltage of the first resistor R1 and the target ratio. Specifically, according to the above description, the first resistor R1 is connected in series with the second shunt unit 220, and the first resistor R1 is not connected in parallel with other electronic devices. Based on this, it can be obtained that when the current detection circuit 20 is working, the current of the second shunt unit 220 is equal to the current of the first resistor R1. The first resistor R1 is a sampling resistor and is a resistor with a fixed resistance. The resistance value of the first resistor R1 can be pre-stored in the processing unit 240. In this way, after the processing unit 240 detects the voltage of the first resistor R1, the current of the first resistor R1 can be obtained as: Wherein, I R1 is the current of the first resistor R1, U R1 is the voltage of the first resistor R1, and R is the resistance value of the first resistor R1. Thus, the current of the second shunt unit 220 can be obtained as: I b =I R1 .
在第一种情况下,第二分流单元220与负载30并联,即第二电流通路不包括负载30。此时,负载30中的电流等于第一分流单元210的电流。也就是说,负载30的电流为:Iload=Ia=Ib×K。其中,Iload为负载30的电流,K为目标比值。在本申请实施例中,第二分流单元220与负载30并联时,目标比值大于1。例如,目标比值可以是2、3、5、8或10。如此,即可使负载30的电流大于第二分流单元220的电流,也即负载30的电流大于第一电阻R1的电流。这样可以在保证电流检测电路20的检测精度的前提下,通过使采样电阻的电流小于负载30的电流来减小采样电阻带来的电能损耗,从而提升电子设备的续航能力。也就是说,相较于相关技术,在采样电阻的阻值不变的情况下,本申请通过减小采样电阻的电流来减小采样电阻带来的电能损耗。In the first case, the second shunt unit 220 is connected in parallel with the load 30, that is, the second current path does not include the load 30. At this time, the current in the load 30 is equal to the current of the first shunt unit 210. That is, the current of the load 30 is: I load =I a =I b ×K. Wherein, I load is the current of the load 30, and K is the target ratio. In the embodiment of the present application, when the second shunt unit 220 is connected in parallel with the load 30, the target ratio is greater than 1. For example, the target ratio can be 2, 3, 5, 8 or 10. In this way, the current of the load 30 can be greater than the current of the second shunt unit 220, that is, the current of the load 30 is greater than the current of the first resistor R1. In this way, the power loss caused by the sampling resistor can be reduced by making the current of the sampling resistor less than the current of the load 30 while ensuring the detection accuracy of the current detection circuit 20, thereby improving the endurance of the electronic device. That is to say, compared with the related art, when the resistance value of the sampling resistor remains unchanged, the present application reduces the power loss caused by the sampling resistor by reducing the current of the sampling resistor.
在第二种情况下,第二分流单元220与负载30串联,即第二电流通路包括负载30。此时,负载30中的电流等于第一分流单元210的电流加第二分流单元220的电流之和。也就是说,负载30的电流为:Iload=Ia+Ib=Ib×K+Ib=Ib(K+1)。在本申请实施例中,第二分流单元220与负载30串联时,目标比值大于0。例如,目标比值可以是0.2、0.4、0.8、1、2、5、8或10。如此,即可使负载30的电流大于第二分流单元220的电流,也即负载30的电流大于第一电阻R1的电流。这样可以在保证电流检测电路20的检测精度的前提下,通过使采样电阻的电流小于负载30的电流来减小采样电阻带来的电能损耗,从而提升电子设备的续航能力。也就是说,相较于相关技术,在采样电阻的阻值不变的情况下,本申请通过减小采样电阻的电流来减小采样电阻带来的电能损耗。In the second case, the second shunt unit 220 is connected in series with the load 30, that is, the second current path includes the load 30. At this time, the current in the load 30 is equal to the sum of the current of the first shunt unit 210 and the current of the second shunt unit 220. In other words, the current of the load 30 is: I load =I a +I b =I b ×K+I b =I b (K+1). In an embodiment of the present application, when the second shunt unit 220 is connected in series with the load 30, the target ratio is greater than 0. For example, the target ratio may be 0.2, 0.4, 0.8, 1, 2, 5, 8 or 10. In this way, the current of the load 30 can be greater than the current of the second shunt unit 220, that is, the current of the load 30 is greater than the current of the first resistor R1. In this way, the power loss caused by the sampling resistor can be reduced by making the current of the sampling resistor less than the current of the load 30 while ensuring the detection accuracy of the current detection circuit 20, thereby improving the endurance of the electronic device. That is to say, compared with the related art, when the resistance value of the sampling resistor remains unchanged, the present application reduces the power loss caused by the sampling resistor by reducing the current of the sampling resistor.
可以理解的是,在图3和图4所示的实施例中,“第一分流单元210与负载30串联于第一电压端V1和第二电压端V2之间”的具体连接方式为:第一分流单元210的第一端与第一电压端V1连接,第一分流单元210的第二端与负载30的第一端连接,负载30的第二端与第二电压端V2连接。这种情况下,第一电流通路为:电流从第一电压端V1输出,先后经第一分流单元210、负载30流入第二电压端V2。在其他一些实施例中,也可以如图5所示,“第一分流单元210与负载30串联于第一电压端V1和第二电压端V2之间”的具体连接方式为:负载30的第一端用于与第一电压端V1连接,第一分流单元210的第一端用于与负载30的第二端连接,第一分流单元210的第二端用于与第二电压端V2连接。在图5所示的实施例中,第一分流单元210的第二端通过第二电阻R2与第二电压端V2连接。这种情况下,第一电流通路为:电流从第一电压端V1输出,先后经负载30、第一分流单元210、第二电阻R2流入第二电压端V2。It can be understood that in the embodiments shown in FIG. 3 and FIG. 4 , the specific connection mode of “the first shunt unit 210 and the load 30 are connected in series between the first voltage terminal V1 and the second voltage terminal V2” is: the first end of the first shunt unit 210 is connected to the first voltage terminal V1, the second end of the first shunt unit 210 is connected to the first end of the load 30, and the second end of the load 30 is connected to the second voltage terminal V2. In this case, the first current path is: the current is output from the first voltage terminal V1, and flows into the second voltage terminal V2 through the first shunt unit 210 and the load 30 in sequence. In some other embodiments, as shown in FIG. 5 , the specific connection mode of “the first shunt unit 210 and the load 30 are connected in series between the first voltage terminal V1 and the second voltage terminal V2” is: the first end of the load 30 is used to connect to the first voltage terminal V1, the first end of the first shunt unit 210 is used to connect to the second end of the load 30, and the second end of the first shunt unit 210 is used to connect to the second voltage terminal V2. In the embodiment shown in FIG. 5 , the second end of the first shunt unit 210 is connected to the second voltage terminal V2 through the second resistor R2. In this case, the first current path is: the current is output from the first voltage terminal V1, and flows into the second voltage terminal V2 through the load 30, the first shunt unit 210, and the second resistor R2 in sequence.
可以理解的是,在上述实施例中,为便于理解,引入了第一电压端V1、第二电压端V2、负载30来对本申请实施例提供的电流检测电路20的连接方式和工作过程进行描述。而事实上,本申请实施例提供的电流检测电路20并不包含第一电压端V1、第二电压端V2和负载30。也就是说,第一电压端V1、第二电压端V2、负载30相对本申请实施例提供的电流检测电路20是作为环境元件存在的,其不应理解为对本申请实施例提供的电流检测电路20的限定。It is understandable that in the above embodiment, for ease of understanding, the first voltage terminal V1, the second voltage terminal V2, and the load 30 are introduced to describe the connection mode and working process of the current detection circuit 20 provided in the embodiment of the present application. In fact, the current detection circuit 20 provided in the embodiment of the present application does not include the first voltage terminal V1, the second voltage terminal V2, and the load 30. In other words, the first voltage terminal V1, the second voltage terminal V2, and the load 30 exist as environmental elements relative to the current detection circuit 20 provided in the embodiment of the present application, and should not be understood as a limitation on the current detection circuit 20 provided in the embodiment of the present application.
在一些实施例中,作为采样电阻,第一电阻R1的阻值可以在0.5KΩ(千欧)至1.5KΩ之间。例如,第一电阻R1的阻值可以是0.5KΩ、0.7KΩ、0.8KΩ、1KΩ、1.2KΩ、1.3KΩ或1.5KΩ。在一些具体的实施例中,第一电阻R1的阻值为1KΩ。In some embodiments, as a sampling resistor, the resistance of the first resistor R1 can be between 0.5KΩ (kilo-ohm) and 1.5KΩ. For example, the resistance of the first resistor R1 can be 0.5KΩ, 0.7KΩ, 0.8KΩ, 1KΩ, 1.2KΩ, 1.3KΩ or 1.5KΩ. In some specific embodiments, the resistance of the first resistor R1 is 1KΩ.
下面结合附图,从三种可能的情况对各电学单元的结构进行详细地解释说明。在下述三种可能的情况中,所涉及的电路图(即图6至图8)均对应于图3所示的电路结构图。在本申请实施例中,所涉及的晶体管均可以是金属氧化物半导体场效应管(metal oxidesemiconductor field effect transistor,MOSFET)。The following is a detailed explanation of the structure of each electrical unit from three possible situations in conjunction with the accompanying drawings. In the following three possible situations, the circuit diagrams involved (i.e., Figures 6 to 8) all correspond to the circuit structure diagram shown in Figure 3. In the embodiment of the present application, the transistors involved can all be metal oxide semiconductor field effect transistors (MOSFETs).
(1)在第一种可能的情况中,目标比值为定值。(1) In the first possible case, the target ratio is a constant.
图6是本申请实施例提供的一种电流检测电路20的电路图。如图6所示,在一些实施例中,第二分流单元220包括第一晶体管T1。第一晶体管T1的第一极与第一分流单元210的第一端连接。也就是说,第一晶体管T1的第一极即为第二分流单元220的第一端。第一晶体管T1的第二极与电压调节单元230的第二端b连接。也就是说,第一晶体管T1的第二极即为第二分流单元220的第二端。FIG6 is a circuit diagram of a current detection circuit 20 provided in an embodiment of the present application. As shown in FIG6, in some embodiments, the second shunt unit 220 includes a first transistor T1. The first electrode of the first transistor T1 is connected to the first end of the first shunt unit 210. In other words, the first electrode of the first transistor T1 is the first end of the second shunt unit 220. The second electrode of the first transistor T1 is connected to the second end b of the voltage regulating unit 230. In other words, the second electrode of the first transistor T1 is the second end of the second shunt unit 220.
第一分流单元210包括多个晶体管。这里的多个指两个或两个以上的整数。例如,第一分流单元210可以包括两个晶体管、五个晶体管或八个晶体管。在图6所示的实施例中,第一分流单元210包括第二晶体管T2、第三晶体管T3、第四晶体管T4……第十一晶体管T11,共十个晶体管。第一分流单元210中的多个晶体管的第一极均与第二分流单元220的第一端连接。也就是说,第一分流单元210中的多个晶体管的第一极连接在一起,形成第一分流单元210的第一端。第一分流单元210中的多个晶体管的第二极均与电压调节单元230的第一端a连接。也就是说,第一分流单元210中的多个晶体管的第二极连接在一起,形成第一分流单元210的第二端。The first shunt unit 210 includes a plurality of transistors. Here, the plurality refers to two or more integers. For example, the first shunt unit 210 may include two transistors, five transistors, or eight transistors. In the embodiment shown in FIG6 , the first shunt unit 210 includes a second transistor T2, a third transistor T3, a fourth transistor T4 ... an eleventh transistor T11, a total of ten transistors. The first poles of the plurality of transistors in the first shunt unit 210 are all connected to the first end of the second shunt unit 220. That is, the first poles of the plurality of transistors in the first shunt unit 210 are connected together to form the first end of the first shunt unit 210. The second poles of the plurality of transistors in the first shunt unit 210 are all connected to the first end a of the voltage regulating unit 230. That is, the second poles of the plurality of transistors in the first shunt unit 210 are connected together to form the second end of the first shunt unit 210.
电压调节单元230包括运算放大器A1和开关晶体管T0。运算放大器A1的第一输入端与第一分流单元210的第二端连接。也就是说,运算放大器A1的第一输入端即为电压调节单元230的第一端a。运算放大器A1的第二输入端与第二分流单元220的第二端及第一电阻R1的第一端连接。也就是说,运算放大器A1的第二输入端即为电压调节单元230的第二端b。在图6所示的实施例中,运算放大器A1的第一输入端为运算放大器A1的反相输入端,运算放大器A1的反相输入端用符号“-”表示;运算放大器A1的第二输入端为运算放大器A1的同相输入端,运算放大器A1的同相输入端用符号“+”表示。运算放大器A1的输出端与开关晶体管T0的控制极连接。第一电阻R1的第二端与开关晶体管T0的第一极连接,开关晶体管T0的第二极用于与第二电压端V2连接。The voltage regulating unit 230 includes an operational amplifier A1 and a switching transistor T0. The first input terminal of the operational amplifier A1 is connected to the second terminal of the first shunt unit 210. That is, the first input terminal of the operational amplifier A1 is the first terminal a of the voltage regulating unit 230. The second input terminal of the operational amplifier A1 is connected to the second terminal of the second shunt unit 220 and the first terminal of the first resistor R1. That is, the second input terminal of the operational amplifier A1 is the second terminal b of the voltage regulating unit 230. In the embodiment shown in FIG6, the first input terminal of the operational amplifier A1 is the inverting input terminal of the operational amplifier A1, and the inverting input terminal of the operational amplifier A1 is represented by the symbol “-”; the second input terminal of the operational amplifier A1 is the non-inverting input terminal of the operational amplifier A1, and the non-inverting input terminal of the operational amplifier A1 is represented by the symbol “+”. The output terminal of the operational amplifier A1 is connected to the control electrode of the switching transistor T0. The second terminal of the first resistor R1 is connected to the first electrode of the switching transistor T0, and the second electrode of the switching transistor T0 is used to be connected to the second voltage terminal V2.
电压调节单元230工作时,若运算放大器A1的同相输入端的电压大于运算放大器A1的反相输入端的电压,则表示流经第一晶体管T1的电流过小,此时运算放大器A1会输出高电平信号,从而增加开关晶体管T0的导通程度,即增加流经第一晶体管T1的电流,如此即可使运算放大器A1的同相输入端的电压下降,直至运算放大器A1的同相输入端的电压等于运算放大器A1的反相输入端的电压。反之,当运算放大器A1的同相输入端的电压小于运算放大器A1的反相输入端的电压,则表示流经第一晶体管T1的电流过大,此时运算放大器A1会输出低电平信号,从而减小开关晶体管T0的导通程度,即减小流经第一晶体管T1的电流,如此即可使运算放大器A1的同相输入端的电压上升,直至运算放大器A1的同相输入端的电压等于运算放大器A1的反相输入端的电压。When the voltage regulating unit 230 is working, if the voltage at the non-inverting input terminal of the operational amplifier A1 is greater than the voltage at the inverting input terminal of the operational amplifier A1, it means that the current flowing through the first transistor T1 is too small. At this time, the operational amplifier A1 will output a high-level signal, thereby increasing the conduction degree of the switch transistor T0, that is, increasing the current flowing through the first transistor T1, so that the voltage at the non-inverting input terminal of the operational amplifier A1 can be reduced until the voltage at the non-inverting input terminal of the operational amplifier A1 is equal to the voltage at the inverting input terminal of the operational amplifier A1. On the contrary, when the voltage at the non-inverting input terminal of the operational amplifier A1 is less than the voltage at the inverting input terminal of the operational amplifier A1, it means that the current flowing through the first transistor T1 is too large. At this time, the operational amplifier A1 will output a low-level signal, thereby reducing the conduction degree of the switch transistor T0, that is, reducing the current flowing through the first transistor T1, so that the voltage at the non-inverting input terminal of the operational amplifier A1 can be increased until the voltage at the non-inverting input terminal of the operational amplifier A1 is equal to the voltage at the inverting input terminal of the operational amplifier A1.
在这一实施例中,处理单元240还具有输出端d1和输出端d2。其中,处理单元240的输出端d1与第一晶体管T1的控制极连接(图中未示出连接关系)。电流检测电路20工作时,处理单元240的输出端d1可以输出电平信号,从而控制第二分流单元220中的第一晶体管T1导通。处理单元240的输出端d2与第一分流单元210中的多个晶体管的每个晶体管的控制极连接(图中未示出连接关系)。电流检测电路20工作时,处理单元240的输出端d2可以输出电平信号,从而控制第一分流单元210中的所有晶体管全部导通。In this embodiment, the processing unit 240 further has an output terminal d1 and an output terminal d2. The output terminal d1 of the processing unit 240 is connected to the control electrode of the first transistor T1 (the connection relationship is not shown in the figure). When the current detection circuit 20 is working, the output terminal d1 of the processing unit 240 can output a level signal, thereby controlling the first transistor T1 in the second shunt unit 220 to be turned on. The output terminal d2 of the processing unit 240 is connected to the control electrode of each of the multiple transistors in the first shunt unit 210 (the connection relationship is not shown in the figure). When the current detection circuit 20 is working, the output terminal d2 of the processing unit 240 can output a level signal, thereby controlling all transistors in the first shunt unit 210 to be turned on.
由前述描述可知,电流检测电路20工作时,目标比值为: It can be seen from the above description that when the current detection circuit 20 is working, the target ratio is:
对于任意晶体管,其第一极和第二极之间的电阻为:其中,RT为晶体管的第一极和第二极之间的电阻,μ为晶体管的沟道的载流子迁移率,Cox为晶体管单位面积的栅极电容,W为晶体管的沟道宽度,L为晶体管的沟道长度,VGS为晶体管的控制极与第一极之间的电压差,VTH为晶体管的开启电压。在本申请实施例中,所有的晶体管可以形成于同一硅片上,从而使每个晶体管的载流子迁移率、开启电压等基本相同。这种情况下,再控制第一分流单元210和第二分流单元220中所有晶体管的单位面积的栅极电容相同,电流检测电路20工作时第一分流单元210和第二分流单元220中所有晶体管的控制极与第一极之间的电压差相同,即可使目标比值仅与各晶体管的沟道宽度与沟道长度之比相关。For any transistor, the resistance between the first and second terminals is: Wherein, RT is the resistance between the first electrode and the second electrode of the transistor, μ is the carrier mobility of the channel of the transistor, Cox is the gate capacitance per unit area of the transistor, W is the channel width of the transistor, L is the channel length of the transistor, VGS is the voltage difference between the control electrode and the first electrode of the transistor, and VTH is the turn-on voltage of the transistor. In the embodiment of the present application, all transistors can be formed on the same silicon wafer, so that the carrier mobility, turn-on voltage, etc. of each transistor are basically the same. In this case, the gate capacitance per unit area of all transistors in the first shunt unit 210 and the second shunt unit 220 is controlled to be the same, and the voltage difference between the control electrode and the first electrode of all transistors in the first shunt unit 210 and the second shunt unit 220 is the same when the current detection circuit 20 is working, so that the target ratio is only related to the ratio of the channel width to the channel length of each transistor.
结合和即可得到,在图6所示的实施例中,当第一分流单元210和第二分流单元220中所有晶体管的沟道宽度与沟道长度之比均相同时,此时目标比值为10。在这一实施例中,由于目标比值为定值,因此目标比值可以预先存储于处理单元240内,以便于处理单元240根据第一电阻R1的电压以及目标比值确定负载30的电流。Combination and It can be obtained that, in the embodiment shown in FIG6 , when the ratio of the channel width to the channel length of all transistors in the first shunt unit 210 and the second shunt unit 220 is the same, the target ratio is 10. In this embodiment, since the target ratio is a fixed value, the target ratio can be pre-stored in the processing unit 240, so that the processing unit 240 determines the current of the load 30 according to the voltage of the first resistor R1 and the target ratio.
在这一可能的情况中,在一些未示出的实施例中,第二分流单元220也可以包括多个并联的晶体管。电流检测电路20工作时,第二分流单元220中的多个晶体管全部导通,不再赘述。在另一些未示出的实施例中,第一分流单元210、第二分流单元220中的各晶体管也可以串联有固定阻值的电阻,或,第一分流单元210、第二分流单元220中的各晶体管也可以替换为固定阻值的电阻。In this possible situation, in some embodiments not shown, the second shunt unit 220 may also include a plurality of transistors connected in parallel. When the current detection circuit 20 is working, all the transistors in the second shunt unit 220 are turned on, which will not be described in detail. In other embodiments not shown, each transistor in the first shunt unit 210 and the second shunt unit 220 may also be connected in series with a resistor of a fixed resistance, or each transistor in the first shunt unit 210 and the second shunt unit 220 may also be replaced with a resistor of a fixed resistance.
(2)在第二种可能的情况中,目标比值为非定值。(2) In the second possible case, the target ratio is a non-constant value.
图7是本申请实施例提供的另一种电流检测电路20的电路图。在图7所示的实施例中,第一分流单元210、第二分流单元220、电压调节单元230的结构均与图6所示的实施例相同,不再赘述。Fig. 7 is a circuit diagram of another current detection circuit 20 provided in an embodiment of the present application. In the embodiment shown in Fig. 7, the structures of the first shunt unit 210, the second shunt unit 220, and the voltage adjustment unit 230 are the same as those in the embodiment shown in Fig. 6, and will not be described in detail.
区别于图6所示实施例的是,在图7所示的实施例中,处理单元240具有多个输出端。处理单元240的输出端的个数等于第一分流单元210、第二分流单元220中晶体管的个数之和。具体来说,处理单元240具有输出端d1、输出端d2、输出端d3、输出端d4……输出端d11。其中,处理单元240的输出端d1与第一晶体管T1的控制极连接(图中未示出连接关系);处理单元240的输出端d2与第二晶体管T2的控制极连接;处理单元240的输出端d3与第三晶体管T3的控制极连接;处理单元240的输出端d4与第四晶体管T4的控制极连接……处理单元240的输出端d11与第十一晶体管T11的控制极连接。如此,使处理单元240可以控制第一分流单元210中的多个晶体管中每个晶体管的导通与关断。处理单元240工作时,处理单元240的输出端d1可以输出电平信号,从而控制第二分流单元220中的第一晶体管T1导通。处理单元240的输出端d2、输出端d3、输出端d4……输出端d11中的至少一个输出电平信号,从而控制第一分流单元210中的第二晶体管T2、第三晶体管T3、第四晶体管T4……第十一晶体管T11中的至少一个导通。Different from the embodiment shown in FIG. 6 , in the embodiment shown in FIG. 7 , the processing unit 240 has a plurality of output terminals. The number of output terminals of the processing unit 240 is equal to the sum of the number of transistors in the first shunt unit 210 and the second shunt unit 220. Specifically, the processing unit 240 has an output terminal d1, an output terminal d2, an output terminal d3, an output terminal d4, and an output terminal d11. Among them, the output terminal d1 of the processing unit 240 is connected to the control electrode of the first transistor T1 (the connection relationship is not shown in the figure); the output terminal d2 of the processing unit 240 is connected to the control electrode of the second transistor T2; the output terminal d3 of the processing unit 240 is connected to the control electrode of the third transistor T3; the output terminal d4 of the processing unit 240 is connected to the control electrode of the fourth transistor T4, and the output terminal d11 of the processing unit 240 is connected to the control electrode of the eleventh transistor T11. In this way, the processing unit 240 can control the conduction and disconnection of each of the plurality of transistors in the first shunt unit 210. When the processing unit 240 is working, the output terminal d1 of the processing unit 240 can output a level signal, thereby controlling the first transistor T1 in the second shunt unit 220 to be turned on. At least one of the output terminals d2, d3, d4, ..., d11 of the processing unit 240 outputs a level signal, thereby controlling at least one of the second transistor T2, the third transistor T3, the fourth transistor T4, ..., the eleventh transistor T11 in the first shunt unit 210 to be turned on.
在这一实施例中,处理单元240工作时,可以根据第一分流单元210中处于导通状态的晶体管的个数来确定目标比值。仍旧以第一分流单元210和第二分流单元220中所有晶体管的沟道宽度与沟道长度之比均相同为例,则:当第一分流单元210中有两个晶体管导通时,目标比值为2;当第一分流单元210中有三个晶体管导通时,目标比值为3……当第一分流单元210中有十个晶体管导通时,目标比值为10。In this embodiment, when the processing unit 240 is working, the target ratio can be determined according to the number of transistors in the first shunt unit 210 that are in the on state. Still taking the case that the ratio of the channel width to the channel length of all transistors in the first shunt unit 210 and the second shunt unit 220 is the same, then: when two transistors in the first shunt unit 210 are turned on, the target ratio is 2; when three transistors in the first shunt unit 210 are turned on, the target ratio is 3... When ten transistors in the first shunt unit 210 are turned on, the target ratio is 10.
在这一实施例中,处理单元240工作时用于:根据第一电阻R1的电压调整第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数。通过调整第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数,即可调整目标比值。In this embodiment, the processing unit 240 is used to adjust the number of transistors in the first shunt unit 210 that are in the on state according to the voltage of the first resistor R1. By adjusting the number of transistors in the first shunt unit 210 that are in the on state, the target ratio can be adjusted.
处理单元240可以通过调整第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数,即通过调整目标比值,从而使第一电阻R1的电压保持在预设电压范围内。具体来说,处理单元240内可以预先设置有预设电压范围,预设电压范围是第一电阻R1的目标电压范围。即电流检测电路20工作时,需要将第一电阻R1的电压控制在预设电压范围内。处理单元240工作时用于:当处理单元240检测到的第一电阻R1的电压较大时,表明流经第一电阻R1的电流较大,也即流经第一分流单元210的电流较大。这种情况下,在流经第一分流单元210的电流保持不变的情况下,处理单元240可以通过增加第一分流单元210中处于导通状态的晶体管的个数来增大目标比值,从而使流经第一电阻R1的电流减小,也即使第一电阻R1的电压减小,从而使第一电阻R1的电压保持在预设电压范围内。如此,一方面可以保证电流检测精度,另一方面可以减小采样电阻带来的电能损耗。同样的,当处理单元240检测到的第一电阻R1的电压较小时,表明流经第一电阻R1的电流较小,也即流经第一分流单元210的电流较小。这种情况下,在流经第一分流单元210的电流保持不变的情况下,处理单元240可以通过减少第一分流单元210中处于导通状态的晶体管的个数来减小目标比值,从而使流经第一电阻R1的电流增大,也即使第一电阻R1的电压增大,从而使第一电阻R1的电压保持在预设电压范围内。如此,可以保证电流检测精度。The processing unit 240 can adjust the number of transistors in the on state among the multiple transistors in the first shunt unit 210, that is, by adjusting the target ratio, so that the voltage of the first resistor R1 is maintained within a preset voltage range. Specifically, a preset voltage range can be pre-set in the processing unit 240, and the preset voltage range is the target voltage range of the first resistor R1. That is, when the current detection circuit 20 is working, it is necessary to control the voltage of the first resistor R1 within the preset voltage range. When the processing unit 240 is working, it is used to: when the voltage of the first resistor R1 detected by the processing unit 240 is large, it indicates that the current flowing through the first resistor R1 is large, that is, the current flowing through the first shunt unit 210 is large. In this case, when the current flowing through the first shunt unit 210 remains unchanged, the processing unit 240 can increase the target ratio by increasing the number of transistors in the on state in the first shunt unit 210, thereby reducing the current flowing through the first resistor R1, that is, reducing the voltage of the first resistor R1, so that the voltage of the first resistor R1 is maintained within the preset voltage range. In this way, on the one hand, the current detection accuracy can be guaranteed, and on the other hand, the power loss caused by the sampling resistor can be reduced. Similarly, when the voltage of the first resistor R1 detected by the processing unit 240 is small, it indicates that the current flowing through the first resistor R1 is small, that is, the current flowing through the first shunt unit 210 is small. In this case, while the current flowing through the first shunt unit 210 remains unchanged, the processing unit 240 can reduce the target ratio by reducing the number of transistors in the on state in the first shunt unit 210, thereby increasing the current flowing through the first resistor R1, that is, increasing the voltage of the first resistor R1, so that the voltage of the first resistor R1 is maintained within the preset voltage range. In this way, the current detection accuracy can be guaranteed.
在这一可能的情况中,在一些未示出的实施例中,第一分流单元210中的多个晶体管中也可以有至少两个晶体管的沟道宽度与沟道长度之比不同。In this possible situation, in some embodiments not shown, at least two transistors among the plurality of transistors in the first shunt unit 210 may have different ratios of channel width to channel length.
(3)在第三种可能的情况中,目标比值为非定值。(3) In the third possible case, the target ratio is a non-constant value.
图8是本申请实施例提供的又一种电流检测电路20的电路图。区别于图7所示实施例的是,在图8所示的实施例中,第二分流单元220除包括第一晶体管T1外,还包括第十二晶体管T12和第十三晶体管T13。第一晶体管T1、第十二晶体管T12、第十三晶体管T13的第一极连接在一起形成第二分流单元220的第一端;第一晶体管T1、第十二晶体管T12、第十三晶体管T13的第二极连接在一起形成第二分流单元220的第二端。处理单元240还具有输出端d12和d13。处理单元240的输出端d12与第十二晶体管T12的控制极连接,处理单元240的输出端d13与第十三晶体管T13的控制极连接。在这一实施例中,处理单元240用于:通过调整第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数,或/和,通过调整第二分流单元220中的多个晶体管中处于导通状态的晶体管的个数,以此来调整目标比值。如此,可以增大目标比值的调节范围。FIG8 is a circuit diagram of another current detection circuit 20 provided in an embodiment of the present application. Different from the embodiment shown in FIG7, in the embodiment shown in FIG8, the second shunt unit 220 includes a twelfth transistor T12 and a thirteenth transistor T13 in addition to the first transistor T1. The first electrodes of the first transistor T1, the twelfth transistor T12, and the thirteenth transistor T13 are connected together to form a first end of the second shunt unit 220; the second electrodes of the first transistor T1, the twelfth transistor T12, and the thirteenth transistor T13 are connected together to form a second end of the second shunt unit 220. The processing unit 240 also has output terminals d12 and d13. The output terminal d12 of the processing unit 240 is connected to the control electrode of the twelfth transistor T12, and the output terminal d13 of the processing unit 240 is connected to the control electrode of the thirteenth transistor T13. In this embodiment, the processing unit 240 is used to adjust the target ratio by adjusting the number of transistors in the first shunt unit 210 that are in a conducting state, or/and by adjusting the number of transistors in the second shunt unit 220 that are in a conducting state. In this way, the adjustment range of the target ratio can be increased.
在这一实施例中,处理单元240工作时,用于:根据第一分流单元210中处于导通状态的晶体管的个数,以及第二分流单元220中处于导通状态的晶体管的个数来确定目标比值。In this embodiment, when the processing unit 240 is working, it is used to determine the target ratio according to the number of transistors in the first shunt unit 210 that are in the on state and the number of transistors in the second shunt unit 220 that are in the on state.
下面从三种可能的实现方式,对本申请实施例提供的电流检测电路20进行详细的解释说明。在下述三种可能的实现方式中,各电学单元(包括第一分流单元210、第二分流单元220、电压调整单元、处理单元240)的结构均为上述“第二种可能的情况”中所介绍的结构为例;第二电压端V2均为地线GND。The current detection circuit 20 provided in the embodiment of the present application is explained in detail from three possible implementations. In the following three possible implementations, the structures of each electrical unit (including the first shunt unit 210, the second shunt unit 220, the voltage adjustment unit, and the processing unit 240) are all taken as an example of the structure described in the above-mentioned "second possible situation"; the second voltage terminal V2 is the ground line GND.
在第一种可能的实现方式中,电流检测电路20的电路图如图7所示。这种情况下,第二电流通路不包括负载30,即第二分流单元220与负载30并联。In a first possible implementation, a circuit diagram of the current detection circuit 20 is shown in FIG7 . In this case, the second current path does not include the load 30 , that is, the second current dividing unit 220 is connected in parallel with the load 30 .
具体来说,第一分流单元210的第一端用于与第一电压端V1连接,第一分流单元210的第二端用于与负载30的第一端连接,负载30的第二端与地线GND连接。第二分流单元220第一端与第一分流单元210的第一端连接。第一电阻R1的第一端与第二分流单元220的第二端连接,第一电阻R1的第二端用于与负载30的第二端连接。第一分流单元210的第二端与电压调节单元230的第一端a连接,第二分流单元220的第二端与电压调节单元230的第二端b连接。Specifically, the first end of the first shunt unit 210 is used to be connected to the first voltage terminal V1, the second end of the first shunt unit 210 is used to be connected to the first end of the load 30, and the second end of the load 30 is connected to the ground line GND. The first end of the second shunt unit 220 is connected to the first end of the first shunt unit 210. The first end of the first resistor R1 is connected to the second end of the second shunt unit 220, and the second end of the first resistor R1 is used to be connected to the second end of the load 30. The second end of the first shunt unit 210 is connected to the first end a of the voltage regulating unit 230, and the second end of the second shunt unit 220 is connected to the second end b of the voltage regulating unit 230.
其中,第二分流单元220包括第一晶体管T1。第一分流单元210包括第二晶体管T2、第三晶体管T3、第四晶体管T4……第十一晶体管T11。第一晶体管T1、第二晶体管T2、第三晶体管T3、第四晶体管T4……第十一晶体管T11均为P型MOSFET。电压调节单元230包括运算放大器A1和开关晶体管T0。运算放大器A1的反相输入端与第一分流单元210的第二端连接。运算放大器A1的同相输入端与第二分流单元220的第二端及第一电阻R1的第一端连接。运算放大器A1的输出端与开关晶体管T0的控制极连接。第一电阻R1的第二端与开关晶体管T0的第一极连接,开关晶体管T0的第二极与负载30的第二端连接。即第一电阻R1通过开关晶体管T0与负载30的第二端连接。开关晶体管T0为N型MOSFET。Among them, the second shunt unit 220 includes a first transistor T1. The first shunt unit 210 includes a second transistor T2, a third transistor T3, a fourth transistor T4...an eleventh transistor T11. The first transistor T1, the second transistor T2, the third transistor T3, the fourth transistor T4...an eleventh transistor T11 are all P-type MOSFETs. The voltage regulating unit 230 includes an operational amplifier A1 and a switching transistor T0. The inverting input terminal of the operational amplifier A1 is connected to the second end of the first shunt unit 210. The non-inverting input terminal of the operational amplifier A1 is connected to the second end of the second shunt unit 220 and the first end of the first resistor R1. The output terminal of the operational amplifier A1 is connected to the control electrode of the switching transistor T0. The second end of the first resistor R1 is connected to the first electrode of the switching transistor T0, and the second electrode of the switching transistor T0 is connected to the second end of the load 30. That is, the first resistor R1 is connected to the second end of the load 30 through the switching transistor T0. The switching transistor T0 is an N-type MOSFET.
电流检测电路20工作时,电流从第一电压端V1流出,经第一分流单元210中处于导通状态的晶体管、负载30流入地线GND,形成第一电流通路。电流还从第一电压端V1流出,经第二分流单元220、第一电阻R1、开关晶体管T0流入地线GND,形成第二电流通路。When the current detection circuit 20 is working, the current flows out from the first voltage terminal V1, flows into the ground line GND through the transistor in the first shunt unit 210 that is in the on state and the load 30, and forms a first current path. The current also flows out from the first voltage terminal V1, flows into the ground line GND through the second shunt unit 220, the first resistor R1, and the switch transistor T0, and forms a second current path.
电压调节单元230工作时,若运算放大器A1的同相输入端的电压大于运算放大器A1的反相输入端的电压,则表示流经第一晶体管T1的电流过小,此时运算放大器A1会输出高电平信号,从而增加开关晶体管T0的导通程度,即增加流经第一晶体管T1的电流,如此即可使运算放大器A1的同相输入端的电压下降,直至运算放大器A1的同相输入端的电压等于运算放大器A1的反相输入端的电压。反之,当运算放大器A1的同相输入端的电压小于运算放大器A1的反相输入端的电压,则表示流经第一晶体管T1的电流过大,此时运算放大器A1会输出低电平信号,从而减小开关晶体管T0的导通程度,即减小流经第一晶体管T1的电流,如此即可使运算放大器A1的同相输入端的电压上升,直至运算放大器A1的同相输入端的电压等于运算放大器A1的反相输入端的电压。When the voltage regulating unit 230 is working, if the voltage at the non-inverting input terminal of the operational amplifier A1 is greater than the voltage at the inverting input terminal of the operational amplifier A1, it means that the current flowing through the first transistor T1 is too small. At this time, the operational amplifier A1 will output a high-level signal, thereby increasing the conduction degree of the switch transistor T0, that is, increasing the current flowing through the first transistor T1, so that the voltage at the non-inverting input terminal of the operational amplifier A1 can be reduced until the voltage at the non-inverting input terminal of the operational amplifier A1 is equal to the voltage at the inverting input terminal of the operational amplifier A1. On the contrary, when the voltage at the non-inverting input terminal of the operational amplifier A1 is less than the voltage at the inverting input terminal of the operational amplifier A1, it means that the current flowing through the first transistor T1 is too large. At this time, the operational amplifier A1 will output a low-level signal, thereby reducing the conduction degree of the switch transistor T0, that is, reducing the current flowing through the first transistor T1, so that the voltage at the non-inverting input terminal of the operational amplifier A1 can be increased until the voltage at the non-inverting input terminal of the operational amplifier A1 is equal to the voltage at the inverting input terminal of the operational amplifier A1.
处理单元240中可以设定有预设电压范围。处理单元240工作时用于检测第一电阻R1的电压。处理单元240还用于:若检测的第一电阻R1的电压大于预设电压范围,则调整第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数增加一个,并再次检测第一电阻R1的电压,直至第一电阻R1的电压在预设电压范围内。此时,处理单元240可以根据第一分流单元210中处于导通状态的晶体管的个数来确定目标比值。A preset voltage range may be set in the processing unit 240. The processing unit 240 is used to detect the voltage of the first resistor R1 when it is working. The processing unit 240 is also used to: if the detected voltage of the first resistor R1 is greater than the preset voltage range, adjust the number of transistors in the first shunt unit 210 that are in the on state by one, and detect the voltage of the first resistor R1 again until the voltage of the first resistor R1 is within the preset voltage range. At this time, the processing unit 240 can determine the target ratio according to the number of transistors in the first shunt unit 210 that are in the on state.
在这一实施例中,处理单元240在根据第一电阻R1的电压以及目标比值确定负载30的电流时,具体为:In this embodiment, when the processing unit 240 determines the current of the load 30 according to the voltage of the first resistor R1 and the target ratio, specifically:
根据第一电阻R1的电压和第一电阻R1的阻值确定第一电阻R1的电流,即以及,将第一电阻R1的电流与目标比值相乘,得到负载30的电流,即:Iload=Ia=Ib×K=IR1×K。The current of the first resistor R1 is determined according to the voltage of the first resistor R1 and the resistance value of the first resistor R1, that is, And, the current of the first resistor R1 is multiplied by the target ratio to obtain the current of the load 30 , that is, I load =I a =I b ×K=I R1 ×K.
在这一实施例中,处理单元240检测的第一电阻R1的电压同样为负载30的电压。In this embodiment, the voltage of the first resistor R1 detected by the processing unit 240 is also the voltage of the load 30 .
在第二种可能的实现方式中,电流检测电路20的电路图如图9所示。这种情况下,第二电流通路包括负载30,即第二分流单元220与负载30串联。In a second possible implementation, a circuit diagram of the current detection circuit 20 is shown in FIG9 . In this case, the second current path includes a load 30 , that is, the second current dividing unit 220 and the load 30 are connected in series.
具体来说,第一分流单元210的第一端用于与第一电压端V1连接,第一分流单元210的第二端用于与负载30的第一端连接,负载30的第二端与地线GND连接。第二分流单元220第一端与第一分流单元210的第一端连接。第一电阻R1的第一端与第二分流单元220的第二端连接,第一电阻R1的第二端用于与负载30的第一端连接。第一分流单元210的第二端与电压调节单元230的第一端a连接,第二分流单元220的第二端与电压调节单元230的第二端b连接。Specifically, the first end of the first shunt unit 210 is used to be connected to the first voltage terminal V1, the second end of the first shunt unit 210 is used to be connected to the first end of the load 30, and the second end of the load 30 is connected to the ground line GND. The first end of the second shunt unit 220 is connected to the first end of the first shunt unit 210. The first end of the first resistor R1 is connected to the second end of the second shunt unit 220, and the second end of the first resistor R1 is used to be connected to the first end of the load 30. The second end of the first shunt unit 210 is connected to the first end a of the voltage regulating unit 230, and the second end of the second shunt unit 220 is connected to the second end b of the voltage regulating unit 230.
其中,第二分流单元220包括第一晶体管T1。第一分流单元210包括第二晶体管T2、第三晶体管T3、第四晶体管T4……第十一晶体管T11。第一晶体管T1、第二晶体管T2、第三晶体管T3、第四晶体管T4……第十一晶体管T11均为P型MOSFET。电压调节单元230包括运算放大器A1和开关晶体管T0。运算放大器A1的反相输入端与第一分流单元210的第二端连接。运算放大器A1的同相输入端与第二分流单元220的第二端及第一电阻R1的第一端连接。运算放大器A1的输出端与开关晶体管T0的控制极连接。第一电阻R1的第二端与开关晶体管T0的第一极连接,开关晶体管T0的第二极与负载30的第一端连接。即第一电阻R1通过开关晶体管T0与负载30的第一端连接。开关晶体管T0为N型MOSFET。Among them, the second shunt unit 220 includes a first transistor T1. The first shunt unit 210 includes a second transistor T2, a third transistor T3, a fourth transistor T4...an eleventh transistor T11. The first transistor T1, the second transistor T2, the third transistor T3, the fourth transistor T4...an eleventh transistor T11 are all P-type MOSFETs. The voltage regulating unit 230 includes an operational amplifier A1 and a switching transistor T0. The inverting input terminal of the operational amplifier A1 is connected to the second end of the first shunt unit 210. The non-inverting input terminal of the operational amplifier A1 is connected to the second end of the second shunt unit 220 and the first end of the first resistor R1. The output terminal of the operational amplifier A1 is connected to the control electrode of the switching transistor T0. The second end of the first resistor R1 is connected to the first electrode of the switching transistor T0, and the second electrode of the switching transistor T0 is connected to the first end of the load 30. That is, the first resistor R1 is connected to the first end of the load 30 through the switching transistor T0. The switching transistor T0 is an N-type MOSFET.
电流检测电路20工作时,电流从第一电压端V1流出,经第一分流单元210中处于导通状态的晶体管、负载30流入地线GND,形成第一电流通路。电流还从第一电压端V1流出,经第二分流单元220、第一电阻R1、开关晶体管T0、负载30流入地线GND,形成第二电流通路。When the current detection circuit 20 is working, the current flows out from the first voltage terminal V1, flows into the ground line GND through the transistor in the on state in the first shunt unit 210 and the load 30, and forms a first current path. The current also flows out from the first voltage terminal V1, flows into the ground line GND through the second shunt unit 220, the first resistor R1, the switch transistor T0, and the load 30, and forms a second current path.
电压调节单元230工作时,若运算放大器A1的同相输入端的电压大于运算放大器A1的反相输入端的电压,则表示流经第一晶体管T1的电流过小,此时运算放大器A1会输出高电平信号,从而增加开关晶体管T0的导通程度,即增加流经第一晶体管T1的电流,如此即可使运算放大器A1的同相输入端的电压下降,直至运算放大器A1的同相输入端的电压等于运算放大器A1的反相输入端的电压。反之,当运算放大器A1的同相输入端的电压小于运算放大器A1的反相输入端的电压,则表示流经第一晶体管T1的电流过大,此时运算放大器A1会输出低电平信号,从而减小开关晶体管T0的导通程度,即减小流经第一晶体管T1的电流,如此即可使运算放大器A1的同相输入端的电压上升,直至运算放大器A1的同相输入端的电压等于运算放大器A1的反相输入端的电压。When the voltage regulating unit 230 is working, if the voltage at the non-inverting input terminal of the operational amplifier A1 is greater than the voltage at the inverting input terminal of the operational amplifier A1, it means that the current flowing through the first transistor T1 is too small. At this time, the operational amplifier A1 will output a high-level signal, thereby increasing the conduction degree of the switch transistor T0, that is, increasing the current flowing through the first transistor T1, so that the voltage at the non-inverting input terminal of the operational amplifier A1 can be reduced until the voltage at the non-inverting input terminal of the operational amplifier A1 is equal to the voltage at the inverting input terminal of the operational amplifier A1. On the contrary, when the voltage at the non-inverting input terminal of the operational amplifier A1 is less than the voltage at the inverting input terminal of the operational amplifier A1, it means that the current flowing through the first transistor T1 is too large. At this time, the operational amplifier A1 will output a low-level signal, thereby reducing the conduction degree of the switch transistor T0, that is, reducing the current flowing through the first transistor T1, so that the voltage at the non-inverting input terminal of the operational amplifier A1 can be increased until the voltage at the non-inverting input terminal of the operational amplifier A1 is equal to the voltage at the inverting input terminal of the operational amplifier A1.
处理单元240中可以设定有预设电压范围。处理单元240工作时用于检测第一电阻R1的电压。处理单元240还用于:若检测的第一电阻R1的电压大于预设电压范围,则调整第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数增加一个,并再次检测第一电阻R1的电压,直至第一电阻R1的电压在预设电压范围内。此时,处理单元240可以根据第一分流单元210中处于导通状态的晶体管的个数来确定目标比值。A preset voltage range may be set in the processing unit 240. The processing unit 240 is used to detect the voltage of the first resistor R1 when it is working. The processing unit 240 is also used to: if the detected voltage of the first resistor R1 is greater than the preset voltage range, adjust the number of transistors in the first shunt unit 210 that are in the on state by one, and detect the voltage of the first resistor R1 again until the voltage of the first resistor R1 is within the preset voltage range. At this time, the processing unit 240 can determine the target ratio according to the number of transistors in the first shunt unit 210 that are in the on state.
在这一实施例中,处理单元240在根据第一电阻R1的电压以及目标比值确定负载30的电流时,具体为:In this embodiment, when the processing unit 240 determines the current of the load 30 according to the voltage of the first resistor R1 and the target ratio, specifically:
根据第一电阻R1的电压和第一电阻R1的阻值确定第一电阻R1的电流,即以及,将第一电阻R1的电流与目标比值加一之和相乘,得到负载30的电流,即:Iload=Ia+Ib=Ib×K+Ib=Ib(K+1)=IR1(K+1)。The current of the first resistor R1 is determined according to the voltage of the first resistor R1 and the resistance value of the first resistor R1, that is, And, the current of the load 30 is obtained by multiplying the current of the first resistor R1 by the sum of the target ratio plus one, that is, I load =I a +I b =I b ×K+I b =I b (K+1) =I R1 (K+1).
在这一实施例中,处理单元240检测的第一电阻R1的电压同样为负载30的电压。In this embodiment, the voltage of the first resistor R1 detected by the processing unit 240 is also the voltage of the load 30 .
在这一种可能的实现方式中,在其他一些未示出的实施例中,第二分流单元220也可以包括多个晶体管,多个晶体管中的每个晶体管均由处理单元240独立控制,不再赘述。In this possible implementation, in some other embodiments not shown, the second shunt unit 220 may also include a plurality of transistors, each of the plurality of transistors is independently controlled by the processing unit 240, which will not be described in detail.
在第三种可能的实现方式中,电流检测电路20的电路图如图10所示。这种情况下,第二电流通路包括负载30,即第二分流单元220与负载30串联。In a third possible implementation, a circuit diagram of the current detection circuit 20 is shown in FIG10 . In this case, the second current path includes a load 30 , that is, the second current dividing unit 220 and the load 30 are connected in series.
具体来说,负载30的第一端用于与第一电压端V1连接,第一分流单元210的第一端用于与负载30的第二端连接,第一分流单元210的第二端用于与地线GND连接。第二分流单元220第一端与第一分流单元210的第一端连接。第一电阻R1的第一端与第二分流单元220的第二端连接,第一电阻R1的第二端用于与地线GND连接。在这一实施例中,由于在电压调节单元230的作用下,第二分流单元220的第二端的电压等于第一分流单元210的第二端的电压,也即第一电阻R1的第一端的电压等于第一分流单元210的第二端的电压。因此,为避免第一电阻R1的第一端的电压等于第一电阻R1的第二端的电压,如图10所示,电流检测电路20还包括第二电阻R2,第一分流单元210的第二端通过第二电阻R2与地线GND连接。Specifically, the first end of the load 30 is used to be connected to the first voltage terminal V1, the first end of the first shunt unit 210 is used to be connected to the second end of the load 30, and the second end of the first shunt unit 210 is used to be connected to the ground line GND. The first end of the second shunt unit 220 is connected to the first end of the first shunt unit 210. The first end of the first resistor R1 is connected to the second end of the second shunt unit 220, and the second end of the first resistor R1 is used to be connected to the ground line GND. In this embodiment, due to the action of the voltage regulating unit 230, the voltage of the second end of the second shunt unit 220 is equal to the voltage of the second end of the first shunt unit 210, that is, the voltage of the first end of the first resistor R1 is equal to the voltage of the second end of the first shunt unit 210. Therefore, in order to avoid the voltage of the first end of the first resistor R1 being equal to the voltage of the second end of the first resistor R1, as shown in FIG10, the current detection circuit 20 further includes a second resistor R2, and the second end of the first shunt unit 210 is connected to the ground line GND through the second resistor R2.
其中,第二分流单元220包括第一晶体管T1。第一分流单元210包括第二晶体管T2、第三晶体管T3、第四晶体管T4……第十一晶体管T11。第一晶体管T1、第二晶体管T2、第三晶体管T3、第四晶体管T4……第十一晶体管T11均为N型MOSFET。电压调节单元230包括运算放大器A1和开关晶体管T0。运算放大器A1的同相输入端与第一分流单元210的第二端连接。运算放大器A1的反相输入端与第二分流单元220的第二端及第一电阻R1的第一端连接。运算放大器A1的输出端与开关晶体管T0的控制极连接。第一电阻R1的第二端与开关晶体管T0的第一极连接,开关晶体管T0的第二极与第二电阻R2的第二端连接。即第一电阻R1通过开关晶体管T0与地线GND连接。开关晶体管T0为P型MOSFET。Among them, the second shunt unit 220 includes a first transistor T1. The first shunt unit 210 includes a second transistor T2, a third transistor T3, a fourth transistor T4...an eleventh transistor T11. The first transistor T1, the second transistor T2, the third transistor T3, the fourth transistor T4...an eleventh transistor T11 are all N-type MOSFETs. The voltage regulating unit 230 includes an operational amplifier A1 and a switching transistor T0. The non-inverting input terminal of the operational amplifier A1 is connected to the second end of the first shunt unit 210. The inverting input terminal of the operational amplifier A1 is connected to the second end of the second shunt unit 220 and the first end of the first resistor R1. The output terminal of the operational amplifier A1 is connected to the control electrode of the switching transistor T0. The second end of the first resistor R1 is connected to the first electrode of the switching transistor T0, and the second electrode of the switching transistor T0 is connected to the second end of the second resistor R2. That is, the first resistor R1 is connected to the ground line GND through the switching transistor T0. The switching transistor T0 is a P-type MOSFET.
电流检测电路20工作时,电流从第一电压端V1流出,经负载30、第一分流单元210中处于导通状态的晶体管、第二电阻R2流入地线GND,形成第一电流通路。电流还从第一电压端V1流出,经负载30、第二分流单元220、第一电阻R1、开关晶体管T0流入地线GND,形成第二电流通路。When the current detection circuit 20 is working, the current flows out from the first voltage terminal V1, flows into the ground line GND through the load 30, the transistor in the first shunt unit 210 that is in the on state, and the second resistor R2, forming a first current path. The current also flows out from the first voltage terminal V1, flows into the ground line GND through the load 30, the second shunt unit 220, the first resistor R1, and the switch transistor T0, forming a second current path.
电压调节单元230工作时,若运算放大器A1的反相输入端的电压大于运算放大器A1的同相输入端的电压,则表示流经第一晶体管T1的电流过小,此时运算放大器A1会输出低电平信号,从而增加开关晶体管T0的导通程度,即增加流经第一晶体管T1的电流,如此即可使运算放大器A1的反相输入端的电压下降,直至运算放大器A1的反相输入端的电压等于运算放大器A1的同相输入端的电压。反之,当运算放大器A1的反相输入端的电压小于运算放大器A1的同相输入端的电压,则表示流经第一晶体管T1的电流过大,此时运算放大器A1会输出高电平信号,从而减小开关晶体管T0的导通程度,即减小流经第一晶体管T1的电流,如此即可使运算放大器A1的反相输入端的电压上升,直至运算放大器A1的反相输入端的电压等于运算放大器A1的同相输入端的电压。When the voltage regulating unit 230 is working, if the voltage at the inverting input terminal of the operational amplifier A1 is greater than the voltage at the non-inverting input terminal of the operational amplifier A1, it means that the current flowing through the first transistor T1 is too small. At this time, the operational amplifier A1 will output a low-level signal, thereby increasing the conduction degree of the switch transistor T0, that is, increasing the current flowing through the first transistor T1, so that the voltage at the inverting input terminal of the operational amplifier A1 can be reduced until the voltage at the inverting input terminal of the operational amplifier A1 is equal to the voltage at the non-inverting input terminal of the operational amplifier A1. On the contrary, when the voltage at the inverting input terminal of the operational amplifier A1 is less than the voltage at the non-inverting input terminal of the operational amplifier A1, it means that the current flowing through the first transistor T1 is too large. At this time, the operational amplifier A1 will output a high-level signal, thereby reducing the conduction degree of the switch transistor T0, that is, reducing the current flowing through the first transistor T1, so that the voltage at the inverting input terminal of the operational amplifier A1 can be increased until the voltage at the inverting input terminal of the operational amplifier A1 is equal to the voltage at the non-inverting input terminal of the operational amplifier A1.
处理单元240中可以设定有预设电压范围。处理单元240工作时用于检测第一电阻R1的电压。处理单元240还用于:若检测的第一电阻R1的电压大于预设电压范围,则调整第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数增加一个,并再次检测第一电阻R1的电压,直至第一电阻R1的电压在预设电压范围内。此时,处理单元240可以根据第一分流单元210中处于导通状态的晶体管的个数来确定目标比值。A preset voltage range may be set in the processing unit 240. The processing unit 240 is used to detect the voltage of the first resistor R1 when it is working. The processing unit 240 is also used to: if the detected voltage of the first resistor R1 is greater than the preset voltage range, adjust the number of transistors in the first shunt unit 210 that are in the on state by one, and detect the voltage of the first resistor R1 again until the voltage of the first resistor R1 is within the preset voltage range. At this time, the processing unit 240 can determine the target ratio according to the number of transistors in the first shunt unit 210 that are in the on state.
在这一实施例中,处理单元240在根据第一电阻R1的电压以及目标比值确定负载30的电流时,具体为:In this embodiment, when the processing unit 240 determines the current of the load 30 according to the voltage of the first resistor R1 and the target ratio, specifically:
根据第一电阻R1的电压和第一电阻R1的阻值确定第一电阻R1的电流,即以及,将第一电阻R1的电流与目标比值加一之和相乘,得到负载30的电流,即:Iload=Ia+Ib=Ib×K+Ib=Ib(K+1)=IR1(K+1)。The current of the first resistor R1 is determined according to the voltage of the first resistor R1 and the resistance value of the first resistor R1, that is, And, the current of the load 30 is obtained by multiplying the current of the first resistor R1 by the sum of the target ratio plus one, that is, I load =I a +I b =I b ×K+I b =I b (K+1) =I R1 (K+1).
在这一种可能的实现方式中,在其他一些未示出的实施例中,第二分流单元220也可以包括多个晶体管,多个晶体管中的每个晶体管均由处理单元240独立控制,不再赘述。In this possible implementation, in some other embodiments not shown, the second shunt unit 220 may also include a plurality of transistors, each of the plurality of transistors is independently controlled by the processing unit 240, which will not be described in detail.
图11是本申请实施例提供的一种第一晶体管T1及第一电阻R1的电压仿真图。其中,横坐标为时间,单位为s(秒);纵坐标为电压,单位为V。曲线①表示第一晶体管T1的电压,曲线②表示处理单元240检测的第一电阻R1的电压。根据图11可知,由于第一晶体管T1与第一电阻R1串联,第一晶体管T1的电流等于第一电阻R1的电流。这种情况下,因为第一晶体管T1的沟道阻值较小,电压也较小,难以准确测量,所以可以通过测量阻值较大的第一电阻R1的电压得到第一电阻R1的电流,即为第一晶体管T1的电流。如此,可以提升电流检测精度。Figure 11 is a voltage simulation diagram of a first transistor T1 and a first resistor R1 provided in an embodiment of the present application. Wherein, the horizontal axis is time, the unit is s (seconds); the vertical axis is voltage, the unit is V. Curve ① represents the voltage of the first transistor T1, and curve ② represents the voltage of the first resistor R1 detected by the processing unit 240. According to Figure 11, since the first transistor T1 is connected in series with the first resistor R1, the current of the first transistor T1 is equal to the current of the first resistor R1. In this case, because the channel resistance of the first transistor T1 is small and the voltage is also small, it is difficult to measure accurately, so the current of the first resistor R1 can be obtained by measuring the voltage of the first resistor R1 with a larger resistance, that is, the current of the first transistor T1. In this way, the current detection accuracy can be improved.
本申请实施例提供的电流检测电路20至少具备如下有益效果:The current detection circuit 20 provided in the embodiment of the present application has at least the following beneficial effects:
电流检测电路20包括第一分流单元210、第二分流单元220、电压调节单元230、第一电阻R1和处理单元240,所形成的电流通路包括第一电流通路和第二电流通路。第一电流通路包括串联的第一分流单元210和负载30,第二电流通路包括串联的第二分流单元220和第一电阻R1。第一电阻R1为采样电阻。电压调节单元230用于使第一分流单元210两端的电压与第二分流单元220两端的电压相同,从而使电流检测电路20工作时第一分流单元210的电流与第二分流单元220的电流具有目标比值。处理单元240工作时可以根据第一电阻R1的电压确定第一电阻R1的电流,再根据第一电阻R1的电流和目标比值来确定负载30的电流,从而达到电流检测的目的。在此,当第二电流通路不包括负载30,即第二分流单元220与负载30并联时,目标比值大于1。此时,第二分流单元220的电流等于第一电阻R1的电流,并且小于第一分流单元210的电流,也即小于负载30的电流。当第二电流通路包括负载30,即第二分流单元220与负载30串联时,目标比值大于0。此时,负载30的电流等于第一分流单元210的电流加上第二分流单元220的电流,因此同样有第二分流单元220的电流等于第一电阻R1的电流,并且小于负载30的电流。如此,即可在保证电流检测电路20的检测精度的前提下,通过使采样电阻的电流小于负载30的电流来减小采样电阻带来的电能损耗,从而提升电子设备的续航能力。The current detection circuit 20 includes a first shunt unit 210, a second shunt unit 220, a voltage regulating unit 230, a first resistor R1 and a processing unit 240, and the current path formed includes a first current path and a second current path. The first current path includes the first shunt unit 210 and the load 30 connected in series, and the second current path includes the second shunt unit 220 and the first resistor R1 connected in series. The first resistor R1 is a sampling resistor. The voltage regulating unit 230 is used to make the voltage across the first shunt unit 210 the same as the voltage across the second shunt unit 220, so that the current of the first shunt unit 210 and the current of the second shunt unit 220 have a target ratio when the current detection circuit 20 is working. When the processing unit 240 is working, the current of the first resistor R1 can be determined according to the voltage of the first resistor R1, and then the current of the load 30 can be determined according to the current of the first resistor R1 and the target ratio, so as to achieve the purpose of current detection. Here, when the second current path does not include the load 30, that is, when the second shunt unit 220 is connected in parallel with the load 30, the target ratio is greater than 1. At this time, the current of the second shunt unit 220 is equal to the current of the first resistor R1, and is less than the current of the first shunt unit 210, that is, less than the current of the load 30. When the second current path includes the load 30, that is, the second shunt unit 220 is connected in series with the load 30, the target ratio is greater than 0. At this time, the current of the load 30 is equal to the current of the first shunt unit 210 plus the current of the second shunt unit 220, so the current of the second shunt unit 220 is also equal to the current of the first resistor R1, and is less than the current of the load 30. In this way, the power loss caused by the sampling resistor can be reduced by making the current of the sampling resistor less than the current of the load 30 while ensuring the detection accuracy of the current detection circuit 20, thereby improving the endurance of the electronic device.
处理单元240可以根据第一电阻R1的电压调整第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数,并根据第一分流单元210中的多个晶体管中处于导通状态的晶体管的个数确定目标比值。如此,无论负载30的电流较大还是较小,都可以使第一电阻R1的电压保持在预设电压范围内,从而一方面可以保证电流检测精度,另一方面可以减小采样电阻带来的电能损耗。The processing unit 240 can adjust the number of transistors in the first shunt unit 210 that are in the on state according to the voltage of the first resistor R1, and determine the target ratio according to the number of transistors in the first shunt unit 210 that are in the on state. In this way, no matter whether the current of the load 30 is large or small, the voltage of the first resistor R1 can be kept within the preset voltage range, so that the current detection accuracy can be guaranteed on the one hand, and the power loss caused by the sampling resistor can be reduced on the other hand.
本申请实施例还提供一种电流检测器,包括如上述任意一个实施例中的电流检测电路20。An embodiment of the present application further provides a current detector, comprising a current detection circuit 20 as in any one of the above embodiments.
具体来说,电流检测电路20包括第一分流单元210、第二分流单元220、电压调节单元230、第一电阻R1和处理单元240。Specifically, the current detection circuit 20 includes a first shunt unit 210 , a second shunt unit 220 , a voltage adjustment unit 230 , a first resistor R1 , and a processing unit 240 .
第一分流单元210用于与负载30串联于第一电压端V1和第二电压端V2之间。其中,第一电压端V1的电压大于第二电压端V2的电压,以形成从第一电压端V1开始,经第一分流单元210、负载30到达第二电压端V2的第一电流通路。在一些具体的实施例中,第二电压端V2可以是地线GND。The first shunt unit 210 is used to be connected in series with the load 30 between the first voltage terminal V1 and the second voltage terminal V2. The voltage of the first voltage terminal V1 is greater than the voltage of the second voltage terminal V2, so as to form a first current path from the first voltage terminal V1 to the second voltage terminal V2 via the first shunt unit 210 and the load 30. In some specific embodiments, the second voltage terminal V2 may be a ground line GND.
第二分流单元220的第一端与第一分流单元210的第一端连接,以使第二分流单元220的第一端的电压与第一分流单元210的第一端的电压相等。第一分流单元210的第二端与电压调节单元230的第一端a连接,第二分流单元220的第二端与电压调节单元230的第二端b连接。电流检测电路20工作时,电压调节单元230的第一端a和第二端的电压相同,也即第一分流单元210的第二端的电压与第二分流单元220的第二端的电压相等。The first end of the second shunt unit 220 is connected to the first end of the first shunt unit 210, so that the voltage of the first end of the second shunt unit 220 is equal to the voltage of the first end of the first shunt unit 210. The second end of the first shunt unit 210 is connected to the first end a of the voltage regulating unit 230, and the second end of the second shunt unit 220 is connected to the second end b of the voltage regulating unit 230. When the current detection circuit 20 is working, the voltage of the first end a and the second end of the voltage regulating unit 230 are the same, that is, the voltage of the second end of the first shunt unit 210 is equal to the voltage of the second end of the second shunt unit 220.
第一电阻R1连接于第二分流单元220的第二端与第二电压端V2之间,以形成从第一电压端V1开始,经第二分流单元220、第一电阻R1到达第二电压端V2的第二电流通路。第二电流通路也可以进一步包括负载30。处理单元240与第一电阻R1连接,以检测第一电阻R1的电压。处理单元240工作时用于:根据第一电阻R1的电压以及目标比值确定负载30的电流。目标比值为电流检测电路20工作时第一分流单元210的电流与第二分流单元220的电流之比。第二分流单元220与负载30并联时,即第二电流通路不包括负载30时,目标比值大于1;第二分流单元220与负载30串联时,即第二电路通路包括负载30时,目标比值大于0。The first resistor R1 is connected between the second end of the second shunt unit 220 and the second voltage end V2 to form a second current path starting from the first voltage end V1, passing through the second shunt unit 220 and the first resistor R1 to reach the second voltage end V2. The second current path may also further include a load 30. The processing unit 240 is connected to the first resistor R1 to detect the voltage of the first resistor R1. When the processing unit 240 is working, it is used to: determine the current of the load 30 according to the voltage of the first resistor R1 and the target ratio. The target ratio is the ratio of the current of the first shunt unit 210 to the current of the second shunt unit 220 when the current detection circuit 20 is working. When the second shunt unit 220 is connected in parallel with the load 30, that is, when the second current path does not include the load 30, the target ratio is greater than 1; when the second shunt unit 220 is connected in series with the load 30, that is, when the second circuit path includes the load 30, the target ratio is greater than 0.
在一些实施例中,第一分流单元210包括多个晶体管。多个晶体管的第一极均与第二分流单元220的第一端连接。多个晶体管的第二极均与电压调节单元230的第一端a连接。处理单元240具有多个输出端,处理单元240的多个输出端与多个晶体管的控制极一一对应连接,以控制多个晶体管中每个晶体管的导通与关断。处理单元240还用于:根据多个晶体管中处于导通状态的晶体管的个数,确定目标比值。In some embodiments, the first shunt unit 210 includes a plurality of transistors. The first electrodes of the plurality of transistors are connected to the first end of the second shunt unit 220. The second electrodes of the plurality of transistors are connected to the first end a of the voltage regulating unit 230. The processing unit 240 has a plurality of output terminals, and the plurality of output terminals of the processing unit 240 are connected to the control electrodes of the plurality of transistors one by one to control the on and off of each transistor in the plurality of transistors. The processing unit 240 is further used to determine the target ratio according to the number of transistors in the on state in the plurality of transistors.
进一步地,处理单元240还用于:根据第一电阻R1的电压调整多个晶体管中处于导通状态的晶体管的个数。也就是说,在这一实施例中,处理单元240可以根据第一电阻R1的电压调整第一分流单元210的多个晶体管中处于导通状态的晶体管的个数,从而调整第一分流单元210的电流与第二分流单元220的电流之比。具体来说,处理单元240内可以设有预设电压范围。处理单元240工作时用于:若第一电阻R1的电压大于预设电压范围的最大值,则增加第一分流单元210的多个晶体管中处于导通状态的晶体管的个数,从而使第一电阻R1的电压处于预设电压范围内。以及,若第一电阻R1的电压小于预设电压范围的最小值,则减少第一分流单元210的多个晶体管中处于导通状态的晶体管的个数,从而使第一电阻R1的电压处于预设电压范围内。如此,无论负载30的电流较大还是较小,都可以使第一电阻R1的电压保持在预设电压范围内,从而一方面可以保证电流检测精度,另一方面可以减小采样电阻带来的电能损耗。Further, the processing unit 240 is also used to: adjust the number of transistors in the on state among the multiple transistors according to the voltage of the first resistor R1. That is, in this embodiment, the processing unit 240 can adjust the number of transistors in the on state among the multiple transistors of the first shunt unit 210 according to the voltage of the first resistor R1, thereby adjusting the ratio of the current of the first shunt unit 210 to the current of the second shunt unit 220. Specifically, a preset voltage range can be provided in the processing unit 240. When the processing unit 240 is working, it is used to: if the voltage of the first resistor R1 is greater than the maximum value of the preset voltage range, increase the number of transistors in the on state among the multiple transistors of the first shunt unit 210, so that the voltage of the first resistor R1 is within the preset voltage range. And, if the voltage of the first resistor R1 is less than the minimum value of the preset voltage range, reduce the number of transistors in the on state among the multiple transistors of the first shunt unit 210, so that the voltage of the first resistor R1 is within the preset voltage range. In this way, no matter the current of the load 30 is large or small, the voltage of the first resistor R1 can be kept within the preset voltage range, thereby ensuring the current detection accuracy on the one hand and reducing the power loss caused by the sampling resistor on the other hand.
在一些具体的实施例中,第一分流单元210中多个晶体管中的每个晶体管的沟道宽度与沟道长度之比均相等。In some specific embodiments, the ratio of the channel width to the channel length of each transistor in the plurality of transistors in the first current splitting unit 210 is equal.
在一些实施例中,第二分流单元220包括第一晶体管T1。第一晶体管T1的第一极与第一分流单元210的第一端连接,第一晶体管T1的第二极与电压调节单元230的第二端b连接。电流检测电路20工作时,第一晶体管T1导通。In some embodiments, the second shunt unit 220 includes a first transistor T1. A first electrode of the first transistor T1 is connected to a first end of the first shunt unit 210, and a second electrode of the first transistor T1 is connected to a second end b of the voltage regulating unit 230. When the current detection circuit 20 is working, the first transistor T1 is turned on.
在一些实施例中,电压调节单元230包括:运算放大器A1和开关晶体管T0。运算放大器A1的第一输入端与第一分流单元210的第二端连接,运算放大器A1的第二输入端与第二分流单元220的第二端及第一电阻R1的第一端连接,运算放大器A1的输出端与开关晶体管T0的控制极连接。第一电阻R1的第二端与开关晶体管T0的第一极连接,开关晶体管T0的第二极用于与第二电压端V2连接。In some embodiments, the voltage regulating unit 230 includes: an operational amplifier A1 and a switch transistor T0. The first input terminal of the operational amplifier A1 is connected to the second terminal of the first shunt unit 210, the second input terminal of the operational amplifier A1 is connected to the second terminal of the second shunt unit 220 and the first terminal of the first resistor R1, and the output terminal of the operational amplifier A1 is connected to the control electrode of the switch transistor T0. The second terminal of the first resistor R1 is connected to the first electrode of the switch transistor T0, and the second electrode of the switch transistor T0 is used to be connected to the second voltage terminal V2.
下面从三种可能的实现方式,对本申请提供的电流检测电路20进行解释说明。The current detection circuit 20 provided in the present application is explained below from three possible implementation modes.
在第一种可能的实现方式中,第一分流单元210的第一端用于与第一电压端V1连接,第一分流单元210的第二端用于与负载30的第一端连接,负载30的第二端与第二电压端V2连接。第一电阻R1的第一端与第二分流单元220的第二端连接,第一电阻R1的第二端用于与负载30的第二端连接。这种情况下,第二电流通路不包括负载30,即第二分流单元220与负载30并联。此时,处理单元240用于:根据第一电阻R1的电压和第一电阻R1的阻值确定第一电阻R1的电流;将第一电阻R1的电流与目标比值相乘,得到负载30的电流。In a first possible implementation, the first end of the first shunt unit 210 is used to connect to the first voltage terminal V1, the second end of the first shunt unit 210 is used to connect to the first end of the load 30, and the second end of the load 30 is connected to the second voltage terminal V2. The first end of the first resistor R1 is connected to the second end of the second shunt unit 220, and the second end of the first resistor R1 is used to connect to the second end of the load 30. In this case, the second current path does not include the load 30, that is, the second shunt unit 220 is connected in parallel with the load 30. At this time, the processing unit 240 is used to: determine the current of the first resistor R1 according to the voltage of the first resistor R1 and the resistance value of the first resistor R1; multiply the current of the first resistor R1 by the target ratio to obtain the current of the load 30.
在第二种可能的实现方式中,第一分流单元210的第一端用于与第一电压端V1连接,第一分流单元210的第二端用于与负载30的第一端连接,负载30的第二端与第二电压端V2连接。第一电阻R1的第一端与第二分流单元220的第二端连接,第一电阻R1的第二端用于与负载30的第一端连接。这种情况下,第二电流通路包括负载30,即第二分流单元220与负载30串联。此时,处理单元240用于:根据第一电阻R1的电压和第一电阻R1的阻值确定第一电阻R1的电流。将第一电阻R1的电流与K+1的乘积确定为负载30的电流,K为目标比值。In a second possible implementation, the first end of the first shunt unit 210 is used to connect to the first voltage terminal V1, the second end of the first shunt unit 210 is used to connect to the first end of the load 30, and the second end of the load 30 is connected to the second voltage terminal V2. The first end of the first resistor R1 is connected to the second end of the second shunt unit 220, and the second end of the first resistor R1 is used to connect to the first end of the load 30. In this case, the second current path includes the load 30, that is, the second shunt unit 220 is connected in series with the load 30. At this time, the processing unit 240 is used to: determine the current of the first resistor R1 according to the voltage of the first resistor R1 and the resistance value of the first resistor R1. The product of the current of the first resistor R1 and K+1 is determined as the current of the load 30, and K is the target ratio.
在第三种可能的实现方式中,电流检测电路20还包括:第二电阻R2。负载30的第一端用于与第一电压端V1连接,第一分流单元210的第一端用于与负载30的第二端连接,第一分流单元210的第二端与第二电阻R2的第一端连接,第二电阻R2的第二端用于与第二电压端V2连接。第一电阻R1的第一端与第二分流单元220的第二端连接,第一电阻R1的第二端与第二电阻R2的第二端连接。这种情况下,第二电流通路包括负载30,即第二分流单元220与负载30串联。此时,处理单元240用于:根据第一电阻R1的电压以及第一电阻R1的阻值确定第一电阻R1的电流。将第一电阻R1的电流与K+1的乘积确定为负载30的电流,K为目标比值。In a third possible implementation, the current detection circuit 20 further includes: a second resistor R2. The first end of the load 30 is used to be connected to the first voltage terminal V1, the first end of the first shunt unit 210 is used to be connected to the second end of the load 30, the second end of the first shunt unit 210 is connected to the first end of the second resistor R2, and the second end of the second resistor R2 is used to be connected to the second voltage terminal V2. The first end of the first resistor R1 is connected to the second end of the second shunt unit 220, and the second end of the first resistor R1 is connected to the second end of the second resistor R2. In this case, the second current path includes the load 30, that is, the second shunt unit 220 is connected in series with the load 30. At this time, the processing unit 240 is used to: determine the current of the first resistor R1 according to the voltage of the first resistor R1 and the resistance value of the first resistor R1. The product of the current of the first resistor R1 and K+1 is determined as the current of the load 30, and K is the target ratio.
本申请实施例还提供一种电子设备,包括负载30和如上述任意一个实施例中的电流检测电路20或电流检测器。An embodiment of the present application further provides an electronic device, including a load 30 and a current detection circuit 20 or a current detector as in any one of the above embodiments.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310076679.1A CN118330297A (en) | 2023-01-12 | 2023-01-12 | Current detection circuit, current detector and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310076679.1A CN118330297A (en) | 2023-01-12 | 2023-01-12 | Current detection circuit, current detector and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118330297A true CN118330297A (en) | 2024-07-12 |
Family
ID=91780823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310076679.1A Pending CN118330297A (en) | 2023-01-12 | 2023-01-12 | Current detection circuit, current detector and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118330297A (en) |
-
2023
- 2023-01-12 CN CN202310076679.1A patent/CN118330297A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20140111173A1 (en) | Low drop-out regulator | |
US9608617B2 (en) | Short circuit protection circuit, semiconductor device and electronic machine | |
TWI548184B (en) | Protection device and method for electronic device | |
US10505361B2 (en) | Integrated circuit with reverse current protection and power source disconnection detection | |
US11041890B2 (en) | Current measurement at a switching amplifier output | |
CN104283407B (en) | Impedor with hyposensitivity is changed to supply of electric power | |
JP2019004556A (en) | Current control circuit, and power supply management circuit employing the same | |
CN118330297A (en) | Current detection circuit, current detector and electronic device | |
US10879862B2 (en) | Transmitter power detection method | |
CN210123935U (en) | Power switch circuit | |
US9059703B2 (en) | Switch circuit | |
CN107147284A (en) | A kind of protection circuit and electric power system | |
CN112444664A (en) | Overcurrent detector for multi-channel potential converter module | |
TWI721348B (en) | Apparatus and method and system for controlling a switch | |
US7906955B2 (en) | On-chip current sensing methods and systems | |
CN113671859B (en) | The control circuit of the power switch | |
CN115754441A (en) | Overcurrent detection circuit, overcurrent detection method, overcurrent protection circuit and chip | |
JP2018500826A (en) | Differential comparator | |
KR101319827B1 (en) | Current limit apparatus | |
TWI644495B (en) | Input protection circuit | |
CN112491003A (en) | Overcurrent control circuit and power supply manager | |
US20240039525A1 (en) | Power limiting circuits | |
US11824527B2 (en) | Electric circuitry for signal transmission | |
TWI796241B (en) | State detection circuit for detecting tri-state and state detection method thereof | |
CN108493912A (en) | A kind of current foldback circuit and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information |
Country or region after: China Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Applicant after: Honor Terminal Co.,Ltd. Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Applicant before: Honor Device Co.,Ltd. Country or region before: China |
|
CB02 | Change of applicant information |