Bidirectional current detection circuit
By designing a bidirectional current detection circuit, using a differential current sampling module, a current direction comparison module and a switching capacitor dynamic comparison module, bidirectional detection of the current direction is achieved, solving the problem that traditional current detection circuits can only detect one-way, and improving the detection accuracy.
Patent Information
- Application Number
- CN202510151928.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-02-11
AI Technical Summary
Traditional current detection circuits can only perform one-way detection and cannot monitor the bidirectional direction of the current in real time, resulting in insufficient detection in practical applications.
A bidirectional current detection circuit is designed to convert the current to be measured into a differential voltage through a differential current sampling module, and voltage rise and amplify are performed to ensure that the voltage value is positive. Then, the current direction comparison module and the switching capacitor dynamic comparison module respectively process the voltage difference to achieve accurate detection of the current direction.
It realizes bidirectional detection of the current direction, can be suitable for forward and reverse currents, and improves the accuracy and reliability of current detection.
Smart Images

Figure CN119804953A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of current detection, and in particular to a bidirectional current detection circuit. Background Art
[0002] In applications such as motor drive and switching power supply, in order to accurately control the output voltage and current, it is necessary to monitor the current flowing through the switch tube at any time. Traditional detection circuits can usually only detect the current in one direction, but in actual applications, the current direction can be positive or negative, so it is particularly necessary to design a bidirectional current detection circuit. Summary of the invention
[0003] The present application provides a bidirectional current detection circuit capable of realizing bidirectional current detection.
[0004] A bidirectional current detection circuit, comprising:
[0005] A differential current sampling module, comprising a sampling resistor, wherein the sampling resistor is connected in series in a current loop to be measured, and the differential current sampling module is used to respectively collect voltages at both ends of the sampling resistor to obtain a first voltage and a second voltage, and respectively perform voltage raising and amplification processing on the first voltage and the second voltage; wherein the first voltage and the second voltage after voltage raising and amplification are both greater than 0, and the voltage difference is equal to the product of the voltage difference between the first voltage and the second voltage before voltage raising and amplification and the sampling gain;
[0006] a current direction comparison module, connected to the differential current sampling module, configured to receive the first voltage and the second voltage after voltage raising and amplification, and output the larger of the first voltage and the second voltage after voltage raising and amplification as the first target voltage, and output the smaller of the first voltage and the second voltage as the second target voltage;
[0007] A switching capacitor dynamic comparison module is connected to the current direction comparison module, and includes a first capacitor, a second capacitor and a comparator. The switching capacitor dynamic comparison module is used to first control the first target voltage and the common-mode voltage to charge the first capacitor, and the second target voltage and the common-mode voltage to charge the second capacitor, and then control the first capacitor to be connected to the first reference power supply and the inverting input of the comparator, respectively, and control the second capacitor to be connected to the second reference power supply and the non-inverting input of the comparator, respectively, so as to obtain a comparison result at the output of the comparator.
[0008] In one embodiment, the differential current sampling module includes: a load unit R1, a load unit R2, a load unit R3, a load unit R4, a load unit R5, a load unit R6, a load unit R7, a first operational amplifier, and a second operational amplifier; the first end of the load unit R1 is connected to one end of the sampling resistor, and the second end of the load unit R1 is respectively connected to the first end of the load unit R2 and the in-phase end of the first operational amplifier; the first end of the load unit R3 is connected to the other end of the sampling resistor, and the second end of the load unit R3 is respectively connected to the first end of the load unit R4 and the in-phase end of the second operational amplifier. The same-phase end is connected; the second end of the load unit R3 and the second end of the load unit R4 are respectively used to receive the common-mode voltage; the output end of the first operational amplifier is respectively connected to the first end of the load unit R5 and the current direction comparison module, and the inverting input end of the first operational amplifier is respectively connected to the second end of the load unit R5 and the first end of the load unit R6; the output end of the second operational amplifier is respectively connected to the first end of the load unit R7 and the current direction comparison module; the inverting input end of the second operational amplifier is respectively connected to the second end of the load unit R7 and the second end of the load unit R6.
[0009] In one embodiment, the load unit R1 , the load unit R2 , the load unit R3 , and the load unit R4 have the same resistance value.
[0010] In one embodiment, the current direction comparison module includes: a control switch SW1, a control switch SW2, a control switch SW3 and a control switch SW4; the first end of the control switch SW1 and the first end of the control switch SW3 are respectively connected to the output end of the first operational amplifier; the first end of the control switch SW2 and the first end of the control switch SW4 are respectively connected to the output end of the second operational amplifier; the second end of the control switch SW1 and the second end of the control switch SW2, the second end of the control switch SW3 and the second end of the control switch SW4 are respectively connected to the switch capacitor dynamic comparison module.
[0011] In one embodiment, the current direction comparison module includes: a third operational amplifier, a first inverter, and a second inverter; the non-inverting input terminal of the third operational amplifier is connected to the output terminal of the first operational amplifier, and the inverting input terminal of the third operational amplifier is connected to the output terminal of the second operational amplifier; the output terminal of the third operational amplifier is connected to the input terminal of the first inverter, and the output terminal of the first inverter is respectively connected to the input terminal of the second inverter, the control terminal of the control switch SW2, and the control terminal of the control switch SW3; the output terminal of the second inverter is respectively connected to the control terminal of the control switch SW1 and the control terminal of the control switch SW4.
[0012] In one embodiment, the switch capacitor dynamic comparison module further includes: a control switch SW5, a control switch SW6, a control switch SW7, a control switch SW8, a control switch SW9, a control switch SW10, a load unit R8, a load unit R9, a load unit R10 and a load unit R11; a first end of the load unit R8 is connected to a second end of the control switch SW1, and a second end of the load unit R8 is connected to a first end of the control switch SW5; a first end of the load unit R9 is connected to the first reference power supply, and a second end of the load unit R9 is connected to a first end of the control switch SW6; a second end of the control switch SW5 and a second end of the control switch SW6 are respectively connected to a first end of the first capacitor; The second end is respectively connected to the first end of the control switch SW9 and the inverting input end of the comparator; the first end of the load unit R11 is connected to the second end of the control switch SW3, and the second end of the load unit R11 is connected to the first end of the control switch SW8; the first end of the load unit R10 is connected to the second reference power supply, and the second end of the load unit R10 is connected to the first end of the control switch SW7; the second end of the control switch SW7 and the second end of the control switch SW8 are respectively connected to the first end of the second capacitor; the second end of the second capacitor is respectively connected to the first end of the control switch SW10 and the non-inverting input end of the comparator; the second end of the control switch SW9 is connected to the second end of the control switch SW10.
[0013] In one embodiment, the control end of the control switch SW5 , the control end of the control switch SW8 , the control end of the control switch SW9 , and the control end of the control switch SW10 are connected in common to receive the same control signal.
[0014] In one embodiment, the control end of the control switch SW6 and the control end of the control switch SW7 are connected together to receive the same control signal.
[0015] In one embodiment, the comparator compares the voltages at the non-phase terminal and the negative phase terminal within a preset time period after the control switch SW6 and the control switch SW7 start to close.
[0016] The above-mentioned differential current sampling module is set to convert the current to be measured into two differential voltages, and the voltage is raised and amplified respectively to ensure that no matter the current to be measured is positive or negative, the voltage values of the two differential voltages after processing are positive, thereby realizing the subsequent capacitor charging and voltage value comparison; then, in order to adapt to the different directions of the current to be measured, one of the output lines is controlled by the current direction comparison module to be always the larger of the processed differential voltages, so as to charge the first capacitor in the later stage, and one line is always the smaller of the processed differential voltages, so as to charge the second capacitor in the later stage; finally, the capacitor is controlled to transfer charge in two stages in sequence through the switch capacitor dynamic comparison module, and finally the value range of the capacitor to be measured can be known according to the comparison result of the comparator, so that through the synergistic effect of each module, the detection circuit can be applied to both forward current and reverse current. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a schematic diagram of the structure of a bidirectional current detection circuit according to an embodiment of the present application;
[0018] Figure 2 A schematic structural diagram of a bidirectional current detection circuit according to another embodiment of the present application;
[0019] Figure 3 A schematic structural diagram of a bidirectional current detection circuit according to another embodiment of the present application;
[0020] Figure 4 A schematic structural diagram of a bidirectional current detection circuit according to another embodiment of the present application;
[0021] Figure 5 A schematic structural diagram of a bidirectional current detection circuit according to another embodiment of the present application;
[0022] Figure 6 This is a control signal timing diagram of an embodiment of the present application. DETAILED DESCRIPTION
[0023] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.
[0026] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0027] Figure 1 FIG. 1 is a block diagram of a bidirectional current detection circuit according to an embodiment of the present invention. Figure 1As shown, the bidirectional current detection circuit includes a differential current sampling module 110, a current direction comparison module 120 and a switch capacitor dynamic comparison module 130; the differential current sampling module 110 includes a sampling resistor R0, and the differential current sampling module 110 is used to respectively collect the voltages at both ends of the sampling resistor R0 to obtain a first voltage U1 and a second voltage U2, and respectively perform voltage raising and amplification processing on the first voltage U1 and the second voltage U2; wherein, the first voltage VO1 and the second voltage VO2 after voltage raising and amplification are both greater than 0, and the voltage difference is equal to the product of the voltage difference between the first voltage U1 and the second voltage U2 before voltage raising and amplification and the sampling gain; the current direction comparison module 120 is connected to the differential current sampling module 110, and is used to receive the first voltage U1 and the second voltage U2, and output the voltage raised and amplified first voltage U1 and the second voltage U2. The larger of the first voltage VO1 and the second voltage VO2 after voltage lifting and amplification is used as the first target voltage, and the smaller of the first voltage U1 and the second voltage U2 after voltage lifting and amplification is output as the second target voltage; the switching capacitor dynamic comparison module 130 is connected to the current direction comparison module 120, including a first capacitor C1, a second capacitor C2 and a comparator 131. The switching capacitor dynamic comparison module 130 is used to first control the first target voltage and the common-mode voltage to charge to both ends of the first capacitor C1, and the second target voltage and the common-mode voltage to charge to both ends of the second capacitor C2, and then control the two ends of the first capacitor C1 to be connected to the first reference power supply and the inverting input end of the comparator 131 respectively, and control the two ends of the second capacitor C2 to be connected to the second reference power supply and the non-inverting input end of the comparator 131 respectively, so as to obtain a comparison result at the output end of the comparator 131.
[0028] It can be understood that the sampling resistor R0 in the differential current sampling module 110 can convert the current signal to be measured into a corresponding voltage signal, and then the differential current sampling module 110 collects the first voltage U1 and the second voltage U2 at both ends of the sampling resistor R0. In order to prevent the first voltage U1 and the second voltage U2 from being negative when the direction of the current to be measured is reversed, it is necessary to perform voltage lifting and amplification processing, so that after the first capacitor C1 and the second capacitor C2 are subsequently charged, the charge can be smoothly transmitted to the comparator 131, wherein the processed first voltage U1 is represented by VO1, and the second voltage U2 is represented by VO2; after the current direction comparison module 120 receives the processed first voltage VO1 and the second voltage VO2, it will be transmitted to the first capacitor C1 and the second capacitor C2 of the switch capacitor dynamic comparison module 130 to charge them respectively. Among them, considering that the direction of the current to be measured can be bidirectional, the magnitude relationship between the processed first voltage VO1 and the second voltage VO2 may change, and the first capacitor C1 is charged with the larger of the processed first voltage VO1 and the second voltage VO2 (expressed as the first target voltage VA), and the second capacitor C2 is charged with the smaller one (expressed as the second target voltage VB). Therefore, in order to achieve correct charging of the first capacitor C1 and the second capacitor C2 regardless of the direction of the current to be measured, a current direction comparison module 120 can be set to fix the output of the larger first target voltage VA to the end connected to the first capacitor C1, and fix the output of the smaller second target voltage VB to the end connected to the second capacitor C2.
[0029] The control of the first capacitor C1 and the second capacitor C2 by the switch capacitor dynamic comparison module 130 is divided into two stages. First, the first stage is to control the first target voltage VA and the common mode voltage VCM to charge the first capacitor C1, and the second target voltage VB and the common mode voltage VCM to charge the second capacitor C2. In this way, the charge amount QC1=C1*(VA-VCM) at both ends of the first capacitor C1 and the charge amount QC2=C2(VB-VCM) at both ends of the second capacitor C2 can be obtained.
[0030] Then, the second stage is entered, and the two ends of the first capacitor C1 are controlled to be connected to the first reference power supply and the inverting input terminal of the comparator 131 respectively, and the two ends of the second capacitor C2 are controlled to be connected to the second reference power supply and the non-inverting input terminal of the comparator 131 respectively, wherein the voltage of the first reference power supply is assumed to be VDAC, the voltage of the second reference power supply is assumed to be 0V, the capacitance value of the first capacitor C1 is equal to the capacitance value of the second capacitor C2, the voltage of the non-inverting input terminal of the comparator 131 is assumed to be V+, and the voltage of the inverting input terminal of the comparator 131 is assumed to be V-, so that the charge amount QC1=C1*(VDAC-V-) at both ends of the first capacitor C1 and the charge amount QC2=C2*(0-V+) at both ends of the second capacitor C2 are obtained. According to the law of charge conservation, we have:
[0031] QC1=C1*(VA-VCM)=C1*(VDAC-V-)
[0032] From this we can get
[0033] V-=VDAC-VA+VCM
[0034] Similarly, there are:
[0035] QC2=C2(VB-VCM)=C2*(0-V+)
[0036] Then we can get
[0037] V+=VCM-VB
[0038] So we have:
[0039] (V+)-(V-)=(VA-VB)-VDAC (Formula 1)
[0040] Among them, since VA is the larger of the processed first voltage VO1 and the second voltage VO2, VB is the smaller one, and the voltage difference between the processed first voltage VO1 and the second voltage VO2 is equal to the product of the voltage difference between the first voltage U1 and the second voltage U2 before processing and the sampling gain Gain, assuming that the first target voltage VA is V01 and the second target voltage VB is V02, then:
[0041] (V01-V02)=(VA-VB)=Gain|U1-U2|=|Gain*Io*R0|
[0042] Combining formula 1, we can get:
[0043] (V+)-(V-)=|Gain*Io*R0|-VDAC
[0044] Among them, since the sampling gain Gain, sampling resistor R0 and VDAC are all known, when the output of the comparator 131 is high, it indicates that V+ is greater than V-, that is, |Gain*Io*R0|-VDAC>0, and then the value range of the current Io to be measured can be obtained; similarly, when the output of the comparator 131 is high, it indicates that V+ is less than V-, that is, |Gain*Io*R0|-VDAC<0, and then the value range of the current Io to be measured can be obtained. The size of VDAC can be set by yourself.
[0045] By setting a differential current sampling module 110, the current to be measured is converted into two differential voltages, and the voltage is raised and amplified respectively to ensure that the voltage values of the two differential voltages after processing are both positive regardless of whether the current to be measured is positive or negative, thereby realizing the subsequent capacitor charging and voltage value comparison; then, in order to adapt to the different directions of the current to be measured, the current direction comparison module 120 controls one of the output lines to be always the larger of the processed differential voltages, so as to charge the first capacitor C1 in the later stage, and the other line is always the smaller of the processed differential voltages, so as to charge the second capacitor C2 in the later stage; finally, the switch capacitor dynamic comparison module 130 successively performs two-stage charge transfer control on the capacitor, and finally the value range of the capacitor to be measured can be obtained according to the comparison result of the comparator 131. In this way, through the synergistic effect of each module, the detection circuit can be applied to both forward current and reverse current, and due to the use of a fully differential structure, the system offset voltage is reduced, and the current detection accuracy is finally improved.
[0046] In one embodiment, Figure 2 As shown, the differential current sampling module 110 includes: a load unit R1, a load unit R2, a load unit R3, a load unit R4, a load unit R5, a load unit R6, a load unit R7, a first operational amplifier 111, and a second operational amplifier 112; the first end of the load unit R1 is connected to one end of the sampling resistor R0, and the second end of the load unit R1 is respectively connected to the first end of the load unit R2 and the in-phase end of the first operational amplifier 111; the first end of the load unit R3 is connected to the other end of the sampling resistor, and the second end of the load unit R3 is respectively connected to the first end of the load unit R4 and the second operational amplifier 112 The in-phase end of the load unit R3 and the second end of the load unit R4 are respectively used to receive the common mode voltage; the output end of the first operational amplifier 111 is respectively connected to the first end of the load unit R5 and the current direction comparison module 120, and the inverting input end of the first operational amplifier 111 is respectively connected to the second end of the load unit R5 and the first end of the load unit R6; the output end of the second operational amplifier 112 is respectively connected to the first end of the load unit R7 and the current direction comparison module 120; the inverting input end of the second operational amplifier 112 is respectively connected to the second end of the load unit R7 and the second end of the load unit R6.
[0047] It can be understood that the differential current sampling module 110 is a differential structure, the resistance value of the load unit R1 is the same as the resistance value of the load unit R3, the resistance value of the load unit R2 is the same as the resistance value of the load unit R4, based on the virtual short characteristic of the operational amplifier, the voltage VP1 of the non-inverting input terminal of the first operational amplifier 111 is equal to the voltage VN1 of the inverting input terminal, and the voltage VP2 of the non-inverting input terminal of the second operational amplifier 112 is equal to the voltage VN2 of the inverting input terminal; wherein, assuming that R2=nR1, R4=nR3, n is a constant, based on the virtual short characteristic of the operational amplifier, the voltage division of the input terminal resistance can be obtained:
[0048] VP1=(U1+VCM) / (n+1)
[0049] VP2=(U2+VCM) / (n+1)
[0050] According to the fully differential op amp output, the load current flowing through is equal:
[0051] (VO1-VO2) / (R5+R6+R7)=(VN1-VN2) / R6
[0052] VO1-VO2=[(R5+R6+R7) / R6]*(VN1-VN2)
[0053] Substituting VN1 and VN2 into VP1 and VP2 yields:
[0054] VO1-VO2=[(R5+R6+R7) / (n+1)R6]*(U1-U2)
[0055] Since the voltage difference between the first voltage VO1 and the second voltage VO2 after voltage raising and amplification is equal to the product of the voltage difference between the first voltage U1 and the second voltage U2 before voltage raising and amplification and the sampling gain Gain, the sampling gain Gain can be expressed as (R5+R6+R7) / (n+1)R6; and since the voltage difference U1-U2 between the first voltage U1 and the second voltage U2 can be expressed as |Io*R0|, then:
[0056] VO1-VO2=|Io*R0*Gain|
[0057] Thus, the voltage raising and amplification of the first voltage U1 and the second voltage U2 can be realized through the above circuit, and the desired sampling gain can be obtained by reasonably setting the resistance values of the above load units R5, R6, and R7, as well as the proportional relationship between the load units R1 and R2, and between the load units R3 and R4. The circuit structure is simple, and the sampling gain is adjustable. In some embodiments, each load unit may include a resistor element.
[0058] In one embodiment, the resistance values of the load unit R1 , the load unit R2 , the load unit R3 and the load unit R4 are the same.
[0059] It can be understood that when the resistance values of the load unit R1, the load unit R2, the load unit R3 and the load unit R4 are the same, that is, R2 = R1, R4 = R3, then:
[0060] Gain=(R5+R6+R7) / 2R6
[0061] This simplifies the gain expression, and the desired sampling gain can be obtained by simply adjusting the resistance values of the load unit R5, the load unit R6, and the load unit R7.
[0062] In one embodiment, Figure 3 As shown, the current direction comparison module 120 includes: a control switch SW1, a control switch SW2, a control switch SW3 and a control switch SW4; the first end of the control switch SW1 and the first end of the control switch SW3 are respectively connected to the output end of the first operational amplifier 111; the first end of the control switch SW2 and the first end of the control switch SW4 are respectively connected to the output end of the second operational amplifier 112; the second end of the control switch SW1 and the second end of the control switch SW2, the second end of the control switch SW3 and the second end of the control switch SW4 are respectively connected to the switch capacitor dynamic comparison module 130.
[0063] It can be understood that in the current direction comparison module 120, by controlling the four control switches respectively, the first voltage VO1 and the second voltage VO2 after voltage raising and amplification can be output as the first target voltage VA or the second target voltage VB respectively. The control switch SW1 and the control switch SW3 are selectively turned on, and the control switch SW2 and the control switch SW4 are selectively turned on. For example, when the first voltage VO1 after voltage raising and amplification is greater than the second voltage VO2, the control switch SW1 and the control switch SW4 are closed, and the control switch SW2 and the control switch SW3 are disconnected, so that VO1 can be used as the first target voltage VA and VO2 can be used as the second target voltage VB; conversely, when the first voltage VO1 after voltage raising and amplification is less than the second voltage VO2, the control switch SW2 and the control switch SW3 are closed, and the control switch SW1 and the control switch SW4 are disconnected, so that VO2 can be used as the first target voltage VA and VO1 can be used as the second target voltage VB.
[0064] In this way, two voltages can be output along a specific path through simple switch switching, which solves the problem of changes in the two voltages caused by changes in the direction of the current to be measured, thereby affecting the subsequent circuit to only receive a voltage of a specific magnitude, thereby realizing bidirectional detection of current.
[0065] In one embodiment, Figure 4 As shown, the current direction comparison module also includes: a third operational amplifier 121, a first inverter 122, and a second inverter 123; the non-inverting input terminal of the third operational amplifier 121 is connected to the output terminal of the first operational amplifier 111, and the inverting input terminal of the third operational amplifier 121 is connected to the output terminal of the second operational amplifier 112; the output terminal of the third operational amplifier 121 is connected to the input terminal of the first inverter 122, and the output terminal of the first inverter 122 is respectively connected to the input terminal of the second inverter 123, the control terminal of the control switch SW2, and the control terminal of the control switch SW3; the output terminal of the second inverter 123 is respectively connected to the control terminal of the control switch SW1 and the control terminal of the control switch SW4.
[0066] It can be understood that, assuming that the output signal of the first inverter 122 is SWN, and the output signal of the second inverter 123 is SWP, the signal SWN is used to control the opening and closing of the control switch SW2 and the control switch SW3, and the signal SWP is used to control the opening and closing of the control switch SW1 and the control switch SW4. When the voltage VO1 is greater than the voltage VO2, the signal SWN is low level, and the signal SWP is high level, so that the control switch SW1 and the control switch SW4 are turned on, and the control switch SW2 and the control switch SW3 are turned off, so that the voltage VO1 is used as the first target voltage VA, and the voltage VO2 is used as the second target voltage VB; when the voltage VO1 is less than the voltage VO2, the signal SWN is high level, and the signal SWP is low level, so that the control switch SW1 and the control switch SW4 are turned off, and the control switch SW2 and the control switch SW3 are turned on, so that the voltage VO2 is used as the first target voltage VA, and the voltage VO1 is used as the second target voltage VB, so as to ensure that the voltage can be output according to the correct path.
[0067] In one embodiment, Figure 5As shown, the switch capacitor dynamic comparison module 130 also includes: a control switch SW5, a control switch SW6, a control switch SW7, a control switch SW8, a control switch SW9, a control switch SW10, a load unit R8, a load unit R9, a load unit R10 and a load unit R11; a first end of the load unit R8 is connected to a second end of the control switch SW1, and a second end of the load unit R8 is connected to a first end of the control switch SW5; a first end of the load unit R9 is connected to a first reference power supply (not shown), and a second end of the load unit R9 is connected to a first end of the control switch SW6; a second end of the control switch SW5 and a second end of the control switch SW6 are respectively connected to a first end of the first capacitor C1; the first capacitor C1 The second end of the load unit R11 is connected to the first end of the control switch SW9 and the inverting input end of the comparator 131 respectively; the first end of the load unit R11 is connected to the second end of the control switch SW3, and the second end of the load unit R11 is connected to the first end of the control switch SW8; the first end of the load unit R10 is connected to the second reference power supply (not shown), and the second end of the load unit R10 is connected to the first end of the control switch SW7; the second end of the control switch SW7 and the second end of the control switch SW8 are connected to the first end of the second capacitor C2 respectively; the second end of the second capacitor C2 is connected to the first end of the control switch SW10 and the non-inverting input end of the comparator 131 respectively; the second end of the control switch SW9 is connected to the second end of the control switch SW10.
[0068] The first reference power supply may be a digital-to-analog converter DAC, which is used to provide a first reference voltage VDAC, and the second reference power supply may be a reference ground, which is used to provide a second reference voltage VSS, wherein the second reference voltage VSS may be 0V. The control switch SW5 and the control switch SW8, together with the control switch SW6 and the control switch SW7, form two switch pairs, and the switch capacitor dynamic comparison module 130 controls the two switch pairs to be turned on to realize the charging of the capacitor and the redistribution of the charge. The working process of the switch capacitor dynamic comparison module 130 is briefly described below.
[0069] First, in the first stage, the switch capacitor dynamic comparison module 130 controls the control switch SW5, the control switch SW8, the control switch SW9 and the control switch SW10 to close, and the control switch SW6 and the control switch SW7 to open, so that the first target voltage VA and the common mode voltage VCM charge the first capacitor C1, and the second target voltage VB and the common mode voltage VCM charge the second capacitor C2; then enter the second stage, the switch capacitor dynamic comparison module 130 controls the control switch SW5, the control switch SW8, the control switch SW9 and the control switch SW10 to open, and the control switch SW6 and the control switch SW7 to close, so that the first capacitor C1 is connected to the first reference power supply, and the second capacitor C2 is connected to the second reference power supply, so as to realize charge redistribution respectively. The specific charge change process can be referred to Figure 1 The specific description in the embodiments will not be repeated here.
[0070] In one embodiment, the control end of the control switch SW5 , the control end of the control switch SW8 , the control end of the control switch SW9 , and the control end of the control switch SW10 are connected in common to receive the same control signal.
[0071] For example, the signal S1 is used as the control signal of the control switches SW5, SW8, SW9, and SW10. The control timing of the signal S1 can refer to Figure 6 As shown, when the signal S1 is at a high level, the control switch is in a closed state, and when it is at a low level, the control switch is in an open state. By connecting the control ends of the above control switches, one-key control can be achieved, simplifying the control process.
[0072] In one embodiment, the control terminal of the control switch SW6 and the control terminal of the control switch SW7 are commonly connected to receive the same control signal.
[0073] For example, the signal S2 is used as the control signal of the control switch SW6 and the control switch SW7. The control timing of the signal S2 can refer to Figure 6 As shown, when the signal S2 is at a high level, the control switch is in a closed state, and when it is at a low level, the control switch is in an open state. By connecting the control ends of the above control switches, one-key control can be achieved, simplifying the control process.
[0074] In one embodiment, the comparator 131 compares the voltages at the non-phase terminal and the voltages at the inverting terminal within a preset time period after the control switches SW6 and SW7 start to close.
[0075] The control timing of the comparator 131 and the control switches SW6 and SW7 can be referred to Figure 6 As shown, the signal CLK is the reference clock signal of the switched capacitor dynamic comparison module 130, and the signal CLK_CMP is the clock signal of the comparator 131. To ensure that the charges on the first capacitor C1 and the second capacitor C2 have enough time to be redistributed after the control switch is switched, thereby ensuring that the output result of the comparator 131 is accurate, the comparator 131 can be driven to perform comparison work after a period of time after the control switch SW6 and the control switch SW7 start to close.
[0076] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A bidirectional current detection circuit, characterized in that: include: A differential current sampling module, comprising a sampling resistor, wherein the sampling resistor is connected in series in a current loop to be measured, and the differential current sampling module is used to respectively collect voltages at both ends of the sampling resistor to obtain a first voltage and a second voltage, and respectively perform voltage raising and amplification processing on the first voltage and the second voltage; wherein the first voltage and the second voltage after voltage raising and amplification are both greater than 0, and the voltage difference is equal to the product of the voltage difference between the first voltage and the second voltage before voltage raising and amplification and the sampling gain; a current direction comparison module, connected to the differential current sampling module, configured to receive the first voltage and the second voltage after voltage raising and amplification, and output the larger of the first voltage and the second voltage after voltage raising and amplification as the first target voltage, and output the smaller of the first voltage and the second voltage as the second target voltage; A switching capacitor dynamic comparison module is connected to the current direction comparison module, and includes a first capacitor, a second capacitor and a comparator. The switching capacitor dynamic comparison module is used to first control the first target voltage and the common-mode voltage to charge the first capacitor, and the second target voltage and the common-mode voltage to charge the second capacitor, and then control the first capacitor to be connected to the first reference power supply and the inverting input of the comparator, respectively, and control the second capacitor to be connected to the second reference power supply and the non-inverting input of the comparator, respectively, so as to obtain a comparison result at the output of the comparator.
2. The bidirectional current detection circuit according to claim 1, characterized in that: The differential current sampling module includes: a load unit R1, a load unit R2, a load unit R3, a load unit R4, a load unit R5, a load unit R6, a load unit R7, a first operational amplifier, and a second operational amplifier; the first end of the load unit R1 is connected to one end of the sampling resistor, and the second end of the load unit R1 is respectively connected to the first end of the load unit R2 and the in-phase end of the first operational amplifier; the first end of the load unit R3 is connected to the other end of the sampling resistor, and the second end of the load unit R3 is respectively connected to the first end of the load unit R4 and the in-phase end of the second operational amplifier. The second end of the load unit R3 and the second end of the load unit R4 are respectively used to receive the common mode voltage; the output end of the first operational amplifier is respectively connected to the first end of the load unit R5 and the current direction comparison module, and the inverting input end of the first operational amplifier is respectively connected to the second end of the load unit R5 and the first end of the load unit R6; the output end of the second operational amplifier is respectively connected to the first end of the load unit R7 and the current direction comparison module; the inverting input end of the second operational amplifier is respectively connected to the second end of the load unit R7 and the second end of the load unit R6.
3. The bidirectional current detection circuit according to claim 1, characterized in that: The load unit R1 , the load unit R2 , the load unit R3 , and the load unit R4 have the same resistance value.
4. The bidirectional current detection circuit according to claim 2, characterized in that: The current direction comparison module includes: a control switch SW1, a control switch SW2, a control switch SW3 and a control switch SW4; the first end of the control switch SW1 and the first end of the control switch SW3 are respectively connected to the output end of the first operational amplifier; the first end of the control switch SW2 and the first end of the control switch SW4 are respectively connected to the output end of the second operational amplifier; the second end of the control switch SW1 and the second end of the control switch SW2, the second end of the control switch SW3 and the second end of the control switch SW4 are respectively connected to the switch capacitor dynamic comparison module.
5. The bidirectional current detection circuit according to claim 4, characterized in that: The current direction comparison module also includes: a third operational amplifier, a first inverter, and a second inverter; the non-inverting input terminal of the third operational amplifier is connected to the output terminal of the first operational amplifier, and the inverting input terminal of the third operational amplifier is connected to the output terminal of the second operational amplifier; the output terminal of the third operational amplifier is connected to the input terminal of the first inverter, and the output terminal of the first inverter is respectively connected to the input terminal of the second inverter, the control terminal of the control switch SW2, and the control terminal of the control switch SW3; the output terminal of the second inverter is respectively connected to the control terminal of the control switch SW1 and the control terminal of the control switch SW4.
6. The bidirectional current detection circuit according to claim 5, characterized in that: The switch capacitor dynamic comparison module also includes: a control switch SW5, a control switch SW6, a control switch SW7, a control switch SW8, a control switch SW9, a control switch SW10, a load unit R8, a load unit R9, a load unit R10 and a load unit R11; the first end of the load unit R8 is connected to the second end of the control switch SW1, and the second end of the load unit R8 is connected to the first end of the control switch SW5; the first end of the load unit R9 is connected to the first reference power supply, and the second end of the load unit R9 is connected to the first end of the control switch SW6; the second end of the control switch SW5 and the second end of the control switch SW6 are respectively connected to the first end of the first capacitor; the second end of the first capacitor is connected to the first end of ... first reference power supply, and the second end of the load unit R9 is connected to the first end of the control switch SW6; the second end of the control switch SW5 and the second end of the control switch SW6 are respectively connected to the first end of the first capacitor; the second end of the first capacitor is connected to the first end of the first reference power supply, and the second end of the first reference power supply is connected to the first end of the first reference power supply, and the second end of the first reference power supply is connected to the first end of the first reference power supply, and the second end of the first reference power supply is connected to the first end of the first reference power supply, and the second end of the first reference power supply is connected to the first end of the first reference power supply, and the second end of the first reference power supply is connected to the first end of the first reference power supply The first end of the load unit R11 is connected to the second end of the control switch SW3, and the second end of the load unit R11 is connected to the first end of the control switch SW8; the first end of the load unit R10 is connected to the second reference power supply, and the second end of the load unit R10 is connected to the first end of the control switch SW7; the second end of the control switch SW7 and the second end of the control switch SW8 are respectively connected to the first end of the second capacitor; the second end of the second capacitor is respectively connected to the first end of the control switch SW10 and the non-inverting input end of the comparator; the second end of the control switch SW9 is connected to the second end of the control switch SW10.
7. The bidirectional current detection circuit according to claim 6, characterized in that: The control end of the control switch SW5 , the control end of the control switch SW8 , the control end of the control switch SW9 , and the control end of the control switch SW10 are commonly connected to receive the same control signal.
8. The bidirectional current detection circuit according to claim 6, characterized in that: The control end of the control switch SW6 and the control end of the control switch SW7 are connected in common to receive the same control signal.
9. The bidirectional current detection circuit according to claim 6, characterized in that: The comparator compares the voltages at the non-phase terminal and the reverse phase terminal within a preset time period after the control switch SW6 and the control switch SW7 start to close.
Citation Information
Patent Citations
Adjustable bidirectional over-current detection circuit
CN115327213A
Peak current detection system and test method
CN115951116A
Bidirectional current detection circuit and power transmission chip
CN117783656A
High-side type motor current detecting circuit
EP0827266A2
Circuit arrangement for determining differences in capacitance
US5629629A