Battery charging and discharging control circuit and motor control circuit
Through the design of independent charging and discharging modules, combined with microcontroller optimization circuits, the problems of switching element heating and main control chip computing power distribution during lithium battery charging and discharging are solved, achieving efficient battery charging and discharging control.
Patent Information
- Application Number
- CN202422293287.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2034-09-20
AI Technical Summary
In existing lithium battery charge and discharge control circuits, continuous conduction of switching elements causes severe heat generation, increases energy consumption, and affects the computing power allocation of the main control chip in realizing core functions.
The charging module, discharging module and charging and discharging control module are designed independently. The charging module is connected to an external charging power supply to control battery charging. During discharge, the battery is powered by the discharge module, which independently controls battery discharge, reduces the conduction time of the switching elements, and reduces heat generation. At the same time, the circuit design is optimized using components such as microcontrollers and transistors to reduce the data collection and analysis burden of the main control chip.
It effectively reduces the heat generation of switching components, reduces energy consumption, optimizes the computing power distribution of the main control chip, and realizes efficient control of the battery charging and discharging process.
Smart Images

Figure CN223451644U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model belongs to battery charge and discharge control technical field, especially relate to a battery charge and discharge control circuit and motor control circuit. BACKGROUND
[0002] New energy automobile lithium ion power battery (namely lithium battery) is generally defined as the device of storing energy, and in the working process, the output energy for the automobile load is the discharge process, and the received energy from the external device is the charging process. Under normal circumstances, the discharge process and the charging process of the lithium battery are realized by the external control circuit, and therefore the effective charge and discharge control circuit and control method are particularly important.
[0003] The commonly used lithium battery charge and discharge control scheme includes a linear power supply scheme and a half-port charge and discharge control scheme. In the charge and discharge process of the linear power supply scheme, a switching element is used as a core device, and the on-off of multiple switching elements is controlled through an open loop or a closed loop according to a control method, so as to change the current size and direction in the circuit, thereby realizing the charge and discharge control of the lithium battery. However, the switching element is continuously turned on, and the current flows through the switching element for a long time, which causes the switching element to heat seriously, and further causes the overall circuit to heat seriously and increase the energy consumption.
[0004] In the charge and discharge process of the half-port charge and discharge control scheme, the charge circuit and the discharge circuit are controlled by monitoring the charge and discharge current and voltage of the charging port and the discharging port through the main control chip such as MCU with monitoring and programming functions. However, this control method needs to ensure that the main control chip continuously collects the states of the charging port and the discharging port, and determines the control of the charge and discharge process through the analysis of the collected data. For the power consumption equipment using an embedded system, the data collection, analysis and control process consumes the operation resources of the main control chip, and affects the algorithm distribution of the main control chip in realizing the core function. UTILITY MODEL CONTENTS
[0005] The utility model provides a kind of battery charge and discharge control circuit and motor control circuit to solve the problem that switching element is continuously turned on in prior art, which causes the switching element to heat seriously, increases energy consumption and affects the algorithm distribution of main control chip in realizing core function.
[0006] In the first aspect, the utility model provides a kind of battery charge and discharge control circuit, including charging module, discharging module and charge and discharge control module;When battery is charged, the charge and discharge control module is connected with charging power supply by the charging module;The charge and discharge control module controls the charging module to charge battery under the condition of power supply;When battery is discharged, battery supplies power to the charge and discharge control module by the discharging module to control battery to discharge by the discharging module.
[0007] Optionally, the charging module comprises a first diode D1; the cathode of the first diode D1 is electrically connected to the discharging module and the charging and discharging control module; the anode of the first diode D1 is electrically connected to a charging positive electrode, one end of a first sampling resistor RS1 and one end of a first resistor R1; the end of the first sampling resistor RS1 away from the charging positive electrode is electrically connected to the drain of a first MOS tube Q1; the source of the first MOS tube Q1 is electrically connected to the source of a second MOS tube Q2, and the gate is electrically connected to the gate of the second MOS tube Q2; the source of the second MOS tube Q2 is electrically connected to the charging and discharging control module, and the drain is electrically connected to the positive electrode of the battery and the discharging module; the negative electrode of the battery is electrically connected to the charging negative electrode and grounded.
[0008] Optionally, the charging and discharging control module comprises a first resistor R1, a triode Q3, a microcontroller and a three-terminal voltage regulator U1; one end of the first resistor R1 away from the first diode D1 is electrically connected to one end of a second resistor R2 and the pin V_CHARGE1 of the microcontroller; one end of the second resistor R2 away from the first resistor R1 is grounded; the microcontroller collects the voltage across the second resistor R2 through the pin V_CHARGE1; one end of a third resistor R3 away from the first MOS tube Q1 is electrically connected to one end of a fourth resistor R4 and the pin V_CHARGE2 of the microcontroller; one end of the fourth resistor R4 away from the third resistor R3 is grounded; the microcontroller collects the voltage across the fourth resistor R4 through the pin V_CHARGE2;
[0009] the collector of the triode Q3 is electrically connected to the gate of the first MOS tube Q1, the base is electrically connected to the pin CHARGE of the microcontroller through a fifth resistor R5, and the emitter is electrically connected to the base of the triode Q3 through a sixth resistor R6 and grounded; the microcontroller outputs high level or low level to the triode Q3 through the pin CHARGE;
[0010] the input end of the three-terminal voltage regulator U1 is electrically connected to the positive electrode of an electrolytic capacitor E1, and electrically connected to the cathode of the first diode D1 through a fourteenth resistor R14, the output end is electrically connected to the discharging module, and the common end is electrically connected to the negative electrode of the electrolytic capacitor E1 and grounded.
[0011] Optionally, the discharging module comprises a third MOS tube Q4 and a fourth MOS tube Q5; the source of the third MOS tube Q4 is electrically connected to the positive pole of the battery, the drain is electrically connected to the cathode of the first diode D1, and the gate is electrically connected to the positive pole of the battery and the source of the fourth MOS tube Q5 through the eleventh resistor R11 and the twelfth resistor R12, respectively; the gate of the fourth MOS tube Q5 is electrically connected to the pin POWER_ON of the microcontroller through the ninth resistor R9, and the drain is electrically connected to the gate of the fourth MOS tube Q5 and grounded through the tenth resistor R10; the microcontroller outputs low level or high level to the fourth MOS tube Q5 through the pin POWER_ON;
[0012] The source of the fourth MOS tube Q5 is electrically connected to the anode of the third diode D3; the cathode of the third diode D3 is electrically connected to the key SW and the cathode of the fourth diode D4; the key SW is grounded away from one end of the third diode D3; the anode of the fourth diode D4 is electrically connected to the pin AD_KEY of the microcontroller, one end of the thirteenth resistor R13, and one end of the third capacitor C3; one end of the thirteenth resistor R13 away from the fourth diode D4 is electrically connected to the output terminal of the three-terminal voltage regulator U1; one end of the third capacitor C3 away from the fourth diode D4 is grounded; after pressing the key SW, the microcontroller is powered on and receives low level through the pin AD_KEY to output high level to the fourth MOS tube Q5 through the pin POWER_ON.
[0013] Optionally, the pin V_CHARGE1 of the microcontroller is electrically connected to the first capacitor C1; one end of the first capacitor C1 away from the microcontroller is grounded.
[0014] Optionally, the pin V_CHARGE2 of the microcontroller is electrically connected to the second capacitor C2; one end of the second capacitor C2 away from the microcontroller is grounded.
[0015] Optionally, the collector of the triode Q3 is electrically connected to the eighth resistor R8; one end of the eighth resistor R8 away from the triode Q3 is electrically connected to one end of the seventh resistor R7; the two ends of the seventh resistor R7 are electrically connected to the gate and the source of the first MOS tube Q1, respectively.
[0016] Optionally, the input terminal and the output terminal of the three-terminal voltage regulator U1 are electrically connected to one end of the fourth capacitor C4 and one end of the fifth capacitor C5, respectively; one end of the fourth capacitor C4 and one end of the fifth capacitor C5 away from the three-terminal voltage regulator U1 are both grounded.
[0017] The utility model provides a motor control circuit based on the battery charge -discharge control circuit of first aspect, including motor, the positive pole of motor is connected with the cathode of fifth diode D5 and the positive pole of battery, is connected with the drain of fifth MOS tube Q6 and the anode of fifth diode D5 of negative pole,
[0018] One end of the gate of fifth MOS tube Q6 is electrically connected to one end of the fifteenth resistor R15 and one end of the second sampling resistor RS2; the end of the fifteenth resistor R15 away from the fifth MOS tube Q6 is electrically connected to the pin Brush_DR of the microcontroller; the microcontroller outputs low level or high level to the fifth MOS tube Q6 through the pin Brush_DR; the source of the fifth MOS tube Q6 is electrically connected to one end of the sixteenth resistor R16, one end of the seventeenth resistor R17 and one end of the second sampling resistor RS2; the end of the sixteenth resistor R16 away from the source of the fifth MOS tube Q6 is electrically connected to the gate of the fifth MOS tube Q6; the end of the seventeenth resistor R17 away from the fifth MOS tube Q6 is electrically connected to one end of the sixth capacitor C6 and one end of the eighteenth resistor R18; the end of the second sampling resistor RS2 away from the fifth MOS tube Q6 is grounded; the end of the sixth capacitor C6 away from the seventeenth resistor R17 is grounded; the end of the eighteenth resistor R18 away from the seventeenth resistor R17 is electrically connected to the non-inverting input terminal of the operational amplifier in the microprocessor; the non-inverting input terminal of the operational amplifier is electrically connected to one end of the nineteenth resistor R19 and one end of the twentieth resistor R20; the end of the nineteenth resistor R19 away from the operational amplifier is electrically connected to the end of the sixth capacitor C6 away from the seventeenth resistor R17; the end of the twentieth resistor R20 away from the inverting input terminal of the operational amplifier is electrically connected to the output terminal of the operational amplifier; the output terminal of the operational amplifier is electrically connected to the non-inverting input terminal of the comparator in the microprocessor, and the positive power supply terminal is electrically connected to the output terminal of the three-terminal voltage regulator U1; the inverting input terminal of the comparator is connected to the reference voltage VREF, and the output terminal outputs high level to the microprocessor, so as to output low level to the fifth MOS tube Q6 through the pin Brush_DR, so that the motor stops; the positive power supply terminal of the comparator is electrically connected to the output terminal of the three-terminal voltage regulator U1.
[0019] The utility model provides a kind of battery charging and discharging control circuit and motor control circuit, wherein battery charging and discharging control circuit includes charging module, discharging module and charge-discharge control module;When battery is charged, the charge-discharge control module is connected with charging power supply by the charging module;The charge-discharge control module controls the charging module to charge battery under the condition of power supply;When battery is discharged, battery supplies power for the charge-discharge control module by the discharging module, to control battery to discharge by the discharging module.The utility model solves the problem that switch element is continuously turned on in prior art, leading to that switch element is seriously heated, increase energy consumption and affect the power distribution of main control chip in realizing core function. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical scheme of the utility model, the following will be needed to use the drawings in the embodiment briefly introduced, obviously, the drawings in the following description is only the embodiment of the utility model, for those skilled in the art, without creative labor, according to these drawings, other drawings can also be obtained.
[0021] Figure 1 The circuit structure schematic diagram of battery charging and discharging control circuit provided by the embodiment of the utility model is provided;
[0022] Figure 2 The circuit structure schematic diagram of the power supply circuit of MCU provided by the embodiment of the utility model is provided;
[0023] Figure 3 The circuit structure schematic diagram of motor control circuit provided by the embodiment of the utility model is provided;
[0024] Figure 4 The circuit structure schematic diagram of motor protection circuit provided by the embodiment of the utility model is provided. DETAILED DESCRIPTION
[0025] The technical scheme in the embodiment of the utility model will be described clearly and completely in the following by combining with the drawings in the embodiment of the utility model, obviously, the described embodiment is only a part of the embodiment of the utility model, not all the embodiment.Based on the embodiment in the utility model, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the utility model.
[0026] Embodiment 1
[0027] The embodiment provides a battery charging and discharging control circuit, which comprises a charging module, a discharging module and a charging and discharging control module; when the battery is charged, the charging and discharging control module is externally connected with a charging power supply through the charging module; under the power supply of the power supply, the charging and discharging control module controls the charging module to charge the battery; when the battery is discharged, the battery supplies power to the charging and discharging control module through the discharging module to control the battery to discharge through the discharging module.
[0028] Exemplarily, as shown in Figure 1 The charging module comprises a first diode D1; the cathode of the first diode D1 is electrically connected with the discharging module and the charging and discharging control module; the anode of the first diode D1 is electrically connected with a charging positive electrode, one end of a first sampling resistor RS1 and one end of a first resistor R1; the end of the first sampling resistor RS1 away from the charging positive electrode is electrically connected with the drain of a first MOS tube Q1; the source of the first MOS tube Q1 is electrically connected with the source of a second MOS tube Q2, and the gate is electrically connected with the gate of the second MOS tube Q2; the source of the second MOS tube Q2 is electrically connected with the charging and discharging control module, and the drain is electrically connected with the positive electrode of the battery BAT and the discharging module; the negative electrode of the battery BAT is electrically connected with a charging negative electrode and grounded.
[0029] As shown in Figure 2 The charging and discharging control module comprises a first resistor R1, a triode Q3, a microcontroller (MCU) and a three-terminal voltage regulator U1; one end of the first resistor R1 away from the first diode D1 is electrically connected with one end of a second resistor R2 and a pin V_CHARGE1 of the microcontroller; one end of the second resistor R2 away from the first resistor R1 is grounded; the microcontroller collects the voltage across the second resistor R2 through the pin V_CHARGE1; the pin V_CHARGE1 of the microcontroller is electrically connected with a first capacitor C1; one end of the first capacitor C1 away from the microcontroller is grounded, and the first capacitor C1 is used to reduce the interference and burr of the voltage collected by the pin V_CHARGE1. In the embodiment, the model of the microcontroller (MCU) is OB38A08A1W16OP.
[0030] One end of the third resistor R3 is electrically connected with the drain of the first MOS tube Q1; one end of the fourth resistor R4 away from the third resistor R3 is electrically connected with the pin V_CHARGE2 of the microcontroller; one end of the fourth resistor R4 away from the third resistor R3 is grounded; the microcontroller collects the voltage across the fourth resistor R4 through the pin V_CHARGE2; the pin V_CHARGE2 of the microcontroller is electrically connected with a second capacitor C2; one end of the second capacitor C2 away from the microcontroller is grounded, and the second capacitor C2 is used to reduce the interference and burr of the voltage collected by the pin V_CHARGE2.
[0031] The collector of the triode Q3 is electrically connected to the gate of the first MOS Q1, the base is electrically connected to the pin CHARGE of the microcontroller through the fifth resistor R5, and the emitter is electrically connected to the base of the triode Q3 through the sixth resistor R6 and grounded; the microcontroller outputs high level or low level to the triode Q3 through the pin CHARGE; the fifth resistor R5 is a current limiting resistor, which is used to reduce the base current of the triode Q3 to avoid damage to the triode Q3, and also plays a role in filtering signal interference. The sixth resistor R6 is a pull-down resistor, which keeps the triode Q3 in a cut-off state when the MCU is powered on, preventing the triode Q3 from being misdirected.
[0032] The collector of the triode Q3 is electrically connected to the eighth resistor R8; one end of the eighth resistor R8 away from the triode Q3 is electrically connected to one end of the seventh resistor R7; the two ends of the seventh resistor R7 are respectively electrically connected to the gate and source of the first MOS Q1. The seventh resistor R7 and the eighth resistor R8 are both voltage dividing resistors, which make the VGS (gate-source) voltage of the first MOS Q1 and the second MOS Q2 not exceed the requirements of the specification book, avoiding damage to the first MOS Q1.
[0033] The positive electrode of the electrolytic capacitor E1 is electrically connected to the input end of the three-terminal voltage regulator U1, and the negative electrode of the electrolytic capacitor E1 is electrically connected to the common end of the three-terminal voltage regulator U1 and grounded. One end of the fourth capacitor C4 and one end of the fifth capacitor C5 are respectively electrically connected to the input end and the output end of the three-terminal voltage regulator U1; the other end of the fourth capacitor C4 and the other end of the fifth capacitor C5 away from the three-terminal voltage regulator U1 are both grounded; the fourteenth resistor R14 is a current limiting resistor, which is used to reduce the input current of the three-terminal voltage regulator U1 in the later stage; the electrolytic capacitor E1 plays a role in energy storage, providing power for the three-terminal voltage regulator U1 in the later stage and the MCU at the moment of power failure; the fourth capacitor C4 and the fifth capacitor C5 both play a role in filtering, filtering out high-frequency components and burrs of the output voltage. In this embodiment, the model of the three-terminal voltage regulator U1 is CJ78L05, and the output is +5V.
[0034] The discharge module comprises a third MOS tube Q4 and a fourth MOS tube Q5; the source of the third MOS tube Q4 is electrically connected to the positive pole of the battery BAT, the drain is electrically connected to the cathode of the first diode D1, and the gate is electrically connected to the positive pole of the battery BAT and the source of the fourth MOS tube Q5 through the eleventh resistor R11 and the twelfth resistor R12, respectively; the gate of the fourth MOS tube Q5 is electrically connected to the pin POWER_ON of the microcontroller through the ninth resistor R9, and the drain is electrically connected to the gate of the fourth MOS tube Q5 through the tenth resistor R10 and grounded; the microcontroller outputs low level or high level to the fourth MOS tube Q5 through the pin POWER_ON. The ninth resistor R9 is a current-limiting resistor, which reduces the gate current of the fourth MOS tube Q5, avoids damage to the fourth MOS tube Q5, and also plays a role in filtering signal interference; the tenth resistor R10 is a pull-down resistor, which keeps the fourth MOS tube Q5 in a cut-off state when the MCU is powered on, preventing the fourth MOS tube Q5 from being mistakenly turned on; the eleventh resistor R11 and the twelfth resistor R12 are both voltage dividing resistors, which keep the VGS (gate-source) voltage of the third MOS tube Q4 from exceeding the requirements of the specification, avoiding damage to the third MOS tube Q4.
[0035] The source of the fourth MOS tube Q5 is electrically connected to the anode of the third diode D3; the cathode of the third diode D3 is electrically connected to the key SW and the cathode of the fourth diode D4; the end of the key SW away from the third diode D3 is grounded; the anode of the fourth diode D4 is electrically connected to the pin AD_KEY of the microcontroller, one end of the thirteenth resistor R13, and one end of the third capacitor C3; the end of the thirteenth resistor R13 away from the fourth diode D4 is electrically connected to the output terminal of the three-terminal voltage regulator U1; the end of the third capacitor C3 away from the fourth diode D4 is grounded; after the key SW is pressed, the microcontroller is powered on and receives low level through the pin AD_KEY to output high level to the fourth MOS tube Q5 through the pin POWER_ON. The third diode D3 plays a role in preventing reverse flow, preventing the MCU supply voltage VDD from flowing through the fourth diode D4 to the fourth MOS tube Q5 when the key SW is pressed; the fourth diode D4 also plays a role in preventing reverse flow, preventing the positive pole voltage BAT+ of the battery BAT from flowing through the eleventh resistor R11, the twelfth resistor R12, and the third diode D3 to the MCU supply voltage VDD when the key SW is pressed; the thirteenth resistor R13 is a current-limiting resistor, which reduces the current passing through the key SW when the key SW is pressed; the third capacitor C3 is a filter capacitor, which filters the waveform jitter of the key SW when it is pressed and released.
[0036] As Figure 1 and Figure 2As shown, when the battery BAT is in charging state, the DC charger is in charging state, the first diode D1 is connected to PP+ through the DC charger, and PP+ is reduced to the supply voltage VDD of the MCU through the three-terminal voltage regulator U1 to supply power to the MCU. After the MCU is powered on, the control pin CHARGE outputs a high level, the transistor Q3 is turned on, the first MOS tube Q1 and the second MOS tube Q2 are turned on, the DC charger charges the battery BAT, and at the same time, the MCU outputs a low level through the pin POWER_ON, so that the fourth MOS tube Q5 and the third MOS tube Q4 are turned off.
[0037] The pin V_CHARGE1 of the MCU can obtain the voltage across the second resistor R2, and perform overvoltage and undervoltage detection of the DC charger. When overvoltage or undervoltage occurs, the MCU outputs a low level through the pin CHARGE, so that the transistor Q3, the first MOS tube Q1 and the second MOS tube Q2 are turned off, and the DC charger is prohibited to charge the battery BAT.
[0038] The pin V_CHARGE2 of the MCU can obtain the voltage across the fourth resistor R4, and the voltages on the pins V_CHARGE1 and V_CHARGE2 can be used to calculate the voltage across the first sampling resistor RS1. The ratio of the voltage across the first sampling resistor RS1 to the resistance value of the first sampling resistor is used as the current flowing through the first sampling resistor RS1 (i.e. charging current detection). When overcurrent occurs during charging, the MCU outputs a low level through the pin CHARGE, so that the transistor Q3, the first MOS tube Q1 and the second MOS tube Q2 are turned off, and the DC charger is prohibited to charge the battery BAT.
[0039] When the battery BAT is in discharging state and the button SW is not pressed, the third MOS tube Q4 is turned off, and the MCU cannot be powered on, thereby realizing a low-power consumption function. When the button SW is pressed, the third MOS tube Q4 is turned on, the positive electrode BAT+ of the battery BAT is connected to PP+ through the second diode D2, and PP+ is reduced to the supply voltage VDD of the MCU through the three-terminal voltage regulator U1 to supply power to the MCU.
[0040] After the MCU is powered on, a high level is output through the pin POWER_ON to turn on the fourth MOS tube Q5 and the third MOS tube Q4. The positive electrode BAT+ of the battery BAT is connected to PP+ through the second diode D2, and PP+ is reduced to the supply voltage VDD of the MCU through the three-terminal voltage regulator U1 to supply power to the MCU. After the button SW is pressed and released, the level is connected, and the third MOS tube Q4 is in a turned-on state.
[0041] The first diode D1 functions as an anti-reflux, when the battery BAT discharges, preventing the positive voltage BAT+ of the battery BAT from refluxing to the positive C+ of the DC charger through the third MOS Q4 and the second diode D2; the second diode D2 also functions as an anti-reflux, when the battery BAT charges, preventing the positive C+ of the DC charger from refluxing to the third MOS Q4 through the first diode D1.
[0042] In summary, the battery BAT charging and discharging control circuit provided by the embodiment has the advantages that the charging control and discharging control of the battery BAT are completely independent, the charging and discharging control logic is clear; when the battery BAT charges, the power supply of the MCU is completely provided by the DC charger, and the battery power is not consumed. When the battery BAT discharges, the key SW is not pressed, and the low power consumption is achieved, and the battery power is not consumed.
[0043] Embodiment 2
[0044] As shown in Figure 3 and Figure 4 The embodiment provides a motor control circuit based on the battery charging and discharging control circuit described in embodiment 1, which comprises a motor; the positive electrode of the motor is electrically connected with the cathode of the fifth diode D5 and the positive electrode of the battery BAT, and the negative electrode is electrically connected with the drain of the fifth MOS Q6 and the anode of the fifth diode D5;
[0045] The gate of the fifth MOS Q6 is electrically connected with one end of the fifteenth resistor R15 and one end of the second sampling resistor RS2; one end of the fifteenth resistor R15 away from the fifth MOS Q6 is electrically connected with the pin Brush_DR of the microcontroller; the microcontroller outputs low or high level to the fifth MOS Q6 through the pin Brush_DR; the source of the fifth MOS Q6 is electrically connected with one end of the sixteenth resistor R16, one end of the seventeenth resistor R17 and one end of the second sampling resistor RS2; one end of the sixteenth resistor R16 away from the source of the fifth MOS Q6 is electrically connected with the gate of the fifth MOS Q6; one end of the seventeenth resistor R17 away from the fifth MOS Q6 is electrically connected with one end of the sixth capacitor C6 and one end of the eighteenth resistor R18; one end of the second sampling resistor RS2 away from the fifth MOS Q6 is grounded; one end of the sixth capacitor C6 away from the seventeenth resistor R17 is grounded; one end of the eighteenth resistor R18 away from the seventeenth resistor R17 is electrically connected with the non-inverting input terminal of the operational amplifier in the microprocessor; the inverting input terminal of the operational amplifier is electrically connected with one end of the nineteenth resistor R19 and one end of the twentieth resistor R20; one end of the nineteenth resistor R19 away from the operational amplifier is electrically connected with the sixth capacitor C6 away from the seventeenth resistor R17; one end of the twentieth resistor R20 away from the inverting input terminal of the operational amplifier is electrically connected with the output terminal of the operational amplifier; the output terminal of the operational amplifier is electrically connected with the non-inverting input terminal of the comparator in the microprocessor, the positive power supply terminal is electrically connected with the output terminal of the three-terminal voltage regulator U1; the reference voltage VREF is connected with the inverting input terminal of the comparator, and the output terminal outputs high level to the microprocessor, so as to output low level to the fifth MOS Q6 through the pin Brush_DR, so that the motor stops; the positive power supply terminal of the comparator is electrically connected with the output terminal of the three-terminal voltage regulator U1.
[0046] In the embodiment, the fifth MOS Q6 is a large power MOS, and the pins 1-3 of the fifth MOS Q6 are all sources, the pin 4 is a gate, and the pins 5-8 are all drains.
[0047] After the MCU is powered on, the PWM signal is output through the pin Brush_DR to control the fifth MOS Q6 to be turned on, and the motor is operated. The motor is an inductive load, and must be controlled by a PWM signal. The PWM signal is linearly raised from 0-100% duty cycle, so as to avoid the motor from running to the maximum speed and prevent overshoot.
[0048] The fifteenth resistor R15 is a current limiting resistor, which reduces the gate current of the fifth MOS Q6, protects the fifth MOS Q6, and also plays a role in filtering signal interference; the sixteenth resistor R16 is a pull-down resistor, which keeps the fifth MOS Q6 in a cut-off state when the MCU is powered on, preventing the fifth MOS Q6 from being mistakenly turned on.
[0049] The fifth diode D5 plays a freewheeling role, since the motor is an inductive load, the current on the motor cannot be suddenly changed when the motor stops running, and the diode needs to provide a freewheeling role to release the energy on the motor to the BAT+ of the battery BAT.
[0050] The second sampling resistor RS2 forms a voltage difference at both ends when the motor is running normally, and the current flowing through the motor can be calculated.
[0051] The seventeenth resistor R17 and the sixth capacitor C6 form a first-order low-pass filter to filter out high-frequency components.
[0052] As shown in Figure 3 The Brush_FO and GND network at both ends of the sixth capacitor C6 are connected to Figure 4 the same network (PCB needs differential wiring) in the MCU internal operational amplifier, the voltage signal at both ends of the second sampling resistor RS2 is amplified and connected to the same phase end of the comparator in the MCU, and compared with the reference voltage VREF at the opposite phase end of the comparator. When the voltage is greater than the reference voltage VREF, the comparator output end FO outputs a high level (i.e. an overcurrent event is generated), and the MCU internal ADC (analog-to-digital converter) is connected to the FO network of the comparator output end. After receiving the high level, the microcontroller pin Brush_DR outputs a low level, and the motor stops running.
[0053] The eighteenth resistor R18 and the nineteenth resistor R19 are the pre-circuit of the operational amplifier, and together with the twentieth resistor R20 in the MCU determine the amplification factor.
[0054] The operational amplifier and the comparator are both internally provided by the MCU, without external placement, convenient circuit connection, and few peripheral components. Since the comparator is used to detect the overcurrent protection, the response speed is fast and the protection is reliable.
[0055] The utility model has been described in detail above in combination with specific embodiments and exemplary examples, but these descriptions cannot be understood as limitations of the utility model. Those skilled in the art understand that the technical solutions and embodiments of the utility model can be variously replaced, modified or improved without deviating from the spirit and scope of the utility model, and these all fall within the scope of the utility model. The protection scope of the utility model is subject to the appended claims.
Claims
1. A battery charge and discharge control circuit, characterized in that: The battery comprises a charging module, a discharging module and a charging and discharging control module; when the battery is charging, the charging and discharging control module is connected to an external charging power supply through the charging module; when the battery is powered by the power supply, the charging and discharging control module controls the charging module to charge the battery; when the battery is discharging, the battery supplies power to the charging and discharging control module through the discharging module to control the battery to discharge through the discharging module.
2. The battery charge and discharge control circuit according to claim 1, characterized in that: The charging module includes a first diode D1; the cathode of the first diode D1 is electrically connected to the discharging module and the charge-discharge control module; the anode of the first diode D1 is electrically connected to the positive electrode of the charging terminal, one end of a first sampling resistor RS1, and one end of a first resistor R1; the end of the first sampling resistor RS1 away from the positive electrode of the charging terminal is electrically connected to the drain of a first MOS transistor Q1; the source of the first MOS transistor Q1 is electrically connected to the source of a second MOS transistor Q2, and the gate is electrically connected to the gate of the second MOS transistor Q2; the source of the second MOS transistor Q2 is electrically connected to the charge-discharge control module, and the drain is electrically connected to the positive electrode of the battery and the discharging module; the negative electrode of the battery is electrically connected to the negative electrode of the charging terminal and grounded.
3. The battery charge and discharge control circuit according to claim 2, characterized in that: The charge and discharge control module includes a first resistor R1, a transistor Q3, a microcontroller and a three-terminal voltage regulator U1; one end of the first resistor R1 away from the first diode D1 is electrically connected to one end of the second resistor R2 and the pin V_CHARGE1 of the microcontroller; one end of the second resistor R2 away from the first resistor R1 is grounded; the microcontroller collects the voltage across the second resistor R2 through the pin V_CHARGE1; the drain of the first MOS transistor Q1 is electrically connected to one end of the third resistor R3; the end of the third resistor R3 away from the first MOS transistor Q1 is electrically connected to one end of the fourth resistor R4 and the pin V_CHARGE2 of the microcontroller; the end of the fourth resistor R4 away from the third resistor R3 is grounded; the microcontroller collects the voltage across the fourth resistor R4 through the pin V_CHARGE2; The collector of the transistor Q3 is electrically connected to the gate of the first MOS transistor Q1, the base is electrically connected to the pin CHARGE of the microcontroller via a fifth resistor R5, and the emitter is electrically connected to the base of the transistor Q3 via a sixth resistor R6 and is grounded; the microcontroller outputs a high level or a low level to the transistor Q3 via the pin CHARGE; The input end of the three-terminal regulator U1 is electrically connected to the positive electrode of the electrolytic capacitor E1 and is electrically connected to the cathode of the first diode D1 through the fourteenth resistor R14. The output end is electrically connected to the discharge module, and the common end is electrically connected to the negative electrode of the electrolytic capacitor E1 and grounded.
4. The battery charge and discharge control circuit according to claim 3, characterized in that: The discharge module includes a third MOS transistor Q4 and a fourth MOS transistor Q5; the source of the third MOS transistor Q4 is electrically connected to the positive electrode of the battery, the drain is electrically connected to the cathode of the first diode D1, and the gate is electrically connected to the positive electrode of the battery and the source of the fourth MOS transistor Q5 through an eleventh resistor R11 and a twelfth resistor R12, respectively; the gate of the fourth MOS transistor Q5 is electrically connected to the POWER_ON pin of the microcontroller through a ninth resistor R9, and the drain is electrically connected to the gate of the fourth MOS transistor Q5 through a tenth resistor R10 and is grounded; the microcontroller outputs a low level or a high level to the fourth MOS transistor Q5 through the POWER_ON pin; The source of the fourth MOS transistor Q5 is electrically connected to the anode of the third diode D3; the cathode of the third diode D3 is electrically connected to the key SW and the cathode of the fourth diode D4; the end of the key SW away from the third diode D3 is grounded; the anode of the fourth diode D4 is electrically connected to the pin AD_KEY of the microcontroller, one end of the thirteenth resistor R13, and one end of the third capacitor C3; the end of the thirteenth resistor R13 away from the fourth diode D4 is electrically connected to the output end of the three-terminal regulator U1; the end of the third capacitor C3 away from the fourth diode D4 is grounded; when the key SW is pressed, the microcontroller is powered and receives a low level through the pin AD_KEY, thereby outputting a high level to the fourth MOS transistor Q5 through the pin POWER_ON.
5. The battery charge and discharge control circuit according to claim 3, characterized in that: A pin V_CHARGE1 of the microcontroller is electrically connected to a first capacitor C1 ; one end of the first capacitor C1 away from the microcontroller is grounded.
6. The battery charge and discharge control circuit according to claim 3, characterized in that: The pin V_CHARGE2 of the microcontroller is electrically connected to a second capacitor C2; one end of the second capacitor C2 away from the microcontroller is grounded.
7. The battery charge and discharge control circuit according to claim 3, characterized in that: The collector of the transistor Q3 is electrically connected to an eighth resistor R8; one end of the eighth resistor R8 away from the transistor Q3 is electrically connected to one end of a seventh resistor R7; and both ends of the seventh resistor R7 are electrically connected to the gate and source of the first MOS transistor Q1, respectively.
8. The battery charge and discharge control circuit according to claim 3, characterized in that: The input and output ends of the three-terminal regulator U1 are electrically connected to one end of a fourth capacitor C4 and one end of a fifth capacitor C5 respectively; the ends of the fourth capacitor C4 and the fifth capacitor C5 away from the three-terminal regulator U1 are both grounded.
9. A motor control circuit based on the battery charge and discharge control circuit according to any one of claims 3 to 8, characterized in that: The motor comprises a positive electrode electrically connected to the cathode of a fifth diode D5 and the positive electrode of a battery, and a negative electrode electrically connected to the drain of a fifth MOS tube Q6 and the anode of the fifth diode D5; The gate of the fifth MOS transistor Q6 is electrically connected to one end of a fifteenth resistor R15 and one end of a second sampling resistor RS2; an end of the fifteenth resistor R15 away from the fifth MOS transistor Q6 is electrically connected to a pin Brush_DR of the microcontroller; the microcontroller outputs a low level or a high level to the fifth MOS transistor Q6 through the pin Brush_DR; the source of the fifth MOS transistor Q6 is electrically connected to one end of a sixteenth resistor R16, one end of a seventeenth resistor R17, and one end of the second sampling resistor RS2; an end of the sixteenth resistor R16 away from the source of the fifth MOS transistor Q6 is electrically connected to the gate of the fifth MOS transistor Q6; an end of the seventeenth resistor R17 away from the fifth MOS transistor Q6 is electrically connected to one end of a sixth capacitor C6 and one end of an eighteenth resistor R18; an end of the second sampling resistor RS2 away from the fifth MOS transistor Q6 is grounded; and an end of the sixth capacitor C6 away from the seventeenth resistor R17 is grounded. The end of the eighteenth resistor R18 away from the seventeenth resistor R17 is electrically connected to the non-inverting input of the operational amplifier in the microprocessor; the inverting input of the operational amplifier is electrically connected to one end of the nineteenth resistor R19 and one end of the twentieth resistor R20; the end of the nineteenth resistor R19 away from the operational amplifier is electrically connected to one end of the sixth capacitor C6 away from the seventeenth resistor R17; the end of the twentieth resistor R20 away from the inverting input of the operational amplifier is electrically connected to the output of the operational amplifier; the output of the operational amplifier is electrically connected to the non-inverting input of the comparator in the microprocessor, and the positive power supply end is electrically connected to the output of the three-terminal regulator U1; the inverting input of the comparator is connected to the reference voltage VREF, and the output end outputs a high level to the microprocessor, so as to output a low level to the fifth MOS transistor Q6 through the pin Brush_DR to stop the motor; the positive power supply end of the comparator is electrically connected to the output of the three-terminal regulator U1.