Bidirectional adaptive current sampling circuit
By designing a bidirectional adaptive current sampling circuit, using the sampling switching module and the differential current sampling circuit, the problem of being unable to achieve wide range sampling of bidirectional currents in the prior art and meeting sampling accuracy is solved, and high-precision and wide range current sampling are achieved.
Patent Information
- Application Number
- CN202411799467.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art cannot meet sampling accuracy while achieving wide range of bidirectional currents.
A bidirectional adaptive current sampling circuit is designed, including a sampling unit, a sampling switching module, a first differential current sampling circuit, a second differential current sampling circuit and a control module. Through the sampling switching module, the sampling resistor is connected to different differential current sampling circuits in a forward or reverse direction, different amplified signals are obtained, and a current sampling signal is generated based on the set threshold.
A wide range of bidirectional current sampling is achieved, while satisfying sampling accuracy, broadening the sampling range and improving the accuracy of sampling results.
Smart Images

Figure CN119716206A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of current sampling, and more specifically to a bidirectional adaptive current sampling circuit. Background Art
[0002] With the continuous development of power electronics technology, bidirectional DCDC converters are developing towards high power density and wide voltage range, which brings with it larger input and output currents. How to achieve accurate sampling of bidirectional currents has become a problem.
[0003] Traditional current sampling methods usually use sampling resistors combined with operational amplifier circuits, but this cannot achieve bidirectional current sampling. In order to achieve bidirectional current sampling, a bias voltage can be added to the operational amplifier circuit, but this will further narrow the current sampling range and reduce the current sampling accuracy. Therefore, the existing current sampling method cannot achieve wide range sampling of bidirectional current while meeting the sampling accuracy. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a bidirectional adaptive current sampling circuit that can satisfy a wide range of bidirectional current sampling and also meet the sampling accuracy in view of the above-mentioned defects of the prior art.
[0005] The technical solution adopted by the present invention to solve the technical problem is: constructing a bidirectional adaptive current sampling circuit, including a sampling unit, a sampling switching module, a first differential current sampling circuit, a second differential current sampling circuit and a control module;
[0006] The sampling unit is connected in the main circuit to obtain the sampling current; the first end of the sampling switching module is connected to the first end of the sampling unit, the second end is connected to the second end of the sampling unit, the third end is connected to the first differential current sampling circuit and the second differential current sampling circuit respectively, and the fourth end is also connected to the first differential current sampling circuit and the second differential current sampling circuit respectively;
[0007] The control module is communicatively connected to the sampling switching module to control the sampling switching module to switch, so that the sampling unit is forwardly or reversely connected to the first differential current sampling circuit and the second differential current sampling circuit;
[0008] The first differential current sampling circuit and the second differential current sampling circuit are used to obtain different amplified signals based on the sampling current;
[0009] The control module is used to generate a current sampling signal based on the different amplified signals and a set threshold.
[0010] In the bidirectional adaptive current sampling circuit of the present invention, the first differential current sampling circuit and the second differential current sampling circuit are used to obtain different amplified signals based on the sampled current, further comprising: the gains of the first differential current sampling circuit and the second differential current sampling circuit are set to be different so as to amplify the received sampled current by different gain multiples to obtain the first amplified signal and the second amplified signal;
[0011] The control module is used to generate a current sampling signal based on the different amplified signals and the set threshold value, further comprising:
[0012] The control module generates the current sampling signal based on the first amplified signal, the second amplified signal and the set threshold.
[0013] In the bidirectional adaptive current sampling circuit of the present invention, the gains of the first differential current sampling circuit and the second differential current sampling circuit are set to be different so as to amplify the received sampling current by different gain multiples to obtain the first amplified signal and the second amplified signal, further comprising:
[0014] The first differential current sampling circuit is used to amplify the sampling current according to a first gain multiple to obtain the first amplified signal, and the second differential current sampling circuit is used to amplify the sampling current according to a second gain multiple to obtain the second amplified signal, wherein the first gain multiple is greater than the second gain multiple.
[0015] In the bidirectional adaptive current sampling circuit of the present invention, the control module generates a current sampling signal based on the first amplified signal, the second amplified signal and a set threshold, including:
[0016] The control module is used to determine whether the first amplified signal is greater than the set threshold, and if so, generate the current sampling signal based on the second amplified signal; otherwise, generate the current sampling signal based on the first amplified signal.
[0017] In the bidirectional adaptive current sampling circuit of the present invention, the set threshold is set based on the maximum current sampling value of the bidirectional adaptive current sampling circuit.
[0018] In the bidirectional adaptive current sampling circuit of the present invention, the sampling switching module includes a first relay and a second relay;
[0019] The common pin of the switch of the first relay is respectively connected to the positive phase input terminal of the first differential current sampling circuit and the positive phase input terminal of the second differential current sampling circuit, the normally closed pin is connected to the first end of the sampling unit, and the normally open pin is connected to the second end of the sampling unit, and the coil control end of the first relay is connected to the control module to receive a first control signal;
[0020] The common pin of the switch of the second relay is respectively connected to the inverting input terminal of the first differential current sampling circuit and the inverting input terminal of the second differential current sampling circuit, the normally closed pin is connected to the second end of the sampling unit, and the normally open pin is connected to the first end of the sampling unit, and the coil control end of the second relay is connected to the control module to receive the second control signal;
[0021] The common pin of the first relay and the second relay is switched between the normally closed pin and the normally open pin based on the first control signal or the second control signal, respectively, so that the sampling unit is forwardly or reversely connected to the first differential current sampling circuit and the second differential current sampling circuit.
[0022] In the bidirectional adaptive current sampling circuit of the present invention, the first differential current sampling circuit includes a first operational amplifier, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, and a sixth resistor;
[0023] The non-phase input terminal of the first operational amplifier is connected to the second terminal of the sampling switching module via the first resistor and the second resistor, the inverting input terminal is connected to the third terminal of the sampling switching module via the third resistor and the fourth resistor, the output terminal is connected to the control module, the positive terminal is connected to the positive electrode of the first power supply, and the negative terminal is connected to the analog ground;
[0024] The fifth resistor is connected between the non-inverting input terminal of the first operational amplifier and the analog ground, and the sixth resistor is connected between the non-inverting input terminal and the output terminal of the first operational amplifier.
[0025] In the bidirectional adaptive current sampling circuit of the present invention, the first differential current sampling circuit further includes a first clamping diode and a second clamping diode, a first filter capacitor, a second filter capacitor, a third filter capacitor, a fourth filter capacitor, a fifth filter capacitor, a sixth filter capacitor and a first output resistor;
[0026] The anode of the first clamping diode is grounded, the cathode is connected to the first input terminal of the control module and the anode of the second clamping diode, and the cathode of the second clamping diode is connected to the positive electrode of the second power supply;
[0027] A first end of the first filter capacitor is connected to a connection point between the first resistor and the second resistor, and a second end is connected to an analog ground;
[0028] A first end of the second filter capacitor is connected to a connection point between the third resistor and the fourth resistor, and a second end is connected to an analog ground;
[0029] A first end of the third filter capacitor is connected to the non-inverting input terminal of the first operational amplifier, and a second end is connected to the analog ground;
[0030] A first end of the fourth filter capacitor is connected to the inverting input end of the first operational amplifier, and a second end of the fourth filter capacitor is connected to the output end of the first operational amplifier;
[0031] The first end of the fifth filter capacitor is connected to the positive electrode of the first power supply, and the second end is connected to the analog ground;
[0032] A first end of the first output resistor is connected to the output end of the first operational amplifier, and a second end is connected to the first input end of the control module;
[0033] A first terminal of the sixth filter capacitor is connected to the first input terminal of the control module, and a second terminal is connected to the analog ground.
[0034] In the bidirectional adaptive current sampling circuit of the present invention, the second differential current sampling circuit includes a second operational amplifier, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a thirteenth resistor and a fourteenth resistor;
[0035] The inverting input terminal of the second operational amplifier is connected to the third terminal of the sampling switching module via the seventh resistor and the eighth resistor, the non-inverting input terminal is connected to the second terminal of the sampling switching module via the ninth resistor and the tenth resistor, and the output terminal is connected to the control module;
[0036] The eleventh resistor and the twelfth resistor are connected between the inverting input terminal and the output terminal of the second operational amplifier, and the thirteenth resistor and the fourteenth resistor are connected between the non-inverting input terminal and the analog ground of the second operational amplifier.
[0037] In the bidirectional adaptive current sampling circuit of the present invention, the second differential current sampling circuit further includes a third clamping diode, a fourth clamping diode, a seventh filter capacitor, an eighth filter capacitor, a ninth filter capacitor, a tenth filter capacitor, an eleventh filter capacitor and a second output resistor;
[0038] The anode of the third clamping diode is grounded, the cathode is connected to the second input terminal of the control module and the anode of the fourth clamping diode, and the cathode of the fourth clamping diode is connected to the positive electrode of the second power supply;
[0039] A first end of the seventh filter capacitor is connected to a connection point between the seventh resistor and the eighth resistor, and a second end is connected to an analog ground;
[0040] A first end of the eighth filter capacitor is connected to a connection point between the ninth resistor and the tenth resistor, and a second end is connected to an analog ground;
[0041] A first end of the ninth filter capacitor is connected to the inverting input end of the second operational amplifier, and a second end is connected to the output end of the second operational amplifier;
[0042] A first end of the tenth filter capacitor is connected to the non-inverting input terminal of the second operational amplifier, and a second end is connected to the analog ground;
[0043] A first end of the second output resistor is connected to the output end of the second operational amplifier, and a second end is connected to the second input end of the control module;
[0044] The first end of the eleventh filter capacitor is connected to the second input end of the control module, and the second end is connected to the analog ground.
[0045] The bidirectional adaptive current sampling circuit of the present invention is implemented by setting a sampling switching module, so that the sampling resistor can be connected to different differential current sampling circuits in the forward or reverse direction, thereby realizing bidirectional current sampling and widening the sampling range. Different differential current sampling circuits can obtain different amplified signals based on the sampling current. Therefore, selecting these different amplified signals based on the set threshold to obtain the corresponding current sampling signal can not only meet the sampling accuracy, but also make the sampling result more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0047] Figure 1 It is a principle block diagram of the bidirectional adaptive current sampling circuit of the present invention;
[0048] Figure 2 It is a principle block diagram of another preferred embodiment of the bidirectional adaptive current sampling circuit of the present invention;
[0049] Figure 3 Is adopted Figure 2 The flow chart of the bidirectional adaptive current sampling circuit sampling the bidirectional DCDC circuit shown;
[0050] Figure 4 It is a circuit diagram of a preferred embodiment of a differential current sampling circuit of a bidirectional adaptive current sampling circuit of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0052] Figure 1 : is a principle block diagram of the bidirectional adaptive current sampling circuit of the present invention. Figure 1 As shown, the bidirectional adaptive current sampling circuit includes a sampling unit, a sampling switching module 100 , a first differential current sampling circuit 200 , a second differential current sampling circuit 300 and a control module 400 .
[0053] like Figure 1 As shown, the sampling unit preferably includes a single sampling resistor R1, which is connected in the bidirectional DCDC main circuit to obtain the sampling current. More preferably, it is a milliohm-level high-precision resistor. Of course, in other preferred embodiments of the present invention, two or more parallel sampling resistors can also be used, or the sampling unit can also include other devices, all of which fall within the scope of protection of the present invention. In a further preferred embodiment of the present invention, any current sampling device, chip or module known in the art can be used to implement the sampling unit, all of which fall within the scope of protection of the present invention. It should be noted that although the present invention uses a bidirectional DCDC as the main circuit to illustrate the bidirectional adaptive current sampling circuit of the present invention, those skilled in the art know that the bidirectional adaptive current sampling circuit of the present invention can be applied to any circuit that requires bidirectional current sampling, and the type of the main circuit is not limited here.
[0054] like Figure 1 As shown, the first end of the sampling switching module 100 is connected to the first end of the sampling resistor R1, the second end is connected to the second end of the sampling resistor R1, the third end is connected to the first differential current sampling circuit 200 and the second differential current sampling circuit 300 respectively, and the fourth end is also connected to the first differential current sampling circuit 200 and the second differential current sampling circuit 300 respectively. The control module 400 is connected to the sampling switching module 100 for communication to control the sampling switching module 100 to switch, so that the sampling resistor R1 is forwardly or reversely connected to the first differential current sampling circuit 200 and the second differential current sampling circuit 300. The first differential current sampling circuit 200 and the second differential current sampling circuit 300 are used to obtain different amplified signals based on the sampled current. The control module 400 is used to generate a current sampling signal based on the different amplified signals and the set threshold.
[0055] The bidirectional adaptive current sampling circuit of the present invention is implemented by setting a sampling switching module, so that the sampling resistor can be connected to different differential current sampling circuits in the forward or reverse direction, thereby realizing bidirectional current sampling and widening the sampling range. Different differential current sampling circuits can obtain different amplified signals based on the sampled current. Therefore, selecting these different amplified signals based on the set threshold to obtain the corresponding current sampling signal can not only meet the sampling accuracy, but also make the sampling result more accurate.
[0056] In a preferred embodiment of the present invention, the first differential current sampling circuit 200 and the second differential current sampling circuit 300 can be constructed by any method known in the art, so that the sampled currents obtain different amplified signals.
[0057] In a further preferred embodiment of the present invention, the first differential current sampling circuit 200 and the second differential current sampling circuit 300 have different gains so that the received sampling current is amplified by different gain multiples to obtain a first amplified signal or a second amplified signal. The control module 400 is communicatively connected to the first differential current sampling circuit 200 and the second differential current sampling circuit 300 to receive the first amplified signal or the second amplified signal and generate a current sampling signal, and generates a current sampling signal based on the first amplified signal, the second amplified signal and a set threshold.
[0058] In a preferred embodiment of the present invention, the sampling switching module 100 may adopt any suitable switch structure, such as a relay, a switch tube, a controllable switch, etc. In a preferred embodiment of the present invention, the sampling switching module 100 may include two relays or two switch tube modules, and the control module 400 is communicatively connected to the sampling switching module 100, thereby sending a relay drive signal or a switch tube drive signal to control the corresponding relay or switch tube module to be turned on or off, so that when the main circuit operates in the first direction, the sampling switching module 100 is in a first switching state, and when the main circuit operates in the second direction, the sampling switching module 100 is in a second switching state, so that the sampling resistor R1 is forwardly or reversely connected to the first differential current sampling circuit 200 or the sampling resistor R1 is forwardly or reversely connected to the second differential current sampling circuit 300.
[0059] In a preferred embodiment of the present invention, the first differential current sampling circuit 200 and the second differential current sampling circuit 300 may adopt any suitable differential current sampling circuit known in the art, and their structures may be the same or different. In order to adapt to a larger current sampling range and meet the accuracy, the first differential current sampling circuit 200 and the second differential current sampling circuit 300 only need to be set to have different gains, so that the received sampling current can be amplified by different gain multiples to obtain a first amplified signal or a second amplified signal.
[0060] In a preferred embodiment of the present invention, the control module 400 may adopt any microcontroller, DSP controller, microprocessor, etc. known in the art, as long as it can be built-in with a known program, so as to generate a current sampling signal based on the first amplified signal or the second amplified signal received from the first differential current sampling circuit 200 and the second differential current sampling circuit 300.
[0061] In a preferred embodiment of the present invention, the first differential current sampling circuit 200 is used to amplify the sampling current according to a first gain multiple to obtain the first amplified signal, and the second differential current sampling circuit 300 is used to amplify the sampling current according to a second gain multiple to obtain the second amplified signal, wherein the first gain multiple is greater than the second gain multiple. The control module 400 is used to determine whether the first amplified signal is greater than a set threshold value, and if so, to generate the current sampling signal based on the second amplified signal, otherwise to generate the current sampling signal based on the first amplified signal. Preferably, the set threshold value can be set based on the maximum current sampling value of the bidirectional adaptive current sampling circuit, for example, it can be 30% of the maximum current sampling value, and of course other values can also be selected, all of which fall within the protection scope of the present invention.
[0062] By implementing the bidirectional adaptive current sampling circuit of the present invention, a sampling resistor can be connected to a differential current sampling circuit with different gains in a forward or reverse direction by setting a sampling switching module, so that bidirectional current sampling can be realized, thereby widening the sampling range, and the differential current sampling circuit with different gains can amplify the sampled current with different gain multiples to obtain amplified signals with different gain multiples, so selecting these amplified signals with different gain multiples based on a set threshold to obtain a corresponding current sampling signal can not only meet the sampling accuracy, but also make the sampling result more accurate.
[0063] Figure 2 FIG. 1 is a schematic diagram of another preferred embodiment of the bidirectional adaptive current sampling circuit of the present invention. Figure 2As shown, the bidirectional adaptive current sampling circuit includes a sampling resistor R1, a sampling switching module, a first differential current sampling circuit 200, a second differential current sampling circuit 300 and a control module.
[0064] like Figure 2 As shown, the sampling resistor R1 is connected in the bidirectional DCDC main circuit to obtain the sampling current. In this preferred embodiment, the sampling switching module includes a first relay K1 and a second relay K2. Figure 2 As shown, the first relay K1 and the second relay K2 are single-pole double-throw relays. Figure 2 As shown, the common pin 4 of the switch of the first relay K1 is respectively connected to the positive phase input terminal of the first differential current sampling circuit 200 and the positive phase input terminal of the second differential current sampling circuit 300, the normally closed pin 3 is connected to the first end of the sampling resistor R1, and the normally open pin 5 is connected to the second end of the sampling resistor R1. The coil control terminal 110 of the first relay K1 is connected to the control module 400 to receive the first control signal. The common pin 4 of the switch of the second relay K2 is respectively connected to the inverting input terminal of the first differential current sampling circuit 200 and the inverting input terminal of the second differential current sampling circuit 300, the normally closed pin 3 is connected to the second end of the sampling resistor R1, and the normally open pin 5 is connected to the first end of the sampling resistor R1. The coil control terminal 120 of the second relay K2 is connected to the control module 400 to receive the second control signal; the common pin 4 of the first relay K1 and the second relay K2 is switched between the normally closed pin 3 and the normally open pin 5 based on the first control signal or the second control signal. Those skilled in the art are aware that in other preferred embodiments of the present invention, a double-pole double-throw relay may be used, or a switch tube module may be used to replace the relay. Based on the teachings of the present invention and common knowledge in the field, those skilled in the art may construct different sampling and switching modules, which all fall within the scope of protection of the present invention.
[0065] In the preferred embodiment, as mentioned above, the first differential current sampling circuit 200 and the second differential current sampling circuit 300 may adopt any suitable differential current sampling circuit known in the art, and their structures may be the same or different. In the preferred embodiment, the first differential current sampling circuit 200 is used to amplify the sampling current according to a first gain multiple to obtain the first amplified signal, and the second differential current sampling circuit 300 is used to amplify the sampling current according to a second gain multiple to obtain the second amplified signal, wherein the first gain multiple is greater than the second gain multiple. That is, in the preferred embodiment, the gain of the first differential current sampling circuit 200 is relatively large, and is used to sample small currents; the gain of the second differential current sampling circuit 300 is relatively small, and is used to sample large currents. Preferably, the first differential current sampling circuit 200 and the second differential current sampling circuit 300 have basically the same structure, except that the resistance values of the differential resistors therein are different, thereby achieving different gains. The preferred embodiment is Figure 4 Of course, any other known differential current sampling circuits are applicable to the present invention, and the first differential current sampling circuit 200 may be designed to have a smaller gain for sampling large currents, and the second differential current sampling circuit 300 may be designed to have a larger gain for sampling small currents.
[0066] Further Figure 2 As shown, the control module includes a DSP controller 400, the first data input terminal ADC1 of the DSP controller 400 is connected to the output terminal of the first differential current sampling circuit 200, the second data input terminal ADC2 of the DSP controller 400 is connected to the output terminal of the second differential current sampling circuit 300, and the signal output terminal of the DSP controller 400 is respectively communicatively connected to the coil control terminal 110 of the first relay K1 and the coil control terminal 120 of the second relay K2.
[0067] Figure 3 Is adopted Figure 2 The flow chart of the bidirectional adaptive current sampling circuit sampling the bidirectional DCDC circuit shown in FIG. Figure 2-3 The sampling process of the bidirectional adaptive current sampling circuit of the present invention is described as follows.
[0068] When current sampling is required, the DSP controller 400 is started to determine the energy flow direction of the bidirectional DCDC circuit. When the energy of the bidirectional DCDC converter flows forward, the switches of the first relays K1 and K2 keep the common pin 4 connected to the normally closed pin 3, the first end of the sampling resistor R1 is connected to the positive phase input terminal of the first differential current sampling circuit 200 and the second differential current sampling circuit 300, and the second end of the sampling resistor R1 is connected to the negative phase input terminal of the first differential current sampling circuit 200 and the second differential current sampling circuit 300. When the energy of the bidirectional DCDC converter flows in the reverse direction, the DSP controller 400 sends a driving signal, the switches of the first relays K1 and K2 keep the common pin 4 connected to the normally open pin 5, the second end of the sampling resistor R1 is connected to the positive phase input terminal of the first differential current sampling circuit 200 and the second differential current sampling circuit 300, and the first end of the sampling resistor R1 is connected to the negative phase input terminal of the first differential current sampling circuit 200 and the second differential current sampling circuit 300. Therefore, no matter the energy of the bidirectional DCDC converter flows forward or reversely, the sampling signals input to the first differential current sampling circuit 200 and the second differential current sampling circuit 300 are both positive voltage signals, so bidirectional current sampling can be achieved.
[0069] Since the gains of the first differential current sampling circuit 200 and the second differential current sampling circuit 300 are different, after the current sampling signal is obtained, the sampled signal can be amplified with different gain multiples. Assuming that the sampling range of the first differential current sampling circuit 200 is the first 30% of the maximum current sampling value, if the actual sampling current is less than 30% of the maximum current sampling value, then after the first differential current sampling circuit 200 amplifies the sampling signal by a large multiple, the sampling value output to the DSP controller is more accurate than the sampling value of the second differential current sampling circuit 300. If the actual sampling current is greater than 30% of the maximum current sampling value, then after the first differential current sampling circuit 200 amplifies the sampling signal by a large multiple, the sampling value output will exceed the maximum voltage value that the DSP controller can accept. Here, a clamping circuit can be used for clamping. Of course, if other types of control modules are selected, the clamping circuit can be omitted.
[0070] Further Figure 3As shown, after the DSP controller 400 receives the first output voltage and the second output voltage respectively generated by the first differential current sampling circuit 200 and the second differential current sampling circuit 300 based on the sampling current through its first input terminal and the second input terminal, the DSP controller 400 determines whether the first output voltage output by the first differential current sampling circuit 200 is greater than a set threshold value (for example, the output voltage 3V corresponding to the sampling value of 30% of the maximum current). If so, it is determined that the current is a small current, and the actual current sampling value is calculated using the first output voltage output by the first differential current sampling circuit 200; otherwise, it is determined that the current is a large current, and the actual current sampling value is calculated using the second output voltage output by the second differential current sampling circuit 300. Here, any calculation method known in the art can be used to calculate the current sampling value, which will not be repeated here.
[0071] The bidirectional adaptive current sampling circuit of the present invention is implemented by setting a sampling switching module, so that the sampling resistor can be connected to the differential current sampling circuit with different gains in the forward or reverse direction, so that bidirectional current sampling can be realized, and the differential current sampling circuit with different gains can amplify the sampling current with different gain multiples to obtain amplified signals with different gain multiples, so that the corresponding current sampling signals obtained based on these amplified signals not only broaden the sampling range, but also meet the sampling accuracy, so the sampling results are more accurate. Furthermore, by adopting a specially designed sampling switching module and DSP controller, not only the circuit is simple and the control is convenient, but also the DSP controller can judge the current current size according to the output voltage of the first differential current sampling circuit, so as to select the calculation basis of the current sampling value, so the sampling results obtained are more accurate.
[0072] Figure 4 FIG. 1 is a circuit diagram of a preferred embodiment of a differential current sampling circuit of a bidirectional adaptive current sampling circuit of the present invention. Figure 4 As shown, the first differential current sampling circuit 200 includes a first operational amplifier U1-A, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a resistor R6 and a resistor R7;
[0073] The non-inverting input terminal of the first operational amplifier U1-A is connected to the second terminal of the sampling switching module 100 (i.e., the common pin 4 of the switch of the first relay K1) through the resistor R2 and the resistor R3, the inverting input terminal is connected to the third terminal of the sampling switching module 100 (i.e., the common pin 4 of the switch of the second relay K2) through the resistor R4 and the resistor R5, the output terminal is connected to the control module 400 (i.e., the first input terminal ADC1 of the DSP controller 400), the positive terminal is connected to the positive pole of the first power supply +5V, and the negative terminal is connected to the analog ground AGND; the resistor R6 is connected between the non-inverting input terminal of the first operational amplifier U1-A and the analog ground AGND, and the resistor R7 is connected between the non-inverting input terminal and the output terminal of the first operational amplifier U1-A. Preferably, the gain of the first differential current sampling circuit 200 can be changed by adjusting the resistance values of the resistors R2, R3, R4, R5, R6, and R7.
[0074] Further Figure 4 As shown, the first differential current sampling circuit 200 further includes a clamping diode D1 and a clamping diode D2, wherein the anode of the clamping diode D1 is grounded GND, the cathode is connected to the first input terminal of the control module 400 and the anode of the clamping diode D2, and the cathode of the clamping diode D2 is connected to the positive electrode of the second power supply +3.3V. By setting the clamping diode, a clamping protection function can be provided, so that the voltage signal output to the DSP controller 400 can be limited to a set range, such as 0 to 3.3V.
[0075] Further Figure 4 As shown, the first differential current sampling circuit 200 further includes a filter capacitor C1, a filter capacitor C2, a filter capacitor C3 and a filter capacitor C4. The first end of the filter capacitor C1 is connected to the connection point of the resistor R2 and the resistor R3, and the second end is connected to the analog ground AGND; the first end of the filter capacitor C2 is connected to the connection point of the resistor R4 and the resistor R5, and the second end is connected to the analog ground AGND. The first end of the filter capacitor C3 is connected to the non-inverting input terminal of the first operational amplifier U1-A, and the second end is connected to the analog ground AGND. The first end of the filter capacitor C4 is connected to the inverting input terminal of the first operational amplifier U1-A, and the second end is connected to the output terminal of the first operational amplifier U1-A. The design of the filter capacitor can filter out the clutter in the circuit.
[0076] Further Figure 4As shown, the first differential current sampling circuit 200 further includes a filter capacitor C5, a filter capacitor C6 and an output capacitor R8; the first end of the filter capacitor C5 is connected to the first power supply positive electrode 5V, and the second end is connected to the analog ground AGND; the first end of the output capacitor R8 is connected to the output end of the first operational amplifier U1-A, and the second end is connected to the first input end ADC1 of the control module 400. The first end of the filter capacitor C6 is connected to the first input end of the control module 400, and the second end is connected to the analog ground AGND. The filter capacitor can be designed to filter out clutter in the circuit.
[0077] Further Figure 4 As shown, the second differential current sampling circuit 300 includes a second operational amplifier U1-B, a resistor R9, a resistor R10, a resistor R11, a resistor R12, a resistor R13, a resistor R14, a resistor R15 and a resistor R16. The inverting input terminal of the second operational amplifier U1-B is connected to the third terminal of the sampling switching module 100 (i.e., the common pin 4 of the switch of the second relay K2) through the resistor R9 and the resistor R10, the non-inverting input terminal is connected to the second terminal of the sampling switching module 100 (i.e., the common pin 4 of the switch of the first relay K1) through the resistor R11 and the resistor R12, and the output terminal is connected to the control module 400 (i.e., the second input terminal ADC2 of the DSP controller 400). The resistor R13 and the resistor R14 are connected between the inverting input terminal and the output terminal of the second operational amplifier U1-B, and the resistor R15 and the resistor R16 are connected between the non-inverting input terminal of the second operational amplifier U1-B and the analog ground AGND. Preferably, the gain of the second differential current sampling circuit 300 can be changed by adjusting the resistance values of the resistors R9 , R10 , R11 , R12 , R13 , R14 , R15 and R16 .
[0078] Further Figure 4 As shown, the second differential current sampling circuit 300 further includes a clamping diode D3 and a clamping diode D4; the anode of the clamping diode D3 is grounded GND, the cathode is connected to the second input terminal of the control module 400 and the anode of the clamping diode D4, and the cathode of the clamping diode D4 is connected to the positive electrode of the second power supply +3.3V. By setting the clamping diode, a clamping protection function can be provided, so that the voltage signal output to the DSP controller 400 can be limited to a set range, such as 0 to 3.3V.
[0079] Further Figure 4As shown, the second differential current sampling circuit 300 further includes a filter capacitor C7, a filter capacitor C8, a filter capacitor C9, a filter capacitor C10, a filter capacitor C12 and an output resistor R17; the first end of the filter capacitor C7 is connected to the connection point of the resistor R9 and the resistor R10, and the second end is connected to the analog ground AGND; the first end of the filter capacitor C8 is connected to the connection point of the resistor R11 and the resistor R12, and the second end is connected to the analog ground AGND; the first end of the filter capacitor C9 is connected to the inverting input end of the second operational amplifier U1-B, and the second end is connected to the output end of the second operational amplifier U1-B; the first end of the filter capacitor C10 is connected to the non-inverting input end of the second operational amplifier U1-B, and the second end is connected to the analog ground AGND; the first end of the output resistor R17 is connected to the output end of the second operational amplifier U1-B, and the second end is connected to the second input end of the control module 400; the first end of the filter capacitor C11 is connected to the second input end of the control module 400, and the second end is connected to the analog ground AGND. Designing the filter capacitor can filter out clutter in the circuit.
[0080] The bidirectional adaptive current sampling circuit of the present invention is implemented by setting a sampling switching module, so that the sampling resistor can be connected to the differential current sampling circuit with different gains in the forward or reverse direction, thereby realizing bidirectional current sampling, and the differential current sampling circuit with different gains can amplify the sampled current with different gain multiples to obtain amplified signals with different gain multiples, so that the corresponding current sampling signals obtained based on these amplified signals not only broaden the sampling range, but also meet the sampling accuracy, so the sampling results are more accurate. Furthermore, through the specially designed differential current sampling circuit, the gain is adjustable and the circuit clutter signal is filtered out through the filter capacitor, so that the obtained current sampling signal is more accurate.
[0081] Although the present invention is described by specific embodiments, it should be understood by those skilled in the art that various changes and equivalent substitutions may be made to the present invention without departing from the scope of the present invention. In addition, various modifications may be made to the present invention for specific situations or materials without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed, but should include all implementation methods falling within the scope of the claims of the present invention.
[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A bidirectional adaptive current sampling circuit, characterized in that: It includes a sampling unit, a sampling switching module, a first differential current sampling circuit, a second differential current sampling circuit and a control module; The sampling unit is connected in the main circuit to obtain the sampling current; the first end of the sampling switching module is connected to the first end of the sampling unit, the second end is connected to the second end of the sampling unit, the third end is connected to the first differential current sampling circuit and the second differential current sampling circuit respectively, and the fourth end is also connected to the first differential current sampling circuit and the second differential current sampling circuit respectively; The control module is communicatively connected to the sampling switching module to control the sampling switching module to switch, so that the sampling unit is forwardly or reversely connected to the first differential current sampling circuit and the second differential current sampling circuit; The first differential current sampling circuit and the second differential current sampling circuit are used to obtain different amplified signals based on the sampling current; The control module is used to generate a current sampling signal based on the different amplified signals and a set threshold.
2. The bidirectional adaptive current sampling circuit according to claim 1, characterized in that: The first differential current sampling circuit and the second differential current sampling circuit are used to obtain different amplified signals based on the sampled current, further comprising: the gains of the first differential current sampling circuit and the second differential current sampling circuit are set to be different so as to amplify the received sampled current by different gain multiples to obtain the first amplified signal and the second amplified signal; The control module is used to generate a current sampling signal based on the different amplified signals and the set threshold value, further comprising: The control module generates the current sampling signal based on the first amplified signal, the second amplified signal and the set threshold.
3. The bidirectional adaptive current sampling circuit according to claim 2, characterized in that: The gain of the first differential current sampling circuit and the gain of the second differential current sampling circuit are set to be different so as to amplify the received sampling current by different gain multiples to obtain the first amplified signal and the second amplified signal, further comprising: The first differential current sampling circuit is used to amplify the sampling current according to a first gain multiple to obtain the first amplified signal, and the second differential current sampling circuit is used to amplify the sampling current according to a second gain multiple to obtain the second amplified signal, wherein the first gain multiple is greater than the second gain multiple.
4. The bidirectional adaptive current sampling circuit according to claim 3, characterized in that: The control module generates a current sampling signal based on the first amplified signal, the second amplified signal and a set threshold, comprising: The control module is used to determine whether the first amplified signal is greater than the set threshold, and if so, generate the current sampling signal based on the second amplified signal, otherwise, generate the current sampling signal based on the first amplified signal.
5. The bidirectional adaptive current sampling circuit according to claim 4, characterized in that: The set threshold is set based on a maximum current sampling value of the bidirectional adaptive current sampling circuit.
6. The bidirectional adaptive current sampling circuit according to any one of claims 1 to 5, characterized in that: The sampling switching module includes a first relay and a second relay; The common pin of the switch of the first relay is respectively connected to the positive phase input terminal of the first differential current sampling circuit and the positive phase input terminal of the second differential current sampling circuit, the normally closed pin is connected to the first end of the sampling unit, and the normally open pin is connected to the second end of the sampling unit, and the coil control end of the first relay is connected to the control module to receive a first control signal; The common pin of the switch of the second relay is respectively connected to the inverting input terminal of the first differential current sampling circuit and the inverting input terminal of the second differential current sampling circuit, the normally closed pin is connected to the second end of the sampling unit, and the normally open pin is connected to the first end of the sampling unit, and the coil control end of the second relay is connected to the control module to receive the second control signal; The common pin of the first relay and the second relay is switched between the normally closed pin and the normally open pin based on the first control signal or the second control signal, respectively, so that the sampling unit is forwardly or reversely connected to the first differential current sampling circuit and the second differential current sampling circuit.
7. The bidirectional adaptive current sampling circuit according to any one of claims 1 to 5, characterized in that: The first differential current sampling circuit includes a first operational amplifier, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, and a sixth resistor; The non-phase input terminal of the first operational amplifier is connected to the second terminal of the sampling switching module via the first resistor and the second resistor, the inverting input terminal is connected to the third terminal of the sampling switching module via the third resistor and the fourth resistor, the output terminal is connected to the control module, the positive terminal is connected to the positive electrode of the first power supply, and the negative terminal is connected to the analog ground; The fifth resistor is connected between the non-inverting input terminal of the first operational amplifier and the analog ground, and the sixth resistor is connected between the non-inverting input terminal and the output terminal of the first operational amplifier.
8. The bidirectional adaptive current sampling circuit according to claim 7, characterized in that: The first differential current sampling circuit further includes a first clamping diode and a second clamping diode, a first filter capacitor, a second filter capacitor, a third filter capacitor, a fourth filter capacitor, a fifth filter capacitor, a sixth filter capacitor and a first output resistor; The anode of the first clamping diode is grounded, the cathode is connected to the first input terminal of the control module and the anode of the second clamping diode, and the cathode of the second clamping diode is connected to the positive electrode of the second power supply; A first end of the first filter capacitor is connected to a connection point between the first resistor and the second resistor, and a second end is connected to an analog ground; A first end of the second filter capacitor is connected to a connection point between the third resistor and the fourth resistor, and a second end is connected to an analog ground; A first end of the third filter capacitor is connected to the non-inverting input terminal of the first operational amplifier, and a second end is connected to the analog ground; A first end of the fourth filter capacitor is connected to the inverting input end of the first operational amplifier, and a second end of the fourth filter capacitor is connected to the output end of the first operational amplifier; The first end of the fifth filter capacitor is connected to the positive electrode of the first power supply, and the second end is connected to the analog ground; A first end of the first output resistor is connected to the output end of the first operational amplifier, and a second end is connected to the first input end of the control module; A first terminal of the sixth filter capacitor is connected to the first input terminal of the control module, and a second terminal is connected to the analog ground.
9. The bidirectional adaptive current sampling circuit according to any one of claims 1 to 5, characterized in that: The second differential current sampling circuit includes a second operational amplifier, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a thirteenth resistor and a fourteenth resistor; The inverting input terminal of the second operational amplifier is connected to the third terminal of the sampling switching module via the seventh resistor and the eighth resistor, the non-inverting input terminal is connected to the second terminal of the sampling switching module via the ninth resistor and the tenth resistor, and the output terminal is connected to the control module; The eleventh resistor and the twelfth resistor are connected between the inverting input terminal and the output terminal of the second operational amplifier, and the thirteenth resistor and the fourteenth resistor are connected between the non-inverting input terminal and the analog ground of the second operational amplifier.
10. The bidirectional adaptive current sampling circuit according to claim 9, characterized in that: The second differential current sampling circuit further includes a third clamping diode, a fourth clamping diode, a seventh filter capacitor, an eighth filter capacitor, a ninth filter capacitor, a tenth filter capacitor, an eleventh filter capacitor and a second output resistor; The anode of the third clamping diode is grounded, the cathode is connected to the second input terminal of the control module and the anode of the fourth clamping diode, and the cathode of the fourth clamping diode is connected to the positive electrode of the second power supply; The first end of the seventh filter capacitor is connected to the connection point of the seventh resistor and the eighth resistor, and the second end is connected to the analog ground; A first end of the eighth filter capacitor is connected to a connection point between the ninth resistor and the tenth resistor, and a second end is connected to an analog ground; A first end of the ninth filter capacitor is connected to the inverting input end of the second operational amplifier, and a second end is connected to the output end of the second operational amplifier; A first end of the tenth filter capacitor is connected to the non-inverting input terminal of the second operational amplifier, and a second end is connected to the analog ground; A first end of the second output resistor is connected to the output end of the second operational amplifier, and a second end is connected to the second input end of the control module; The first end of the eleventh filter capacitor is connected to the second input end of the control module, and the second end is connected to the analog ground.
Citation Information
Cited By
Reference following anti-interference bidirectional current sampling method and system
CN121856627A