WO2018081918A1 - Switching power supply circuit and switching power supply current detection method - Google Patents

Switching power supply circuit and switching power supply current detection method Download PDF

Info

Publication number
WO2018081918A1
WO2018081918A1 PCT/CN2016/104211 CN2016104211W WO2018081918A1 WO 2018081918 A1 WO2018081918 A1 WO 2018081918A1 CN 2016104211 W CN2016104211 W CN 2016104211W WO 2018081918 A1 WO2018081918 A1 WO 2018081918A1
Authority
WO
WIPO (PCT)
Prior art keywords
circuit
load
power supply
current value
switching power
Prior art date
Application number
PCT/CN2016/104211
Other languages
French (fr)
Chinese (zh)
Inventor
朱笠
代仁军
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201680078411.XA priority Critical patent/CN108475982B/en
Priority to PCT/CN2016/104211 priority patent/WO2018081918A1/en
Publication of WO2018081918A1 publication Critical patent/WO2018081918A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02MAPPARATUS FOR CONVERSION BETWEEN AC AND AC, BETWEEN AC AND DC, OR BETWEEN DC AND DC, AND FOR USE WITH MAINS OR SIMILAR POWER SUPPLY SYSTEMS; CONVERSION OF DC OR AC INPUT POWER INTO SURGE OUTPUT POWER; CONTROL OR REGULATION THEREOF
    • H02M1/00Details of apparatus for conversion
    • H02M1/08Circuits specially adapted for the generation of control voltages for semiconductor devices incorporated in static converters

Definitions

  • the invention relates to the field of electronics, and in particular to a switching power supply circuit and a switching power supply current detecting method.
  • Power consumption is a very important indicator for smart phones. Due to the high power conversion efficiency of switching power supply circuits, it has been widely used in power management circuits of smart phones. In actual use, the user expects to accurately obtain the current consumption of each switching power supply load, and provide data support for system power management.
  • the detection of the switching power supply current is generally performed by measuring the conduction voltage drop of the switching tubes of the respective switching power supplies, and calculating the current consumption of the switching power supply load according to the conduction impedance of the switching tubes.
  • the embodiment of the invention provides a switching power supply circuit and a switching power supply current detecting method, which can reduce the detection error and improve the accuracy of the current detection.
  • the first aspect of the present invention provides a switching power supply circuit including: a switching power supply control circuit, a load switching circuit, and a load current detecting circuit; the load switching circuit includes a target load; and the switching power supply control circuit Including the power load;
  • the switching power supply control circuit is connected to the load switching circuit; the load current detecting circuit is connected to the load switching circuit;
  • the load switching circuit is used to integrate the target load into the power load
  • the load current detecting circuit is configured to detect a voltage value corresponding to the target load
  • the switching power supply control circuit is configured to detect the first detection current value and the second detection current value, and the first detection current value is a current value corresponding to the switching power supply circuit when the power load is in a sleep state and the target load is in a high resistance state, and the second detection current is The value is a current value corresponding to the switching power supply circuit when the power load is in a sleep state and the current value corresponding to the target load is equal to the target current value;
  • the switching power supply control circuit is further configured to calculate a current value corresponding to the target load according to the voltage value corresponding to the target load, and adjust the current value corresponding to the target load to the target current value;
  • the switching power supply control circuit is further configured to determine a difference between the second detected current value and the first detected current value as a detected value corresponding to the target current value.
  • the power load refers to the load in the original switching power supply circuit
  • the target load is a high-precision load in the newly added load switching circuit, and the target load is connected in parallel with the power load.
  • Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, a load switching circuit, and a load current detecting circuit, wherein the load switching circuit includes a target load, and the switching power supply control circuit includes a power load, a load switching circuit connection, and a switching power supply.
  • the control circuit and the load current detecting circuit are connected, the load switching circuit combines the target load into the power load, the load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and The current value is adjusted to the target current value, and the recorded first detection current value and the second detection current value, that is, the current value corresponding to the switching power supply circuit and the current corresponding to the target load when the power load is in the sleep state and the target load is in the high resistance state
  • the current value corresponding to the switching power supply circuit the difference between the two is used as the detection value corresponding to the target current value.
  • the embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit
  • the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
  • the load switching circuit further includes a digital-to-analog converter DAC, an NMOS transistor, and a serial peripheral interface SPI;
  • the switching power supply control circuit and the load current detecting circuit are connected to the load switching circuit through the SPI;
  • One end of the DAC is connected to the SPI, the other end of the DAC is connected to the gate of the NMOS transistor, the drain of the NMOS transistor is connected to the target load, and the source of the NMOS transistor is grounded;
  • the switching power supply control circuit is also used to control the output voltage of the DAC, the output voltage is used to control the gate voltage of the NMOS transistor, the gate voltage is used to adjust the on-resistance of the NMOS transistor, and the on-resistance is used to adjust the current of the target load. value.
  • the embodiment of the invention provides a specific composition of the load switching circuit, which improves the achievability of the solution.
  • the load switching circuit further includes a sustain level resistor, and the level resistor is used for the NMOS.
  • the transistor maintains a fixed level, one end of the level resistor is maintained connected to the gate of the NMOS transistor, and the other end of the level resistor is grounded.
  • Embodiments of the present invention provide a manner of maintaining a fixed level of an NMPS transistor in a load switching circuit, which improves the achievability of the solution.
  • the load current detecting circuit includes: a differential amplifying circuit, a first inverse proportional amplifying circuit, a gain adjusting circuit, and voltage following a circuit, a second inverse proportional amplification circuit, and an analog to digital converter ADC;
  • the input end of the differential amplifying circuit is connected to the target load, and the output end of the differential amplifying circuit is connected to the first inverse proportional amplifying circuit and the gain adjusting circuit;
  • the voltage follower circuit is connected to the first inverse proportional amplification circuit and the second reverse proportional amplification circuit;
  • the amplification ratio corresponding to the differential amplification circuit is 1:1; the amplification ratio corresponding to the second direction proportional amplification circuit is 1:1;
  • the first inverse proportional amplification circuit is configured to amplify the first output voltage of the differential amplification circuit, and the amplification ratio corresponding to the first inverse proportional amplification circuit is a target value;
  • a voltage follower circuit for buffering the first output voltage
  • the ADC is used for sampling the output voltage of the second inverse proportional amplification circuit and the output voltage of the gain adjustment circuit, and the output voltage of the second inverse proportional amplification circuit is used for determining the voltage value corresponding to the target load, and the output of the gain adjustment circuit
  • the terminal voltage is the adjustment factor of the target value.
  • the load current detecting circuit in the embodiment of the invention processes the voltage of the target load through a plurality of amplifying circuits, thereby reducing the influence of noise, temperature and the like on the voltage detection, and improving the detection precision.
  • the differential amplifying circuit includes a first operational amplifier A 1 a second operational amplifier A 2 , a first resistor R 1 , a second resistor R 2 , a third resistor R 3 , a fourth resistor R 4 , a fifth resistor R 5 , and a PMOS transistor T 2 ;
  • the gain adjustment circuit includes a third operational amplifier A 3 , R 5 and T 2 ;
  • the voltage follower circuit includes a fourth operational amplifier A 4 ;
  • the second inverse proportional amplification circuit includes a fifth operational amplifier A 5 , a sixth resistor R 6 , a seventh resistor R 7 and an eighth resistor R 8 ;
  • the inverting terminal of the reference voltage of A 3 A 3 positive input end the output terminal of A 1, A 3 output termination gate of T 2, a drain contact between the T 3 R 2 and R 4 the intermediate node, T 2 source electrode connected to one end of R 5, R 5 other end of the terminal;
  • a 4 forward input end of the output terminal of A 2, A 4, an inverting input end of the output terminal A 4;
  • One end of the ADC is connected to the output of A 5 and the output of A 3 , and the other end of the ADC is connected to the load switching circuit.
  • Embodiments of the present invention provide a specific structure of a load current detecting circuit, which improves the achievability of the solution.
  • the accuracy of R 1 to R 8 is one percent.
  • the accuracy of the target load is one percent.
  • the resistance of the target load is 0.5 ohm.
  • a second aspect of the embodiments of the present invention provides a power supply current detecting method, the method comprising:
  • the switching power supply circuit first determines the current value to be calibrated, that is, the target current value.
  • the switching power supply circuit sets the target load to a high-impedance state, and sets the power load to a sleep state, and records the current value corresponding to the switching power supply circuit at this time, that is, the first current value.
  • the switching power supply circuit sets the target load to the working state, and detects the voltage value corresponding to the target load at this time, and calculates the current value corresponding to the target load according to the voltage value.
  • the switching power supply circuit adjusts the current value corresponding to the target load to the target current value; when the current value corresponding to the target load is equal to the target current value, the switching power supply circuit records the detection at this time.
  • the current value corresponding to the switching power supply circuit that is, the second detected current value.
  • the switching power supply circuit compares the difference between the second detected current value and the first detected current value
  • the detection value corresponding to the target current value that is, when the switching power supply circuit detects the current value of the switching power supply circuit as the difference, the actual current value of the corresponding switching power supply circuit is the target value.
  • Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, a load switching circuit, and a load current detecting circuit, wherein the load switching circuit includes a target load, and the switching power supply control circuit includes a power load, a load switching circuit connection, and a switching power supply.
  • the control circuit and the load current detecting circuit are connected, the load switching circuit combines the target load into the power load, the load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and The current value is adjusted to the target current value, and the recorded first detection current value and the second detection current value, that is, the current value corresponding to the switching power supply circuit and the current corresponding to the target load when the power load is in the sleep state and the target load is in the high resistance state
  • the current value corresponding to the switching power supply circuit the difference between the two is used as the detection value corresponding to the target current value.
  • the embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit
  • the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
  • the switching power supply circuit determines that a difference between the second detected current value and the first detected current value is a target current value. After the value is detected, the switching power supply circuit sets the target load to a high-impedance state and sets the power load to the active state.
  • the target load can be set to a high-impedance state, which can avoid the influence on the switching power supply control circuit.
  • Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, a load switching circuit, and a load current detecting circuit, wherein the load switching circuit includes a target load, and the switching power supply control circuit includes a power load, a load switching circuit connection, and a switching power supply.
  • the control circuit and the load current detecting circuit are connected, the load switching circuit combines the target load into the power load, the load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and The current value is adjusted to the target current value, and the recorded first detection current value and the second detection current value, that is, the power load is in a sleep state and the target load is in a high resistance state, the switching power supply circuit corresponds to The current value corresponding to the target load and the current value corresponding to the target current value are equal to the current value corresponding to the switching power supply circuit, and the difference between the two is used as the detection value corresponding to the target current value.
  • the embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit
  • the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
  • FIG. 1 is a schematic diagram of an embodiment of a switching power supply circuit in an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an embodiment of a load switching circuit in a switching power supply circuit according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an embodiment of a load current detecting circuit in a switching power supply circuit according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an embodiment of a method for detecting a switching power supply current in an embodiment of the present invention.
  • the switching power supply circuit in the embodiment of the present invention is based on the prior art switching power supply circuit, and the related functional circuit is added and the function of the original switching power supply circuit is adaptively improved.
  • the switching power supply circuit in the prior art is introduced below.
  • the switching power supply circuit is roughly composed of a main circuit, a control circuit, a detection circuit, and an auxiliary power supply.
  • Inrush current limiting Limits the inrush current on the input side of the power supply.
  • Input filter Its function is to filter the clutter in the grid and to prevent the clutter generated by the machine from feeding back to the grid.
  • Rectification and filtering directly rectify the grid AC power to a smoother DC.
  • Inverter The rectified DC power is changed to high frequency AC, which is the core part of the high frequency switching power supply.
  • Output rectification and filtering Provides a stable and reliable DC power supply according to the load requirements.
  • the circuit is identified by the protection circuit.
  • the control circuit performs various protection measures on the power supply.
  • an embodiment of the present invention provides a switching power supply circuit and a switching power supply current detecting method, which can reduce detection errors and improve current detection accuracy.
  • a switching power supply circuit in an embodiment of the present invention, a switching power supply circuit 100, a switching power supply control circuit 101, a load switching circuit 102, and a load current detecting circuit 103;
  • the load switching circuit 102 includes a target load;
  • the switching power supply control circuit 101 includes a power load;
  • the switching power supply control circuit 101 is connected to the load switching circuit 102, and the load current detecting circuit 103 is connected to the load switching circuit 102;
  • the load switching circuit 102 is configured to integrate the target load into the power load
  • the load current detecting circuit 103 is configured to detect a voltage value corresponding to the target load
  • the switching power supply control circuit 101 is configured to detect a first detection current value and a second detection current value, wherein the first detection current value is a current corresponding to the switching power supply circuit 100 when the power supply load 1011 is in a sleep state and the target load is in a high resistance state. a value, the second detection current value is a current value corresponding to the switching power supply circuit 100 when the power load 1011 is in a sleep state and the current value corresponding to the target load is equal to the target current value;
  • the switching power supply control circuit 101 is further configured to calculate a current value corresponding to the target load according to the voltage value corresponding to the target load, and adjust a current value corresponding to the target load to the target current value;
  • the switching power supply control circuit 101 is further configured to determine a difference between the second detected current value and the first detected current value as a detected value corresponding to the target current value.
  • the switching power supply control circuit 101 first sets the power supply load 1011 to a sleep state, adjusts the target load to a high resistance state, detects and records the current value corresponding to the power supply circuit 100 at this time, that is, the first detected current value, and then switches.
  • the power control circuit 101 adjusts the target load to be in a non-high impedance state, and at the same time, the switching power supply control circuit 101 controls the load current detecting circuit 103 to detect the voltage value corresponding to the target load, and then acquires the voltage value according to the voltage value and the target. Calculating the current value corresponding to the target load, and determining whether the current value is equal to the target current value.
  • the switching power supply control circuit 101 uses the difference between the second detected current value and the first detected current value as the detected value corresponding to the target current value, that is, when the switching power supply control circuit detects that the current value of the power supply circuit 100 is the second detection.
  • the actual current value of the corresponding power supply circuit 100 is the target current value.
  • the power load 1011 refers to the load in the original switching power supply circuit
  • the target load is the high-precision load in the newly added load switching circuit 102
  • the target load is connected in parallel with the power load 1011.
  • Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, and load cutting The circuit and the load current detecting circuit, wherein the load switching circuit comprises a target load, the switching power supply control circuit comprises a power load, the load switching circuit connection is connected with the switching power supply control circuit and the load current detecting circuit, and the load switching circuit integrates the target load into the power load
  • the load current detecting circuit detects the voltage value corresponding to the target load
  • the switching power supply control circuit calculates the current value according to the voltage value of the target load, and adjusts the current value to the target current value, and records the first detected current value and the second value.
  • the current value corresponding to the switching power supply circuit and the current value corresponding to the target load are equal to the target current value, and the current value corresponding to the switching power supply circuit is between The difference is used as the detection value corresponding to the target current value.
  • the embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit For reference, the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
  • the load switching circuit can be configured in various manners according to the embodiment corresponding to FIG. 1 .
  • the load switching circuit in the embodiment of the present invention is described below as an example. Referring to FIG. 2 , the load switching circuit in the embodiment of the present invention is described.
  • a schematic diagram of a structure of a load switching circuit 102 in the embodiment of the present invention includes: a target load R x , a digital to analog converter (DAC), and an N-type metal oxide semiconductor (N-Metal-Oxide-Semiconductor, NMOS) transistor T 1 and Serial Peripheral Interface (SPI);
  • DAC digital to analog converter
  • NMOS N-type metal oxide semiconductor
  • SPI Serial Peripheral Interface
  • the SPI is used to connect with the switching power supply control circuit and the load current detecting circuit
  • One end of the DAC is connected to the SPI, the other end is connected to the gate of the NMOS transistor, and the drain of the NMOS transistor is connected to the target load R x , and the source is connected to the ground end;
  • the switching power supply control circuit 101 also controls the output voltage of the DAC, the output terminal voltage for controlling the gate voltage of NMOS transistor T 1, ie, It is used to adjust the on-resistance of the NMOS transistor T 1 for adjusting the current value of the target load R x . That is to say, the switching power supply control circuit 101 realizes the adjustment of the current value of the target load by controlling the output voltage of the DAC.
  • the NMOS transistor T 1 when the output voltage of the DAC is 0 volts, the NMOS transistor T 1 is turned off, the target load R x has no current flowing, that is, the corresponding current value is 0; when the output voltage of the DAC is greater than the turn-on voltage of the NMOS transistor T 1 The NMOS transistor T 1 is saturated and turned on, and the on-resistance is less than 20 milliohms. At this time, the current flowing through the target load R x is determined by the resistance of the target load; when the voltage output from the DAC is between 0 volts and the turn-on voltage, The on-resistance of the NMOS transistor T 1 varies from 20 milliohms to several hundred kilo ohms.
  • the load may further comprise the switching circuit 102 maintains the level of the resistor R 0, maintains the level of the resistor R 0. 1 to maintain a fixed level for the NMOS transistor T, which maintains the level of the resistor R 0 is connected to one end of the NMOS transistor T The gate of 1 is connected to the ground at the other end.
  • the resistance of the target load may be 0.5 ohms or other resistance values, which is not limited herein.
  • the target load is a high-precision load, and the accuracy may be 1%, or It is another value, and is not limited here.
  • the resistance of the level resistor can be 47K ohms, and can also be other resistance values, which is not limited herein.
  • the embodiment of the invention provides a specific structure of a load switching circuit, which improves the achievability of the solution.
  • the load current detecting circuit can have various structures.
  • the load current detecting circuit in the embodiment of the present invention is described below as an example. Referring to FIG. 3, one of the load current detecting circuits is shown.
  • Schematic diagram of the structure, the load current detecting circuit 103 in the embodiment of the present invention includes: a differential amplifying circuit 1031, a first inverse proportional amplifying circuit 1032, a gain adjusting circuit 1033, a voltage following circuit 1034, a second inverse proportional amplifying circuit 1035, and a modulus Converter (Analog-to-Digital Converter, ADC);
  • ADC Analog-to-Digital Converter
  • the input end of the differential amplifying circuit 1031 is connected to the target load R x , and the output end of the differential amplifying circuit is connected to the first inverse proportional amplifying circuit 1032 and the gain adjusting circuit 1033 ;
  • the voltage follower circuit 1034 is connected to the first inverse proportional amplification circuit 1032 and the second inverse proportional amplification circuit 1035;
  • the amplification ratios of the differential amplifying circuit 1031 and the second inverse proportional amplifying circuit 1035 are both 1:1, which are used to reduce the influence of temperature, noise and the like on the circuit.
  • the first inverse proportional amplifying circuit 1032 is configured to amplify the first output voltage of the differential amplifying circuit 1031, and the corresponding scaling ratio of the first inverse proportional amplifying circuit 1032 is a target value;
  • Voltage follower circuit 1034 is configured to buffer the first output voltage
  • the gain adjustment circuit 1033 is configured to adjust the target value
  • the ADC is used to sample the output voltage of the second inverse proportional amplification circuit 1035 and the output voltage of the gain adjustment circuit 1033, wherein the output voltage of the second inverse proportional amplification circuit 1035 is used to determine the voltage corresponding to the target load R x .
  • the value, the output voltage of the gain adjustment circuit 1033 is used as an adjustment factor of the target value.
  • the differential amplifying circuit 1031 includes a first operational amplifier A 1
  • the first inverse proportional amplifying circuit includes 1032 including a second operational amplifier A 2 , a first resistor R 1 , a second resistor R 2 , and a third resistor R 3 .
  • a fourth resistor R 4 a fifth resistor R 5 and a P-channel transistor O 2 transistor
  • the gain adjustment circuit 1033 includes third operational amplifiers A 3 , R 5 and T 2
  • the voltage follower circuit 1034 includes a fourth operational amplifier A 4
  • the second inverse proportional amplification 1035 circuit includes a fifth operational amplifier A 5 , a sixth resistor R 6 , a seventh resistor R 7 and an eighth resistor R 8 ;
  • the inverting terminal of the reference voltage of A 3 A 3 positive input end the output terminal of A 1, A 3 output termination gate of T 2, a drain contact between the T 3 R 2 and R 4 the intermediate node, T 2 source electrode connected to one end of R 5, R 5 other end of the terminal;
  • a 4 forward input end of the output terminal of A 2, A 4, an inverting input end of the output terminal A 4;
  • One end of the ADC is connected to the output of A 5 and the output of A 3 , and the other end of the ADC is connected to the load switching circuit.
  • the amplification ratio corresponding to the first inverse proportional amplification circuit 1032 is a target value.
  • R T2 is the impedance of T 2 .
  • V 1 ⁇ V ref V 3 is high level and T 2 is off
  • the target value is When V 1 ⁇ V ref , when V 3 is low level, T 2 is saturated and turned on. Since the impedance is on the order of milli ohms when T 2 saturation is turned on, the target value is V 1 is the output voltage of A 1 , V 3 is the input voltage of A 3 , and V ref is the reference voltage.
  • R 1 to R 8 are high-precision resistors, and the corresponding precision may be 1% or other values, which is not limited herein.
  • the resistance value of R 1 to R 8 is generally on the order of K ohms, and is specifically set according to its action in the circuit, which is not limited herein.
  • the above structural composition is only one example, and the differential amplifying circuit 1031, the first inverse proportional amplifying circuit 1032, the gain adjusting circuit 1033, the voltage following circuit 1034, and the second inverse proportional amplifying circuit 1035 may also be combined by other components.
  • the composition is not limited herein.
  • the detection accuracy of the load current detecting circuit 103 in the embodiment of the present invention is determined by the parameters of the ADC, the resistance values of R 1 to R 8 , and the resistance of R x .
  • the detection accuracy of the load current detecting circuit 103 in the embodiment of the present invention is described below with a specific example:
  • R 2 20Kohm
  • R 5 1.25Kohm
  • V ref 50mV
  • ADC bit width 12 bits accuracy 1/4096, input range 0 to 0 in the flow detection circuit 103 4.2V with a resolution of 1.02mV.
  • the target load R x 0.5 ohm
  • the power supply load is in the range of 1A to 1 mA
  • the output voltage of the switching power supply circuit to be detected is 1.0V.
  • the output voltage of A 5 which is obtained by sampling by the ADC, is the voltage value corresponding to R x , and the resolution of the ADC is 1.02 mV, that is, the current accuracy that can be detected is 2.04. mA.
  • the output voltage of A 5 obtained by sampling the ADC is five times the voltage value corresponding to R x , and the resolution of the ADC is 1.02 mV, that is, the current accuracy that can be detected is 0.41 mA. .
  • the output voltage of the switching power supply circuit is 1.0 V, so the maximum detectable current is 2 A, that is, in the range of 100 mA and 2 A, the current detection accuracy is 2.04 mA, which is about 2%.
  • the current detection accuracy is 0.41 mA in the range of 0 to 100 mA.
  • the embodiments of the present invention provide several high-precision load current detecting circuits, which improve the achievability of the solution.
  • an embodiment of the switching power supply current detecting method in the embodiment of the present invention includes:
  • the switching power supply circuit determines a target current value.
  • the switching power supply circuit is composed of a switching power supply control circuit, a load switching circuit and a load current detecting circuit.
  • the switching power supply control circuit first determines the current to be calibrated. Value, the target current value.
  • the switching power supply circuit sets the target load to a high resistance state, sets the power load to a sleep state, and records a first detection current value corresponding to the switching power supply circuit;
  • the switching power supply control circuit After determining the target current value, the switching power supply control circuit adjusts the target load in the load switching circuit to a high-impedance state, and at the same time, sets the power load in the switching power supply control circuit to a sleep state, and detects and records the detected switching power supply circuit at this time.
  • the corresponding current value that is, the first detected current value.
  • the switching power supply circuit sets the target load to an operating state, and detects a voltage value corresponding to the target load.
  • the switching power supply control circuit adjusts the target load in the load switching circuit to a non-high resistance state, that is, sets it to an operating state.
  • the switching power supply control circuit controls the load current detecting circuit to detect the voltage value corresponding to the target load.
  • the load current detecting circuit is a high-precision detecting circuit, and the detected voltage value has high precision, and the specific precision value is related to its circuit composition.
  • the switching power supply circuit calculates a current value corresponding to the target load according to the voltage value.
  • the switching power supply control circuit obtains the voltage value detected by the load current detecting circuit, and calculates a current value corresponding to the target load according to the voltage value and the resistance value of the target load.
  • the switching power supply circuit determines whether the current value corresponding to the target load is equal to the target current value, if not, proceed to step 406, and if so, proceed to step 407;
  • the switching power supply circuit adjusts the current value corresponding to the target load to the target current value, and step 407;
  • the switching power supply control circuit adjusts the current value corresponding to the target load to the target current value.
  • the switching power supply control circuit can adjust the current value of the target load by adjusting the impedance of the target load, and can also be used in other manners, which is not limited herein.
  • the switching power supply circuit records a second detection current value corresponding to the switching power supply circuit
  • the switching power supply control circuit records the current value corresponding to the detected switching power supply circuit at this time, that is, the second detected current value.
  • the switching power supply circuit determines that a difference between the second detected current value and the first detected current value is a detected value corresponding to the target current value.
  • the switching power supply control circuit calculates a difference between the second detected current value and the first detected current value, and uses the difference as the detected value corresponding to the target current value, that is, when the switching power supply control circuit detects the current value of the power supply circuit When the difference is made, the actual current value of the corresponding power supply circuit is the target current value.
  • the switching power supply circuit determines that the difference between the second detection current value and the first detection current value is a detection value corresponding to the target current value, that is, after the calibration of the target current value is completed, the target load may be set to a high resistance state.
  • the power load is set to the working state. Since the target load is in parallel with the power load and the target load can be in a high-impedance state after the calibration is completed, the normal operation of the power load is not affected.
  • the switching current supply circuit can continue to calibrate the next current value, and can perform other operations, which is not limited herein.
  • Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, a load switching circuit, and a load current detecting circuit, wherein the load switching circuit includes a target load, and the switching power supply control circuit includes a power load, a load switching circuit connection, and a switching power supply.
  • the control circuit and the load current detecting circuit are connected, the load switching circuit combines the target load into the power load, the load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and The current value is adjusted to the target current value, and the recorded first detection current value and the second detection current value, that is, the power load is in a sleep state and the target load is in a high resistance state, the switching power supply circuit corresponds to The current value corresponding to the target load and the current value corresponding to the target current value are equal to the current value corresponding to the switching power supply circuit, and the difference between the two is used as the detection value corresponding to the target current value.
  • the embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit
  • the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
  • the output voltage of the switching power supply circuit to be detected is 1.0V
  • the maximum load current of the power supply is 2A
  • the target load resistance is 0.5 ohm
  • 500mA is the current to be calibrated.
  • the switching power supply control circuit sets the target load to the working state, and controls the load current detecting circuit to detect the voltage value corresponding to the target load, and calculates the current value of the target load according to the voltage value and the resistance value of the target load, if the current value is not equal to 500 mA , the impedance of the target load is adjusted until the current value corresponding to the target load is 500 mA. Since the 500 mA is the current calibrated by the ADC in the load current detecting circuit, the switching power supply control circuit records the current data of the switching power supply circuit detected at this time 510 mA.
  • this data is the calibrated 500mA load data, and the subsequent application uses this data as the standard for 500mA current detection. After the test is finished, let the load switching circuit enter a high-impedance state, which will not affect the switching power supply control circuit.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling or communication connection may be an indirect coupling or communication connection through some interface, device or unit, and may be in electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (English full name: Read-Only Memory, English abbreviation: ROM), a random access memory (English full name: Random Access Memory, English abbreviation: RAM), magnetic A variety of media that can store program code, such as a disc or a disc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Dc-Dc Converters (AREA)
  • Control Of Voltage And Current In General (AREA)

Abstract

A switching power supply circuit (100). The switching power supply circuit (100) comprises: a switching power supply control circuit (101), a load switching circuit (102) and a load current detection circuit (103), wherein the load switching circuit (102) comprises a target load; the switching power supply control circuit (101) comprises a power supply load; the switching power supply control circuit (101) is connected to the load switching circuit (102); the load current detection circuit (103) is connected to the load switching circuit (102); the load switching circuit (102) is used to incorporate the target load into the power supply load; the load current detection circuit (103) is used to detect a voltage value corresponding to the target load ; the switching power supply control circuit (101) is used to detect a first detection current value and a second detection current value; the switching power supply control circuit (101) is further used to calculate a current value corresponding to the target load according to the voltage value corresponding to the target load, and adjust the current value corresponding to the target load to a target current value; and the switching power supply control circuit (101) is further used to determine that a difference value between the second detection current value and the first detection current value is a detection value corresponding to the target current value.

Description

一种开关电源电路及开关电源电流检测方法Switching power supply circuit and switching power supply current detecting method 技术领域Technical field
本发明涉及电子领域,尤其涉及一种开关电源电路及开关电源电流检测方法。The invention relates to the field of electronics, and in particular to a switching power supply circuit and a switching power supply current detecting method.
背景技术Background technique
功耗对于智能手机而言是一个非常重要的指标,由于开关电源电路的电源转换效率高,在智能手机的电源管理电路中得到了广泛应用。在实际的使用过程中,用户期望精确获得各个开关电源负载的耗流,为系统电源管理提供数据支持。Power consumption is a very important indicator for smart phones. Due to the high power conversion efficiency of switching power supply circuits, it has been widely used in power management circuits of smart phones. In actual use, the user expects to accurately obtain the current consumption of each switching power supply load, and provide data support for system power management.
现有技术对开关电源电流的检测一般通过测量各个开关电源的开关管的导通压降,根据开关管的导通阻抗,计算得到开关电源负载的耗流。In the prior art, the detection of the switching power supply current is generally performed by measuring the conduction voltage drop of the switching tubes of the respective switching power supplies, and calculating the current consumption of the switching power supply load according to the conduction impedance of the switching tubes.
由于开关管导通时其阻抗受到工作电压,温度因素的影响较大,因此这种方法的检测精度较差。Since the impedance of the switch is affected by the operating voltage and the temperature factor is large when the switch is turned on, the detection accuracy of this method is poor.
发明内容Summary of the invention
本发明实施例提供了一种开关电源电路及开关电源电流检测方法,可以减少检测误差,提升电流检测的精度。The embodiment of the invention provides a switching power supply circuit and a switching power supply current detecting method, which can reduce the detection error and improve the accuracy of the current detection.
有鉴于此,本发明实施例第一方面提供了一种开关电源电路,该开关电源电路包括:开关电源控制电路,负载切换电路以及负载电流检测电路;负载切换电路包括目标负载;开关电源控制电路包括电源负载;In view of this, the first aspect of the present invention provides a switching power supply circuit including: a switching power supply control circuit, a load switching circuit, and a load current detecting circuit; the load switching circuit includes a target load; and the switching power supply control circuit Including the power load;
开关电源控制电路与负载切换电路连接;负载电流检测电路与负载切换电路连接;The switching power supply control circuit is connected to the load switching circuit; the load current detecting circuit is connected to the load switching circuit;
负载切换电路用于将目标负载合入电源负载;The load switching circuit is used to integrate the target load into the power load;
负载电流检测电路用于检测目标负载对应的电压值;The load current detecting circuit is configured to detect a voltage value corresponding to the target load;
开关电源控制电路用于检测第一检测电流值及第二检测电流值,第一检测电流值为电源负载处于休眠状态且目标负载处于高阻状态时开关电源电路对应的电流值,第二检测电流值为电源负载处于休眠状态且目标负载对应的电流值等于目标电流值时开关电源电路对应的电流值;The switching power supply control circuit is configured to detect the first detection current value and the second detection current value, and the first detection current value is a current value corresponding to the switching power supply circuit when the power load is in a sleep state and the target load is in a high resistance state, and the second detection current is The value is a current value corresponding to the switching power supply circuit when the power load is in a sleep state and the current value corresponding to the target load is equal to the target current value;
开关电源控制电路还用于根据目标负载对应的电压值计算目标负载对应的电流值,并将目标负载对应的电流值调节至目标电流值; The switching power supply control circuit is further configured to calculate a current value corresponding to the target load according to the voltage value corresponding to the target load, and adjust the current value corresponding to the target load to the target current value;
开关电源控制电路还用于确定第二检测电流值与第一检测电流值的差值为目标电流值对应的检测值。The switching power supply control circuit is further configured to determine a difference between the second detected current value and the first detected current value as a detected value corresponding to the target current value.
需要说明的是,本发明实施例中电源负载指的是原开关电源电路中的负载,目标负载是新增的负载切换电路中的高精度负载,目标负载与电源负载并联。It should be noted that, in the embodiment of the present invention, the power load refers to the load in the original switching power supply circuit, and the target load is a high-precision load in the newly added load switching circuit, and the target load is connected in parallel with the power load.
本发明实施例提供了一种开关电源电路,包括开关电源控制电路,负载切换电路以及负载电流检测电路,其中负载切换电路包括目标负载,开关电源控制电路包括电源负载,负载切换电路连接与开关电源控制电路及负载电流检测电路连接,负载切换电路将目标负载合入电源负载,负载电流检测电路检测目标负载对应的电压值,开关电源控制电路根据目标负载的电压值计算其电流值,并将其电流值调节至目标电流值,将记录的第一检测电流值和第二检测电流值,即电源负载处于休眠状态且目标负载处于高阻状态时开关电源电路对应的电流值和目标负载对应的电流值等于目标电流值时开关电源电路对应的电流值,这两者之间的差值作为目标电流值对应的检测值。本发明实施例在原有开关电源电路的基础上,合入了高精度的目标负载,将高精度的目标负载代替原有电源负载,增加了高精度的负载电流检测电路,将该电路检测的数据作为参考,对原有开关电源电路检测的数据进行校准,以减少检测误差,提升电流检测的精度。Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, a load switching circuit, and a load current detecting circuit, wherein the load switching circuit includes a target load, and the switching power supply control circuit includes a power load, a load switching circuit connection, and a switching power supply. The control circuit and the load current detecting circuit are connected, the load switching circuit combines the target load into the power load, the load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and The current value is adjusted to the target current value, and the recorded first detection current value and the second detection current value, that is, the current value corresponding to the switching power supply circuit and the current corresponding to the target load when the power load is in the sleep state and the target load is in the high resistance state When the value is equal to the target current value, the current value corresponding to the switching power supply circuit, the difference between the two is used as the detection value corresponding to the target current value. The embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit For reference, the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
结合本发明实施例的第一方面,在本发明实施例第一方面的第一种实现方式中,负载切换电路还包括数字模拟转换器DAC、NMOS晶体管及串行外设接口SPI;With reference to the first aspect of the embodiments of the present invention, in a first implementation manner of the first aspect of the embodiments, the load switching circuit further includes a digital-to-analog converter DAC, an NMOS transistor, and a serial peripheral interface SPI;
开关电源控制电路与负载电流检测电路通过SPI与负载切换电路连接;The switching power supply control circuit and the load current detecting circuit are connected to the load switching circuit through the SPI;
DAC的一端接SPI,DAC的另一端接NMOS晶体管的栅极,NMOS晶体管的漏极接目标负载,NMOS晶体管的源极接地端;One end of the DAC is connected to the SPI, the other end of the DAC is connected to the gate of the NMOS transistor, the drain of the NMOS transistor is connected to the target load, and the source of the NMOS transistor is grounded;
开关电源控制电路还用于控制DAC的输出端电压,输出端电压用于控制NMOS晶体管的栅极电压,栅极电压用于调节NMOS晶体管的导通阻抗,导通阻抗用于调节目标负载的电流值。The switching power supply control circuit is also used to control the output voltage of the DAC, the output voltage is used to control the gate voltage of the NMOS transistor, the gate voltage is used to adjust the on-resistance of the NMOS transistor, and the on-resistance is used to adjust the current of the target load. value.
本发明实施例提供了一种负载切换电路的具体组成,提高了方案的可实现性。 The embodiment of the invention provides a specific composition of the load switching circuit, which improves the achievability of the solution.
结合本发明实施例的第一方面的第一种实现方式,在本发明实施例第一方面的第二种实现方式中,负载切换电路还包括维持电平电阻,维持电平电阻用于给NMOS晶体管维持固定的电平,维持电平电阻的一端接NMOS晶体管的栅极,维持电平电阻的另一端接地端。In a second implementation manner of the first aspect of the embodiment of the present invention, the load switching circuit further includes a sustain level resistor, and the level resistor is used for the NMOS. The transistor maintains a fixed level, one end of the level resistor is maintained connected to the gate of the NMOS transistor, and the other end of the level resistor is grounded.
本发明实施例提供了一种维持负载切换电路中NMPS晶体管的固定电平的方式,提高了方案的可实现性。Embodiments of the present invention provide a manner of maintaining a fixed level of an NMPS transistor in a load switching circuit, which improves the achievability of the solution.
结合本发明实施例的第一方面,在本发明实施例第一方面的第三种实现方式中,负载电流检测电路包括:差分放大电路,第一反向比例放大电路,增益调节电路,电压跟随电路,第二反向比例放大电路以及模数转换器ADC;With reference to the first aspect of the embodiments of the present invention, in a third implementation manner of the first aspect of the embodiments, the load current detecting circuit includes: a differential amplifying circuit, a first inverse proportional amplifying circuit, a gain adjusting circuit, and voltage following a circuit, a second inverse proportional amplification circuit, and an analog to digital converter ADC;
差分放大电路的输入端与目标负载连接,差分放大电路的输出端与第一反向比例放大电路及增益调节电路连接;The input end of the differential amplifying circuit is connected to the target load, and the output end of the differential amplifying circuit is connected to the first inverse proportional amplifying circuit and the gain adjusting circuit;
电压跟随电路与第一反向比例放大电路及第二反向比例放大电路连接;The voltage follower circuit is connected to the first inverse proportional amplification circuit and the second reverse proportional amplification circuit;
差分放大电路对应的放大比例为1:1;第二方向比例放大电路对应的放大比例为1:1;The amplification ratio corresponding to the differential amplification circuit is 1:1; the amplification ratio corresponding to the second direction proportional amplification circuit is 1:1;
第一反向比例放大电路用于放大差分放大电路的第一输出电压,第一反向比例放大电路对应的放大比例为目标值;The first inverse proportional amplification circuit is configured to amplify the first output voltage of the differential amplification circuit, and the amplification ratio corresponding to the first inverse proportional amplification circuit is a target value;
电压跟随电路用于将第一输出电压进行缓冲;a voltage follower circuit for buffering the first output voltage;
增益调节电路用于调节目标值;a gain adjustment circuit for adjusting a target value;
ADC用于采样第二反向比例放大电路的输出端电压和增益调节电路的输出端电压,第二反向比例放大电路的输出端电压用于确定目标负载对应的电压值,增益调节电路的输出端电压为目标值的调节系数。The ADC is used for sampling the output voltage of the second inverse proportional amplification circuit and the output voltage of the gain adjustment circuit, and the output voltage of the second inverse proportional amplification circuit is used for determining the voltage value corresponding to the target load, and the output of the gain adjustment circuit The terminal voltage is the adjustment factor of the target value.
本发明实施例中的负载电流检测电路通过多个放大电路对目标负载的电压进行处理,减少噪声、温度等因素对电压检测的影响,提高了检测的精度。The load current detecting circuit in the embodiment of the invention processes the voltage of the target load through a plurality of amplifying circuits, thereby reducing the influence of noise, temperature and the like on the voltage detection, and improving the detection precision.
结合本发明实施例第一方面的第三种实现方式,在本发明实施例第一方面的第四种实现方式中,差分放大电路包括第一运算放大器A1;第一反向比例放大电路包括第二运算放大器A2,第一电阻R1,第二电阻R2,第三电阻R3,第四电阻R4、第五电阻R5及PMOS晶体管T2;增益调节电路包括第三运算放大器A3,R5及T2;电压跟随电路包括第四运算放大器A4;第二反向比例放大电路包括第五运算放大器A5,第六电阻R6,第七电阻R7及第八电阻R8In a fourth implementation manner of the first aspect of the embodiment of the present invention, the differential amplifying circuit includes a first operational amplifier A 1 a second operational amplifier A 2 , a first resistor R 1 , a second resistor R 2 , a third resistor R 3 , a fourth resistor R 4 , a fifth resistor R 5 , and a PMOS transistor T 2 ; the gain adjustment circuit includes a third operational amplifier A 3 , R 5 and T 2 ; the voltage follower circuit includes a fourth operational amplifier A 4 ; the second inverse proportional amplification circuit includes a fifth operational amplifier A 5 , a sixth resistor R 6 , a seventh resistor R 7 and an eighth resistor R 8 ;
A1的正向输入端连接目标负载的一端,A1的反向输入端连接目标负载的另一端,A1的输出端接R2的一端,R2的另一端接A2的反向输入端及R3的一端,R3的另一端接R4的一端,R4的另一端接A2的输出端,A2的正向输入端接R1的一端,R1的另一端接地端;A 1 positive input end connected to the target load, the inverting input of A 1 is connected to the other end of the target load, an output end 2 is A 1 R & lt termination, R 2, A the other end of the reverse input 2 and R 3 is an end side, the other end of R 3 R 4, one end, the other end of the output terminal R 4 a 2, a 2 forward end of the input end of R 1, R 1 is other end of the end ;
A3的反向输入端接基准电压,A3的正向输入端接A1的输出端,A3的输出端接T2的栅极,T2的漏极接R3及R4之间的中间节点,T2的源极接R5的一端,R5的另一端接地端;The inverting terminal of the reference voltage of A 3, A 3 positive input end the output terminal of A 1, A 3 output termination gate of T 2, a drain contact between the T 3 R 2 and R 4 the intermediate node, T 2 source electrode connected to one end of R 5, R 5 other end of the terminal;
A4的正向输入端接A2的输出端,A4的反向输入端接A4的输出端;A 4 forward input end of the output terminal of A 2, A 4, an inverting input end of the output terminal A 4;
A5的反向输入端接R7的一端及R8的一端,R7的另一端接A4的输出端,R8的另一端接A5的输出端,A5的正向输入端接R6的一端,R6的另一端接地端;One ends inverting terminal R A 5 R 7 and 8, the other end of the output terminal A 4 R 7, the other end of the output terminal 5 A R 8, the positive input terminal A of 5 end R 6, R is other end of the end portion 6;
ADC的一端接A5的输出端及A3的输出端,ADC的另一端接负载切换电路。One end of the ADC is connected to the output of A 5 and the output of A 3 , and the other end of the ADC is connected to the load switching circuit.
本发明实施例提供了一种负载电流检测电路的具体构成,提高了方案的可实现性。Embodiments of the present invention provide a specific structure of a load current detecting circuit, which improves the achievability of the solution.
结合本发明实施例第一方面的第四种实现方式,在本发明实施例第一方面的第五种实现方式中,R1至R8对应的精度为百分之一。With reference to the fourth implementation manner of the first aspect of the embodiment of the present invention, in the fifth implementation manner of the first aspect of the embodiment, the accuracy of R 1 to R 8 is one percent.
结合本发明实施例第一方面、第一方面的第一至第五种实现方式,在本发明实施例的第六种实现方式中,目标负载对应的精度为百分之一。With reference to the first aspect of the embodiments of the present invention, the first to fifth implementation manners of the first aspect, in the sixth implementation manner of the embodiment of the present invention, the accuracy of the target load is one percent.
结合本发明实施例第一方面、第一方面的第一至第五种实现方式,在本发明实施例的第七种实现方式中,目标负载的阻值为0.5欧姆。With reference to the first aspect of the embodiment of the present invention, the first to fifth implementation manners of the first aspect, in the seventh implementation manner of the embodiment of the present invention, the resistance of the target load is 0.5 ohm.
本发明实施例的第二方面提供了一种电源电流检测方法,该方法包括:A second aspect of the embodiments of the present invention provides a power supply current detecting method, the method comprising:
开关电源电路首先确定待校准的电流值,即目标电流值。开关电源电路将目标负载设置为高阻状态,并将电源负载设置为休眠状态,记录此时开关电源电路对应的电流值,即第一电流值。然后开关电源电路将目标负载设置为工作状态,并检测此时目标负载对应的电压值,根据该电压值计算目标负载对应的电流值。当目标负载对应的电流值不等于目标电流值时,开关电源电路将目标负载对应的电流值调节至目标电流值;当目标负载对应的电流值等于目标电流值时,开关电源电路记录此时检测到的开关电源电路对应的电流值,即第二检测电流值。最后,开关电源电路将第二检测电流值与第一检测电流值的差值作 为目标电流值对应的检测值,即以后当开关电源电路检测到开关电源电路的电流值为该差值时,对应的开关电源电路的实际电流值为目标值。The switching power supply circuit first determines the current value to be calibrated, that is, the target current value. The switching power supply circuit sets the target load to a high-impedance state, and sets the power load to a sleep state, and records the current value corresponding to the switching power supply circuit at this time, that is, the first current value. Then, the switching power supply circuit sets the target load to the working state, and detects the voltage value corresponding to the target load at this time, and calculates the current value corresponding to the target load according to the voltage value. When the current value corresponding to the target load is not equal to the target current value, the switching power supply circuit adjusts the current value corresponding to the target load to the target current value; when the current value corresponding to the target load is equal to the target current value, the switching power supply circuit records the detection at this time. The current value corresponding to the switching power supply circuit, that is, the second detected current value. Finally, the switching power supply circuit compares the difference between the second detected current value and the first detected current value The detection value corresponding to the target current value, that is, when the switching power supply circuit detects the current value of the switching power supply circuit as the difference, the actual current value of the corresponding switching power supply circuit is the target value.
本发明实施例提供了一种开关电源电路,包括开关电源控制电路,负载切换电路以及负载电流检测电路,其中负载切换电路包括目标负载,开关电源控制电路包括电源负载,负载切换电路连接与开关电源控制电路及负载电流检测电路连接,负载切换电路将目标负载合入电源负载,负载电流检测电路检测目标负载对应的电压值,开关电源控制电路根据目标负载的电压值计算其电流值,并将其电流值调节至目标电流值,将记录的第一检测电流值和第二检测电流值,即电源负载处于休眠状态且目标负载处于高阻状态时开关电源电路对应的电流值和目标负载对应的电流值等于目标电流值时开关电源电路对应的电流值,这两者之间的差值作为目标电流值对应的检测值。本发明实施例在原有开关电源电路的基础上,合入了高精度的目标负载,将高精度的目标负载代替原有电源负载,增加了高精度的负载电流检测电路,将该电路检测的数据作为参考,对原有开关电源电路检测的数据进行校准,以减少检测误差,提升电流检测的精度。Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, a load switching circuit, and a load current detecting circuit, wherein the load switching circuit includes a target load, and the switching power supply control circuit includes a power load, a load switching circuit connection, and a switching power supply. The control circuit and the load current detecting circuit are connected, the load switching circuit combines the target load into the power load, the load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and The current value is adjusted to the target current value, and the recorded first detection current value and the second detection current value, that is, the current value corresponding to the switching power supply circuit and the current corresponding to the target load when the power load is in the sleep state and the target load is in the high resistance state When the value is equal to the target current value, the current value corresponding to the switching power supply circuit, the difference between the two is used as the detection value corresponding to the target current value. The embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit For reference, the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
结合本发明实施例的第二方面,在本发明实施例第二方面的第一种实现方式中,开关电源电路确定第二检测电流值与第一检测电流值的差值为目标电流值对应的检测值之后,开关电源电路将目标负载设置成高阻状态,将电源负载设置为工作状态。With reference to the second aspect of the embodiments of the present invention, in a first implementation manner of the second aspect of the embodiment, the switching power supply circuit determines that a difference between the second detected current value and the first detected current value is a target current value. After the value is detected, the switching power supply circuit sets the target load to a high-impedance state and sets the power load to the active state.
本发明实施例中开关电源电路将待校准的电流值校准完成后,可以将目标负载设置为高阻状态,能够避免对开关电源控制电路的影响。In the embodiment of the present invention, after the calibration of the current value to be calibrated is completed, the target load can be set to a high-impedance state, which can avoid the influence on the switching power supply control circuit.
从以上技术方案可以看出,本发明实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present invention have the following advantages:
本发明实施例提供了一种开关电源电路,包括开关电源控制电路,负载切换电路以及负载电流检测电路,其中负载切换电路包括目标负载,开关电源控制电路包括电源负载,负载切换电路连接与开关电源控制电路及负载电流检测电路连接,负载切换电路将目标负载合入电源负载,负载电流检测电路检测目标负载对应的电压值,开关电源控制电路根据目标负载的电压值计算其电流值,并将其电流值调节至目标电流值,将记录的第一检测电流值和第二检测电流值,即电源负载处于休眠状态且目标负载处于高阻状态时开关电源电路对应 的电流值和目标负载对应的电流值等于目标电流值时开关电源电路对应的电流值,这两者之间的差值作为目标电流值对应的检测值。本发明实施例在原有开关电源电路的基础上,合入了高精度的目标负载,将高精度的目标负载代替原有电源负载,增加了高精度的负载电流检测电路,将该电路检测的数据作为参考,对原有开关电源电路检测的数据进行校准,以减少检测误差,提升电流检测的精度。Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, a load switching circuit, and a load current detecting circuit, wherein the load switching circuit includes a target load, and the switching power supply control circuit includes a power load, a load switching circuit connection, and a switching power supply. The control circuit and the load current detecting circuit are connected, the load switching circuit combines the target load into the power load, the load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and The current value is adjusted to the target current value, and the recorded first detection current value and the second detection current value, that is, the power load is in a sleep state and the target load is in a high resistance state, the switching power supply circuit corresponds to The current value corresponding to the target load and the current value corresponding to the target current value are equal to the current value corresponding to the switching power supply circuit, and the difference between the two is used as the detection value corresponding to the target current value. The embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit For reference, the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings according to these drawings without paying any creative work.
图1是本发明实施例中开关电源电路的一个实施例示意图;1 is a schematic diagram of an embodiment of a switching power supply circuit in an embodiment of the present invention;
图2是本发明实施例中开关电源电路中负载切换电路的一个实施例示意图;2 is a schematic diagram of an embodiment of a load switching circuit in a switching power supply circuit according to an embodiment of the present invention;
图3是本发明实施例中开关电源电路中负载电流检测电路的一个实施例示意图;3 is a schematic diagram of an embodiment of a load current detecting circuit in a switching power supply circuit according to an embodiment of the present invention;
图4是本发明实施例中开关电源电流检测方法的一个实施例示意图。4 is a schematic diagram of an embodiment of a method for detecting a switching power supply current in an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对 于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if present) in the specification and claims of the present invention and the above figures are used to distinguish similar objects without being used for Describe a specific order or order. It is to be understood that the data so used may be interchanged as appropriate, such that the embodiments of the invention described herein can be implemented, for example, in a sequence other than those illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units, but may include those that are not clearly listed or Other steps or units inherent to these processes, methods, products or equipment.
应理解,本发明实施例中的开关电源电路是在现有技术的开关电源电路的基础上,增加了相关的功能电路并对原开关电源电路的功能作了适应性的改进。为了更好的理解本发明实施例中的开关电源电路,下面对现有技术中的开关电源电路进行介绍。开关电源电路大致由主电路、控制电路、检测电路、辅助电源四大部份组成。It should be understood that the switching power supply circuit in the embodiment of the present invention is based on the prior art switching power supply circuit, and the related functional circuit is added and the function of the original switching power supply circuit is adaptively improved. In order to better understand the switching power supply circuit in the embodiment of the present invention, the switching power supply circuit in the prior art is introduced below. The switching power supply circuit is roughly composed of a main circuit, a control circuit, a detection circuit, and an auxiliary power supply.
1、主电路1, the main circuit
冲击电流限幅:限制接通电源瞬间输入侧的冲击电流。Inrush current limiting: Limits the inrush current on the input side of the power supply.
输入滤波器:其作用是过滤电网存在的杂波及阻碍本机产生的杂波反馈回电网。Input filter: Its function is to filter the clutter in the grid and to prevent the clutter generated by the machine from feeding back to the grid.
整流与滤波:将电网交流电源直接整流为较平滑的直流电。Rectification and filtering: directly rectify the grid AC power to a smoother DC.
逆变:将整流后的直流电变为高频交流电,这是高频开关电源的核心部分。Inverter: The rectified DC power is changed to high frequency AC, which is the core part of the high frequency switching power supply.
输出整流与滤波:根据负载需要,提供稳定可靠的直流电源。Output rectification and filtering: Provides a stable and reliable DC power supply according to the load requirements.
2、控制电路2, the control circuit
一方面从输出端取样,与设定值进行比较,然后去控制逆变器,改变其脉宽或脉频,使输出稳定,另一方面,根据测试电路提供的数据,经保护电路鉴别,提供控制电路对电源进行各种保护措施。On the one hand, sampling from the output, comparing with the set value, then controlling the inverter, changing its pulse width or pulse frequency to make the output stable, on the other hand, according to the data provided by the test circuit, the circuit is identified by the protection circuit. The control circuit performs various protection measures on the power supply.
3、检测电路3, detection circuit
提供保护电路中正在运行中各种参数和各种仪表数据。Provides various parameters and various meter data in operation in the protection circuit.
4、辅助电源4, auxiliary power supply
实现电源的软件(远程)启动,为保护电路和控制电路(PWM等芯片)工作供电。Software (remote) startup of the power supply, power supply for protection circuits and control circuits (chips such as PWM).
基于上述背景,本发明实施例提供了一种开关电源电路及开关电源电流检测方法,能够减少检测误差,提升电流检测的精度。Based on the above background, an embodiment of the present invention provides a switching power supply circuit and a switching power supply current detecting method, which can reduce detection errors and improve current detection accuracy.
请参阅图1,本发明实施例中开关电源电路的一个实施例,本发明实施例中开关电源电路100包括:开关电源控制电路101,负载切换电路102以及负载电流检测电路103;Referring to FIG. 1, an embodiment of a switching power supply circuit in an embodiment of the present invention, a switching power supply circuit 100, a switching power supply control circuit 101, a load switching circuit 102, and a load current detecting circuit 103;
其中,负载切换电路102包括目标负载;开关电源控制电路101包括电源负载; Wherein, the load switching circuit 102 includes a target load; the switching power supply control circuit 101 includes a power load;
开关电源控制电路101与负载切换电路102连接,负载电流检测电路103与负载切换电路连接102;The switching power supply control circuit 101 is connected to the load switching circuit 102, and the load current detecting circuit 103 is connected to the load switching circuit 102;
负载切换电路102用于将目标负载合入电源负载;The load switching circuit 102 is configured to integrate the target load into the power load;
负载电流检测电路103用于检测目标负载对应的电压值;The load current detecting circuit 103 is configured to detect a voltage value corresponding to the target load;
开关电源控制电路101用于检测第一检测电流值及第二检测电流值,其中,第一检测电流值为电源负载1011处于休眠状态且目标负载、处于高阻状态时开关电源电路100对应的电流值,第二检测电流值为电源负载1011处于休眠状态且目标负载对应的电流值等于目标电流值时开关电源电路100对应的电流值;The switching power supply control circuit 101 is configured to detect a first detection current value and a second detection current value, wherein the first detection current value is a current corresponding to the switching power supply circuit 100 when the power supply load 1011 is in a sleep state and the target load is in a high resistance state. a value, the second detection current value is a current value corresponding to the switching power supply circuit 100 when the power load 1011 is in a sleep state and the current value corresponding to the target load is equal to the target current value;
开关电源控制电路101还用于根据目标负载对应的电压值计算目标负载对应的电流值,并将目标负载对应的电流值调节为该目标电流值;The switching power supply control circuit 101 is further configured to calculate a current value corresponding to the target load according to the voltage value corresponding to the target load, and adjust a current value corresponding to the target load to the target current value;
开关电源控制电路101还用于确定第二检测电流值与第一检测电流值的差值为目标电流值对应的检测值。The switching power supply control circuit 101 is further configured to determine a difference between the second detected current value and the first detected current value as a detected value corresponding to the target current value.
本发明实施例中开关电源控制电路101首先将电源负载1011设置为休眠状态,将目标负载调节至高阻状态,检测并记录此时电源电路100对应的电流值,即第一检测电流值,随后开关电源控制电路101调节目标负载,使其处于非高阻状态,与此同时开关电源控制电路101控制负载电流检测电路103检测目标负载对应的电压值,然后获取该电压值,根据该电压值和目标负载的阻值计算目标负载对应的电流值,再判断该电流值是否等于目标电流值,若等于,则检测并记录此时电源电路100对应的电流值,即第二检测电流值,若不等于,则再调节目标负载,使得电源电路100对应的电流值等于目标电流值。最后开关电源控制电路101将第二检测电流值与第一检测电流值的差值作为目标电流值对应的检测值,也就是当开关电源控制电路检测到电源电路100的电流值为目第二检测电流值与第一检测电流值的差值时,对应的电源电路100的实际电流值为目标电流值。In the embodiment of the present invention, the switching power supply control circuit 101 first sets the power supply load 1011 to a sleep state, adjusts the target load to a high resistance state, detects and records the current value corresponding to the power supply circuit 100 at this time, that is, the first detected current value, and then switches. The power control circuit 101 adjusts the target load to be in a non-high impedance state, and at the same time, the switching power supply control circuit 101 controls the load current detecting circuit 103 to detect the voltage value corresponding to the target load, and then acquires the voltage value according to the voltage value and the target. Calculating the current value corresponding to the target load, and determining whether the current value is equal to the target current value. If equal, detecting and recording the current value corresponding to the power supply circuit 100 at this time, that is, the second detected current value, if not equal to Then, the target load is adjusted again so that the current value corresponding to the power supply circuit 100 is equal to the target current value. Finally, the switching power supply control circuit 101 uses the difference between the second detected current value and the first detected current value as the detected value corresponding to the target current value, that is, when the switching power supply control circuit detects that the current value of the power supply circuit 100 is the second detection. When the current value is different from the first detected current value, the actual current value of the corresponding power supply circuit 100 is the target current value.
需要说明的是,本发明实施例中电源负载1011指的是原开关电源电路中的负载,目标负载是新增的负载切换电路102中的高精度负载,目标负载与电源负载1011并联。It should be noted that, in the embodiment of the present invention, the power load 1011 refers to the load in the original switching power supply circuit, the target load is the high-precision load in the newly added load switching circuit 102, and the target load is connected in parallel with the power load 1011.
本发明实施例提供了一种开关电源电路,包括开关电源控制电路,负载切 换电路以及负载电流检测电路,其中负载切换电路包括目标负载,开关电源控制电路包括电源负载,负载切换电路连接与开关电源控制电路及负载电流检测电路连接,负载切换电路将目标负载合入电源负载,负载电流检测电路检测目标负载对应的电压值,开关电源控制电路根据目标负载的电压值计算其电流值,并将其电流值调节至目标电流值,将记录的第一检测电流值和第二检测电流值,即电源负载处于休眠状态且目标负载处于高阻状态时开关电源电路对应的电流值和目标负载对应的电流值等于目标电流值时开关电源电路对应的电流值,这两者之间的差值作为目标电流值对应的检测值。本发明实施例在原有开关电源电路的基础上,合入了高精度的目标负载,将高精度的目标负载代替原有电源负载,增加了高精度的负载电流检测电路,将该电路检测的数据作为参考,对原有开关电源电路检测的数据进行校准,以减少检测误差,提升电流检测的精度。Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, and load cutting The circuit and the load current detecting circuit, wherein the load switching circuit comprises a target load, the switching power supply control circuit comprises a power load, the load switching circuit connection is connected with the switching power supply control circuit and the load current detecting circuit, and the load switching circuit integrates the target load into the power load The load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and adjusts the current value to the target current value, and records the first detected current value and the second value. Detecting the current value, that is, when the power load is in the sleep state and the target load is in the high resistance state, the current value corresponding to the switching power supply circuit and the current value corresponding to the target load are equal to the target current value, and the current value corresponding to the switching power supply circuit is between The difference is used as the detection value corresponding to the target current value. The embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit For reference, the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
基于上述图1对应的实施例,负载切换电路可以有多种结构,下面以其中一种作为例子对本发明实施例中的负载切换电路进行说明,请参阅图2,本发明实施例中负载切换电路102的一个结构示意图,本发明实施例中负载切换电路102包括:目标负载Rx、数字模拟转换器(Digital to analog converter,DAC)、N型金属氧化物半导体(N-Metal-Oxide-Semiconductor,NMOS)晶体管T1和串行外设接口(Serial Peripheral Interface,SPI);The load switching circuit can be configured in various manners according to the embodiment corresponding to FIG. 1 . The load switching circuit in the embodiment of the present invention is described below as an example. Referring to FIG. 2 , the load switching circuit in the embodiment of the present invention is described. A schematic diagram of a structure of a load switching circuit 102 in the embodiment of the present invention includes: a target load R x , a digital to analog converter (DAC), and an N-type metal oxide semiconductor (N-Metal-Oxide-Semiconductor, NMOS) transistor T 1 and Serial Peripheral Interface (SPI);
SPI用于与开关电源控制电路及负载电流检测电路连接;The SPI is used to connect with the switching power supply control circuit and the load current detecting circuit;
DAC的一端连接SPI,另一端连接NMOS晶体管的栅极,而NMOS晶体管的漏极连接目标负载Rx,源极连接地端;One end of the DAC is connected to the SPI, the other end is connected to the gate of the NMOS transistor, and the drain of the NMOS transistor is connected to the target load R x , and the source is connected to the ground end;
基于上述负载切换电路102的结构,本发明实施例中,开关电源控制电路101还用于控制DAC的输出端电压,该输出端电压用于控制NMOS晶体管T1的栅极电压,该栅极电压用于调节NMOS晶体管T1的导通阻抗,该导通阻抗用于调节目标负载Rx的电流值。也就是说开关电源控制电路101通过控制DAC的输出电压实现对目标负载的电流值的调节。Structure of the load circuit 102 is switched on, the gate voltage of the embodiment of the present invention, the switching power supply control circuit 101 also controls the output voltage of the DAC, the output terminal voltage for controlling the gate voltage of NMOS transistor T 1, ie, It is used to adjust the on-resistance of the NMOS transistor T 1 for adjusting the current value of the target load R x . That is to say, the switching power supply control circuit 101 realizes the adjustment of the current value of the target load by controlling the output voltage of the DAC.
具体地,当DAC的输出电压为0伏时,NMOS晶体管T1截止,目标负载Rx没有电流流过,即对应的电流值为0;当DAC的输出电压大于NMOS晶体管T1的开启电压时,NMOS晶体管T1饱和导通,导通阻抗小于20毫欧姆,此时 流过目标负载Rx的电流由目标负载的阻值决定;当DAC输出的电压在0伏和开启电压之间时,NMOS晶体管T1的导通阻抗从20毫欧姆到几百K欧姆之间变化。Specifically, when the output voltage of the DAC is 0 volts, the NMOS transistor T 1 is turned off, the target load R x has no current flowing, that is, the corresponding current value is 0; when the output voltage of the DAC is greater than the turn-on voltage of the NMOS transistor T 1 The NMOS transistor T 1 is saturated and turned on, and the on-resistance is less than 20 milliohms. At this time, the current flowing through the target load R x is determined by the resistance of the target load; when the voltage output from the DAC is between 0 volts and the turn-on voltage, The on-resistance of the NMOS transistor T 1 varies from 20 milliohms to several hundred kilo ohms.
可选地,负载切换电路102还可以包括维持电平电阻R0,维持电平电阻R0用于给NMOS晶体管T1维持固定的电平,该维持电平电阻R0的一端连接NMOS晶体管T1的栅极,另一端连接地端。Alternatively, the load may further comprise the switching circuit 102 maintains the level of the resistor R 0, maintains the level of the resistor R 0. 1 to maintain a fixed level for the NMOS transistor T, which maintains the level of the resistor R 0 is connected to one end of the NMOS transistor T The gate of 1 is connected to the ground at the other end.
需要说明的是,本发明实施例中目标负载的阻值可以为0.5欧姆,也可以为其他阻值,具体此处不作限定,目标负载是高精度负载,其精度具体可以为1%,也可以是其他值,具体此处也不作限定。而维持电平电阻的阻值可以为47K欧姆,也可以为其他阻值,具体此处不作限定。It should be noted that, in the embodiment of the present invention, the resistance of the target load may be 0.5 ohms or other resistance values, which is not limited herein. The target load is a high-precision load, and the accuracy may be 1%, or It is another value, and is not limited here. The resistance of the level resistor can be 47K ohms, and can also be other resistance values, which is not limited herein.
本发明实施例提供了一种负载切换电路的具体结构,提高了方案的可实现性。The embodiment of the invention provides a specific structure of a load switching circuit, which improves the achievability of the solution.
基于上述图1对应的实施例,负载电流检测电路可以有多种结构,下面以其中一种作为例子对本发明实施例中的负载电流检测电路进行说明,请参阅图3,负载电流检测电路的一个结构示意图,本发明实施例中负载电流检测电路103包括:差分放大电路1031,第一反向比例放大电路1032,增益调节电路1033,电压跟随电路1034,第二反向比例放大电路1035以及模数转换器(Analog-to-Digital Converter,ADC);Based on the embodiment corresponding to FIG. 1 above, the load current detecting circuit can have various structures. The load current detecting circuit in the embodiment of the present invention is described below as an example. Referring to FIG. 3, one of the load current detecting circuits is shown. Schematic diagram of the structure, the load current detecting circuit 103 in the embodiment of the present invention includes: a differential amplifying circuit 1031, a first inverse proportional amplifying circuit 1032, a gain adjusting circuit 1033, a voltage following circuit 1034, a second inverse proportional amplifying circuit 1035, and a modulus Converter (Analog-to-Digital Converter, ADC);
差分放大电路1031的输入端与目标负载Rx连接,差分放大电路的输出端与第一反向比例放大电路1032及增益调节电路1033连接;The input end of the differential amplifying circuit 1031 is connected to the target load R x , and the output end of the differential amplifying circuit is connected to the first inverse proportional amplifying circuit 1032 and the gain adjusting circuit 1033 ;
电压跟随电路1034与第一反向比例放大电路1032及第二反向比例放大电路1035连接;The voltage follower circuit 1034 is connected to the first inverse proportional amplification circuit 1032 and the second inverse proportional amplification circuit 1035;
差分放大电路1031和第二反向比例放大电路1035对应的放大比例均为1:1,用于减小温度、噪声等因素对电路的影响。The amplification ratios of the differential amplifying circuit 1031 and the second inverse proportional amplifying circuit 1035 are both 1:1, which are used to reduce the influence of temperature, noise and the like on the circuit.
第一反向比例放大电路1032用于放大差分放大电路1031的第一输出电压,第一反向比例放大电路1032对应的放大比例为目标值;The first inverse proportional amplifying circuit 1032 is configured to amplify the first output voltage of the differential amplifying circuit 1031, and the corresponding scaling ratio of the first inverse proportional amplifying circuit 1032 is a target value;
电压跟随电路1034用于将该第一输出电压进行缓冲;Voltage follower circuit 1034 is configured to buffer the first output voltage;
增益调节电路1033用于调节该目标值;The gain adjustment circuit 1033 is configured to adjust the target value;
ADC用于采样第二反向比例放大电路1035的输出端电压和增益调节电路 1033的输出端电压,其中,第二反向比例放大电路1035的输出端电压用于确定目标负载Rx对应的电压值,增益调节电路1033的输出端电压作为目标值的调节系数。The ADC is used to sample the output voltage of the second inverse proportional amplification circuit 1035 and the output voltage of the gain adjustment circuit 1033, wherein the output voltage of the second inverse proportional amplification circuit 1035 is used to determine the voltage corresponding to the target load R x . The value, the output voltage of the gain adjustment circuit 1033 is used as an adjustment factor of the target value.
具体地,差分放大电路1031包括第一运算放大器A1,第一反向比例放大电路包括1032包括第二运算放大器A2,第一电阻R1,第二电阻R2,第三电阻R3,第四电阻R4、第五电阻R5及P沟道金属氧化物半导体(positive channel Metal Oxide Semiconductor,PMOS)晶体管T2;增益调节电路1033包括第三运算放大器A3,R5及T2;电压跟随电路1034包括第四运算放大器A4;第二反向比例放大1035电路包括第五运算放大器A5,第六电阻R6,第七电阻R7及第八电阻R8Specifically, the differential amplifying circuit 1031 includes a first operational amplifier A 1 , and the first inverse proportional amplifying circuit includes 1032 including a second operational amplifier A 2 , a first resistor R 1 , a second resistor R 2 , and a third resistor R 3 . a fourth resistor R 4 , a fifth resistor R 5 and a P-channel transistor O 2 transistor; the gain adjustment circuit 1033 includes third operational amplifiers A 3 , R 5 and T 2 ; The voltage follower circuit 1034 includes a fourth operational amplifier A 4 ; the second inverse proportional amplification 1035 circuit includes a fifth operational amplifier A 5 , a sixth resistor R 6 , a seventh resistor R 7 and an eighth resistor R 8 ;
A1的正向输入端连接目标负载的一端,A1的反向输入端连接目标负载的另一端,A1的输出端接R2的一端,R2的另一端接A2的反向输入端及R3的一端,R3的另一端接R4的一端,R4的另一端接A2的输出端,A2的正向输入端接R1的一端,R1的另一端接地端;A 1 positive input end connected to the target load, the inverting input of A 1 is connected to the other end of the target load, an output end 2 is A 1 R & lt termination, R 2, A the other end of the reverse input 2 and R 3 is an end side, the other end of R 3 R 4, one end, the other end of the output terminal R 4 a 2, a 2 forward end of the input end of R 1, R 1 is other end of the end ;
A3的反向输入端接基准电压,A3的正向输入端接A1的输出端,A3的输出端接T2的栅极,T2的漏极接R3及R4之间的中间节点,T2的源极接R5的一端,R5的另一端接地端;The inverting terminal of the reference voltage of A 3, A 3 positive input end the output terminal of A 1, A 3 output termination gate of T 2, a drain contact between the T 3 R 2 and R 4 the intermediate node, T 2 source electrode connected to one end of R 5, R 5 other end of the terminal;
A4的正向输入端接A2的输出端,A4的反向输入端接A4的输出端;A 4 forward input end of the output terminal of A 2, A 4, an inverting input end of the output terminal A 4;
A5的反向输入端接R7的一端及R8的一端,R7的另一端接A4的输出端,R8的另一端接A5的输出端,A5的正向输入端接R6的一端,R6的另一端接地端;One ends inverting terminal R A 5 R 7 and 8, the other end of the output terminal A 4 R 7, the other end of the output terminal 5 A R 8, the positive input terminal A of 5 end R 6, R is other end of the end portion 6;
ADC的一端接A5的输出端及A3的输出端,ADC的另一端接负载切换电路。One end of the ADC is connected to the output of A 5 and the output of A 3 , and the other end of the ADC is connected to the load switching circuit.
基于上述电路连接,第一反向比例放大电路1032对应的放大比例为目标值为
Figure PCTCN2016104211-appb-000001
其中,RT2为T2的阻抗。当V1<Vref时,V3是高电平,T2截止,则目标值为
Figure PCTCN2016104211-appb-000002
当V1<Vref时,V3是低电平时,T2饱和导通,由于T2饱和导通时阻抗在毫欧姆量级,故目标值为
Figure PCTCN2016104211-appb-000003
V1为A1的输出电压,V3为A3的入电压,Vref为基准电压。
Based on the above circuit connection, the amplification ratio corresponding to the first inverse proportional amplification circuit 1032 is a target value.
Figure PCTCN2016104211-appb-000001
Where R T2 is the impedance of T 2 . When V 1 <V ref , V 3 is high level and T 2 is off, then the target value is
Figure PCTCN2016104211-appb-000002
When V 1 <V ref , when V 3 is low level, T 2 is saturated and turned on. Since the impedance is on the order of milli ohms when T 2 saturation is turned on, the target value is
Figure PCTCN2016104211-appb-000003
V 1 is the output voltage of A 1 , V 3 is the input voltage of A 3 , and V ref is the reference voltage.
需要说明的是,本发明实施例中R1至R8为高精度电阻,对应的精度可以为1%,也可以为其他值,具体此处不作限定。R1至R8的电阻值一般为K欧姆量级,具体根据其在电路中的作用设定,此处不作限定。It should be noted that in the embodiment of the present invention, R 1 to R 8 are high-precision resistors, and the corresponding precision may be 1% or other values, which is not limited herein. The resistance value of R 1 to R 8 is generally on the order of K ohms, and is specifically set according to its action in the circuit, which is not limited herein.
应理解,上述结构组成仅为一个示例,差分放大电路1031,第一反向比例放大电路1032,增益调节电路1033,电压跟随电路1034,第二反向比例放大电路1035还可以由其他元器件组合构成,具体此处不作限定。It should be understood that the above structural composition is only one example, and the differential amplifying circuit 1031, the first inverse proportional amplifying circuit 1032, the gain adjusting circuit 1033, the voltage following circuit 1034, and the second inverse proportional amplifying circuit 1035 may also be combined by other components. The composition is not limited herein.
本发明实施例中负载电流检测电路103的检测精度由ADC的参数,R1至R8的阻值以及Rx的阻值决定。下面以一具体例子对本发明实施例中负载电流检测电路103的检测精度进行说明:The detection accuracy of the load current detecting circuit 103 in the embodiment of the present invention is determined by the parameters of the ADC, the resistance values of R 1 to R 8 , and the resistance of R x . The detection accuracy of the load current detecting circuit 103 in the embodiment of the present invention is described below with a specific example:
流检测电路103中的R1=R3=R4=10Kohm,R2=20Kohm,R5=1.25Kohm,Vref=50mV,ADC位宽12位,精度为1/4096,输入量程为0至4.2V,分辨率为1.02mV。目标负载Rx=0.5ohm,电源负载在1A至1毫安范围内,待检测的开关电源电路的输出电压为1.0V。R 1 = R 3 = R 4 = 10Kohm, R 2 = 20Kohm, R 5 = 1.25Kohm, V ref = 50mV, ADC bit width 12 bits, accuracy 1/4096, input range 0 to 0 in the flow detection circuit 103 4.2V with a resolution of 1.02mV. The target load R x = 0.5 ohm, the power supply load is in the range of 1A to 1 mA, and the output voltage of the switching power supply circuit to be detected is 1.0V.
当流过Rx的电流小于100mA时,其压降小于50mV(即V1<Vref),A3输出低电平(即V3为低电平),则A2的放大比例(即目标值)为
Figure PCTCN2016104211-appb-000004
当流过Rx的电流大于100mA时,其压降大于50mV(即V1>Vref),A3输出高电平(即V3为高电平),则A2的放大比例(即目标值)为
Figure PCTCN2016104211-appb-000005
When the current flowing through R x is less than 100 mA, the voltage drop is less than 50 mV (ie, V 1 <V ref ), and A 3 is output low (ie, V 3 is low), then the amplification ratio of A 2 (ie, the target) Value) is
Figure PCTCN2016104211-appb-000004
When the current flowing through R x is greater than 100 mA, the voltage drop is greater than 50 mV (ie, V 1 >V ref ), and A 3 is output high (ie, V 3 is high), then the amplification ratio of A 2 (ie, the target) Value) is
Figure PCTCN2016104211-appb-000005
也就是说,当Rx流过的电流大于100mA时,ADC通过采样得到的A5的输出端电压即Rx对应的电压值,ADC的分辨率为1.02mV,即可以检测的电流精度是2.04mA。That is to say, when the current flowing through R x is greater than 100 mA, the output voltage of A 5 , which is obtained by sampling by the ADC, is the voltage value corresponding to R x , and the resolution of the ADC is 1.02 mV, that is, the current accuracy that can be detected is 2.04. mA.
当Rx流过的电流小于100mA时,ADC通过采样得到的A5的输出端电压是Rx对应的电压值的五倍,ADC的分辨率为1.02mV,即可以检测的电流精度 是0.41mA。When the current flowing through R x is less than 100 mA, the output voltage of A 5 obtained by sampling the ADC is five times the voltage value corresponding to R x , and the resolution of the ADC is 1.02 mV, that is, the current accuracy that can be detected is 0.41 mA. .
由于Rx=0.5ohm,开关电源电路的输出电压为1.0V,因此可检测的最大电流为2A,即在100mA和2A的范围内,电流检测精度为2.04mA,达到约2%。在0到100mA的范围内,电流检测精度为0.41mA。Since R x = 0.5 ohm, the output voltage of the switching power supply circuit is 1.0 V, so the maximum detectable current is 2 A, that is, in the range of 100 mA and 2 A, the current detection accuracy is 2.04 mA, which is about 2%. The current detection accuracy is 0.41 mA in the range of 0 to 100 mA.
本发明实施例提供了几种高精度的负载电流检测电路,提高了方案的可实现性。The embodiments of the present invention provide several high-precision load current detecting circuits, which improve the achievability of the solution.
上面介绍了本发明实施例中的开关电源电路,下面介绍本发明实施例中的电源电流检测方法,请参阅图4,本发明实施例中开关电源电流检测方法的一个实施例包括:The switching power supply circuit in the embodiment of the present invention is described above. The power supply current detecting method in the embodiment of the present invention is described below. Referring to FIG. 4, an embodiment of the switching power supply current detecting method in the embodiment of the present invention includes:
401、开关电源电路确定目标电流值;401. The switching power supply circuit determines a target current value.
本发明实施例中,开关电源电路由开关电源控制电路、负载切换电路及负载电流检测电路组成,当开关电源电路需要对检测的电流值进行校准时,先通过开关电源控制电路确定待校准的电流值,即目标电流值。In the embodiment of the invention, the switching power supply circuit is composed of a switching power supply control circuit, a load switching circuit and a load current detecting circuit. When the switching power supply circuit needs to calibrate the detected current value, the switching power supply control circuit first determines the current to be calibrated. Value, the target current value.
402、开关电源电路将目标负载设置为高阻状态,将电源负载设置为休眠状态,记录开关电源电路对应的第一检测电流值;402. The switching power supply circuit sets the target load to a high resistance state, sets the power load to a sleep state, and records a first detection current value corresponding to the switching power supply circuit;
确定目标电流值后,开关电源控制电路将负载切换电路中的目标负载调节至高阻状态,同时,将开关电源控制电路中的电源负载设置为休眠状态,检测并记录此时检测到的开关电源电路对应的电流值,即第一检测电流值。After determining the target current value, the switching power supply control circuit adjusts the target load in the load switching circuit to a high-impedance state, and at the same time, sets the power load in the switching power supply control circuit to a sleep state, and detects and records the detected switching power supply circuit at this time. The corresponding current value, that is, the first detected current value.
403、开关电源电路将目标负载设置为工作状态,并检测该目标负载对应的电压值;403. The switching power supply circuit sets the target load to an operating state, and detects a voltage value corresponding to the target load.
记录第一检测电流值后,开关电源控制电路将负载切换电路中的目标负载调节非高阻状态,即设置为工作状态。当目标负载处于工作状态时,开关电源控制电路控制负载电流检测电路检测目标负载对应的电压值。具体地,负载电流检测电路是一种高精度检测电路,其检测出来的电压值精度较高,具体的精度值与其电路组成相关。After the first detection current value is recorded, the switching power supply control circuit adjusts the target load in the load switching circuit to a non-high resistance state, that is, sets it to an operating state. When the target load is in the working state, the switching power supply control circuit controls the load current detecting circuit to detect the voltage value corresponding to the target load. Specifically, the load current detecting circuit is a high-precision detecting circuit, and the detected voltage value has high precision, and the specific precision value is related to its circuit composition.
404、开关电源电路根据该电压值计算该目标负载对应的电流值;404. The switching power supply circuit calculates a current value corresponding to the target load according to the voltage value.
开关电源控制电路获取负载电流检测电路检测到的电压值,并根据该电压值及目标负载的阻值计算该目标负载对应的电流值。 The switching power supply control circuit obtains the voltage value detected by the load current detecting circuit, and calculates a current value corresponding to the target load according to the voltage value and the resistance value of the target load.
405、开关电源电路判断该目标负载对应的电流值是否等于目标电流值,若否,则执行步骤406,若是,则执行步骤407;405, the switching power supply circuit determines whether the current value corresponding to the target load is equal to the target current value, if not, proceed to step 406, and if so, proceed to step 407;
406、开关电源电路将目标负载对应的电流值调节至目标电流值,并执行步骤407;406, the switching power supply circuit adjusts the current value corresponding to the target load to the target current value, and step 407;
当目标负载对应的电流值不等于目标电流值时,开关电源控制电路将该目标负载对应的电流值调节至目标电流值。具体地,开关电源控制电路可以通过调节目标负载的阻抗来调节目标负载的电流值,还可以通过其他方式,具体此处不作限定。When the current value corresponding to the target load is not equal to the target current value, the switching power supply control circuit adjusts the current value corresponding to the target load to the target current value. Specifically, the switching power supply control circuit can adjust the current value of the target load by adjusting the impedance of the target load, and can also be used in other manners, which is not limited herein.
407、开关电源电路记录开关电源电路对应的第二检测电流值;407. The switching power supply circuit records a second detection current value corresponding to the switching power supply circuit;
当目标负载对应的电流值等于目标电流值时,开关电源控制电路记录此时检测到的开关电源电路对应的电流值,即第二检测电流值。When the current value corresponding to the target load is equal to the target current value, the switching power supply control circuit records the current value corresponding to the detected switching power supply circuit at this time, that is, the second detected current value.
408、开关电源电路确定该第二检测电流值与第一检测电流值的差值为该目标电流值对应的检测值。408. The switching power supply circuit determines that a difference between the second detected current value and the first detected current value is a detected value corresponding to the target current value.
开关电源控制电路计算第二检测电流值与第一检测电流值的差值,并将这个差值作为该目标电流值对应的检测值,即当开关电源控制电路检测到电源电路的电流值为该差值时,对应的电源电路的实际电流值为目标电流值。The switching power supply control circuit calculates a difference between the second detected current value and the first detected current value, and uses the difference as the detected value corresponding to the target current value, that is, when the switching power supply control circuit detects the current value of the power supply circuit When the difference is made, the actual current value of the corresponding power supply circuit is the target current value.
需要说明的是,开关电源电路确定第二检测电流值与第一检测电流值的差值为目标电流值对应的检测值,即完成目标电流值的校准后,可以将目标负载设置为高阻状态,将电源负载设置为工作状态,由于目标负载与电源负载并联并且校准完成后目标负载能够处于高阻状态,因此不会影响电源负载的正常工作。开关电源电路完成目标电流值的校准后,也可以继续校准下一个电流值,还可以执行其他操作,具体此处不作限定。It should be noted that the switching power supply circuit determines that the difference between the second detection current value and the first detection current value is a detection value corresponding to the target current value, that is, after the calibration of the target current value is completed, the target load may be set to a high resistance state. The power load is set to the working state. Since the target load is in parallel with the power load and the target load can be in a high-impedance state after the calibration is completed, the normal operation of the power load is not affected. After the calibration of the target current value is completed, the switching current supply circuit can continue to calibrate the next current value, and can perform other operations, which is not limited herein.
本发明实施例提供了一种开关电源电路,包括开关电源控制电路,负载切换电路以及负载电流检测电路,其中负载切换电路包括目标负载,开关电源控制电路包括电源负载,负载切换电路连接与开关电源控制电路及负载电流检测电路连接,负载切换电路将目标负载合入电源负载,负载电流检测电路检测目标负载对应的电压值,开关电源控制电路根据目标负载的电压值计算其电流值,并将其电流值调节至目标电流值,将记录的第一检测电流值和第二检测电流值,即电源负载处于休眠状态且目标负载处于高阻状态时开关电源电路对应 的电流值和目标负载对应的电流值等于目标电流值时开关电源电路对应的电流值,这两者之间的差值作为目标电流值对应的检测值。本发明实施例在原有开关电源电路的基础上,合入了高精度的目标负载,将高精度的目标负载代替原有电源负载,增加了高精度的负载电流检测电路,将该电路检测的数据作为参考,对原有开关电源电路检测的数据进行校准,以减少检测误差,提升电流检测的精度。Embodiments of the present invention provide a switching power supply circuit including a switching power supply control circuit, a load switching circuit, and a load current detecting circuit, wherein the load switching circuit includes a target load, and the switching power supply control circuit includes a power load, a load switching circuit connection, and a switching power supply. The control circuit and the load current detecting circuit are connected, the load switching circuit combines the target load into the power load, the load current detecting circuit detects the voltage value corresponding to the target load, and the switching power supply control circuit calculates the current value according to the voltage value of the target load, and The current value is adjusted to the target current value, and the recorded first detection current value and the second detection current value, that is, the power load is in a sleep state and the target load is in a high resistance state, the switching power supply circuit corresponds to The current value corresponding to the target load and the current value corresponding to the target current value are equal to the current value corresponding to the switching power supply circuit, and the difference between the two is used as the detection value corresponding to the target current value. The embodiment of the invention integrates a high-precision target load on the basis of the original switching power supply circuit, replaces the original power load with a high-precision target load, and increases a high-precision load current detecting circuit, and the data detected by the circuit For reference, the data detected by the original switching power supply circuit is calibrated to reduce the detection error and improve the accuracy of the current detection.
为了便于理解,下面以一实际应用场景对本发明实施例中的开关电源电流检测方法进行说明:For ease of understanding, the switching power supply current detecting method in the embodiment of the present invention is described in an actual application scenario:
待检测开关电源电路的输出电压为1.0V,电源负载最大电流为2A,目标负载阻值为0.5欧姆,500mA为待校准电流。需要进行校准时,让电源负载进入休眠状态,并将目标负载设置为高阻状态,此时电源负载耗电在1至2mA量级,开关电源控制电路记录此时检测到的开关电源电路的电流数据1.2mA(第一检测电流值)。开关电源控制电路将目标负载设置为工作状态,并控制负载电流检测电路检测目标负载对应的电压值,根据该电压值以及目标负载的阻值计算目标负载的电流值,如果该电流值不等于500mA,则调节目标负载的阻抗直到目标负载对应的电流值为500mA,由于这个500mA是经过负载电流检测电路中ADC校准过的电流,开关电源控制电路记录此时检测到的开关电源电路的电流数据510mA(第二检测电流值),以510-1.2=508.8mA为基准,这个数据就是经过校准的500mA负载数据,后续应用以此数据作为500mA电流检测的标准。检测结束后,让负载切换电路进入高阻状态,对开关电源控制电路不会有影响。The output voltage of the switching power supply circuit to be detected is 1.0V, the maximum load current of the power supply is 2A, the target load resistance is 0.5 ohm, and 500mA is the current to be calibrated. When calibration is required, the power load is put into a sleep state, and the target load is set to a high-impedance state. At this time, the power load consumes power on the order of 1 to 2 mA, and the switching power supply control circuit records the current of the switching power supply circuit detected at this time. Data 1.2 mA (first sensed current value). The switching power supply control circuit sets the target load to the working state, and controls the load current detecting circuit to detect the voltage value corresponding to the target load, and calculates the current value of the target load according to the voltage value and the resistance value of the target load, if the current value is not equal to 500 mA , the impedance of the target load is adjusted until the current value corresponding to the target load is 500 mA. Since the 500 mA is the current calibrated by the ADC in the load current detecting circuit, the switching power supply control circuit records the current data of the switching power supply circuit detected at this time 510 mA. (Second detection current value), based on 510-1.2=508.8mA, this data is the calibrated 500mA load data, and the subsequent application uses this data as the standard for 500mA current detection. After the test is finished, let the load switching circuit enter a high-impedance state, which will not affect the switching power supply control circuit.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直 接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or straightness shown or discussed The coupling or communication connection may be an indirect coupling or communication connection through some interface, device or unit, and may be in electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(英文全称:Read-Only Memory,英文缩写:ROM)、随机存取存储器(英文全称:Random Access Memory,英文缩写:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (English full name: Read-Only Memory, English abbreviation: ROM), a random access memory (English full name: Random Access Memory, English abbreviation: RAM), magnetic A variety of media that can store program code, such as a disc or a disc.
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the embodiments are modified, or the equivalents of the technical features are replaced by the equivalents of the technical solutions of the embodiments of the present invention.

Claims (10)

  1. 一种开关电源电路,其特征在于,所述开关电源电路包括:开关电源控制电路,负载切换电路以及负载电流检测电路;所述负载切换电路包括目标负载;所述开关电源控制电路包括电源负载;A switching power supply circuit, comprising: a switching power supply control circuit, a load switching circuit and a load current detecting circuit; the load switching circuit includes a target load; and the switching power supply control circuit includes a power load;
    所述开关电源控制电路与所述负载切换电路连接;所述负载电流检测电路与所述负载切换电路连接;The switching power supply control circuit is connected to the load switching circuit; the load current detecting circuit is connected to the load switching circuit;
    所述负载切换电路用于将所述目标负载合入所述电源负载;The load switching circuit is configured to integrate the target load into the power load;
    所述负载电流检测电路用于检测所述目标负载对应的电压值;The load current detecting circuit is configured to detect a voltage value corresponding to the target load;
    所述开关电源控制电路用于检测第一检测电流值及第二检测电流值,所述第一检测电流值为所述电源负载处于休眠状态且所述目标负载处于高阻状态时所述开关电源电路对应的电流值,所述第二检测电流值为所述电源负载处于休眠状态且所述目标负载对应的电流值等于目标电流值时所述开关电源电路对应的电流值;The switching power supply control circuit is configured to detect a first detection current value and a second detection current value, where the first detection current value is the switching power supply when the power load is in a sleep state and the target load is in a high resistance state a current value corresponding to the circuit, wherein the second detection current value is a current value corresponding to the switching power supply circuit when the power load is in a sleep state and a current value corresponding to the target load is equal to a target current value;
    所述开关电源控制电路还用于根据所述目标负载对应的电压值计算所述目标负载对应的电流值,并将所述目标负载对应的电流值调节至所述目标电流值;The switching power supply control circuit is further configured to calculate a current value corresponding to the target load according to a voltage value corresponding to the target load, and adjust a current value corresponding to the target load to the target current value;
    所述开关电源控制电路还用于确定所述第二检测电流值与所述第一检测电流值的差值为所述目标电流值对应的检测值。The switching power supply control circuit is further configured to determine a detection value corresponding to the difference between the second detection current value and the first detection current value as the target current value.
  2. 根据权利要求1所述的开关电源电路,其特征在于,所述负载切换电路还包括数字模拟转换器DAC、NMOS晶体管及串行外设接口SPI;The switching power supply circuit according to claim 1, wherein the load switching circuit further comprises a digital-to-analog converter DAC, an NMOS transistor, and a serial peripheral interface SPI;
    所述开关电源控制电路与所述负载电流检测电路通过所述SPI与所述负载切换电路连接;The switching power supply control circuit and the load current detecting circuit are connected to the load switching circuit through the SPI;
    所述DAC的一端接所述SPI,所述DAC的另一端接所述NMOS晶体管的栅极,所述NMOS晶体管的漏极接所述目标负载,所述NMOS晶体管的源极接地端;One end of the DAC is connected to the SPI, the other end of the DAC is connected to the gate of the NMOS transistor, the drain of the NMOS transistor is connected to the target load, and the source of the NMOS transistor is grounded;
    所述开关电源控制电路还用于控制所述DAC的输出端电压,所述输出端电压用于控制所述NMOS晶体管的栅极电压,所述栅极电压用于调节所述NMOS晶体管的导通阻抗,所述导通阻抗用于调节所述目标负载的电流值。The switching power supply control circuit is further configured to control an output voltage of the DAC, the output voltage is used to control a gate voltage of the NMOS transistor, and the gate voltage is used to adjust a conduction of the NMOS transistor Impedance, the on-resistance is used to adjust a current value of the target load.
  3. 根据权利要求2所述的开关电源电路,其特征在于,所述负载切换电 路还包括维持电平电阻,所述维持电平电阻用于给所述NMOS晶体管维持固定的电平,所述维持电平电阻的一端接所述NMOS晶体管的栅极,所述维持电平电阻的另一端接地端。The switching power supply circuit according to claim 2, wherein said load switching power The circuit further includes a sustain level resistor for maintaining a fixed level to the NMOS transistor, one end of the sustain level resistor being connected to a gate of the NMOS transistor, the sustain level resistor The other end of the ground.
  4. 根据权利要求1所述的开关电源电路,其特征在于,所述负载电流检测电路包括:差分放大电路,第一反向比例放大电路,增益调节电路,电压跟随电路,第二反向比例放大电路以及模数转换器ADC;The switching power supply circuit according to claim 1, wherein the load current detecting circuit comprises: a differential amplifying circuit, a first inverse proportional amplifying circuit, a gain adjusting circuit, a voltage following circuit, and a second inverse proportional amplifying circuit. And an analog to digital converter ADC;
    所述差分放大电路的输入端与目标负载连接,所述差分放大电路的输出端与所述第一反向比例放大电路及所述增益调节电路连接;An input end of the differential amplifying circuit is connected to a target load, and an output end of the differential amplifying circuit is connected to the first inverse proportional amplifying circuit and the gain adjusting circuit;
    所述电压跟随电路与所述第一反向比例放大电路及所述第二反向比例放大电路连接;The voltage follower circuit is connected to the first inverse proportional amplification circuit and the second inverse proportional amplification circuit;
    所述差分放大电路对应的放大比例为1:1;所述第二方向比例放大电路对应的放大比例为1:1;The amplification ratio corresponding to the differential amplification circuit is 1:1; the amplification ratio corresponding to the second direction proportional amplification circuit is 1:1;
    所述第一反向比例放大电路用于放大所述差分放大电路的第一输出电压,所述第一反向比例放大电路对应的放大比例为目标值;The first inverse proportional amplification circuit is configured to amplify a first output voltage of the differential amplification circuit, and an amplification ratio corresponding to the first reverse proportional amplification circuit is a target value;
    所述电压跟随电路用于将所述第一输出电压进行缓冲;The voltage follower circuit is configured to buffer the first output voltage;
    所述增益调节电路用于调节所述目标值;The gain adjustment circuit is configured to adjust the target value;
    所述ADC用于采样所述第二反向比例放大电路的输出端电压和增益调节电路的输出端电压,所述第二反向比例放大电路的输出端电压用于确定所述目标负载对应的电压值,所述增益调节电路的输出端电压为所述目标值的调节系数。The ADC is configured to sample an output terminal voltage of the second inverse proportional amplification circuit and an output terminal voltage of the gain adjustment circuit, and an output terminal voltage of the second inverse proportional amplification circuit is used to determine a target load corresponding to the target a voltage value, the output voltage of the gain adjustment circuit being an adjustment factor of the target value.
  5. 根据权利要求4所述的开关电源电路,其特征在于,所述差分放大电路包括第一运算放大器A1;所述第一反向比例放大电路包括第二运算放大器A2,第一电阻R1,第二电阻R2,第三电阻R3,第四电阻R4、第五电阻R5及PMOS晶体管T2;所述增益调节电路包括第三运算放大器A3,所述R5及所述T2;所述电压跟随电路包括第四运算放大器A4;所述第二反向比例放大电路包括第五运算放大器A5,第六电阻R6,第七电阻R7及第八电阻R8The switching power supply circuit according to claim 4, wherein said differential amplifier circuit comprises a first operational amplifier A 1; the ratio of the first reverse amplifier circuit includes a second operational amplifier A 2, the first resistors R 1 a second resistor R 2 , a third resistor R 3 , a fourth resistor R 4 , a fifth resistor R 5 , and a PMOS transistor T 2 ; the gain adjustment circuit includes a third operational amplifier A 3 , the R 5 and the T 2 ; the voltage follower circuit includes a fourth operational amplifier A 4 ; the second inverse proportional amplification circuit includes a fifth operational amplifier A 5 , a sixth resistor R 6 , a seventh resistor R 7 and an eighth resistor R 8 ;
    所述A1的正向输入端连接目标负载的一端,所述A1的反向输入端连接所述目标负载的另一端,所述A1的输出端接R2的一端,所述R2的另一端接所述A2的反向输入端及所述R3的一端,所述R3的另一端接所述R4的一端,所述R4的另 一端接所述A2的输出端,所述A2的正向输入端接所述R1的一端,所述R1的另一端接地端;One end of the positive input terminal of the A 1 is connected to the target load, the inverting input of A 1 is connected to the other end of the target load, the terminating end of the output A 1 of said R 2, said R 2 inverting input terminal of the other end of the a 2 and R 3 of one end, the other end of R 3 end of the R 4, the R output of said another end of a 2 4 end, the forward end of the input a 2 of the R 1 end, the other end of the end of R 1;
    所述A3的反向输入端接基准电压,所述A3的正向输入端接所述A1的输出端,所述A3的输出端接所述T2的栅极,所述T2的漏极接所述R3及所述R4之间的中间节点,所述T2的源极接所述R5的一端,所述R5的另一端接地端;The inverting input terminal of the A 3 is connected to the reference voltage, the forward input terminal of the A 3 is connected to the output end of the A 1 , and the output terminal of the A 3 is connected to the gate of the T 2 , the T 2 connected to the drain of R 3 and the other end of end of the intermediate node between R 4, the T electrode connected to the source 2 end R 5, said R 5;
    所述A4的正向输入端接所述A2的输出端,所述A4的反向输入端接所述A4的输出端; 4 A the positive input terminal of the output A 2 of the termination, the termination 4 A reverse input terminal of the output A 4;
    所述A5的反向输入端接所述R7的一端及所述R8的一端,所述R7的另一端接所述A4的输出端,所述R8的另一端接所述A5的输出端,所述A5的正向输入端接所述R6的一端,所述R6的另一端接地端;The reverse input terminal of the A 5 is connected to one end of the R 7 and one end of the R 8 , the other end of the R 7 is connected to the output end of the A 4 , and the other end of the R 8 is connected to the a 5 is an output terminal, the input terminal a 5 forward end of said R 6, said R 6 is other end connected to ground;
    所述ADC的一端接所述A5的输出端及所述A3的输出端,所述ADC的另一端接所述负载切换电路。One end of the ADC is connected to the output end of the A 5 and the output end of the A 3 , and the other end of the ADC is connected to the load switching circuit.
  6. 根据权利要求5所述的开关电源电路,所述R1至所述R8对应的精度为百分之一。The switching power supply circuit according to claim 5, wherein said R 1 to said R 8 correspond to an accuracy of one percent.
  7. 根据权利要求1至6中任一项所述的开关电源电路,所述目标负载对应的精度为百分之一。The switching power supply circuit according to any one of claims 1 to 6, wherein the target load corresponds to an accuracy of one percent.
  8. 根据权利要求1至6中任一项所述的开关电源电路,所述目标负载的阻值为0.5欧姆。The switching power supply circuit according to any one of claims 1 to 6, wherein the target load has a resistance of 0.5 ohm.
  9. 一种电源电流检测方法,其特征在于,包括:A method for detecting a power source current, comprising:
    开关电源电路确定目标电流值;The switching power supply circuit determines a target current value;
    所述开关电源电路将目标负载设置为高阻状态,将电源负载设置为休眠状态,记录所述开关电源电路对应的第一检测电流值;The switching power supply circuit sets the target load to a high impedance state, sets the power load to a sleep state, and records a first detected current value corresponding to the switching power supply circuit;
    所述开关电源电路将目标负载设置为工作状态,并检测所述目标负载对应的电压值;The switching power supply circuit sets a target load to an operating state, and detects a voltage value corresponding to the target load;
    所述开关电源电路根据所述电压值计算所述目标负载对应的电流值;The switching power supply circuit calculates a current value corresponding to the target load according to the voltage value;
    当确定所述目标负载对应的电流值不等于所述目标电流值时,所述开关电源电路将所述目标负载对应的电流值调节至所述目标电流值;When it is determined that the current value corresponding to the target load is not equal to the target current value, the switching power supply circuit adjusts a current value corresponding to the target load to the target current value;
    当确定所述目标负载对应的电流值等于所述目标电流值时,所述开关电源电路记录所述开关电源电路对应的第二检测电流值; When it is determined that the current value corresponding to the target load is equal to the target current value, the switching power supply circuit records a second detected current value corresponding to the switching power supply circuit;
    所述开关电源电路确定所述第二检测电流值与所述第一检测电流值的差值为所述目标电流值对应的检测值。The switching power supply circuit determines a difference between the second detected current value and the first detected current value as a detected value corresponding to the target current value.
  10. 根据权利要求9所述的方法,其特征在于,所述开关电源电路确定所述第二检测电流值与所述第一检测电流值的差值为所述目标电流值对应的检测值之后包括:The method according to claim 9, wherein the switching power supply circuit determines that the difference between the second detected current value and the first detected current value is a detected value corresponding to the target current value, and then includes:
    所述开关电源电路将所述目标负载设置为高阻状态,将所述电源负载设置为工作状态。 The switching power supply circuit sets the target load to a high impedance state, and sets the power load to an active state.
PCT/CN2016/104211 2016-11-01 2016-11-01 Switching power supply circuit and switching power supply current detection method WO2018081918A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680078411.XA CN108475982B (en) 2016-11-01 2016-11-01 Switching power supply circuit and switching power supply current detection method
PCT/CN2016/104211 WO2018081918A1 (en) 2016-11-01 2016-11-01 Switching power supply circuit and switching power supply current detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/104211 WO2018081918A1 (en) 2016-11-01 2016-11-01 Switching power supply circuit and switching power supply current detection method

Publications (1)

Publication Number Publication Date
WO2018081918A1 true WO2018081918A1 (en) 2018-05-11

Family

ID=62075443

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/104211 WO2018081918A1 (en) 2016-11-01 2016-11-01 Switching power supply circuit and switching power supply current detection method

Country Status (2)

Country Link
CN (1) CN108475982B (en)
WO (1) WO2018081918A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111478687A (en) * 2020-04-27 2020-07-31 西安电子科技大学 High-precision current-limiting load switch circuit
CN117890820A (en) * 2024-01-15 2024-04-16 江淮前沿技术协同创新中心 Power module testing system and method
CN118413088A (en) * 2024-07-03 2024-07-30 歌尔股份有限公司 Noise suppression circuit, intelligent device, noise suppression method thereof and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113252970B (en) * 2021-04-23 2022-11-18 长城电源技术有限公司 Load detection circuit and power supply system
CN114333656B (en) * 2021-12-10 2023-12-12 北京镁伽科技有限公司 Power self-checking system, adjustable voltage source and image signal generator

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201430719Y (en) * 2009-06-15 2010-03-24 常州绿威电器有限公司 Electronic emergency inverter
CN103427632A (en) * 2013-07-21 2013-12-04 马东林 Tolerance charge pump
CN203691216U (en) * 2013-11-27 2014-07-02 李子一 Load switching circuit for power converter
CN104360147A (en) * 2014-11-24 2015-02-18 中国航空工业集团公司洛阳电光设备研究所 Test equipment for three-end voltage regulator

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101029910B (en) * 2007-03-22 2010-05-26 华为技术有限公司 Current inspecting circuit and device
CN102539869A (en) * 2012-02-23 2012-07-04 华为技术有限公司 Current detecting device and method
CN103217567A (en) * 2013-04-19 2013-07-24 华为技术有限公司 Current detection method and power detection circuit
US9385609B2 (en) * 2014-02-14 2016-07-05 Infineon Technologies Ag Analog current estimation and digital estimation correction for a multiphase buck converter

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201430719Y (en) * 2009-06-15 2010-03-24 常州绿威电器有限公司 Electronic emergency inverter
CN103427632A (en) * 2013-07-21 2013-12-04 马东林 Tolerance charge pump
CN203691216U (en) * 2013-11-27 2014-07-02 李子一 Load switching circuit for power converter
CN104360147A (en) * 2014-11-24 2015-02-18 中国航空工业集团公司洛阳电光设备研究所 Test equipment for three-end voltage regulator

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111478687A (en) * 2020-04-27 2020-07-31 西安电子科技大学 High-precision current-limiting load switch circuit
CN117890820A (en) * 2024-01-15 2024-04-16 江淮前沿技术协同创新中心 Power module testing system and method
CN118413088A (en) * 2024-07-03 2024-07-30 歌尔股份有限公司 Noise suppression circuit, intelligent device, noise suppression method thereof and storage medium

Also Published As

Publication number Publication date
CN108475982B (en) 2020-03-10
CN108475982A (en) 2018-08-31

Similar Documents

Publication Publication Date Title
WO2018081918A1 (en) Switching power supply circuit and switching power supply current detection method
US6621259B2 (en) Current sense amplifier and method
WO2016179964A1 (en) Detection circuit and detection method for high-side current
US8648586B2 (en) Circuit for sensing load current of a voltage regulator
US11249117B2 (en) Autoranging ammeter with fast dynamic response
US12123788B2 (en) Temperature measurement circuit, temperature and light intensity measurement circuit, temperature measurement method and temperature and light intensity measurement method
CN107064613B (en) A kind of switch power supply current detection circuit
TWI640794B (en) Sensor device
TW201825909A (en) Current sense amplifier architecture and level shifter
US20130158921A1 (en) Load impedance detection
US9806685B1 (en) Trans-impedance amplifier with increased dynamic range
JP6027625B2 (en) Current sensing device for multi-sensor arrays
CN111983316A (en) ISO detection method and device
TWI596890B (en) Signal processing circuit
JP2013102283A (en) Current output circuit
JP2012247233A (en) Current/voltage conversion circuit
US9825596B2 (en) Switched amplifiers
JP2011254408A (en) Power amplifier module and portable information terminal
CN102455725A (en) Voltage/current double-loop control device and chip
JP4977829B2 (en) High precision level improved window comparator for DC-DC converter
US11435426B2 (en) Current measurement in power-gated microprocessors
CN112311332B (en) Signal amplifying circuit with high power supply rejection ratio and driving circuit therein
Zhang et al. A High Accuracy and Wide Input Voltage Range Current Sense Amplifier for Bidirectional High-Side and Low-Side Current-Sensing
CN113155159A (en) Bridge type detector
CN218734271U (en) Signal conditioning circuit and measuring device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16920597

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16920597

Country of ref document: EP

Kind code of ref document: A1