Over-current detection circuit, system and method
By using a temperature sensor and a controller in the H-bridge driving circuit to obtain the temperature coefficient of the overcurrent detection resistance for voltage compensation, and amplify the voltage in the amplification circuit, the overcurrent detection circuit in the prior art is solved by mistake or not triggering due to temperature changes in the above-current detection circuit in the prior art. The problem triggered in time achieves more accurate and reliable overcurrent protection.
Patent Information
- Application Number
- CN202411616308.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-01-14
AI Technical Summary
Due to the temperature coefficient characteristics of the overcurrent detection resistor of the existing H-bridge drive circuit, the overcurrent detection circuit is prone to accidentally triggering or not triggering the overcurrent protection in time due to temperature changes, and small signal feedback may cause the controller to be unable to respond, causing the circuit to work. abnormal.
The overcurrent detection circuit including a temperature sensor and a controller is adopted to obtain the temperature coefficient of the corresponding overcurrent detection resistance by detecting the ambient temperature, compensate the actual voltage, and amplify the voltage in the amplification circuit to ensure the detection of the overcurrent protection threshold. Ensure accurate triggering of overcurrent protection at different temperatures.
It improves the abnormal working function of overcurrent detection current caused by temperature changes, ensures the accuracy and timeliness of overcurrent protection, avoids the problem that the circuit cannot respond due to small signal feedback, and improves the safety and reliability of the circuit.
Smart Images

Figure CN119310333A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of overcurrent protection, and in particular to an overcurrent detection circuit, system and method. Background Art
[0002] At present, the mainstream H-bridge drive circuit overcurrent detection application solutions on the market are as follows: Figure 1 As shown, Cin is a filter capacitor used to eliminate instantaneous circuit fluctuations, reduce interference noise, and protect the circuit from electrostatic interference; capacitor C1 is used to prevent the negative pressure on the ground from being too high, thereby causing damage to the H-bridge driver chip; Rcs is an overcurrent detection resistor; VCC is a driving power supply used to drive the motor M.
[0003] The working principle of this solution is: use MCU to detect the voltage Vo on the overcurrent detection resistor Rcs (Vo1=Iocp (overcurrent threshold)*Rcs), and set the Vo1 voltage as the overcurrent detection threshold voltage. When the system detects that the voltage on the overcurrent detection resistor Rcs is less than the overcurrent detection threshold voltage, the circuit works normally. When the system detects that the voltage on the Rcs resistor is greater than the overcurrent detection threshold voltage, the overcurrent protection is triggered. At the same time, this working principle is also applied to other application fields of overcurrent detection such as power supply and half-bridge drive.
[0004] The disadvantage of this solution is that it can easily cause the overcurrent detection circuit to work abnormally.
[0005] Since the overcurrent detection resistor Rcs generally has a negative temperature coefficient, it is easy for the voltage on the Rcs resistor to change with temperature, causing the circuit to work abnormally. When the circuit works at -40°C, the resistance value of the overcurrent detection resistor Rcs will increase, causing the voltage on the overcurrent detection resistor Rcs to exceed the set overcurrent protection threshold voltage Vo1, causing the circuit to falsely trigger the overcurrent protection and work abnormally. When the circuit works at 125°C, the resistance value of the overcurrent detection resistor Rcs will change slightly, causing the voltage on the overcurrent detection resistor Rcs to be lower than the set overcurrent protection threshold voltage Vo1, and the overcurrent protection cannot be triggered in time. In severe cases, the circuit will be damaged.
[0006] In addition, if the resistance value of the overcurrent detection resistor Rcs is too small, the voltage on the overcurrent detection resistor Rcs may be fed back to the MCU and cannot respond. However, if the resistance value of the overcurrent detection resistor Rcs is too large, a relatively large positive voltage (GND of the chip) will be generated on the overcurrent detection resistor Rcs. If this voltage is too high, the chip will be damaged, and the overcurrent detection resistor Rcs itself will also generate relatively large power, requiring a resistor with a relatively large package. Therefore, the resistance value of the overcurrent detection resistor Rcs cannot be selected too large, and only a relatively small value can be selected. This also causes the voltage on the overcurrent detection resistor Rcs to be relatively small. If a simple 8-bit MCU without amplification function is used, the voltage on the overcurrent detection resistor Rcs may be fed back to the MCU and cannot respond. Summary of the invention
[0007] The technical problem to be solved by the present disclosure is to overcome the defect in the prior art that the overcurrent detection circuit is prone to abnormal operation, and to provide an overcurrent detection circuit, system and method.
[0008] The present invention solves the above technical problems through the following technical solutions:
[0009] In a first aspect, an overcurrent detection circuit is provided, the overcurrent detection circuit comprising an overcurrent detection resistor, a temperature sensor and a controller;
[0010] The overcurrent detection resistor is connected in series with the circuit to be tested, wherein one end of the overcurrent detection resistor is grounded, and the overcurrent detection resistor is electrically connected to the controller;
[0011] The output end of the temperature sensor is connected to the input end of the controller, and the temperature sensor is used to detect the current ambient temperature;
[0012] The output end of the controller is connected to the input end of the circuit to be tested; the controller is used to obtain the first temperature coefficient of the corresponding overcurrent detection resistor according to the current ambient temperature, and trigger overcurrent protection for the circuit to be tested when the first voltage is greater than or equal to a first threshold voltage; wherein the first voltage is the actual voltage across the overcurrent detection resistor after being compensated by the first temperature coefficient.
[0013] Optionally, the overcurrent detection circuit further includes an amplification circuit.
[0014] The two input ends of the amplifier circuit are respectively connected to the two ends of the overcurrent detection resistor, and the output end of the amplifier circuit is connected to the other input end of the controller;
[0015] The output end of the amplifier circuit is used to output a second voltage; wherein the second voltage is the voltage of the first voltage after being amplified by the amplifier circuit;
[0016] The controller is used to trigger overcurrent protection for the circuit under test when the second voltage is greater than or equal to a second threshold voltage.
[0017] Optionally, the amplifying circuit comprises an operational amplifier.
[0018] The calculation formula of the second voltage is:
[0019] Vout = G*(V0-Vos);
[0020] Wherein, Vout is the second voltage; G is the gain; V0 is the first voltage; Vos is the actual input offset voltage of the operational amplifier;
[0021] The calculation formula of the first voltage is:
[0022] V0=Ics*Rcs*K1;
[0023] Among them, V0 is the first voltage; Ics is the actual current flowing through the overcurrent detection resistor; Rcs is the actual resistance value of the overcurrent detection resistor; K1 is the first temperature coefficient.
[0024] Optionally, the amplification circuit includes an operational amplifier, and the controller is further used to obtain a second temperature coefficient of the corresponding operational amplifier according to the current ambient temperature, and obtain a first input offset voltage; wherein the first input offset voltage is a voltage after the actual input offset voltage of the operational amplifier is compensated by the second temperature coefficient;
[0025] The calculation formula of the first input offset voltage is:
[0026] Vos1=K2*Vos;
[0027] Wherein, Vos1 is the first input offset voltage; K2 is the second temperature coefficient; Vos is the actual input offset voltage;
[0028] The calculation formula of the second voltage is:
[0029] Vout = G*(V0-Vos1);
[0030] Wherein, Vout is the second voltage; G is the gain; V0 is the first voltage; Vos1 is the first input offset voltage of the operational amplifier;
[0031] The calculation formula of the first voltage is:
[0032] V0=Ics*Rcs*K1;
[0033] Among them, V0 is the first voltage; Ics is the actual current flowing through the overcurrent detection resistor; Rcs is the actual resistance value of the overcurrent detection resistor; K1 is the first temperature coefficient.
[0034] Optionally, the amplifying circuit further includes a switch, a first resistor and a second resistor;
[0035] The switch is connected in parallel with the overcurrent detection resistor, and the switch is electrically connected to the controller;
[0036] The controller is used for controlling the switch to close when it is detected that there is no current on the overcurrent detection resistor;
[0037] One end of the first resistor is respectively connected to the inverting input end of the operational amplifier and one end of the second resistor, and the other end of the first resistor is respectively connected to one end of the overcurrent detection resistor and one end of the switch;
[0038] The other end of the second resistor is connected to the output end of the operational amplifier.
[0039] Optionally, the amplifying circuit further includes a third resistor and a fourth resistor.
[0040] One end of the third resistor is respectively connected to the positive input end of the operational amplifier and one end of the fourth resistor, and the other end of the third resistor is respectively connected to the other end of the overcurrent detection resistor and the other end of the switch; the other end of the fourth resistor is grounded.
[0041] Optionally, the controller includes an MCU, and the MCU is used to store a correspondence between the ambient temperature and the first temperature coefficient and a correspondence between the ambient temperature and the second temperature coefficient, and to respectively obtain the first temperature coefficient and the second temperature coefficient according to different correspondences.
[0042] In a second aspect, an overcurrent detection system is provided, wherein the overcurrent detection system comprises a circuit to be tested and the overcurrent detection circuit as described in the first aspect.
[0043] Optionally, the circuit to be tested is an H-bridge driving circuit, the H-bridge driving circuit includes a first input terminal, a second input terminal, a first output terminal, a second output terminal, a first ground terminal and a second ground terminal, and the controller includes a third output terminal and a fourth output terminal;
[0044] The first input terminal is connected to the third output terminal, the second input terminal is connected to the fourth output terminal, the first ground terminal and the second ground terminal are both connected to the other end of the overcurrent detection resistor, the first output terminal is used to connect one end of the motor, and the second output terminal is used to connect the other end of the motor.
[0045] In a third aspect, an overcurrent detection method is provided, the overcurrent detection method being applied to the overcurrent detection system as described in the second aspect, the overcurrent detection method comprising the following steps:
[0046] Get the current ambient temperature;
[0047] Acquire a first temperature coefficient of the corresponding overcurrent detection resistor according to the current ambient temperature;
[0048] Obtain a first voltage according to the first temperature coefficient; wherein the first voltage is the actual voltage across the overcurrent detection resistor after being compensated by the first temperature coefficient;
[0049] In response to the first voltage being greater than or equal to a first threshold voltage, overcurrent protection for the circuit under test is triggered.
[0050] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.
[0051] The positive progressive effect of the present disclosure lies in: the present disclosure detects the current ambient temperature by using a temperature sensor, and obtains the first temperature coefficient of the corresponding overcurrent detection resistor according to the current ambient temperature, the first temperature coefficient compensates the actual voltage at both ends of the overcurrent detection circuit, thereby obtaining a first voltage; the controller compares the first voltage with a first threshold voltage, and triggers overcurrent protection for the circuit to be measured when the first voltage is greater than or equal to the first threshold voltage; thereby improving the defect of abnormal operation of the overcurrent detection current caused by temperature changes; and the overcurrent detection circuit in the present disclosure can achieve the function of more accurately triggering the overcurrent protection of the circuit to be measured. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of an overcurrent detection circuit of an H-bridge circuit provided by the prior art;
[0053] Figure 2 A module schematic diagram of an overcurrent detection circuit provided in Embodiment 1 of the present disclosure;
[0054] Figure 3 A module schematic diagram of another overcurrent detection circuit provided in Embodiment 1 of the present disclosure;
[0055] Figure 4 A circuit diagram of an amplifier circuit provided in Embodiment 1 of the present disclosure;
[0056] Figure 5 A curve diagram showing the corresponding relationship between the input offset voltage and the ambient temperature provided in Embodiment 1 of the present disclosure;
[0057] Figure 6A circuit diagram of another amplifier circuit provided in Embodiment 1 of the present disclosure;
[0058] Figure 7 A circuit diagram of an overcurrent detection circuit of an H-bridge drive circuit provided in Embodiment 2 of the present disclosure;
[0059] Figure 8 A flow chart of an overcurrent detection method provided in Embodiment 3 of the present disclosure;
[0060] Fig. 9 A logic block diagram of an overcurrent detection method for an H-bridge drive circuit provided in Example 3 of the present disclosure. DETAILED DESCRIPTION
[0061] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.
[0062] Prefixes such as "first" and "second" are used in the embodiments of the present disclosure only to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of prefixes such as ordinal numbers to distinguish description objects in the embodiments of the present disclosure does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and no unnecessary limitation should be constituted due to the use of such prefixes. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
[0063] Example 1
[0064] Figure 2 This is a module schematic diagram of an overcurrent detection circuit provided in this embodiment. The overcurrent detection circuit includes an overcurrent detection resistor 11, a temperature sensor 12 and a controller 13.
[0065] The overcurrent detection resistor 11 is connected in series with the circuit to be tested 14 , wherein one end of the overcurrent detection resistor 11 is grounded, and the overcurrent detection resistor 11 is electrically connected to the controller 13 .
[0066] The output end of the temperature sensor 12 is connected to the input end of the controller 13 , and the temperature sensor 12 is used to detect the current ambient temperature.
[0067] The output end of the controller 13 is connected to the input end of the circuit to be tested 14; the controller 13 is used to obtain the first temperature coefficient of the corresponding overcurrent detection resistor according to the current ambient temperature, and trigger the overcurrent protection of the circuit to be tested when the first voltage is greater than or equal to the first threshold voltage; wherein the first voltage is the actual voltage across the overcurrent detection resistor after being compensated by the first temperature coefficient.
[0068] In this embodiment, by using a temperature sensor to detect the current ambient temperature, and obtaining the first temperature coefficient of the corresponding overcurrent detection resistor according to the current ambient temperature, and triggering the overcurrent protection of the circuit to be tested when the first voltage is greater than or equal to the first threshold voltage, the defect of abnormal operation of the overcurrent detection current caused by temperature changes is improved, and the function of the overcurrent detection circuit being able to trigger the overcurrent protection more accurately is realized. Among them, the circuit to be tested can be a circuit that needs overcurrent detection, such as an H-bridge drive circuit, a half-bridge drive circuit, or a power supply.
[0069] In a specific example, since the resistance value of the overcurrent detection resistor changes with temperature, the curve of the required overcurrent detection resistor changing with temperature can be found through the specification sheet, and the first temperature coefficient corresponding to each temperature is stored in the memory of the controller in advance. At the same time, the temperature sensor monitors the current ambient temperature of the circuit in real time and feeds back the current ambient temperature to the controller, and the controller reads the first temperature coefficient K1 of the temperature corresponding to the overcurrent detection resistor in the memory, wherein the first temperature coefficient is used to compensate for the resistance value of the overcurrent detection resistor. In the calculation process, since the first temperature coefficient has a compensating effect on the actual resistance value of the overcurrent detection resistor, the acquisition of the first voltage is still calculated based on the ideal value of the overcurrent detection resistor.
[0070] The first threshold voltage, i.e., the overcurrent protection threshold voltage V1, is Iocp*Rcs1, and Rcs1 is Rcs*K1. Among them, Iocp is the threshold current, Rcs is the actual resistance value of the overcurrent detection resistor; Rcs1 is the ideal value of the overcurrent detection resistor, i.e., the resistance value of the overcurrent detection resistor after temperature compensation by the first temperature coefficient K1. The comparison between the first voltage and the first threshold voltage is actually the comparison between the actual current flowing through the overcurrent detection resistor and the threshold current. In other words, at different temperatures, it is necessary to ensure that the resistance value of the overcurrent detection resistor remains unchanged during the calculation process, so that it is possible to accurately judge whether the actual current flowing through the overcurrent detection resistor is greater than or equal to the threshold current based on the comparison between the first voltage and the first threshold voltage.
[0071] Therefore, in obtaining the first temperature coefficient K1, it is necessary to ensure that the product of the actual resistance of the overcurrent detection resistor and the first temperature coefficient at different ambient temperatures, that is, Rcs* K1, is fixed. Specifically, according to different ambient temperatures, the actual resistance of the overcurrent detection resistor is detected, and then compared with the ideal value of the overcurrent detection resistor calibrated at the factory, to obtain the corresponding first temperature coefficient, so that the first temperature coefficient multiplied by the corresponding actual resistance is equal to the ideal value of the overcurrent detection resistor, that is, Rcs1=Rcs* K1. In other words, Rcs1 is a fixed value, which can ensure that the overcurrent detection threshold voltage V1 of the circuit working in an environment of -40℃ to 125℃ will not change with the change of temperature, ensuring the safety and reliability of the circuit.
[0072] In addition, in the specific implementation process, the overcurrent detection resistor is often a resistor with a negative temperature coefficient, that is, the actual resistance of the overcurrent detection resistor increases with decreasing temperature and decreases with increasing temperature. In other words, the actual resistance of the overcurrent detection resistor is negatively correlated with temperature. Therefore, the first temperature coefficient is often less than 1 at low temperatures and greater than 1 at high temperatures, thereby ensuring that the product of the actual resistance of the overcurrent detection resistor and the corresponding first temperature coefficient remains unchanged.
[0073] Specifically, when the circuit operates at 25°C, the overcurrent detection resistor is the ideal value Rcs1, the overcurrent detection threshold current is Iocp, and the first threshold voltage on the overcurrent detection resistor is V1 (V1=Iocp*Rcs1). When the detected feedback voltage, i.e., the first voltage, is greater than or equal to V1, the overcurrent protection is triggered; when the detected first voltage is less than V1, the circuit works normally.
[0074] In the prior art, when the circuit operates at -40°C, the actual resistance of the overcurrent detection resistor becomes larger, denoted as R1, where R1>Rcs1, and the operating current flowing through the overcurrent detection resistor is Io1. When Io1<Iocp, the actual voltage V on the overcurrent detection resistor is R1 may be greater than the first threshold voltage Vo of the overcurrent protection, where V R1 =R1*Io1, thereby erroneously triggering the overcurrent protection of the circuit under test, causing the circuit to work abnormally.
[0075] In the present disclosure, an overcurrent detection circuit with a temperature compensation function is used, that is, Figure 2 After the over-current detection circuit shown, the controller reads the temperature coefficient K of the over-current detection resistor corresponding to -40℃ in the internal memory. (-40℃) , that is, at this time the first temperature coefficient K1=K (-40℃) , and K (-40℃) <1, the actual voltage across the overcurrent detection resistor is compensated by the first temperature coefficient to obtain a first voltage V0=Io1*R1*K (-40℃) Since V0 is less than the set first threshold voltage V1 at this time, the circuit can work normally, thereby avoiding the problem of false triggering of overcurrent protection of the circuit to be tested and causing abnormal circuit operation in the prior art.
[0076] In the prior art, when the circuit operates at 125°C, the actual resistance of the overcurrent detection resistor will become smaller, recorded as R2, where R2<Rcs1, and the operating current flowing through the overcurrent detection resistor is Io2. When Io2>Iocp, the actual voltage V on the overcurrent detection resistor R2 (V R2=R2*Io2) may be smaller than the threshold voltage Vo of the overcurrent protection, resulting in failure to timely trigger the overcurrent protection of the circuit under test, which brings a relatively large risk.
[0077] The present disclosure adopts Figure 2 After the over-current detection circuit with temperature compensation function is shown, the controller reads the temperature coefficient K of the over-current resistor corresponding to 125℃ in the internal memory. (125℃) , that is, at this time the first temperature coefficient K1 = K (125℃) , and K (125℃) >1, the actual voltage across the overcurrent detection resistor is compensated by the first temperature coefficient to obtain a first voltage V0=Io2*Rcs2*K (125℃) Since V0 is greater than the set first threshold voltage V1 at this time, the overcurrent protection is triggered, thereby avoiding the relatively large risk caused by the overcurrent protection of the circuit to be tested not being triggered in time.
[0078] In addition, since there is still a problem in the prior art that the controller cannot respond to small signals, in order to solve the problem in the prior art that the first voltage is too small and the controller cannot recognize it, the following implementation is provided:
[0079] In an optional embodiment, Figure 3 As shown, the overcurrent detection circuit further includes an amplifier circuit 15 , two input ends of the amplifier circuit 15 are respectively connected to two ends of the overcurrent detection resistor 11 , and an output end of the amplifier circuit 15 is connected to another input end of the controller 13 .
[0080] The output end of the amplifier circuit 15 is used to output a second voltage; wherein the second voltage is the voltage of the first voltage after being amplified by the amplifier circuit; the controller 13 is used to trigger overcurrent protection of the circuit under test when the second voltage is greater than or equal to a second threshold voltage.
[0081] In this embodiment, the amplifier circuit amplifies the first voltage obtained through temperature compensation to obtain the second voltage, which solves the problem that the first voltage is too small to be recognized by the controller, so the staff can flexibly select the resistance value of the overcurrent detection resistor. Further, the controller receives the second voltage and compares the second voltage with the second threshold voltage, and when it is detected that the second voltage is greater than or equal to the second threshold voltage, the overcurrent protection of the circuit to be tested is triggered.
[0082] In the prior art, if the resistance value of the overcurrent detection resistor is too small, and a simple controller, such as a simple eight-bit MCU, does not have an amplification function, when the small signal voltage on the overcurrent detection resistor is fed back to the controller, the controller will not respond, resulting in abnormal circuit operation.
[0083] However, the overcurrent detection circuit in the present disclosure includes an amplifier circuit, which amplifies the small signal voltage on the overcurrent detection resistor, namely the first voltage, thereby solving the problem that the first voltage is too small to be recognized by the controller.
[0084] Specifically, the first voltage on the overcurrent detection resistor with temperature compensation is V0=Io2*Rcs2*K1, where K1 is the first temperature coefficient, which represents the compensation coefficient of the overcurrent detection resistor corresponding to different temperatures. Therefore, in order to ensure that the controller can respond in time, a suitable amplifier circuit is used to forward amplify the first voltage on the overcurrent detection resistor to obtain the second voltage Vout. When the amplification factor of the amplifier circuit, that is, the voltage gain, is G, Vout=G*V0; by amplifying the first voltage V0 to obtain the second voltage Vout, the problem of the controller being unable to respond due to the first voltage being too small is solved, so that the staff can flexibly select the resistance value of the overcurrent detection resistor, and the overcurrent detection circuit will not cause the circuit to work abnormally due to the overcurrent detection resistor's resistance value being too small, which facilitates the design and application of the overcurrent detection circuit and ensures the safety and reliability of the circuit.
[0085] Further, the second voltage Vout is compared with the second threshold voltage V2. At this time, V2= G*Iocp*Rcs1, where G is the amplification factor, Iocp is the overcurrent detection threshold current, and Rcs1 is the ideal value of the overcurrent detection resistor. When the controller detects that the second voltage is greater than or equal to the second threshold voltage, the overcurrent protection of the circuit to be tested is triggered.
[0086] In an optional embodiment, Figure 4 As shown, the amplifier circuit 15 includes an operational amplifier 151. Wherein, +VS is the positive electrode of the power supply for powering the operational amplifier. In this embodiment, the influence of the input offset voltage of the operational amplifier itself on the overcurrent detection circuit is particularly considered, thereby improving the stability and accuracy of obtaining the second voltage and improving the effect of the amplifier circuit.
[0087] The calculation formula of the second voltage is:
[0088] Vout = G*(V0-Vos);
[0089] Wherein, Vout is the second voltage; G is the gain; V0 is the first voltage; and Vos is the actual input offset voltage of the operational amplifier.
[0090] The calculation formula of the first voltage is:
[0091] V0=Ics*Rcs*K1;
[0092] Among them, V0 is the first voltage; Ics is the actual current flowing through the overcurrent detection resistor; Rcs is the actual resistance value of the overcurrent detection resistor; K1 is the first temperature coefficient.
[0093] Input offset voltage refers to the difference between the DC voltages applied to the two input terminals in order to obtain a constant zero voltage output at the output terminal of an operational amplifier. For an ideal operational amplifier, when the input voltage is zero, the output voltage should also be zero; however, due to process limitations, the two input pairs of the operational amplifier cannot be completely symmetrical, resulting in input offset voltage in actual operational amplifiers. Among them, the input offset voltage Vos is usually equivalent to a voltage source at the non-inverting input terminal of the operational amplifier, and Vos can be positive or negative.
[0094] Therefore, in the prior art, since the operational amplifier itself has an input offset voltage Vos, if the input offset voltage Vos is greater than the first voltage, the first voltage will be overwhelmed by the input offset voltage of the operational amplifier, causing abnormal output of the amplifier circuit.
[0095] In the calculation process of the second voltage, the present invention takes into account the error caused by the actual input offset voltage. That is, the actual input voltage of the operational amplifier is the first voltage minus the actual input offset voltage. By improving the accuracy of the calculation of the second voltage, the stability of the second voltage acquisition is improved, thereby improving the effect of the amplification circuit.
[0096] In addition, in this embodiment, the second threshold voltage V2 = G*(Iocp*Rcs1- Vos1), where G is the amplification factor, Iocp is the overcurrent detection threshold current, Rcs1 is the ideal value of the overcurrent detection resistor, and Vos1 is the theoretical value of the input offset voltage, that is, the first input offset voltage. When the controller detects that the second voltage is greater than or equal to the second threshold voltage, the overcurrent protection of the circuit to be tested is triggered.
[0097] However, the actual input offset voltage of the operational amplifier is affected by the ambient temperature, causing the actual input offset voltage to change with the temperature. Therefore, in order to overcome the influence of the ambient temperature on the actual input offset voltage, another overcurrent detection circuit is provided to compensate for the actual input offset voltage and solve the problem of abnormal circuit operation caused by the change of the actual input offset voltage due to the change of the ambient temperature, thereby ensuring the safety and reliability of the circuit. The specific scheme is as follows:
[0098] In an optional embodiment, Figure 4As shown, the amplifier circuit 15 includes an operational amplifier 151, and the controller is also used to obtain the corresponding second temperature coefficient of the operational amplifier according to the above-mentioned current ambient temperature, and obtain a first input offset voltage; wherein, the first input offset voltage is the voltage after the actual input offset voltage of the operational amplifier is compensated by the second temperature coefficient.
[0099] The calculation formula of the first input offset voltage is:
[0100] Vos1=K2*Vos;
[0101] Wherein, Vos1 is the first input offset voltage; K2 is the second temperature coefficient; and Vos is the actual input offset voltage.
[0102] The calculation formula of the second voltage is:
[0103] Vout = G*(V0-Vos1);
[0104] Wherein, Vout is the second voltage; G is the gain; V0 is the first voltage; and Vos1 is the first input offset voltage of the operational amplifier.
[0105] The calculation formula of the first voltage is:
[0106] V0=Ics*Rcs*K1;
[0107] Among them, V0 is the first voltage; Ics is the actual current flowing through the overcurrent detection resistor; Rcs is the actual resistance value of the overcurrent detection resistor; K1 is the first temperature coefficient.
[0108] In this embodiment, the actual input offset voltage of the operational amplifier may change with temperature, which may cause the circuit to work abnormally. Figure 5 is a graph showing the actual input offset voltage changing with the ambient temperature. Specifically, the horizontal axis is the ambient temperature value, and the vertical axis is the input offset voltage value. Further, the second temperature coefficient is obtained according to the ratio of the first input offset voltage to the actual input offset voltage. Specifically, the input offset voltage of the operational amplifier at room temperature, i.e., 25°C, can be selected as the first input offset voltage. In other words, the product of the second temperature coefficient and the actual input offset voltage at each actual ambient temperature is the first input offset voltage.
[0109] Since the actual input offset voltage will change with the change of ambient temperature, it will cause the first voltage of the overcurrent detection resistor to change in the second voltage amplified by the amplifier circuit in the operating temperature range of -40℃~125℃, which will cause the circuit to work abnormally. Therefore, it is necessary to obtain the temperature change curve of the actual input offset voltage Vos corresponding to the specification of the operational amplifier, store the second temperature coefficient K2 in the controller according to the temperature change curve, and the controller reads the corresponding second temperature coefficient K2 to calculate the first input offset voltage Vos1=K2*Vos after temperature compensation, which solves the problem of abnormal circuit operation caused by the change of the actual input offset voltage due to the change of ambient temperature, and ensures the safety and reliability of the circuit.
[0110] Specifically, at this time, the second threshold voltage V2 = G*(Iocp*Rcs1- Vos1), where G is the amplification factor, Iocp is the overcurrent detection threshold current, Rcs1 is the ideal value of the overcurrent detection resistor, and Vos1 is the theoretical value of the input offset voltage, that is, the first input offset voltage. When the controller detects that the second voltage Vout is greater than or equal to the second threshold voltage, the overcurrent protection is triggered.
[0111] In an optional embodiment, Figure 6 As shown, the amplifier circuit 15 further includes a switch 152 , a first resistor 153 and a second resistor 154 .
[0112] The switch 152 is connected in parallel with the overcurrent detection resistor 11 , and the switch 152 is electrically connected to the controller 13 .
[0113] The controller 13 is used for controlling the switch to close when it is detected that there is no current on the overcurrent detection resistor.
[0114] One end of the first resistor 153 is respectively connected to the inverting input end of the operational amplifier 151 and one end of the second resistor 154 , and the other end of the first resistor 153 is respectively connected to one end of the overcurrent detection resistor 11 and one end of the switch 152 .
[0115] The other end of the second resistor 154 is connected to the output end of the operational amplifier 151 .
[0116] In this embodiment, when no current flows through the overcurrent detection resistor, the controller controls the switch to close, and the second voltage output by the amplifier circuit is the output voltage when no voltage is applied to the two ends of the operational amplifier, which is recorded as Vout=V. In other words, the input voltage received by the two input ends of the operational amplifier is zero, so the actual input offset voltage of the operational amplifier can be calculated based on the second voltage at this time, that is, the actual input offset voltage is the ratio of the second voltage at this time to the amplification factor, which is recorded as Vos=V / G. When current flows through the overcurrent detection resistor, the controller controls the switch to open, and the actual input voltage of the operational amplifier is V0-Vos.
[0117] In addition, if Figure 6 In the amplifier circuit shown, the calculation formula for the amplification factor is:
[0118] G=1+R F / R G ;
[0119] Among them, R G is the resistance of the first resistor, R F is the resistance value of the second resistor.
[0120] In an optional embodiment, Figure 6 As shown, the amplifier circuit 15 further includes a third resistor 155 and a fourth resistor 156 .
[0121] One end of the third resistor 155 is respectively connected to the positive input end of the operational amplifier 151 and one end of the fourth resistor 156, and the other end of the third resistor 155 is respectively connected to the other end of the overcurrent detection resistor 11 and the other end of the switch 152; the other end of the fourth resistor 156 is grounded.
[0122] In this embodiment, the amplifier circuit is a differential amplifier circuit, and the two input terminals of the operational amplifier are connected through symmetrical resistors to form a differential amplifier. In this configuration, the resistors of the two input terminals are not only equal in value, but also symmetrical in position in the circuit. In other words, the resistance values of the first resistor and the third resistor are equal, and the resistance values of the second resistor and the fourth resistor are equal. The differential amplifier circuit can suppress common-mode signals and improve the working state of the amplifier circuit.
[0123] In an optional implementation manner, the amplifier circuit further includes a corresponding power supply, the power supply is used to power the operational amplifier, and the connection method of the power supply is as follows: Figure 6 shown.
[0124] In an optional implementation, the amplifier circuit 15 further includes a filter capacitor 157, such as Figure 6As shown, one end of the filter capacitor 157 is connected to the positive electrode +VS of the power supply, and the other end of the filter capacitor 157 is grounded. In this embodiment, the filter capacitor is used to eliminate instantaneous circuit fluctuations, reduce interference noise, and protect the circuit from electrostatic interference.
[0125] In an optional embodiment, Figure 6 As shown, the amplifier circuit 15 further includes a first capacitor 158 and a fifth resistor 159; one end of the first capacitor 158 is connected to the output end of the operational amplifier 151, and the other end of the first capacitor 158 is grounded; one end of the fifth resistor 159 is connected to the output end of the operational amplifier 151, and the other end of the fifth resistor 159 is grounded. The first capacitor is used as a capacitive load to simulate the load connection in the circuit; the fifth resistor is used as a resistive load to simulate the load connection in the circuit.
[0126] In another optional implementation, the amplifying circuit may include only the first capacitor or the fifth resistor.
[0127] In an optional embodiment, the controller includes an MCU, which is used to store the correspondence between the ambient temperature and the first temperature coefficient and the correspondence between the ambient temperature and the second temperature coefficient, and to obtain the first temperature coefficient and the second temperature coefficient respectively according to different correspondences.
[0128] In this embodiment, the memory of the MCU is used to store the corresponding relationship between the ambient temperature and the first temperature coefficient and the corresponding relationship between the ambient temperature and the second temperature coefficient. The processor in the MCU is used to obtain the first temperature coefficient and the second temperature coefficient respectively according to different corresponding relationships, and to compare the second voltage with the second threshold voltage. When the MCU detects that the second voltage is greater than or equal to the second threshold voltage, overcurrent protection is triggered to prevent circuit damage or safety accidents. The acquisition of the second voltage is successively compensated by the first temperature coefficient and the second temperature coefficient, so that overcurrent detection is achieved without changing the second threshold voltage, thereby ensuring the safety and reliability of the circuit.
[0129] Example 2
[0130] This embodiment provides an overcurrent detection system, which includes a circuit to be tested and the overcurrent detection circuit as described in Embodiment 1.
[0131] In this embodiment, the temperature sensor is used to detect the current ambient temperature, and the first temperature coefficient of the corresponding overcurrent detection resistor is obtained according to the current ambient temperature, and when the first voltage is greater than or equal to the first threshold voltage, the overcurrent protection is triggered, thereby improving the defect of abnormal operation of the overcurrent detection current caused by temperature changes, so that the overcurrent detection system can trigger the overcurrent protection more accurately. Among them, the circuit to be tested can be a circuit that needs to perform overcurrent detection, such as an H-bridge drive circuit, a half-bridge drive circuit, or a power supply.
[0132] In an optional embodiment, Figure 7 As shown, the circuit to be tested is an H-bridge driving circuit 16, which includes a first input terminal, a second input terminal, a first output terminal, a second output terminal, a first ground terminal and a second ground terminal, and the controller includes a third output terminal and a fourth output terminal.
[0133] The first input terminal is connected to the third output terminal, the second input terminal is connected to the fourth output terminal, the first ground terminal and the second ground terminal are both connected to the other end of the overcurrent detection resistor, the first output terminal is used to connect one end of the motor 17, and the second output terminal is used to connect the other end of the motor 17.
[0134] In this embodiment, the first input terminal IN1 of the H-bridge driving circuit is connected to the third output terminal of the controller, and the second input terminal IN2 of the H-bridge driving circuit is connected to the fourth output terminal of the controller. The first output terminal OUTA of the H-bridge driving circuit is used to connect one end of the motor 17, and the second output terminal OUTB of the H-bridge driving circuit is used to connect the other end of the motor 17. The controller controls the forward and reverse rotation of the motor by controlling the current output direction of the two output terminals of the H-bridge driving circuit.
[0135] Specifically, Figure 7 The circuit shown also includes a second capacitor 18 and a third capacitor 19. One end of the second capacitor is connected to the VM end of the H-bridge drive circuit, wherein the VM end is used to connect the voltage required to drive the motor, and one end of the overcurrent detection resistor of the second capacitor. One end of the third capacitor is connected to the VM end, and the other end of the third capacitor is grounded. In this embodiment, the second capacitor is used to prevent the negative pressure on the ground from being too high, thereby causing damage to the chip of the H-bridge drive circuit. The third capacitor is used to eliminate instantaneous circuit fluctuations, reduce interference noise, and protect the circuit from electrostatic interference.
[0136] Furthermore, by using a temperature sensor to detect the current ambient temperature, and obtaining the first temperature coefficient of the corresponding overcurrent detection resistor and the second temperature coefficient of the corresponding operational amplifier according to the current ambient temperature, and amplifying the voltage across the overcurrent detection resistor through the amplifier circuit to obtain the second voltage, amplification of small signals is achieved. When the controller detects that the second voltage is greater than or equal to the second threshold voltage, the overcurrent protection of the H-bridge drive circuit is triggered, thereby improving the defect of abnormal operation of the overcurrent detection current caused by temperature changes, and achieving the function of the overcurrent detection circuit being able to trigger the overcurrent protection more accurately. Therefore, Figure 7 The circuit in the embodiment takes into account the influence of ambient temperature, the problem that the voltage across the overcurrent detection resistor is too small to be detected by the controller, and the influence of the input offset voltage of the operational amplifier itself, thereby realizing a small signal zero-adjusting amplification H-bridge overcurrent detection circuit with temperature compensation function.
[0137] As for the system embodiment, since it basically corresponds to the overcurrent detection circuit embodiment, the relevant parts may refer to the partial description of the overcurrent detection circuit embodiment.
[0138] Example 3
[0139] Figure 8 An overcurrent detection method is provided for this embodiment. The overcurrent detection method is applied to the overcurrent detection system as described in Embodiment 1. The overcurrent detection method includes the following steps:
[0140] S301, obtaining the current ambient temperature.
[0141] S302: Obtain a first temperature coefficient of the corresponding overcurrent detection resistor according to the current ambient temperature.
[0142] S303. Obtain a first voltage according to the first temperature coefficient; wherein the first voltage is the actual voltage across the overcurrent detection resistor after being compensated by the first temperature coefficient.
[0143] S304 . In response to the first voltage being greater than or equal to a first threshold voltage, triggering overcurrent protection.
[0144] In this embodiment, by detecting the current ambient temperature and obtaining the corresponding first temperature coefficient of the overcurrent detection resistor based on the current ambient temperature, the resistance of the overcurrent detection resistor will not change with the change of temperature; and when the first voltage is greater than or equal to the first threshold voltage, the overcurrent protection is triggered, thereby improving the defect of abnormal operation of the overcurrent detection current caused by temperature changes, so that the overcurrent detection system can trigger the overcurrent protection more accurately, ensuring the safety and reliability of the circuit.
[0145] In a specific embodiment, Fig. 9 The figure is a logic block diagram of an overcurrent detection method for an H-bridge drive circuit, wherein the temperature sensor records the real-time temperature, i.e., the current ambient temperature; the main control MCU is the controller; and the actual sampling resistor is the actual resistance value of the overcurrent detection resistor.
[0146] First, in the preprocessing of the first temperature coefficient, the temperature sensor records the real-time temperature and transmits it to the main control MCU. The main control MCU transmits the IO control signal to the H-bridge driver chip, and the H-bridge driver chip obtains the actual sampling resistance Rcs through overcurrent sampling; the corresponding first temperature coefficient K1 is obtained according to the ratio of the theoretical resistance value of the overcurrent detection resistor to the actual sampling resistance, and the first temperature coefficient K1 is stored in the memory of the main control MCU. Among them, the product of the first temperature coefficient and the actual sampling resistance is the theoretical resistance. Thus, the corresponding relationship between the first temperature coefficient and the real-time temperature is obtained, which is convenient for subsequent temperature compensation of the overcurrent detection resistor.
[0147] The temperature sensor records the real-time temperature and transmits it to the main control MCU. The real-time temperature is read to obtain the corresponding first temperature coefficient and the actual sampling resistor is temperature compensated to obtain the temperature-compensated resistance value K1*Rcs. Among them, the corresponding relationship between the ambient temperature and the first temperature coefficient can be obtained by looking up the relationship curve between the temperature and the first temperature coefficient in the circuit device specification sheet and stored in the memory in advance; it can also be used as Fig. 9 The preprocessing method shown is obtained.
[0148] The amplifier circuit amplifies the first voltage obtained by the sampling resistor after temperature compensation, that is, amplifies the small signal, and outputs the second voltage to feed back to the controller. Fig. 9 The amplifier circuit shown feeds the amplified signal back to the main control MCU.
[0149] Furthermore, considering the influence of ambient temperature on the operational amplifier, the controller also obtains the corresponding second temperature coefficient according to the current ambient temperature to compensate the actual input offset voltage of the operational amplifier to obtain the final second voltage. The second voltage is fed back to the controller as an amplified signal. The second voltage is compared with the second threshold voltage. When the controller detects that the second voltage is greater than or equal to the second threshold voltage, the overcurrent protection of the H-bridge driver chip is triggered; thereby improving the influence of ambient temperature on the overcurrent protection, so that the overcurrent detection system can more accurately trigger the overcurrent protection of the circuit to be tested, and at the same time, the problem that the voltage across the overcurrent detection resistor is too small and the controller cannot respond is solved through the amplification circuit, thereby ensuring the safety and reliability of the circuit.
[0150] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. An overcurrent detection circuit, characterized in that: The overcurrent detection circuit includes an overcurrent detection resistor, a temperature sensor and a controller; The overcurrent detection resistor is connected in series with the circuit to be tested, wherein one end of the overcurrent detection resistor is grounded, and the overcurrent detection resistor is electrically connected to the controller; The output end of the temperature sensor is connected to the input end of the controller, and the temperature sensor is used to detect the current ambient temperature; The output end of the controller is connected to the input end of the circuit to be tested; the controller is used to obtain the first temperature coefficient of the corresponding overcurrent detection resistor according to the current ambient temperature, and trigger overcurrent protection for the circuit to be tested when the first voltage is greater than or equal to a first threshold voltage; wherein the first voltage is the actual voltage across the overcurrent detection resistor after being compensated by the first temperature coefficient.
2. The overcurrent detection circuit according to claim 1, characterized in that: The overcurrent detection circuit also includes an amplifier circuit. The two input ends of the amplifier circuit are respectively connected to the two ends of the overcurrent detection resistor, and the output end of the amplifier circuit is connected to the other input end of the controller; The output end of the amplifier circuit is used to output a second voltage; wherein the second voltage is the voltage of the first voltage after being amplified by the amplifier circuit; The controller is used to trigger overcurrent protection for the circuit under test when the second voltage is greater than or equal to a second threshold voltage.
3. The overcurrent detection circuit as claimed in claim 2, characterized in that: The amplifying circuit comprises an operational amplifier, The calculation formula of the second voltage is: Vout = G*(V0-Vos); Wherein, Vout is the second voltage; G is the gain; V0 is the first voltage; Vos is the actual input offset voltage of the operational amplifier; The calculation formula of the first voltage is: V0=Ics*Rcs*K1; Among them, V0 is the first voltage; Ics is the actual current flowing through the overcurrent detection resistor; Rcs is the actual resistance value of the overcurrent detection resistor; K1 is the first temperature coefficient.
4. The overcurrent detection circuit as claimed in claim 2, characterized in that: The amplification circuit includes an operational amplifier, and the controller is further used to obtain a second temperature coefficient of the corresponding operational amplifier according to the current ambient temperature, and obtain a first input offset voltage; wherein the first input offset voltage is a voltage after the actual input offset voltage of the operational amplifier is compensated by the second temperature coefficient; The calculation formula of the first input offset voltage is: Vos1=K2*Vos; Wherein, Vos1 is the first input offset voltage; K2 is the second temperature coefficient; Vos is the actual input offset voltage; The calculation formula of the second voltage is: Vout = G*(V0-Vos1); Wherein, Vout is the second voltage; G is the gain; V0 is the first voltage; Vos1 is the first input offset voltage of the operational amplifier; The calculation formula of the first voltage is: V0=Ics*Rcs*K1; Among them, V0 is the first voltage; Ics is the actual current flowing through the overcurrent detection resistor; Rcs is the actual resistance value of the overcurrent detection resistor; K1 is the first temperature coefficient.
5. The overcurrent detection circuit according to claim 3 or 4, characterized in that: The amplifying circuit further includes a switch, a first resistor and a second resistor; The switch is connected in parallel with the overcurrent detection resistor, and the switch is electrically connected to the controller; The controller is used for controlling the switch to close when it is detected that there is no current on the overcurrent detection resistor; One end of the first resistor is respectively connected to the inverting input end of the operational amplifier and one end of the second resistor, and the other end of the first resistor is respectively connected to one end of the overcurrent detection resistor and one end of the switch; The other end of the second resistor is connected to the output end of the operational amplifier.
6. The overcurrent detection circuit as claimed in claim 5, characterized in that: The amplifier circuit further includes a third resistor and a fourth resistor. One end of the third resistor is respectively connected to the positive input end of the operational amplifier and one end of the fourth resistor, and the other end of the third resistor is respectively connected to the other end of the overcurrent detection resistor and the other end of the switch; the other end of the fourth resistor is grounded.
7. The overcurrent detection circuit as claimed in claim 4, characterized in that: The controller includes an MCU, and the MCU is used to store a corresponding relationship between the ambient temperature and the first temperature coefficient and a corresponding relationship between the ambient temperature and the second temperature coefficient, and to respectively obtain the first temperature coefficient and the second temperature coefficient according to different corresponding relationships.
8. An overcurrent detection system, characterized in that: The overcurrent detection system comprises a circuit to be tested and an overcurrent detection circuit as described in any one of claims 1 to 7.
9. The overcurrent detection system according to claim 8, characterized in that: The circuit to be tested is an H-bridge driving circuit, the H-bridge driving circuit includes a first input terminal, a second input terminal, a first output terminal, a second output terminal, a first ground terminal and a second ground terminal, and the controller includes a third output terminal and a fourth output terminal; The first input terminal is connected to the third output terminal, the second input terminal is connected to the fourth output terminal, the first ground terminal and the second ground terminal are both connected to the other end of the overcurrent detection resistor, the first output terminal is used to connect one end of the motor, and the second output terminal is used to connect the other end of the motor.
10. An overcurrent detection method, characterized in that: The overcurrent detection method is applied to the overcurrent detection system according to claim 8 or 9, and the overcurrent detection method comprises the following steps: Get the current ambient temperature; Acquire a first temperature coefficient of the corresponding overcurrent detection resistor according to the current ambient temperature; Obtain a first voltage according to the first temperature coefficient; wherein the first voltage is the actual voltage across the overcurrent detection resistor after being compensated by the first temperature coefficient; In response to the first voltage being greater than or equal to a first threshold voltage, overcurrent protection for the circuit under test is triggered.