Current sampling circuit, charging and discharging circuit, circuit board and electronic equipment

By designing an automatic switching current sampling circuit, using the cooperation of the current feedback module and the logic processing module, the sampling resistance value is automatically switched when the microcontroller is sleeping, solving the problem of high power consumption of the microcontroller in the monitoring current scenario and adapting to different current scenarios and reduce power consumption.

CN118937782APending Publication Date: 2024-11-12SHENZHEN XINGUODU TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410913246.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the prior art, the microcontroller needs to switch the sampling resistor in the monitoring current scenario, and cannot automatically switch when the microcontroller is sleeping, resulting in an increase in power consumption.

Method used

A current sampling circuit is designed, including a sampling resistor module, a control module, a logic processing module and a current feedback module. The detection voltage of the sampling resistor unit is detected through the current feedback module, the logic processing module outputs a control signal, and the control module automatically switches the sampling resistor. Implement automatic switching circuit without the need for microcontroller program control.

Benefits of technology

It realizes automatic switching of sampling resistance value when the microcontroller is sleeping, adapts to different current scenarios, reduces the power consumption of the microcontroller, and improves the sampling accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118937782A_ABST
    Figure CN118937782A_ABST
Patent Text Reader

Abstract

The invention discloses a current sampling circuit, a charging and discharging circuit, a circuit board and electronic equipment, a current feedback module detects detection voltage at two ends of a first sampling resistor unit, a voltage feedback signal is sent to a logic processing module according to the detection voltage, and the logic processing module outputs a control signal to a control module according to the voltage feedback signal. The control module enables the voltage input end and the voltage output end to be connected or disconnected according to a control signal received by the control input end, and when the voltage input end and the voltage output end are disconnected, the sampling resistance value is the resistance value of the first sampling resistance unit; when the voltage input end and the voltage output end are conducted, the sampling resistance value is the resistance value after the first sampling resistance unit and the second sampling resistance unit are connected in parallel. According to the invention, the circuit can be automatically switched to change the sampling resistance value, the single-chip microcomputer program control is not needed, the circuit can still operate when the single-chip microcomputer is dormant, and the power consumption of the single-chip microcomputer can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic circuits, and in particular to a current sampling circuit, a charging and discharging circuit, a circuit board and an electronic device. Background Art

[0002] In some MCU current monitoring scenarios, such as battery charging and discharging current, the current coverage is sometimes wide. In order to improve the accuracy of current sampling, different sampling resistors need to be used in different situations. Therefore, a circuit that can switch sampling resistors is needed to achieve different sampling resistance values.

[0003] In the related art, the commonly used switch switching scheme is to use a single-chip microcomputer to control the MOS tube to switch the path. This scheme not only relies on circuit control, but also requires the single-chip microcomputer to perform program control, which cannot put the single-chip microcomputer into sleep mode and will increase the power consumption of the single-chip microcomputer. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a current sampling circuit, a charging and discharging circuit, a circuit board and an electronic device, which can realize automatic switching of the circuit to change the sampling resistance value to adapt to different currents, and does not require single-chip computer program control, and can still run when the single-chip computer is dormant, which can reduce the power consumption of the single-chip computer.

[0005] According to the first aspect of the present application, a current sampling circuit includes:

[0006] A sampling resistor module, the sampling resistor module comprising a first sampling resistor unit and a second sampling resistor unit; a first end of the first sampling resistor unit is used to connect to an input voltage, and a second end of the first sampling resistor unit is used to connect to a load unit;

[0007] A control module, wherein a voltage input terminal of the control module is connected to a first terminal of the first sampling resistor unit, a first terminal of the second sampling resistor unit is connected to a voltage output terminal of the control module, and a second terminal of the second sampling resistor is connected to a second terminal of the first sampling resistor; the control module is provided with a control input terminal, and the control module is used to connect or disconnect the voltage input terminal and the voltage output terminal according to a control signal received by the control input terminal;

[0008] A logic processing module, wherein an output terminal of the logic processing module is connected to a control input terminal of the control module;

[0009] a current feedback module, wherein a first detection end of the current feedback module is connected to a first end of the first sampling resistor unit, a second detection end of the current feedback module is connected to a second end of the first sampling resistor unit, a feedback signal output end of the current feedback module is connected to the logic processing module, the current feedback module is used to detect a detection voltage of the first sampling resistor unit through the first detection end and the second detection end, the current feedback module is used to send a voltage feedback signal to the logic processing module according to the detection voltage, and the logic processing module is used to output the control signal to the control module according to the voltage feedback signal.

[0010] According to the current sampling circuit of the embodiment of the present application, at least the following beneficial effects are achieved: when the current sampling circuit of the present application is in operation, the detection voltage at both ends of the first sampling resistor unit is detected by the current feedback module, and a voltage feedback signal is sent to the logic processing module according to the detection voltage, and the logic processing module outputs a control signal to the control module according to the voltage feedback signal, and then the control module makes the voltage input end and the voltage output end conductive or cut off according to the control signal received by the control input end, when the voltage input end and the voltage output end are cut off, only the first sampling resistor unit in the sampling resistor module works at this time, and the sampling resistance value is the resistance value of the first sampling resistor unit; when the voltage input end and the voltage output end are conductive, the first sampling resistor unit and the second sampling resistor unit in the sampling resistor module both work at this time, and the first sampling resistor unit and the second sampling resistor unit are connected in parallel at this time, so the sampling resistance value is the resistance value after the first sampling resistor unit and the second sampling resistor unit are connected in parallel. In this way, the current sampling circuit of the present application can realize automatic switching circuit to change the sampling resistance value to adapt to different currents, and does not need single-chip program control, and can still run when the single-chip is dormant, which can reduce the power consumption of the single-chip.

[0011] According to some embodiments of the present application, the current feedback module is provided with an amplifying unit, a first signal output terminal and a second signal output terminal, and the voltage feedback signal includes a signal of the first signal output terminal and a signal of the second signal output terminal; the amplifying unit is used to amplify the detection voltage to obtain a detection amplified voltage;

[0012] When the detection amplified voltage is greater than the preset high voltage threshold, the first signal output terminal is a high level signal; when the detection amplified voltage is lower than the preset high voltage threshold and greater than the preset high voltage hysteresis voltage, the level of the first signal output terminal does not change; when the detection amplified voltage is less than the preset high voltage hysteresis voltage, the first signal output terminal is a low level signal; when the detection amplified voltage is less than the preset low voltage threshold, the second signal output terminal is a high level, and when the detection amplified voltage is greater than the preset low voltage threshold and less than the preset low voltage hysteresis voltage, the level of the second signal output terminal remains unchanged; when the detection amplified voltage is greater than the preset low voltage hysteresis voltage, the second signal output terminal is a low level;

[0013] The logic processing module includes a first trigger, a second trigger and an OR gate, the S end of the first trigger is respectively connected to the first signal output end and the R end of the second trigger, the S end of the second trigger is respectively connected to the second signal output end and the R end of the first trigger, the first input end of the OR gate is connected to the Q end of the first trigger, and the second input end of the OR gate is connected to the Q non-end of the second trigger; the output end of the OR gate serves as the output end of the logic processing module.

[0014] According to some embodiments of the present application, the current feedback module also includes a first operational amplifier, a first resistor and an inverter, one end of the first resistor is connected to the output end of the amplification unit, the other end of the first resistor is connected to the inverting input end of the first operational amplifier, the non-inverting input end of the first operational amplifier is connected to the first reference voltage through the second resistor, the non-inverting input end of the first operational amplifier is also connected to the output end of the first operational amplifier through a third resistor, the output end of the first operational amplifier is connected to the input end of the inverter, and the output end of the inverter serves as the first signal output end;

[0015] The current feedback module also includes a second operational amplifier, an inverting input terminal of the second operational amplifier is connected to the first resistor, a non-inverting input terminal of the second operational amplifier is connected to a second reference voltage via a fourth resistor, and the non-inverting input terminal of the second operational amplifier is also connected to an output terminal of the second operational amplifier via a fifth resistor, and the output terminal of the second operational amplifier serves as the second signal output terminal.

[0016] According to some embodiments of the present application, the amplification unit includes a first differential amplification subunit, a second differential amplification subunit and a positive phase summation operation subunit;

[0017] The positive phase input terminal of the first differential amplifier unit is connected to the first detection terminal, and the negative phase input terminal of the first differential amplifier unit is connected to the second detection terminal; the negative phase input terminal of the second differential amplifier unit is connected to the first detection terminal, and the positive phase input terminal of the second differential amplifier unit is connected to the second detection terminal; the positive phase input terminal of the positive phase summation operator unit is respectively connected to the output terminal of the first differential amplifier unit and the output terminal of the second differential amplifier unit, and the negative phase input terminal of the positive phase summation operator unit is grounded; the output terminal of the positive phase summation operator unit is the output terminal of the amplifier unit.

[0018] According to some embodiments of the present application, the control module includes a driving unit and an on-off unit, the first end of the on-off unit serves as the voltage input end, the other end of the on-off unit serves as the voltage output end, the output end of the driving unit is connected to the on-off switch, and the input end of the driving unit is connected to the output end of the logic processing module. When the control signal is at a high level, the driving unit drives the on-off unit to make the voltage input end and the voltage output end conductive; when the control signal is at a low level, the driving unit drives the on-off unit to make the voltage input end and the voltage output end conductive.

[0019] According to some embodiments of the present application, the on-off unit includes a first field effect transistor and a second field effect transistor, the drain of the first field effect transistor serves as the voltage input terminal, the gate of the first field effect transistor is connected to the output terminal of the driving unit, the source of the first field effect transistor is connected to the source of the second field effect transistor, the gate of the second field effect transistor is connected to the output terminal of the driving unit, and the drain of the second field effect transistor serves as the voltage output terminal.

[0020] According to some embodiments of the present application, the driving unit includes a third field effect transistor, the gate of the third field effect transistor serves as the input end of the driving unit, the drain of the third field effect transistor serves as the output end of the driving unit, and the drain of the third field effect transistor is connected between the source of the second field effect transistor and the source of the first field effect transistor.

[0021] A second aspect of the present application provides a charging and discharging circuit, including:

[0022] The current sampling circuit as described in any one of the embodiments of the first aspect;

[0023] A power supply module, wherein a positive terminal of the power supply module is connected to a first end of a first sampling resistor unit, and a voltage at the positive terminal of the power supply module is used as the input voltage;

[0024] A battery module, wherein the positive terminal of the battery module is connected to the second end of the first sampling resistor unit, and the positive terminal of the battery module serves as the load;

[0025] The negative terminal of the power module is connected to the negative terminal of the battery module.

[0026] A third aspect of the present application provides a circuit board, including:

[0027] The current sampling circuit as described in any one of the embodiments of the first aspect;

[0028] Alternatively, a charging and discharging circuit as described in the embodiment of the second aspect.

[0029] A fourth aspect of the present application provides an electronic device, comprising the circuit board as described in the third aspect of the present application.

[0030] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The present application is further described below with reference to the accompanying drawings and embodiments, wherein:

[0032] Figure 1 This is a schematic diagram of the circuit module structure of the current sampling circuit of an embodiment of the present application;

[0033] Figure 2 A curve diagram for detecting the amplified voltage;

[0034] Figure 3 for Figure 1 The structural diagram of the logic processing module;

[0035] Figure 4 for Figure 1 Specific circuit diagram of the current feedback module;

[0036] Figure 5 for Figure 1 Specific circuit diagram of the control module.

[0037] Reference numerals:

[0038] Sampling resistor module 110; control module 120; current feedback module 130; logic processing module 140; power module 150; battery module 160;

[0039] The first resistor R1; the second resistor R2; the third resistor R3; the fourth resistor R4; the fifth resistor R5; the sixth resistor R6; the seventh resistor R7; the eighth resistor R8; the ninth resistor R9; the tenth resistor R10; the eleventh resistor R11; the twelfth resistor R12; the thirteenth resistor R13; the fourteenth resistor R14; the fifteenth resistor R15; the sixteenth resistor R16; the seventeenth resistor R17; the eighteenth resistor R18; the nineteenth resistor R19; the first operational amplifier U1; the second operational amplifier U2; the third operational amplifier U3; the fourth operational amplifier U4; the fifth operational amplifier U5; the first trigger U6; the second trigger U7; the OR gate U8; the first field effect transistor Q1; the second field effect transistor Q2; the third field effect transistor Q3. DETAILED DESCRIPTION

[0040] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0041] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0042] In the description of this application, "several" means more than one, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0043] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.

[0044] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0045] Reference Figure 1 , Figure 1 Schematic diagram of the circuit module structure of the current sampling circuit of the embodiment of the present application. The first aspect of the present application provides a current sampling circuit, which includes a sampling resistor module 110, a control module 120, a logic processing module 140 and a current feedback module 130. The sampling resistor module 110 includes a first sampling resistor unit and a second sampling resistor unit; the first end of the first sampling resistor unit is used to connect to the input voltage, and the second end of the first sampling resistor unit is used to connect to the load unit; the voltage input end of the control module 120 is connected to the first end of the first sampling resistor unit, the first end of the second sampling resistor unit is connected to the voltage output end of the control module 120, and the second end of the second sampling resistor is connected to the second end of the first sampling resistor; the control module 120 is provided with a control input end, and the control module 120 is used to make the voltage input end and the voltage output end conductive or cut off according to the control signal received by the control input end; the logic processing module 140 The output end of the current feedback module 130 is connected to the control input end of the control module 120; the first detection end of the current feedback module 130 is connected to the first end of the first sampling resistor unit, the second detection end of the current feedback module 130 is connected to the second end of the first sampling resistor unit, and the feedback signal output end of the current feedback module 130 is connected to the logic processing module 140. The current feedback module 130 is used to detect the detection voltage of the first sampling resistor unit through the first detection end and the second detection end. The current feedback module 130 is used to send a voltage feedback signal to the logic processing module 140 according to the detection voltage. The logic processing module 140 is used to output a control signal to the control module 120 according to the voltage feedback signal.

[0046] When the current sampling circuit of the present application is in operation, the detection voltage at both ends of the first sampling resistor unit is detected by the current feedback module 130, and a voltage feedback signal is sent to the logic processing module 140 according to the detection voltage. The logic processing module 140 outputs a control signal to the control module 120 according to the voltage feedback signal. Then, the control module 120 turns on or off the voltage input terminal and the voltage output terminal according to the control signal received at the control input terminal. When the voltage input terminal and the voltage output terminal are turned off, only the first sampling resistor unit in the sampling resistor module 110 works, and the sampling resistance value is the resistance value of the first sampling resistor unit; when the voltage input terminal and the voltage output terminal are turned on, both the first sampling resistor unit and the second sampling resistor unit in the sampling resistor module 110 work, and the first sampling resistor unit and the second sampling resistor unit are connected in parallel. Therefore, the sampling resistance value is the resistance value after the first sampling resistor unit and the second sampling resistor unit are connected in parallel. In this way, the current sampling circuit of the present application can realize automatic switching circuit to change the sampling resistance to adapt to different currents, and does not require microcontroller program control. It can still run when the microcontroller is in sleep mode, thereby reducing the power consumption of the microcontroller.

[0047] In one embodiment, the resistance of the first sampling resistor unit is greater than the resistance of the second sampling resistor unit. The first sampling resistor unit is a resistor, and the second sampling resistor unit is a resistor. In another embodiment, the first sampling resistor unit is composed of a plurality of resistors connected in series. The second sampling resistor unit is composed of a plurality of resistors connected in series.

[0048] It is understandable that, referring to Figure 2 , Figure 2 is a curve diagram of detecting the amplified voltage. The current feedback module 130 is provided with a first signal output terminal and a second signal output terminal, and the voltage feedback signal includes a signal of the first signal output terminal and a signal of the second signal output terminal;

[0049] When the detection amplified voltage is greater than the preset high-voltage threshold, the first signal output terminal is a high-level signal; when the detection amplified voltage is lower than the preset high-voltage threshold and greater than the preset high-voltage hysteresis voltage, the level of the first signal output terminal does not change; when the detection amplified voltage is less than the preset high-voltage hysteresis voltage, the first signal output terminal is a low-level signal; when the detection amplified voltage is less than the preset low-voltage threshold, the second signal output terminal is a high level, and when the detection amplified voltage is greater than the preset low-voltage threshold and less than the preset low-voltage hysteresis voltage, the level of the second signal output terminal remains unchanged; when the detection amplified voltage is greater than the preset low-voltage hysteresis voltage, the second signal output terminal is a low level.

[0050] Reference Figure 3 , Figure 3 yes Figure 1The schematic diagram of the structure of the logic processing module 140 in FIG. The logic processing module 140 includes a first trigger U6, a second trigger U7 and an OR gate U8, the S end of the first trigger U6 is respectively connected to the first signal output end and the R end of the second trigger U7, the S end of the second trigger U7 is respectively connected to the second signal output end and the R end of the first trigger U6, the first input end of the OR gate U8 is connected to the Q end of the first trigger U6, and the second input end of the OR gate U8 is connected to the Q non-end of the second trigger U7; the output end of the OR gate U8 serves as the output end of the logic processing module 140.

[0051] It is worth noting that, since the S end of the first trigger U6 is connected to the first signal output end and the R end of the second trigger U7 respectively, when the detection amplified voltage is greater than the preset high voltage threshold, the first signal output end is a high level signal, the first trigger U6 will record the high level, and the second trigger U7 will be reset to zero, and at this time, the Q end of the first trigger U6 is a high level, so the output end of the OR gate U8 is a high level. When the detection amplified voltage is lower than the preset high voltage threshold and greater than the preset high voltage hysteresis voltage, the level of the first signal output end does not change; when the detection amplified voltage is less than the preset high voltage hysteresis voltage and higher than the preset low voltage hysteresis voltage, the first signal output end and the second signal output end are both low level signals, so that the first trigger U6 and the second trigger U7 trigger remain in their original state, so the output end of the OR gate U8 remains in its original state. Since the S end of the second trigger U7 is connected to the second signal output end and the R end of the first trigger U6 respectively, when the detection amplified voltage is less than the preset low voltage threshold, the second signal output end is high level, the second trigger U7 will record the high level, and set the first trigger U6 to zero, so that the Q end of the first trigger U6 is low level, and at this time, the Q non-end of the second trigger U7 is low level, so the output of the OR gate U8 is low level. When the detection amplified voltage is greater than the preset low voltage threshold and less than the preset low voltage hysteresis voltage, the level of the second signal output end remains unchanged. When the detection amplified voltage is greater than the preset low voltage hysteresis voltage and less than the preset high voltage hysteresis voltage, the first signal output end and the second signal output end are both low level signals, so that the first trigger U6 and the second trigger U7 trigger remain in their original state, so the output end of the OR gate U8 is to maintain the original state.

[0052] It is understandable that, referring to Figure 4 , Figure 4 yes Figure 1The specific circuit diagram of the current feedback module 130 in FIG. The current feedback module 130 includes a first operational amplifier U1, a first resistor R1 and an inverter, one end of the first resistor R1 is connected to the output end of the amplification unit, the other end of the first resistor R1 is connected to the inverting input end of the first operational amplifier U1, the non-inverting input end of the first operational amplifier U1 is connected to the first reference voltage through the second resistor R2, the non-inverting input end of the first operational amplifier U1 is also connected to the output end of the first operational amplifier U1 through the third resistor R3, the output end of the first operational amplifier U1 is connected to the input end of the inverter, and the output end of the inverter serves as the first signal output end.

[0053] It is worth noting that referring to Figure 4 , the preset high voltage threshold of the embodiment of the present application is:

[0054] V(h)=VCC*R2 / (R2+R3)+V1*R3 / (R2+R3);

[0055] The preset high voltage hysteresis voltage is:

[0056] V(hc)=0+V1*R3 / (R2+R3);

[0057] Among them, VCC is not shown in the figure. VCC refers to the power supply voltage of each device in the current feedback module 130, and V1 is the first reference voltage. The detection voltage is amplified by the amplification unit to obtain the detection amplified voltage, and the detection amplified voltage is input to the inverting input terminal of the first operational amplifier U1. When the voltage at the inverting input terminal of the first operational amplifier U1 is greater than V(h), the output terminal of the first operational amplifier U1 outputs a low level. After passing through the inverter, the output terminal of the inverter is a high level, that is, the first signal output terminal is a high level. When the voltage at the inverting input terminal of the first operational amplifier U1 is less than V(h) and greater than V(hc), the output terminal level of the first operational amplifier U1 does not change, so the level of the first signal output terminal does not change.

[0058] In one embodiment, referring to Figure 4 The current feedback module 130 also includes a second operational amplifier U2, an inverting input terminal of the second operational amplifier U2 is connected to the first resistor R1, a non-inverting input terminal of the second operational amplifier U2 is connected to the second reference voltage through a fourth resistor R4, and the non-inverting input terminal of the second operational amplifier U2 is also connected to the output terminal of the second operational amplifier U2 through a fifth resistor R5, and the output terminal of the second operational amplifier U2 serves as a second signal output terminal.

[0059] It is worth noting that referring to Figure 5 , the preset low voltage threshold of the embodiment of the present application is:

[0060] V(l)=0+V1*R5 / (R4+R5);

[0061] The preset low voltage hysteresis voltage is:

[0062] V(lc)=VCC*R4 / (R4+R5)+V1*R15 / (R4+R5);

[0063] Wherein, V2 is the second reference voltage. The detection voltage is amplified by the amplification unit to obtain the detection amplified voltage, and the detection amplified voltage is input to the inverting input terminal of the second operational amplifier U2. When the voltage of the inverting input terminal of the second operational amplifier U2 is lower than V(l), the output terminal of the second operational amplifier U2 is high level, that is, the second signal output terminal is high level. When the voltage of the inverting input terminal of the second operational amplifier U2 is greater than V(l) and less than Vlc), the output terminal level of the second operational amplifier U2 does not change, that is, the level of the second signal output terminal does not change.

[0064] It is understandable that, referring to Figure 4 , the amplification unit includes a first differential amplification subunit, a second differential amplification subunit and a positive phase summation operation subunit;

[0065] The positive phase input terminal of the first differential amplifier unit is connected to the first detection terminal, and the negative phase input terminal of the first differential amplifier unit is connected to the second detection terminal; the negative phase input terminal of the second differential amplifier unit is connected to the first detection terminal, and the positive phase input terminal of the second differential amplifier unit is connected to the second detection terminal; the positive phase input terminal of the positive phase summation operator unit is respectively connected to the output terminal of the first differential amplifier unit and the output terminal of the second differential amplifier unit, and the negative phase input terminal of the positive phase summation operator unit is grounded; the output terminal of the positive phase summation operator unit is the output terminal of the amplifier unit.

[0066] Specifically, the first differential amplifier subunit includes a third operational amplifier U3, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8 and a ninth resistor R9, one end of the sixth resistor R6 serves as a positive phase input end of the first differential amplifier subunit, and the other end is connected to the positive phase input end of the third operational amplifier U3; one end of the seventh resistor R7 serves as an inverting input end of the first differential amplifier subunit, and the other end of the seventh resistor R7 is connected to the inverting input end of the third operational amplifier U3. The positive phase input end of the third operational amplifier U3 is also grounded through the eighth resistor R8; the inverting input end of the third operational amplifier U3 is also connected to the output end of the third operational amplifier U3 through the ninth resistor R9. The first differential amplifier subunit is used to amplify the detection voltage through the third operational amplifier U3.

[0067] The second differential amplifier subunit includes a fourth operational amplifier U4, a tenth resistor R10, an eleventh resistor R11, a twelfth resistor R12 and a thirteenth resistor R13; one end of the tenth resistor R10 serves as the positive phase input end of the second differential amplifier subunit, and the other end is connected to the positive phase input end of the fourth operational amplifier U4; one end of the eleventh resistor R11 serves as the negative phase input end of the second differential amplifier subunit, and the other end of the eleventh resistor R11 is connected to the negative phase input end of the fourth operational amplifier U4. The positive phase input end of the fourth operational amplifier U4 is also grounded through the twelfth resistor R12; the negative phase input end of the fourth operational amplifier U4 is also connected to the output end of the third operational amplifier U3 through the thirteenth resistor R13. The second differential amplifier subunit amplifies the detection voltage through the fourth operational amplifier U4.

[0068] The positive phase summing operator unit includes a fifth operational amplifier U5, a fourteenth resistor R14, a fifteenth resistor R15, a sixteenth resistor R16 and a seventeenth resistor R17. The positive phase input terminal of the fifth operational amplifier U5 is connected to the output terminal of the third operational amplifier U3 through the fourteenth resistor R14, and the positive phase input terminal of the fifth operational amplifier U5 is connected to the output terminal of the fourth operational amplifier U4 through the fifteenth resistor R15; the inverting input terminal of the fifth operational amplifier U5 is grounded through the sixteenth resistor R16, and the inverting input terminal of the fifth operational amplifier U5 is also connected to the output terminal of the fifth operational amplifier U5 through the seventeenth resistor R17. The output terminal of the fifth operational amplifier U5 serves as the output terminal of the amplification unit. The positive phase summing operator unit realizes the summing and amplification of the output terminal voltage of the third operational amplifier U3 and the output terminal voltage of the fourth operational amplifier U4 through the fifth operational amplifier U5, thereby obtaining the detection amplified voltage.

[0069] It is understandable that, referring to Figure 5 , Figure 5 yes Figure 1 The specific circuit diagram of the control module 120 is as follows; the control module 120 includes a driving unit and a conduction and cutoff unit, the first end of the conduction and cutoff unit is used as a voltage input end, the other end of the conduction and cutoff unit is used as a voltage output end, the output end of the driving unit is connected to the conduction and cutoff, and the input end of the driving unit is connected to the output end of the logic processing module 140. When the control signal is at a high level, the driving unit drives the conduction and cutoff unit to conduct between the voltage input end and the voltage output end; when the control signal is at a low level, the driving unit drives the conduction and cutoff unit to cut off between the voltage input end and the voltage output end.

[0070] It is worth noting that the output end of the OR gate U8 serves as the output end of the logic processing module 140, and the control signal is the output end signal of the OR gate U8. When the detection amplified voltage is greater than the preset high voltage threshold, the first signal output end is a high level signal, and the output end of the OR gate U8 is a high level. At this time, the control signal is a high level, and the driving unit drives the on-off unit to conduct between the voltage input end and the voltage output end. At this time, the first sampling resistor unit and the second sampling resistor unit are connected in parallel, and the sampling resistance value is reduced; and when the detection amplified voltage is lower than the preset high voltage threshold and greater than the preset high voltage hysteresis voltage, the level of the first signal output end does not change, that is, the control signal does not change, so the sampling resistance value does not change. When the detection amplified voltage is less than the preset high voltage hysteresis voltage and higher than the low voltage hysteresis voltage, the first signal output end and the second signal output end are both low level signals, so that the first trigger U6 and the second trigger U7 trigger remain in their original state, so the output end of the OR gate U8 is to maintain the original state.

[0071] When the detection amplified voltage is less than the preset low-voltage threshold, the second signal output terminal is at a high level, and the output of the OR gate U8 is at a low level, that is, the control signal is at a low level, and the driving unit drives the conduction and cutoff unit to cut off the voltage input terminal and the voltage output terminal. At this time, the sampling resistance is the resistance of the first sampling resistance unit. When the detection amplified voltage is greater than the preset low-voltage threshold and less than the preset low-voltage hysteresis voltage, the level of the second signal output terminal remains unchanged, that is, the control signal remains unchanged, and the sampling resistance remains the resistance of the first sampling resistance unit. When the detection amplified voltage is greater than the preset low-voltage hysteresis voltage and less than the preset high-voltage hysteresis voltage, the first signal output terminal and the second signal output terminal are both low-level signals, so that the first trigger U6 and the second trigger U7 trigger remain in their original state, so the output terminal of the OR gate U8 remains in its original state.

[0072] Therefore, the current sampling circuit of the embodiment of the present application realizes that when the detection amplified voltage is greater than the preset high-voltage hysteresis voltage, the driving unit drives the on-off unit to make the voltage input terminal and the voltage output terminal conductive, thereby reducing the sampling resistance; when the detection amplified voltage is less than the preset low-voltage hysteresis voltage, the driving unit drives the on-off unit to make the voltage input terminal and the voltage output terminal cut off, and the sampling resistance is the resistance of the first sampling resistance unit. This is equivalent to realizing that when the current flowing through the sampling resistance module 110 is large, the sampling resistance is reduced, and when the current flowing through the sampling resistance module 110 is small, the sampling resistance is increased, so it can adapt to different application scenarios and ensure sampling accuracy. In addition, it only relies on hardware circuits, does not require program participation, can run when the single-chip microcomputer is dormant, can reduce the power consumption of the single-chip microcomputer, and compared with software control, the hardware control response speed is faster.

[0073] It is understandable that, referring to Figure 5The on-off unit includes a first field effect transistor Q1 and a second field effect transistor Q2, the drain of the first field effect transistor Q1 serves as a voltage input terminal, the gate of the first field effect transistor Q1 is connected to the output terminal of the driving unit, the source of the first field effect transistor Q1 is connected to the source of the second field effect transistor Q2, the gate of the second field effect transistor Q2 is connected to the output terminal of the driving unit, and the drain of the second field effect transistor Q2 serves as a voltage output terminal.

[0074] It can be understood that the driving unit includes a third field effect transistor Q3, the gate of the third field effect transistor Q3 serves as the input end of the driving unit, the drain of the third field effect transistor Q3 serves as the output end of the driving unit, and the drain of the third field effect transistor Q3 is connected between the source of the second field effect transistor Q2 and the source of the first field effect transistor Q1.

[0075] It is worth noting that when the control signal is at a high level, that is, the gate of the third field effect tube Q3 is at a high level, the third field effect tube Q3 is turned on, so the gate of the first field effect tube Q1 and the gate of the second field effect tube Q2 are pulled down, so the first field effect tube Q1 and the second field effect tube Q2 are turned on, so the voltage input end and the voltage output end are connected, so that the first sampling resistance unit and the second sampling resistance unit are connected in parallel. When the control signal is at a low level, that is, the gate of the third field effect tube Q3 is at a low level, the third field effect tube Q3 is turned off, so the first field effect tube Q1 is turned off, the second field effect tube Q2 is turned off, so the voltage input end and the voltage output end are turned off, and the sampling resistance value is the resistance value of the first sampling resistance unit. The embodiment of the present application adopts the first field effect tube Q1 and the second field effect tube Q2, so that the current can flow from the first field effect tube Q1 to the second field effect tube Q2, and can also flow from the second field effect tube Q2 to the first field effect tube Q1.

[0076] In one embodiment, the drain of the third field effect transistor Q3 is connected between the source of the second field effect transistor Q2 and the source of the first field effect transistor Q1 through an eighteenth resistor R18, and the substrate of the third field effect transistor Q3 is grounded, and the substrate of the third field effect transistor Q3 is connected to the gate of the third field effect transistor Q3 through a nineteenth resistor R19.

[0077] Reference Figure 1 The second aspect of the present application provides a charging and discharging circuit, including:

[0078] A current sampling circuit as in any one of the embodiments of the first aspect;

[0079] A power module 150, wherein the positive terminal of the power module 150 is connected to the first end of the first sampling resistor unit, and the voltage at the positive terminal of the power module 150 is used as the input voltage;

[0080] A battery module 160, wherein the positive terminal of the battery module 160 is connected to the second end of the first sampling resistor unit, and the positive terminal of the battery module 160 serves as a load;

[0081] The negative terminal of the power module 150 is connected to the negative terminal of the battery module 160 .

[0082] Specifically, the power module 150 can charge the battery module 160; at the same time, the battery module 160 can discharge, thereby supplying power to the power module 150. Since the embodiment of the present application adopts the first field effect transistor Q1 and the second field effect transistor Q2, the current can flow from the first field effect transistor Q1 to the second field effect transistor Q2, and can also flow from the second field effect transistor Q2 to the first field effect transistor Q1. Therefore, whether the battery is charging or discharging, sampling can be performed through the current sampling circuit of the present application, and the current sampling circuit can realize automatic switching and change the sampling resistance value.

[0083] Since the charging and discharging circuit includes the current sampling circuit of the first aspect embodiment, the corresponding contents of the current sampling circuit in the first aspect embodiment can be applied to the charging and discharging circuit of the first aspect and have the same implementation principle and technical effect. In order to avoid redundant description, it will not be described in detail here.

[0084] A third aspect of the present application provides a circuit board, including:

[0085] A current sampling circuit as in any one of the embodiments of the first aspect;

[0086] Alternatively, a charging and discharging circuit as in the embodiment of the second aspect.

[0087] Since the circuit board includes the current sampling circuit of the first aspect embodiment, the corresponding contents of the current sampling circuit in the first aspect embodiment can be applied to the circuit board of the third aspect and have the same implementation principle and technical effect. In order to avoid redundant description, it will not be described in detail here.

[0088] A fourth aspect of the present application provides an electronic device, comprising a circuit board as in the third aspect of the present application.

[0089] Since the electronic device includes the circuit board of the third aspect embodiment, the corresponding contents of the current sampling circuit in the first aspect embodiment can be applied to the electronic device of the fourth aspect and have the same implementation principles and technical effects. In order to avoid redundant description, it will not be described in detail here.

[0090] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the relevant technical field without departing from the purpose of the present application. In addition, the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

Claims

1. A current sampling circuit, characterized in that: include: A sampling resistor module, the sampling resistor module comprising a first sampling resistor unit and a second sampling resistor unit; a first end of the first sampling resistor unit is used to connect to an input voltage, and a second end of the first sampling resistor unit is used to connect to a load unit; A control module, wherein a voltage input terminal of the control module is connected to a first terminal of the first sampling resistor unit, a first terminal of the second sampling resistor unit is connected to a voltage output terminal of the control module, and a second terminal of the second sampling resistor is connected to a second terminal of the first sampling resistor; the control module is provided with a control input terminal, and the control module is used to connect or disconnect the voltage input terminal and the voltage output terminal according to a control signal received by the control input terminal; A logic processing module, wherein an output terminal of the logic processing module is connected to a control input terminal of the control module; a current feedback module, wherein a first detection end of the current feedback module is connected to a first end of the first sampling resistor unit, a second detection end of the current feedback module is connected to a second end of the first sampling resistor unit, a feedback signal output end of the current feedback module is connected to the logic processing module, the current feedback module is used to detect a detection voltage of the first sampling resistor unit through the first detection end and the second detection end, the current feedback module is used to send a voltage feedback signal to the logic processing module according to the detection voltage, and the logic processing module is used to output the control signal to the control module according to the voltage feedback signal.

2. The current sampling circuit according to claim 1, characterized in that: The current feedback module is provided with an amplifying unit, a first signal output terminal and a second signal output terminal, and the voltage feedback signal includes a signal of the first signal output terminal and a signal of the second signal output terminal; the amplifying unit is used to amplify the detection voltage to obtain a detection amplified voltage; When the detection amplified voltage is greater than the preset high voltage threshold, the first signal output terminal is a high level signal; When the detection amplified voltage is lower than the preset high-voltage threshold and greater than the preset high-voltage hysteresis voltage, the level of the first signal output terminal does not change; when the detection amplified voltage is less than the preset high-voltage hysteresis voltage, the first signal output terminal is a low-level signal; when the detection amplified voltage is less than the preset low-voltage threshold, the second signal output terminal is a high-level signal, and when the detection amplified voltage is greater than the preset low-voltage threshold and less than the preset low-voltage hysteresis voltage, the level of the second signal output terminal remains unchanged; When the detection amplified voltage is greater than the preset low-voltage hysteresis voltage, the second signal output terminal is at a low level; The logic processing module includes a first trigger, a second trigger and an OR gate, the S end of the first trigger is respectively connected to the first signal output end and the R end of the second trigger, the S end of the second trigger is respectively connected to the second signal output end and the R end of the first trigger, the first input end of the OR gate is connected to the Q end of the first trigger, and the second input end of the OR gate is connected to the Q non-end of the second trigger; the output end of the OR gate serves as the output end of the logic processing module.

3. The current sampling circuit according to claim 2, characterized in that: The current feedback module further includes a first operational amplifier, a first resistor and an inverter, one end of the first resistor is connected to the output end of the amplification unit, the other end of the first resistor is connected to the inverting input end of the first operational amplifier, the non-inverting input end of the first operational amplifier is connected to the first reference voltage through the second resistor, the non-inverting input end of the first operational amplifier is also connected to the output end of the first operational amplifier through the third resistor, the output end of the first operational amplifier is connected to the input end of the inverter, and the output end of the inverter serves as the first signal output end; The current feedback module also includes a second operational amplifier, an inverting input terminal of the second operational amplifier is connected to the first resistor, a non-inverting input terminal of the second operational amplifier is connected to a second reference voltage via a fourth resistor, and the non-inverting input terminal of the second operational amplifier is also connected to an output terminal of the second operational amplifier via a fifth resistor, and the output terminal of the second operational amplifier serves as the second signal output terminal.

4. The current sampling circuit according to claim 3, characterized in that: The amplification unit includes a first differential amplification subunit, a second differential amplification subunit and a positive phase summation operation subunit; The positive phase input terminal of the first differential amplifier unit is connected to the first detection terminal, and the negative phase input terminal of the first differential amplifier unit is connected to the second detection terminal; the negative phase input terminal of the second differential amplifier unit is connected to the first detection terminal, and the positive phase input terminal of the second differential amplifier unit is connected to the second detection terminal; the positive phase input terminal of the positive phase summation operator unit is respectively connected to the output terminal of the first differential amplifier unit and the output terminal of the second differential amplifier unit, and the negative phase input terminal of the positive phase summation operator unit is grounded; the output terminal of the positive phase summation operator unit is the output terminal of the amplifier unit.

5. The current sampling circuit according to claim 1, characterized in that: The control module includes a driving unit and a conduction and cutoff unit, wherein a first end of the conduction and cutoff unit serves as the voltage input end, and the other end of the conduction and cutoff unit serves as the voltage output end, the output end of the driving unit is connected to the conduction and cutoff, and the input end of the driving unit is connected to the output end of the logic processing module. When the control signal is at a high level, the driving unit drives the conduction and cutoff unit to conduct between the voltage input end and the voltage output end; when the control signal is at a low level, the driving unit drives the conduction and cutoff unit to cut off between the voltage input end and the voltage output end.

6. The current sampling circuit according to claim 5, characterized in that: The on-off unit includes a first field effect transistor and a second field effect transistor, the drain of the first field effect transistor serves as the voltage input terminal, the gate of the first field effect transistor is connected to the output terminal of the driving unit, the source of the first field effect transistor is connected to the source of the second field effect transistor, the gate of the second field effect transistor is connected to the output terminal of the driving unit, and the drain of the second field effect transistor serves as the voltage output terminal.

7. The current sampling circuit according to claim 6, characterized in that: The driving unit includes a third field effect transistor, a gate of the third field effect transistor serves as an input end of the driving unit, a drain of the third field effect transistor serves as an output end of the driving unit, and the drain of the third field effect transistor is connected between a source of the second field effect transistor and a source of the first field effect transistor.

8. A charging and discharging circuit, characterized in that: include: The current sampling circuit according to any one of claims 1 to 7; A power supply module, wherein a positive terminal of the power supply module is connected to a first end of a first sampling resistor unit, and a voltage at the positive terminal of the power supply module is used as the input voltage; A battery module, wherein the positive terminal of the battery module is connected to the second end of the first sampling resistor unit, and the positive terminal of the battery module serves as the load; The negative terminal of the power module is connected to the negative terminal of the battery module.

9. A circuit board, characterized in that: include: The current sampling circuit according to any one of claims 1 to 7; Or, the charge and discharge circuit as claimed in claim 8.

10. An electronic device, characterized in that: Comprising the circuit board as claimed in claim 9.

Citation Information

Cited By

  • Relay protection circuit in chip test and electronic chip

    CN120433119A