Total current sampling circuit, chip and load detection circuit
By designing the total current sampling circuit, the sampling and monitoring of the total current of multiple load components is achieved by using the current multiplexing sampling terminal and gain amplifier, which solves the problem of inability to detect the total current in the prior art and ensures that in fast charging and motor applications Circuit safety and sampling accuracy.
Patent Information
- Application Number
- CN202411184448.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-12
AI Technical Summary
The prior art cannot effectively detect and feedback the total current output from multiple sets of parallel loads, resulting in the inability to adjust the current in time in fast charging and motor application scenarios to protect the safety of the sampling circuit and motor.
A total current sampling circuit is designed to realize the total current sampling terminal sampling of multiple load elements through the processing unit, selector, adder and at least two sampling channels, and use gain amplifier and analog-to-digital converter for the total current sampling terminal. Current amplification and digitization process ensure that current sampling configurations in multiple scenarios are realized in limited port scenarios.
It realizes accurate sampling and monitoring of the total current of multiple load components, can protect the circuit safety when the external charging current is too large or short-circuited, and timely adjust the motor running current to meet the needs of different sampling accuracy and power ranges.
Smart Images

Figure CN118937750A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of current sampling, and in particular to a total current sampling circuit, a chip and a load detection circuit. Background Art
[0002] In some highly integrated applications, chips often integrate multiple operational amplifiers to reduce the complexity of the entire system and improve the integration. Operational amplifiers generally require differential inputs. When multiple operational amplifiers are integrated in a chip, the number of pins of the chip increases, and a compatible design is adopted by multiplexing pins. Chinese invention patent 201811298024.4 achieves the purpose of detecting a group of different steering wheel buttons with only one PIN pin by multiplexing the PIN pin of the constant current source inside the MCU and the PIN pin of the ADC sampling module inside it; in Chinese invention patent 201811298024.4, the constant current source module switches the output current signals of different gears in turn through the preset chip pins, and at the same time controls the ADC sampling module to sample the test key value voltage of the triggered button on the preset chip pin, and performs matching judgment, and then controls the constant current source module to output the current signal of the selected matching gear on the preset chip pin, but the MCU cannot detect the sum of the current signals of all gears inside the controller, that is, the method of multiplexing the preset chip pins cannot feedback the total current output of multiple groups of key loads outside the MCU.
[0003] The aforementioned total current is mainly the total current output by a circuit composed of multiple loads in parallel, which is used to ensure the overall power consumption of the circuit and meet the power supply of the application equipment. If the total current output by multiple groups of loads in parallel outside the MCU cannot be obtained, then in the fast charging application scenario, the total current cannot be adjusted to protect the sampling circuit from exceeding the working power in the case of excessive external charging current or short circuit. For example, in the motor application scenario, if the total current output by the motor drive circuit is missing, it is impossible to timely feedback the state of excessive motor operating current such as motor stall or motor damage. Summary of the invention
[0004] This application discloses a total current sampling circuit, a chip and a load detection circuit, and the specific technical solutions involved are as follows: A total current sampling circuit, the total current sampling circuit includes a processing unit, a selector and at least two sampling channels; the total current sampling circuit is provided with a current multiplexing sampling end; there is a sampling multiplexing channel among the at least two sampling channels; the processing unit is used to sample the total current of a preset number of load elements at the current multiplexing sampling end, and when the selector selects the sampling multiplexing channel to connect to the processing unit, the total current of the preset number of load elements is measured as a result of being amplified by the sampling multiplexing channel; wherein the total current of the preset number of load elements is the sum of the currents of the preset number of load elements; the preset number is greater than the value 1.
[0005] In summary, the total current sampling circuit disclosed in the present application can multiplex a single sampling port to sample the current and value of the load elements connected to each of the multiple sampling ports, thereby realizing multi-channel current summing and multiplexing of the sampling channel where the single sampling port is located, and is specifically multiplexed in the scenario where the sampling multiplexing channel samples the total current of the preset number of load elements, thereby utilizing the total current sampling circuit to perform the external circuit total current sampling configuration for the corresponding scenario. Based on this, the processing unit can adjust the excessive current according to the total current information to protect the circuit safety when the external charging current is too large or short-circuited; and also convert the sampling current of one of the sampling channels according to the total current sampled by the multiple sampling channels.
[0006] Furthermore, the total current sampling circuit is also provided with a reference sampling terminal and at least one first current sampling terminal; there is also at least one first sampling channel in the at least two sampling channels; a gain amplifier is provided in each sampling channel, wherein a gain amplifier provided in a first sampling channel is a first gain amplifier, and a gain amplifier provided in a sampling multiplexing channel is a second gain amplifier; the positive input terminal of each first gain amplifier is respectively connected to a first current sampling terminal, and each first current sampling terminal is used to sample the current of a load element; the positive input terminal of the second gain amplifier and the negative input terminal of each first gain amplifier are both connected to the reference sampling terminal; the negative input terminal of the second gain amplifier is connected to the current multiplexing sampling terminal. Therefore, the reference sampling terminal provides a common terminal for all gain amplifiers, and also forms a differential routing with the input terminal of the same gain amplifier with opposite polarity, so as to reduce differential mode interference; it is suitable for a large current (charging overcurrent detection or motor stall current) application scenario, sampling the current flowing through the parallel connection trunk composed of a preset number of load elements externally connected to the current multiplexing sampling terminal P2.
[0007] Furthermore, the total current sampling circuit also includes an adder; the output ends of the at least two gain amplifiers are respectively connected to the corresponding input ends of the adder; the output end of the second gain amplifier and the output end of the adder are respectively connected to the corresponding input ends of the selector; the output end of the selector is connected to the processing unit; when the current multiplexing sampling end is configured to sample the total current of a preset number of load elements, the selector is used to prohibit the output end of the adder from being connected to the processing unit, and at the same time, the output end of the second gain amplifier is selected to be connected to the processing unit, so that the second gain amplifier amplifies the total current of the preset number of load elements, and then transmits the amplified result to the processing unit. Then the processing unit directly obtains the sampling result of the total current of the preset number of load elements through the second gain amplifier, and the second gain amplifier is multiplexed as a circuit module for sampling the total current of the preset number of load elements.
[0008] Furthermore, the total current sampling circuit also includes an analog-to-digital converter, the output end of each gain amplifier is respectively connected to the corresponding input end of the analog-to-digital converter, and the output end of the analog-to-digital converter is connected to the processing unit; the analog-to-digital converter is used to convert the output signal of each gain amplifier so that the processing unit can measure the current of each load element or its sum value. When applying the fast charging scenario, the processing unit uses the current digital value converted by the analog-to-digital converter for power control and over-current protection of the charging equipment.
[0009] Furthermore, when the current multiplexing sampling end samples the total current of the preset number of load elements, the processing unit is used to measure the current of each load element connected to the first current sampling end respectively through an analog-to-digital converter, and the processing unit is also used to measure the current of the parallel connection main circuit of the preset number of load elements connected to the current multiplexing sampling end through the analog-to-digital converter, wherein the total current of the preset number of load elements is the current of the parallel connection main circuit of the preset number of load elements; the preset number of load elements include the load elements connected to the first current sampling end and the load elements to be detected that are connected in parallel to the branch where the load elements connected to the first current sampling end are located, so that the current of the load element to be detected is equal to the difference obtained by subtracting the sum of the currents of the load elements connected to the first current sampling end from the current of the parallel connection main circuit of the preset number of load elements.
[0010] A chip includes the total current sampling circuit. The chip has at least one sampling channel whose positive input terminal is connected to the first current sampling terminal of the chip to receive the sampled power of a single load element connected to the outside of the chip, and another sampling channel whose positive input terminal is connected to the current multiplexing sampling terminal of the chip to receive the sampled power of a single load element connected to the outside of the chip or the total sampled current of multiple load elements. In addition, at least one sampling channel whose negative input terminal and another sampling channel whose positive input terminal are combined and connected to the reference sampling terminal of the chip to receive the total sampled current between all external load elements, corresponding to the total current of the preset number of load elements disclosed in the above embodiment; thus, a total sampling current selection path is provided in the chip, and a plurality of series-parallel connection modes of external load circuit sampling configuration can be performed, which has good flexibility. Based on this, the processing unit can adjust the excessive current according to the total current of the preset number of load elements, and the preset number can be adjusted to increase or decrease the load elements connected to the chip to protect the circuit safety when the external charging current is too large or short-circuited, and timely adjust the power of the charging device or adjust the running current of the motor with abnormal stall.
[0011] A load detection circuit, the load detection circuit includes a load circuit and the chip, or the load detection circuit includes a load circuit and the total current sampling circuit. The load detection circuit disclosed in the present application can perform current sampling of different ranges and precisions on the load circuit through sampling channels, adders and selectors in a limited number of port scenarios, so as to realize that a single sampling channel is reused in the scenario where the current multiplexing sampling end samples the total current of the preset number of load elements, thereby utilizing the internally set total current sampling circuit to perform sampling configuration of external circuits in multiple scenarios, and meet the total current sampling requirements of different sampling precisions and power ranges.
[0012] Furthermore, the load circuit includes the preset number of load elements and the preset number of sampling resistors; each load element is provided with one end connected to the power supply voltage, and the preset number of sampling resistors are commonly connected to the reference sampling end; wherein each of the first current sampling ends is respectively connected to a load element, and the load element connected to the first current sampling end is connected to the reference sampling end through a sampling resistor. Based on this, the processing unit can adjust the excessive current according to the total current output by all sampling channels to protect the circuit safety when the external charging current is too large or short-circuited.
[0013] Further, there is one load element to be detected and at least one preset load element among the preset number of load elements, there is one target sampling resistor and at least one reference sampling resistor among the preset number of sampling resistors, one end of each preset load element is connected to the supply voltage, the other end of each preset load element is respectively connected to the corresponding first current sampling end, and the other end of each preset load element is also respectively connected to the reference sampling end through the corresponding reference sampling resistor, so that each preset load element and the corresponding reference sampling resistor are connected in series between the supply voltage and the reference sampling end; one end of the load element to be detected is connected to the supply voltage, and the other end of the load element to be detected is connected to the reference sampling end, so that the branch in which each preset load element is connected in series with the corresponding reference sampling resistor is connected in parallel with the load element to be detected, and the reference sampling end becomes the common end of the parallel connection between the load element to be detected and the branch where each preset load element is located.
[0014] Furthermore, the reference sampling terminal is connected to the current multiplexing sampling terminal through a target sampling resistor, so that the target sampling resistor is connected to the parallel connection trunk of the preset number of load elements, and the current multiplexing sampling terminal samples the total current of the preset number of load elements, so that the second gain amplifier can sample and process the total current of the preset number of load elements through the current multiplexing sampling terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of the internal circuit structure of a chip of a total current sampling circuit is disclosed for one embodiment of the present application.
[0016] Figure 2 Another embodiment of the present application discloses a schematic diagram of a load circuit connected when a current multiplexing sampling terminal P3 samples the total current of three load elements. DETAILED DESCRIPTION
[0017] In the following description, specific details are given to provide a thorough understanding of the embodiments. However, one of ordinary skill in the art will appreciate that the embodiments may be practiced without these specific details. For example, circuits may be shown in block diagrams so as not to obscure the embodiments in unnecessary detail. In other cases, well-known circuits, structures, and techniques may not be shown in detail in order not to obscure the embodiments.
[0018] The prior art uses a resistor with a small resistance value to sample the current, and the sampled voltage represents the current situation. This is a common current sampling method. When performing overcurrent detection on some fast charging devices, it is necessary to detect whether the external charging current is too large to protect the current sampling conversion device in front from exceeding the safe power and ensure that the power consumption of the overall circuit meets the power supply requirements of the sampling work; when applied to detect the bus current of the motor, by detecting whether the bus current is too large, problems such as motor stalling or motor damage can be checked; the load current includes the load's working current and the load's sleep current (when performing overcurrent detection on the fast charging device and detecting the bus current of the motor, the sampled current detected is the load's working current). Otherwise, in the fast charging application scenario, it is impossible to adjust the total current to protect the sampling circuit from exceeding the working power in the case of excessive external charging current or short circuit; for example, in the motor application scenario, if the total current output by the motor drive circuit is missing, it is impossible to timely feedback the motor stalling or motor damage and other conditions where the motor's operating current is too large.
[0019] In order to solve at least one of the aforementioned technical problems, the present application discloses a total current sampling circuit, which includes a processing unit, a selector, an adder and at least two sampling channels; the total current sampling circuit is provided with a current multiplexing sampling terminal, and other multiple sampling terminals can also be provided to respectively connect multiple load elements; there is a sampling multiplexing channel in the at least two sampling channels, and multiple sampling channels of different types can also be provided to respectively sample and amplify the currents of multiple load elements; in order to improve the detection capability, one sampling channel is preferably provided with a gain amplifier. In the total current sampling circuit, a sampling channel or all sampling channels are connected to the processing unit by the selector. It can be understood that one sampling channel is used to sample one current, and one sampling channel can be connected by an operational amplifier structure and a resistor to form a sampling channel with current sampling, amplification, and feedback adjustment functions; the adder can also perform addition operations on the current signals sampled by all sampling channels or some sampling channels to obtain total current information.
[0020] In the present application, the processing unit is used to sample the total current of the preset number of load elements at the current multiplexing sampling end. When the selector selects the sampling multiplexing channel to connect to the processing unit, the total current of the preset number of load elements is measured after being amplified by the sampling multiplexing channel, and multiplexed into the sampling result or detection result of the total current of the preset number of load elements, wherein the total current of the preset number of load elements is represented by the sampling voltage of the sampling resistor connected to the current multiplexing sampling end and located in the parallel connection trunk of the preset number of load elements.
[0021] It should be noted that the total current of the preset number of load elements is the sum of the currents of the preset number of load elements, that is, the sum of the currents of the preset number of load elements (or their branches) flowing outside the total current sampling circuit. The preset number is greater than the value 1. In some circuit implementations of the external load, the number of sampling channels set is greater than or equal to the preset number.
[0022] In summary, the total current sampling circuit disclosed in the present application can multiplex a single sampling port to sample the current and value of the load elements connected to each of the multiple sampling ports, thereby realizing multi-channel current summing and multiplexing of the sampling channel where the single sampling port is located, and is specifically multiplexed in the scenario where the sampling multiplexing channel samples the total current of the preset number of load elements, thereby utilizing the total current sampling circuit to perform the external circuit total current sampling configuration for the corresponding scenario. Based on this, the processing unit can adjust the excessive current according to the total current information to protect the circuit safety when the external charging current is too large or short-circuited; and also convert the sampling current of one of the sampling channels according to the total current sampled by the multiple sampling channels.
[0023] On the basis of the above embodiment, the total current sampling circuit is further provided with a reference sampling terminal and at least one first current sampling terminal; there is also at least one first sampling channel in the at least two sampling channels; a gain amplifier is provided in each sampling channel, wherein a gain amplifier provided in a first sampling channel is a first gain amplifier, and a gain amplifier provided in a sampling multiplexing channel is a second gain amplifier. The positive input terminal of each first gain amplifier is respectively connected to a first current sampling terminal, and each first current sampling terminal is used to sample the current of a load element, that is, each first gain amplifier samples the current flowing through the load element through the first current sampling terminal connected thereto, and the current of the load element is also the current of the branch where the load element is located (a load branch external to the total current sampling circuit), wherein a gain amplifier samples the current of different load elements through the corresponding first current sampling terminal, forming a sampling channel, that is, forming a connection path between a first current sampling terminal and a processing unit (or adder or selector).
[0024] The positive input terminal of the second gain amplifier and the negative input terminal of each first gain amplifier are connected to the reference sampling terminal, and the reference sampling terminal is used to sample the total current of a preset number of load elements; the preset number is the number of sampling channels included in the total current sampling circuit, and the preset number is greater than the value 1; the number of sampling channels included in the total current sampling circuit is the preset number, and the number of sampling channels included in the total current sampling circuit is equal to the number of load elements; here, one gain amplifier is connected to one sampling channel, and all sampling channels are connected to the reference sampling terminal in common, providing a common input terminal for all gain amplifiers, and also forming a differential routing between the input terminals of the same gain amplifier with opposite polarities, thereby reducing differential mode interference.
[0025] Indicatively, Figure 1 As shown, the preset number is equal to the value 3, there are three gain amplifiers in the total current sampling circuit, there is a second gain amplifier which is the gain amplifier PGA2, there are two first gain amplifiers which are the gain amplifier PGA11 and the gain amplifier PGA12, the total current sampling circuit is provided with a first current sampling terminal P11, a first current sampling terminal P12, a reference sampling terminal M and a current multiplexing sampling terminal P2, the positive input terminal of the gain amplifier PGA11 is connected to the first current sampling terminal P11 to sample the current flowing through the branch where the load element connected to the first current sampling terminal P11 is located, the positive input terminal of the gain amplifier PGA12 is connected to the first current sampling terminal P12 to sample the current flowing through the branch where the load element connected to the first current sampling terminal P11 is located, The current of the branch where the load element of the current sampling terminal P12 is located, the positive input terminal of the gain amplifier PGA2, the negative input terminal of the gain amplifier PGA11 and the negative input terminal of the gain amplifier PGA12 are all connected to the reference sampling terminal M to sample the sum of the currents of the branches where the three load elements are located, then the first current sampling terminal P11 and the first current sampling terminal P12 are configured to be at different potentials from the reference sampling terminal M. It can be understood that the reference sampling terminal and the first current sampling terminal adopt differential routing in order to eliminate the differential mode interference of the ground. For a single gain amplifier, only the differential mode voltage between the positive and negative input terminals is concerned. It is only necessary to ensure that the potentials of the input terminals connected to the reference sampling terminal are equal between different gain amplifiers.
[0026] It should be noted that the internal structure of the gain amplifier used in this application is as follows: Figure 1As shown, for each gain amplifier, the inside of the gain amplifier includes an operational amplifier OP, a feedback resistor, a positive input resistor, a negative input resistor and a pull-up resistor. The positive input terminal + of the operational amplifier OP and one end of the positive input resistor are commonly connected to one end of the pull-up resistor, the other end of the pull-up resistor is connected to a reference voltage VREF, and the other end of the positive input resistor is set as the positive input terminal of the gain amplifier; the positive input terminal + of the operational amplifier OP and one end of the positive input resistor are commonly connected to one end of the pull-up resistor, the other end of the pull-up resistor is connected to the reference voltage, and the other end of the positive input resistor is set as the positive input terminal of the gain amplifier; the negative input terminal - of the operational amplifier OP and one end of the negative input resistor are commonly connected to one end of the feedback resistor, the other end of the feedback resistor is connected to the output terminal of the operational amplifier OP, and the output terminal of the operational amplifier OP is set as the output terminal of the gain amplifier; the other end of the negative input resistor is set as the negative input terminal of the gain amplifier, and the other end of the negative input resistor is grounded, thereby forming a differential input structure inside the gain amplifier.
[0027] Those skilled in the art can understand that, by utilizing the virtual disconnection characteristic of the operational amplifier, the voltage at the positive input terminal (the port connected to the first current sampling terminal or the second current sampling terminal) of the gain amplifier will not have a voltage drop at the positive input resistor, because there is no current, so the presence or absence of the positive input resistor does not affect the voltage at the positive input terminal of the gain amplifier being equal to the voltage of the positive input terminal + of the operational amplifier OP, and similarly, the voltage at the negative input terminal of the gain amplifier is equal to the voltage of the negative input terminal - of the operational amplifier OP, and therefore, the sampling current or sampling voltage at the positive input terminal or its negative input terminal (referring to the first current sampling terminal or the second current sampling terminal) of the gain amplifier is essentially sampling at the input terminal of the operational amplifier inside it. In addition, the signal gain parameter of the gain amplifier is adjustable, for example, the resistance value of at least one resistor of the feedback resistor, the positive input resistor, the negative input resistor, and the pull-up resistor can be adjusted to change the signal gain parameter (essentially changing the resistance ratio between different resistors) to adapt to the signal amplification requirements of its positive and negative input terminals, improve the detection capability of small current signals, and suppress excessive amplification of large current signals.
[0028] The negative input terminal of the second gain amplifier is connected to the current multiplexing sampling terminal, as shown schematically. Figure 1As shown, the positive input terminal of the second gain amplifier PGA2 is connected to the current multiplexing sampling terminal P2. In an application scenario of a larger current (charging overcurrent detection or motor stall current), the current flowing through the parallel-connected main circuit composed of a preset number of load elements externally connected to the current multiplexing sampling terminal P2 is sampled, and in an application scenario of a smaller current (sleep current of the equipment), the current flowing through the branch where a single load element externally connected to the current multiplexing sampling terminal P2 is located is sampled separately; the second gain amplifier PGA2 is reused in different current sampling scenarios to perform sampling and detection of corresponding current ranges and accuracy.
[0029] In summary, the total current sampling circuit disclosed in the present application is internally designed to interconnect a selector and multiple gain amplifiers, and a single gain amplifier is selected by the selector to the processing unit. It is capable of sampling multiple loads connected to the outside of the sampling circuit in different ranges by selecting a single gain amplifier or multiple gain amplifiers under a limited number of sampling ports, thereby realizing multiplexing of the gain amplifier, including multiplexing in the scenario where the second gain amplifier and the current multiplexing sampling end sample the total current of the preset number of load elements, the scenario where the currents of the preset number of load elements are summed by an adder, and the scenario where the second gain amplifier and the current multiplexing sampling end sample the current of a single load element, thereby utilizing the total current sampling circuit to perform sampling configuration of external circuits in multiple scenarios, meeting the requirements of different sampling accuracy and sampling range, and having good current sampling flexibility. Based on this, the processing unit can adjust the excessive current according to the total current of the preset number of load elements, so as to protect the circuit safety when the external charging current is too large or short-circuited, and timely adjust the power of the charging device or adjust the operating current of the motor that has stalled abnormally; or, by separately sampling the current of one of the load elements in the sleep state and amplifying it, the sleep current information can be obtained, overcoming the problem of small current detection of one port of a multi-port charging device that cannot be detected separately due to low sampling accuracy or large detection error.
[0030] As an embodiment, the total current sampling circuit further includes an adder; the output ends of the at least two gain amplifiers are respectively connected to the corresponding input ends of the adder, corresponding to Figure 1 The output end of the first gain amplifier PGA11, the output end of the first gain amplifier PGA12 and the output end of the second gain amplifier PGA2 can be configured to be connected to the three input ends of the adder respectively, so as to add the sampling signals amplified by the first gain amplifier PGA11, the first gain amplifier PGA12 and the second gain amplifier PGA2, which is equivalent to obtaining the result of the total current of the preset number of load elements being amplified by the second gain amplifier, and is also equivalent to adding the sampling current values of the three gain amplifiers through the adder.
[0031] The output end of the second gain amplifier and the output end of the adder are respectively connected to the corresponding input ends of the selector, and the output end of the selector is connected to the processing unit, corresponding to Figure 1 The output end of the second gain amplifier PGA2 and the output end of the adder can be configured to be connected to the two input ends of the selector respectively, and the selection end Select of the selector receives an external selection signal (which can be from the processing unit) to select the output end of the second gain amplifier to be connected to the processing unit when the total current of the preset number of load elements is input to the negative input end of the second gain amplifier, that is, to let the separate gain amplifier amplify the total output current; or when the total current of a single load element is input to the negative input end of the second gain amplifier, select the output end of the second gain amplifier to be connected to the processing unit for current sampling and detection of the single load element, or switch the output end of the adder to be connected to the processing unit for sampling and detection of the total current of the preset number of load elements.
[0032] When the current multiplexing sampling terminal is configured to sample the total current of the preset number of load elements, it is schematically represented as the second gain amplifier PGA2 sampling the current collected in the sampling resistor R1 through the current multiplexing sampling terminal P2, and the current collected in the sampling resistor R1 comes from the current of the preset number of load elements. At this time, the second gain amplifier PGA2 has sampled the total current of the preset number of load elements through the current multiplexing sampling terminal P2, and the selector is used to prohibit the output terminal of the selected adder from being connected to the processing unit, and the output signals of each gain amplifier do not need to be added through the adder. At the same time, the selector selects the output terminal of the second gain amplifier to be connected to the processing unit, so that the second gain amplifier amplifies the total current of the preset number of load elements, and then transmits the amplified result to the processing unit. The processing unit directly obtains the sampling result of the total current of the preset number of load elements through the second gain amplifier, so that the second gain amplifier is multiplexed as a circuit module for sampling the total current of the preset number of load elements.
[0033] Introduce sampling resistor for explanation, combined with Figure 1 and Figure 2 It can be seen that the second gain amplifier PGA2 is connected to the sampling resistor R1 through the current multiplexing sampling terminal P2, and the sampling resistor R1 is connected to the reference sampling terminal M. Figure 2 The load elements Load1 to Load3 shown in the figure are considered to be connected in parallel to the reference sampling terminal M through corresponding resistors, so that the sampling resistor R1 samples Figure 2The current sum values of the load elements Load1 to Load3 shown in the figure can be applied to provide a scenario of a load current sum selection path for the motor load circuit outside the total current sampling circuit. In this scenario, the sampling resistor R1 is connected to the parallel connection trunk of the load elements Load1, Load2 and Load3, and the sampling resistor R1 samples the current collected by the load elements Load1, Load2 and Load3, generates a sampling voltage to the current multiplexing sampling terminal P2, and then provides a load current sum selection signal source for the selector, and there is no need to call the adder to add the output signals of the first gain amplifier PGA11, the first gain amplifier PGA12 and the second gain amplifier PGA2.
[0034] In the present application, the total current sampling circuit further includes an analog-to-digital converter, the output end of each gain amplifier is respectively connected to the corresponding input end of the analog-to-digital converter, and the output end of the analog-to-digital converter is connected to the processing unit, such as Figure 1 As shown, the output end of the first gain amplifier PGA11, the output end of the first gain amplifier PGA12, and the output end of the second gain amplifier PGA2 are respectively connected to an input end of the analog-to-digital converter ADC, and the analog-to-digital converter is used to convert the output signal of each gain amplifier so that the processing unit can measure the current of each load element or its sum value, that is, the processing unit obtains the sum value of the current of each load element through the analog-to-digital converter when the total current of the preset number of load elements is sampled at the current multiplexing sampling end, or the processing unit obtains the current of a single load element currently sampled at the current multiplexing sampling end through the analog-to-digital converter when the current of a load element is sampled at the current multiplexing sampling end. Therefore, the processing unit monitors the current of each load element or its sum value in real time through the analog-to-digital converter. When applied to the motor, the processing unit uses the current digital value converted by the analog-to-digital converter to calculate the motor rotation angle; when applied to the fast charging scenario, the processing unit uses the current digital value converted by the analog-to-digital converter for power control and over-current protection of the charging device.
[0035] Based on the above embodiment, when the current multiplexing sampling end samples the total current of the preset number of load elements, the processing unit measures the current of each load element connected to the first current sampling end through an analog-to-digital converter, and the processing unit also measures the current of the parallel connection trunk of the preset number of load elements connected to the current multiplexing sampling end through an analog-to-digital converter, wherein the total current of the preset number of load elements is the current of the parallel connection trunk of the preset number of load elements, combined with Figure 1 and Figure 2It can be known that the sampling resistor R1 is connected to the parallel connection trunk of the load elements Load1, Load2 and Load3, and the sampling resistor R1 samples the current collected by the load elements Load1, Load2 and Load3, that is, the current of the parallel connection trunk of the preset number of load elements connected to the current multiplexing sampling terminal. Then the sampling resistor R1 generates a corresponding sampling voltage and transmits it to the current multiplexing sampling terminal P2. After amplification by the second gain amplifier PGA2, it is measured by the processing unit through real-time conversion by the analog-to-digital converter. Therefore, the total current selected inside the total current sampling circuit is only amplified by the second gain amplifier PGA2, and a relatively accurate total current can be obtained.
[0036] It can be understood that the preset number of load elements disclosed in the present application includes a load element connected to the first current sampling terminal and a load element to be detected connected in parallel to the branch where the load element connected to the first current sampling terminal is located, wherein each load element forms a sampling channel in the total current sampling circuit through the sampling terminal connected thereto; in one application, such as Figure 2As shown, the preset number is equal to the value 3, the load elements connected to the first current sampling terminal are load element Load1 and load element Load2 respectively, the branch where the load element connected to the first current sampling terminal is located includes a series branch of load element Load1 and sampling resistor R2 and a series branch of load element Load2 and sampling resistor R3, then the load element to be detected connected in parallel with the branch where the load element connected to the first current sampling terminal is located is load element Load3; the current flowing through the branch where the load element Load1 is located is connected to the first current sampling terminal P11 separately through the sampling resistor R2, the current flowing through the branch where the load element Load2 is located is connected to the first current sampling terminal P12 separately through the sampling resistor R3, the first gain amplifier PGA11 collects the current of the load element Load1, the first gain amplifier PGA12 collects the current of the load element Load2, and the load element Load 3 is connected to the reference sampling terminal M, and the currents of the three load elements all flow through the current multiplexing sampling terminal P2 through the sampling resistor R1. Therefore, the second gain amplifier PGA2 measures the total current between the current of the load element Load1, the current of the load element Load2 and the current of the load element Load3. Therefore, under the software configuration of the processing unit, the current of the parallel connection trunk of the preset number of load elements is controlled to subtract the sum of the currents of the load elements connected to the first current sampling terminals, and the difference obtained is the current of the load element to be detected; the current of the load element to be detected is schematically represented as the current of the load element Load3 obtained by subtracting the current collected by the first gain amplifier PGA11 (representing the current of the load element Load1) and the current collected by the first gain amplifier PGA12 (representing the current of the load element Load2) from the total current measured by the second gain amplifier PGA2.
[0037] In addition, when the current multiplexing sampling end samples the current of a load element, when the selector selects the output end of the adder to be connected to the processing unit, the adder is used to add the output signals of all gain amplifiers, and then transmit the addition result to the processing unit, so that the processing unit samples the sum of the results of the currents of each load element being amplified by the corresponding gain amplifier, wherein each load element can be connected in parallel to the reference sampling end outside the total current sampling circuit, and a load element is connected to the input end of a gain amplifier through a sampling end, then each load element connected in parallel provides the same potential to the common end of each gain amplifier at the reference sampling end, thereby reducing the differential mode voltage interference of the gain amplifier.
[0038] Based on the above embodiments, the present application discloses a chip, which includes the total current sampling circuit, which is regarded as an integrated circuit, packaged in the chip, and has corresponding pins set externally. In the present application, the reference sampling terminal, the current multiplexing sampling terminal, and at least one of the first current sampling terminals are respectively set as the ports of the chip connecting to the external circuit, that is, the pins of the chip. Figure 1 The first current sampling terminal P11 can be represented as a chip pin P11, Figure 1 The first current sampling terminal P12 can be represented as a chip pin P12, Figure 1 The current multiplexing sampling terminal P2 can be represented as chip pin P2, Figure 1 The reference sampling terminal M can be represented as the chip pin M. The chip integrates at least two sampling channels, and each sampling channel can be provided with a gain amplifier or other op amp structure with adjustable gain coefficient; based on the above-mentioned embodiment, the chip has at least one sampling channel whose positive input terminal is led to the first current sampling terminal of the chip to receive the sampled power of a single load element connected to the outside of the chip, and another sampling channel whose positive input terminal is led to the current multiplexing sampling terminal of the chip to receive the sampled power of a single load element connected to the outside of the chip or the total sampled current of multiple load elements, and at least one sampling channel whose negative input terminal and another sampling channel whose positive input terminal are combined and connected to the reference sampling terminal of the chip to receive the total sampled current between all external load elements, corresponding to the total current of the preset number of load elements disclosed in the above-mentioned embodiment; thus, a total sampling current selection path is provided in the chip, and a plurality of series-parallel connection modes of external load circuit sampling configuration can be performed, which has good flexibility. Based on this, the processing unit can adjust the excessive current according to the total current of the preset number of load elements. The preset number can be adjusted to increase or decrease the load elements external to the chip to protect the circuit safety when the external charging current is too large or short-circuited, and to timely adjust the power of the charging device or adjust the operating current of the motor that has stalled abnormally.
[0039] The present application also discloses a load detection circuit. The load detection circuit includes a load circuit and the chip, and the chip samples the load circuit connected to its pins; or, the load detection circuit includes a load circuit and the total current sampling circuit, and the whole sampling circuit is formed and divided into multiple sampling channels. In order to improve the detection capability, each sampling channel is provided with a gain amplifier; correspondingly, the load circuit is internally connected in parallel with multiple load branches. Specifically, the total current sampling circuit is provided with at least two sampling channels, each connected to a load branch, and one sampling channel can also be configured to connect the trunk line of all load elements connected in parallel to obtain the total current information of the load circuit.
[0040] The load detection circuit disclosed in the present application can perform total current sampling of the load circuit in different ranges and accuracies through sampling channels and selectors in a limited number of port scenarios, and realize the reuse of a single sampling channel in the scenario where the current multiplexing sampling end samples the total current of the preset number of load elements, thereby utilizing the internally set total current sampling circuit to perform sampling configuration of external circuits in multiple scenarios, meeting the total current sampling requirements with different sampling accuracies and power ranges.
[0041] Specifically, the load circuit includes the preset number of load elements and the preset number of sampling resistors; each load element is provided with one end connected to the power supply voltage, and the preset number of sampling resistors are connected to the reference sampling end, so that the current sampled by each sampling resistor from the load element is fed back to the reference sampling end; each first current sampling end is respectively connected to a load element, and the load element connected to the first current sampling end is connected to the reference sampling end through a sampling resistor, that is, a load element and a sampling resistor are connected to a first current sampling end, so that the first current sampling end samples the current of a load element through a sampling resistor. It should be noted that the current of the load element is also the current of the branch where the load element is located (a load branch external to the total current sampling circuit), wherein a gain amplifier samples the current of the corresponding load element through the corresponding first current sampling end to form a sampling channel, that is, to form a connection path between the first current sampling end and the processing unit (or adder or selector). Based on this, the processing unit can adjust the excessive current according to the total current output by all sampling channels to protect the circuit safety when the external charging current is too large or short-circuited.
[0042] As an implementation manner of the load circuit, in the load circuit, there is one load element to be detected and at least one preset load element among the preset number of load elements, and there is one target sampling resistor and at least one reference sampling resistor among the preset number of sampling resistors. Schematically, the preset number is a value of 3, such as Figure 2 As shown, the preset number of load elements include a load element to be detected Load3, a preset load element Load2 and a preset load element Load1, and the preset number of resistors include a target sampling resistor R1, a reference sampling resistor R2 and a reference sampling resistor R3.
[0043] One end of each preset load element is connected to the supply voltage, the other end of each preset load element is connected to the corresponding first current sampling end, and the other end of each preset load element is also connected to the reference sampling end through a corresponding reference sampling resistor, so that each preset load element and the corresponding reference sampling resistor are connected in series between the supply voltage and the reference sampling end. Schematically, as shown in FIG. Figure 2As shown, one end of the preset load element Load1 is connected to the power supply voltage VM, the other end of the preset load element Load1 is connected to the first current sampling terminal P11, and the other end of the preset load element Load1 is connected to the reference sampling terminal M through the reference sampling resistor R2; one end of the preset load element Load2 is connected to the power supply voltage VM, the other end of the load element Load3 to be detected is connected to the first current sampling terminal P12, and the other end of the preset load element Load2 is connected to the reference sampling terminal M through the reference sampling resistor R3. The preset load element Load1 and the preset load element Load2 have sampling terminals (the first current sampling terminal P11 and the first current sampling terminal P12, respectively) that are mainly used for sampling current in the corresponding sampling channels, and also have a common terminal (reference sampling terminal M) to overcome the differential mode interference in the differential operational amplifier structure composed of the positive and negative input terminals.
[0044] One end of the load element to be detected is connected to the power supply voltage, and the other end of the load element to be detected is connected to the reference sampling end, so that the branch in which each preset load element is connected in series with the corresponding reference sampling resistor is connected in parallel with the load element to be detected, and the reference sampling end becomes the common end of the parallel connection of the load element to be detected and the branch where each preset load element is located, that is, the reference sampling end is set in the parallel connection trunk of the load element to be detected and the branch where each preset load element is located.
[0045] Indicatively, Figure 2 As shown, one end of the load element Load3 to be detected is connected to the power supply voltage VM, the other end of the load element Load3 to be detected is connected to the reference sampling terminal M, the series branch of the preset load element Load1 and the reference sampling resistor R2, the series branch of the preset load element Load2 and the reference sampling resistor R3 and the load element Load3 to be detected are connected in parallel to the reference sampling terminal M, so that the preset load element Load1, the preset load element Load2 and the load element Load3 to be detected are all connected to the reference sampling terminal M as the common end of each gain amplifier. Thus, the current of the preset load element Load1 and the current of the preset load element Load2 are sampled independently through the first current sampling terminal P11 and the first current sampling terminal P12.
[0046] The reference sampling terminal is connected to the current multiplexing sampling terminal through a target sampling resistor, so that the target sampling resistor is connected to the parallel connection trunk of the preset number of load elements, so that the current multiplexing sampling terminal samples the total current of the preset number of load elements. Figure 1 and Figure 2It can be known that one end of the target sampling resistor R1 is connected to the reference sampling terminal M, and the other end of the target sampling resistor R1 is connected to the current multiplexing sampling terminal P2, so that the target sampling resistor R1 is connected between the positive and negative input terminals of the second gain amplifier PGA2; specifically, the series branch of the preset load element Load1 and the reference sampling resistor R2, the series branch of the preset load element Load2 and the reference sampling resistor R3, and the load element Load3 to be detected are connected in parallel to the reference sampling terminal M, and the reference sampling terminal M is connected to the current multiplexing sampling terminal P2 through the target sampling resistor R1, so that the current of the preset load element Load1, the current of the preset load element Load2, and the current of the load element Load3 to be detected all flow through the target sampling resistor R1 and form a sampling voltage to be fed back to the current multiplexing sampling terminal P2, then the second gain amplifier PGA2 samples the total current between the preset load element Load1, the preset load element Load2 and the load element Load3 to be detected through the current multiplexing sampling terminal P2, so that the second gain amplifier can sample and process the total current of the preset number of load elements through the current multiplexing sampling terminal.
[0047] On this basis, the number and resistance value of the reference sampling resistors can be adjusted to meet the requirements of different power levels. Of course, the gain coefficient of the gain amplifier can be set to achieve accurate sampling of the output current of the load elements involved to meet the sampling accuracy requirements of the total current of multiple load elements.
[0048] Although the embodiments of the present application have been shown and described, it is understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present application, and the scope of the present application is limited by the attached claims and their equivalents. The above is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.
Claims
1. The total current sampling circuit is characterized in that: The total current sampling circuit includes a processing unit, a selector and at least two sampling channels; The total current sampling circuit is provided with a current multiplexing sampling terminal; There is a sampling multiplexing channel among the at least two sampling channels; A processing unit, configured to measure the result of amplifying the total current of a preset number of load elements through the sampling multiplexing channel when the selector selects the sampling multiplexing channel to connect to the processing unit, in the case where the total current of a preset number of load elements is sampled at the current multiplexing sampling end; The total current of the preset number of load elements is the sum of the currents of the preset number of load elements; and the preset number is greater than a value of 1.
2. The total current sampling circuit according to claim 1, characterized in that: The total current sampling circuit is provided with a reference sampling terminal and at least one first current sampling terminal; There is at least one first sampling channel among the at least two sampling channels; A gain amplifier is provided in each sampling channel, wherein a gain amplifier provided in a first sampling channel is a first gain amplifier, and a gain amplifier provided in a sampling multiplexing channel is a second gain amplifier; The positive input terminal of each first gain amplifier is respectively connected to a first current sampling terminal, and each first current sampling terminal is used to sample the current of a load element; the positive input terminal of the second gain amplifier and the negative input terminal of each first gain amplifier are both connected to the reference sampling terminal; The negative input terminal of the second gain amplifier is connected to the current multiplexing sampling terminal.
3. The total current sampling circuit according to claim 2, characterized in that: The total current sampling circuit also includes an adder; the output ends of the at least two gain amplifiers are respectively connected to the corresponding input ends of the adder; the output end of the second gain amplifier and the output end of the adder are respectively connected to the corresponding input ends of the selector; the output end of the selector is connected to the processing unit; When the current multiplexing sampling end is configured to sample the total current of a preset number of load elements, the selector is used to prohibit the output end of the adder from being connected to the processing unit, and at the same time enable the output end of the second gain amplifier to be connected to the processing unit, so that the second gain amplifier amplifies the total current of the preset number of load elements and then transmits the amplified result to the processing unit.
4. The total current sampling circuit according to claim 3, characterized in that: The total current sampling circuit also includes an analog-to-digital converter, the output end of each gain amplifier is respectively connected to the corresponding input end of the analog-to-digital converter, and the output end of the analog-to-digital converter is connected to the processing unit; The analog-to-digital converter is used to convert the output signal of each gain amplifier so that the processing unit can measure the current of each load element or the sum value thereof.
5. The total current sampling circuit according to claim 4, characterized in that: When the current multiplexing sampling end samples the total current of the preset number of load elements, the processing unit is used to measure the current of each load element connected to the first current sampling end respectively through an analog-to-digital converter, and the processing unit is also used to measure the current of the parallel connection trunk of the preset number of load elements connected to the current multiplexing sampling end through the analog-to-digital converter, wherein the total current of the preset number of load elements is the current of the parallel connection trunk of the preset number of load elements; the preset number of load elements include the load elements connected to the first current sampling end and the load elements to be detected that are connected in parallel to the branch where the load elements connected to the first current sampling end are located, so that the current of the load element to be detected is equal to the difference obtained by subtracting the sum of the currents of the load elements connected to the first current sampling end from the current of the parallel connection trunk of the preset number of load elements.
6. A chip, characterized in that: The chip comprises the total current sampling circuit as described in any one of claims 1 to 5.
7. A load detection circuit, characterized in that: The load detection circuit includes a load circuit and the chip described in claim 6, or the load detection circuit includes a load circuit and the total current sampling circuit described in any one of claims 1 to 5.
8. The load detection circuit according to claim 7, characterized in that: The load circuit includes the preset number of load elements and the preset number of sampling resistors; each load element is provided with one end connected to the power supply voltage, and the preset number of sampling resistors are commonly connected to the reference sampling end; Each of the first current sampling terminals is connected to a load element respectively, and the load element connected to the first current sampling terminal is connected to the reference sampling terminal via a sampling resistor.
9. The load detection circuit according to claim 8, characterized in that: There is one load element to be detected and at least one preset load element among the preset number of load elements, there is one target sampling resistor and at least one reference sampling resistor among the preset number of sampling resistors, one end of each preset load element is connected to the supply voltage, the other end of each preset load element is respectively connected to the corresponding first current sampling end, and the other end of each preset load element is also respectively connected to the reference sampling end through the corresponding reference sampling resistor, so that each preset load element and the corresponding reference sampling resistor are connected in series between the supply voltage and the reference sampling end; One end of the load element to be detected is connected to the power supply voltage, and the other end of the load element to be detected is connected to the reference sampling end, so that the branch in which each preset load element is connected in series with the corresponding reference sampling resistor is connected in parallel with the load element to be detected, and the reference sampling end becomes the common end of the parallel connection of the load element to be detected and the branch where each preset load element is located.
10. The load detection circuit according to claim 9, characterized in that: The reference sampling terminal is connected to the current multiplexing sampling terminal through a target sampling resistor, so that the target sampling resistor is connected to the parallel connection trunk of the preset number of load elements, and the current multiplexing sampling terminal samples the total current of the preset number of load elements.
