A battery charging circuit
By integrating a constant current and constant voltage control unit into the battery charging circuit, battery pre-charging, constant voltage/constant current charging state switching, and timing are realized, solving the problem of low integration in traditional battery charging circuits and improving the stability and safety of the charging process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN GREATESTGOOD-MICRO ELECTRONIC LTD CORP
- Filing Date
- 2022-07-14
- Publication Date
- 2026-06-02
Smart Images

Figure CN115117972B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery charging equipment technology, and more particularly to a battery charging circuit. Background Technology
[0002] Traditional battery charging circuits, such as Figure 1 As shown, the circuit mainly includes an input circuit, a transformer, an output circuit, a switching transistor, a MOSFET driver circuit and a Zener diode located in the primary coil of the transformer, an operational amplifier located in the secondary coil of the transformer, and a general-purpose MCU. The primary PWM control circuit switches the switching transistor on or off, outputting power to the secondary coil of the transformer. The secondary coil, through the general-purpose MCU, samples the battery charging voltage and outputs a feedback signal via an LED to the primary PWM control circuit of the primary coil of the transformer. This circuit has several drawbacks. It uses a large number of components or chips in both the primary and secondary coils of the transformer, resulting in low overall circuit integration and inconvenient maintenance. While Chinese patent application CN112436570A provides a three-stage battery charging circuit, it still suffers from low circuit integration. Furthermore, when the battery or circuit malfunctions, the charging circuit may continue to operate for an extended period, and overcharging may adversely affect the battery capacity.
[0003] If the circuit can be integrated to combine functions that would otherwise require the secondary coil of a transformer, such as battery pre-charging, constant voltage / constant current charging, charging indicator switching, charging timing statistics, or overcharge protection, it will inevitably improve the stability of the charging process and reduce the maintenance difficulty of the charging circuit. Summary of the Invention
[0004] In view of this, the present invention proposes a battery charging circuit that can switch between battery pre-charging and constant voltage / constant current charging states and time the different states respectively.
[0005] The technical solution of the present invention is implemented as follows: The present invention provides a battery charging circuit, including an input circuit, a transformer, a first switching transistor T1, an output circuit, a primary current sampling resistor, a secondary voltage sampling circuit, and a constant current and constant voltage control unit (200).
[0006] The constant current and constant voltage control unit (200) includes a power supply terminal VCC, a sampling current input terminal CS, a sampling voltage input terminal FB, a secondary constant voltage feedback input terminal COMP, and a drive output terminal GD;
[0007] The output terminal of the input circuit is electrically connected to the power supply terminal VCC of the constant current and constant voltage control unit (200), one end of the secondary voltage sampling circuit, and one end of the primary coil of the transformer, respectively; the other end of the secondary voltage sampling circuit is grounded; the output terminal of the secondary voltage sampling circuit is electrically connected to the sampling voltage input terminal FB of the constant current and constant voltage control unit (200); the secondary coil of the transformer is electrically connected to the output circuit; the output circuit is set with a first threshold voltage and a second threshold voltage.
[0008] The other end of the primary coil of the transformer is electrically connected to the drain of the first switching transistor T1. The gate of the first switching transistor T1 is electrically connected to the drive output terminal GD of the constant current and constant voltage control unit (200). The source of the first switching transistor T1 and the sampling current input terminal CS of the constant current and constant voltage control unit (200) are both electrically connected to one end of the primary current sampling resistor. The other end of the primary current sampling resistor is grounded.
[0009] The constant current and constant voltage control unit (200) acquires the current battery voltage at the output circuit. When the current battery voltage is lower than the first threshold voltage, it enters the pre-charging stage, increases the output voltage of the secondary coil of the output voltage transformer until the first threshold voltage, and starts timing the pre-charging stage. When the current battery voltage is between the first threshold voltage and the second threshold voltage REFCV, it enters the constant current charging stage, increases the output voltage of the secondary coil of the transformer until the second threshold voltage REFCV, and starts timing the constant current charging stage. When the current battery voltage is equal to the second threshold voltage REFCV, it enters the constant voltage charging stage, maintains the output voltage of the secondary coil of the output voltage transformer unchanged, and starts timing the constant voltage charging stage.
[0010] Based on the above technical solutions, the preferred constant current and constant voltage control unit (200) includes a constant voltage control circuit (201), a constant current control circuit (202), a battery overvoltage and short circuit protection circuit (204), an oscillator, a logic judgment circuit (205), a push-pull output circuit (206), a timing circuit (207), several comparators and transconductance amplifiers;
[0011] The constant voltage control circuit (201) performs slope compensation on the transformer primary current sampling signal input at the sampling current input terminal CS, and then compares it with the signal input at the secondary constant voltage feedback input terminal COMP. Alternatively, after performing slope compensation on the transformer primary current sampling signal input at the sampling current input terminal CS, it compares it with the signal FBS input at the sampling voltage input terminal FB after processing by the transconductance amplifier and the output result of the second threshold voltage REFCV, i.e., the constant voltage loop compensation signal COMPCV, and sends it to the comparator. The comparator outputs the constant voltage loop peak current signal QCV and sends it to the logic judgment circuit (205). The oscillator is electrically connected to the logic judgment circuit (205) and provides the logic judgment circuit (205) with a pulse signal. The constant voltage control circuit (201) also provides the transformer primary current sampling signal after slope compensation to the constant current control circuit (202). The constant voltage loop compensation signal COMPCV is also sent to the timing circuit (207).
[0012] The constant current control circuit (202) acquires the voltage signal VIO corresponding to the secondary current of the transformer. After processing the voltage signal VIO and the reference voltage REFCC through a transconductance amplifier, the constant current loop compensation signal COMPCC is obtained. It is further compared with the slope-compensated primary current sampling signal of the transformer, and the constant current loop peak current signal QCC is output and sent to the logic judgment circuit (205). The constant current loop compensation signal COMPCC is also sent to the timing circuit (207).
[0013] The secondary voltage sampling signal FBS is also input to the battery overvoltage and short circuit protection circuit (204). The battery overvoltage and short circuit protection circuit (204) outputs a precharge signal QPRE to the timing circuit (207) or a fault signal to the logic judgment circuit (205) according to the magnitude of the signal FBS. The timing circuit (207) also inputs a timing termination signal TO to the logic judgment circuit (205).
[0014] The logic judgment circuit (205) outputs a PWM signal Ton to the push-pull output circuit (206) based on the input constant voltage loop peak current signal QCV, constant current loop peak current signal QCC, oscillator input signal and timing termination signal TO. The push-pull output circuit (206) outputs the PWM signal Ton to the drive output terminal GD to drive the first switching transistor T1 to turn on or off.
[0015] Preferably, the constant voltage control circuit (201) includes a slope compensation unit (301) and a first comparator U1; the signal of the input sampling current input terminal CS is superimposed with the slope compensation signal Vslope output by the slope compensation unit (301) to obtain the CS_slope signal, the CS_slope signal is sent to the non-inverting input terminal of the first comparator U1, the input signal of the secondary constant voltage feedback input terminal COMP is sent to the inverting input terminal of the first comparator U1, and the constant voltage loop peak current signal QCV is output after comparison by the first comparator U1.
[0016] Preferably, the constant voltage control circuit (201) includes a slope compensation unit (301), a first transconductance amplifier U2, and a second comparator U3; the non-inverting input terminal of the first transconductance amplifier U2 receives the second threshold voltage REFCV, the inverting input terminal of the first transconductance amplifier U2 is electrically connected to the sampling voltage input terminal FB, the output terminal of the first transconductance amplifier U2 is electrically connected to one end of resistor R5 and the inverting input terminal of the second comparator U3, the other end of resistor R5 is electrically connected to one end of capacitor C5, and the other end of capacitor C5 is grounded; the signal sent to the sampling current input terminal CS by the primary current sampling resistor is superimposed with the slope compensation signal Vslope output by the slope compensation unit (301) to obtain the CS_slope signal, and the CS_slope signal is sent to the non-inverting input terminal of the second comparator U3; the output terminal of the first transconductance amplifier U2 outputs the constant voltage loop compensation signal COMPCV, and the output terminal of the second comparator U3 outputs the constant voltage loop peak current signal QCV.
[0017] Preferably, the slope compensation unit (301) includes a fourth switch K4, a fifth switch K5, a capacitor C4, and a first inverter U4; the output terminal of the logic judgment circuit (205) is electrically connected to the input terminals of the fourth switch K4 and the first inverter U4, respectively, and the output terminal of the first inverter U4 is electrically connected to the fifth switch K5; the normally open contact of the fourth switch K4 is electrically connected to the power supply terminal VCC, one normally open contact of the fifth switch K5, and one end of the capacitor C4, respectively, and one end of the capacitor C4 serves as the output terminal of the slope compensation signal Vslope; the other normally open contact of the fifth switch K5 and the other end of the capacitor C4 are both grounded.
[0018] Preferably, the constant current control circuit (202) includes an operational amplifier U5, a first switch K1, a second switch K2, a third switch K3, a first RC filter circuit, a second transconductance amplifier U6, a second RC filter circuit, and a third comparator U7; the sampling current input terminal CS is electrically connected to one normally open contact of the first switch K1, the other normally open contact of the first switch K1 is electrically connected to the non-inverting input terminal of the operational amplifier U5, and the inverting input terminal of the operational amplifier U5 is electrically connected to its output terminal; the output terminal of the operational amplifier U5 is electrically connected to one normally open contact of the second switch K2, the other normally open contact of the second switch K2 is electrically connected to one normally open contact of the third switch K3 and the input terminal of the first RC filter circuit, the other normally open contact of the third switch K3 is grounded, the output terminal of the first RC filter circuit is electrically connected to the inverting input terminal of the second transconductance amplifier U6, and the non-inverting input terminal of the second transconductance amplifier U6 is electrically connected to the reference current input terminal. The voltage REFCC is electrically connected. The output of the second transconductance amplifier U6 is electrically connected to the input of the second RC filter circuit and the inverting input of the third comparator U7, respectively. The transformer primary current sampling signal input at the sampling current input CS is fed into the non-inverting input of the third comparator U7 after slope compensation. The first switch K1 is turned on when Ton / 2 is high, the second switch K2 is turned on when TDM is high, and the third switch is turned on only when TDM is low. Ton / 2 is the midpoint pulse signal of the PWM signal Ton. TDM and TDMB are both demagnetization time signals of the transformer secondary winding, and TDMB is the inverting signal of TDM. The first RC filter circuit is used to output the voltage signal VIO corresponding to the transformer secondary current. The output of the second transconductance amplifier U6 is used to output the constant current loop compensation signal COMPCC, and the output of the third comparator U7 outputs the constant current loop peak current signal QCC.
[0019] Preferably, the battery overvoltage and short-circuit protection circuit (204) includes a sixth comparator U10, a seventh comparator U11, an eighth comparator U12, and a first OR gate U13; the signal FBS input to the sampling voltage input terminal FB is electrically connected to the non-inverting input terminals of the sixth comparator U10, the seventh comparator U11, and the eighth comparator U12, respectively; the inverting input terminal of the sixth comparator U10 is connected to the battery undervoltage threshold voltage; the inverting input terminal of the seventh comparator U11 is connected to the battery overvoltage threshold voltage; the inverting input terminal of the eighth comparator U12 is connected to the first threshold voltage; the output terminal of the eighth comparator U12 outputs a pre-charge signal QPRE to the timing circuit (207); the output terminals of the sixth comparator U10 and the seventh comparator U11 are electrically connected to the two input terminals of the first OR gate U13, respectively, and the output terminal of the first OR gate U13 outputs a fault signal FAULT to the logic judgment circuit (205).
[0020] Further preferably, the logic judgment circuit (205) includes a second OR gate U14, a two-input AND gate U15, a pulse trigger U16, a delay unit U17, and a third OR gate U18; the peak current signal QCV of the constant voltage loop and the peak current signal QCC of the constant current loop are electrically connected to the two input terminals of the second OR gate U14 respectively, the output terminal of the second OR gate U14 is electrically connected to one input terminal of the two-input AND gate U15, and the output terminal of the delay unit U17 is electrically connected to the other input terminal of the two-input AND gate U15; the two-input... The output of AND gate U15 is electrically connected to one input of the third OR gate U18, the output of timing circuit (207) is electrically connected to the other input of the third OR gate U18, the output of the third OR gate U18 is electrically connected to the R terminal of pulse trigger U16, the pulse output of oscillator is electrically connected to the S terminal of pulse trigger U16, and the output of pulse trigger U16 is electrically connected to the input of push-pull output circuit (206) and the input of delay unit U17 respectively; pulse trigger U16 outputs PWM signal Ton.
[0021] Preferably, the push-pull output circuit (206) includes a second inverter U18, a second switch T2, and a third switch T3; the output terminal of the logic judgment circuit (205) is electrically connected to the input terminal of the second inverter U18, the output terminal of the second inverter U18 is electrically connected to the gate of the second switch T2 and the gate of the third switch T3 respectively, the drain of the second switch T2 is electrically connected to the power supply terminal VCC of the constant current and constant voltage control unit (200), the source of the second switch T2 is electrically connected to the drain of the third switch T3 and then serves as the output terminal of the push-pull output circuit (206) and is electrically connected to the drive output terminal GD of the constant current and constant voltage control unit (200), and the source of the third switch T3 is grounded.
[0022] Preferably, the timing circuit (207) includes a ninth comparator U19, a tenth comparator U20, a state judgment unit U21, and a timer U22; the non-inverting input of the ninth comparator U19 is connected to the constant voltage loop compensation signal COMPCV, the inverting input of the ninth comparator U19 is connected to the upper threshold voltage of the constant voltage loop compensation signal COMPCV, and the output of the ninth comparator U19 outputs a binary signal QCVS to the first input of the state judgment unit U21; the first input of the tenth comparator U20 is connected to the constant current loop compensation signal COMPCC, and the inverting input of the tenth comparator U20 outputs a binary signal QCVS to the first input of the state judgment unit U21; the inverting input of the tenth comparator U20 outputs a binary signal QCVS to the first input of the state judgment unit U21. The upper threshold voltage of the constant current loop compensation signal COMPCC is connected to the phase input terminal. The output terminal of the tenth comparator U20 outputs the binary signal QCCS to the second input terminal of the state judgment unit U21. The pre-charge signal QPRE output by the battery overvoltage and short circuit protection circuit (204) is sent to the third input terminal of the state judgment unit U21. The output terminal of the state judgment unit U21 is electrically connected to the input terminal of the timer U22. The timer U22 counts the pre-charge stage, the constant current charging stage, or the constant voltage charging stage, and sends the timing end signal to the logic judgment circuit (205).
[0023] Further preferably, the constant current and constant voltage control unit (200) also includes a light-turning control circuit (203), which includes a programmable current source, a fourth comparator U8, a fifth comparator U9, a sixth switch K6, a seventh switch K7, and two light-emitting diodes; the voltage signal VIO corresponding to the transformer secondary current or the constant voltage loop compensation signal COMPCV is used as an input signal and electrically connected to the non-inverting input terminal of the fourth comparator U8 and the non-inverting input terminal of the fifth comparator U9, respectively; the inverting input terminal of the fourth comparator U8 is electrically connected to the green light threshold voltage, and the inverting input terminal of the fifth comparator U9 is electrically connected to the green light threshold voltage. The red light threshold voltage is electrically connected; the output of the fourth comparator U8 is electrically connected to the sixth switch K6, the output of the fifth comparator U9 is electrically connected to the seventh switch K7, one normally open input of the sixth switch K6 and one normally open input of the seventh switch are both electrically connected to the programmable current source, the other normally open input of the sixth switch K6 is electrically connected to the anode of the green LED, the other normally open input of the seventh switch is electrically connected to the anode of the red LED, the cathodes of the green LED and the red LED are both electrically connected to one end of the current-limiting resistor R6, and the other end of the current-limiting resistor R6 is grounded.
[0024] Based on the above technical solutions, preferably, the secondary voltage sampling circuit includes an auxiliary coil L1, a first voltage divider resistor R1, a second voltage divider resistor R2, and a diode D1; one end of the auxiliary coil L1 is electrically connected to the anode of the diode D1 at one end of the first voltage divider resistor R1, and the cathode of the diode D1 is electrically connected to the power supply terminal VCC of the constant current and constant voltage control unit (200); the other end of the first voltage divider resistor R1 is electrically connected to the sampling voltage input terminal FB of the constant current and constant voltage control unit (200) and one end of the second voltage divider resistor R2; the other end of the second voltage divider resistor R2 and the other end of the auxiliary coil L1 are grounded.
[0025] Based on the above technical solution, a preferred embodiment further includes a secondary constant voltage feedback circuit. This circuit comprises a third voltage divider resistor R7, a fourth voltage divider resistor R8, a capacitor C5, a light-emitting diode D2, a Zener diode D3, and a phototransistor D4. One end of the third voltage divider resistor R7 and the anode of the light-emitting diode D2 are electrically connected to the secondary coil of the transformer. The other end of the third voltage divider resistor R7 is electrically connected to one end of the capacitor C5, one end of the fourth voltage divider resistor R8, and the third terminal of the Zener diode D3. The anode of the Zener diode D3 and the other end of the fourth voltage divider resistor R8 are both grounded. The cathode of the Zener diode D3 is electrically connected to the other end of the capacitor C5 and the cathode of the light-emitting diode D2. The collector of the phototransistor D4 is electrically connected to the secondary constant voltage feedback input terminal COMP, and the emitter of the phototransistor D4 is grounded. The light-emitting diode D2 inputs a feedback signal to the phototransistor D4.
[0026] The battery charging circuit provided by this invention has the following advantages over the prior art:
[0027] (0) This solution simplifies the circuit structure, eliminates the need for operational amplifiers and MCUs on the secondary side of the transformer, improves chip integration, reduces material usage, and lowers maintenance workload;
[0028] (1) This scheme obtains the current signal of the switching transistor T1 and the voltage signal of the transformer secondary coil to make the output circuit in different charging states. On the other hand, it also obtains the battery voltage feedback signal from the battery to be charged at the output circuit and times the charging state. It judges whether the battery charging process is abnormal from multiple dimensions and improves the control capability of the battery charging process. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 Wiring diagram for a traditional battery charging circuit;
[0031] Figure 2 This is a charging curve diagram of a battery charging circuit according to the present invention;
[0032] Figure 3 This is a wiring diagram of a secondary-side feedback mode of a battery charging circuit according to the present invention.
[0033] Figure 4 This is a wiring diagram of a primary-side feedback mode of a battery charging circuit according to the present invention.
[0034] Figure 5 This is a structural block diagram of a constant current and constant voltage control unit for a battery charging circuit according to the present invention.
[0035] Figure 6 Wiring diagrams for two different constant voltage control circuits of a battery charging circuit according to the present invention;
[0036] Figure 7 This is a wiring diagram of a slope compensation unit in a battery charging circuit according to the present invention.
[0037] Figure 8 This is a wiring diagram of a constant current control circuit for a battery charging circuit according to the present invention.
[0038] Figure 9 This is a wiring diagram of the indicator light control circuit for a battery charging circuit according to the present invention.
[0039] Figure 10 This is a wiring diagram of a battery overvoltage and short circuit protection circuit for a battery charging circuit according to the present invention.
[0040] Figure 11 This is a wiring diagram of the logic judgment circuit of a battery charging circuit according to the present invention.
[0041] Figure 12 This is a wiring diagram of a push-pull output circuit for a battery charging circuit according to the present invention.
[0042] Figure 13 This is a wiring diagram of the timing circuit of a battery charging circuit according to the present invention. Detailed Implementation
[0043] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0044] like Figure 2 As shown in Figure 5, the present invention provides a battery charging circuit, including an input circuit, a transformer, a first switching transistor T1, an output circuit, a primary current sampling resistor, a secondary voltage sampling circuit, and a constant current and constant voltage control unit 200, etc. Compared with the prior art, the biggest difference is that no additional amplifier or MCU is required on the secondary side of the transformer, and the control device is mainly set on the primary side of the transformer. Figure 3 or Figure 4 In this example, the current flowing through the primary coil of the transformer is Ip, and the current flowing through the secondary coil is Is. For example... Figure 2 As shown in the figure, the horizontal axis represents charging time, and the vertical axes represent the current and voltage curves during charging, respectively. For lithium batteries, the charging process mainly includes a pre-charging stage, a constant current charging stage, and a constant voltage charging stage. For lead-acid batteries, there is a step-down float charging stage after the constant voltage charging phase. During the pre-charging stage, the charging current is kept at a low level and gradually increases until it reaches the pre-charging threshold voltage, after which the next stage, the constant current charging stage, begins. The pre-charging stage provides a buffer before entering the constant current charging and constant voltage charging stages of fast charging, reducing damage to the battery and protecting its capacity.
[0045] Figure 3 and Figure 4 The difference is that, Figure 3 The secondary-side feedback mode circuit has a secondary constant voltage feedback circuit set on the secondary side of the transformer, that is... Figure 3 The dashed box in the diagram represents the secondary constant voltage feedback circuit, which includes a third voltage divider resistor R7, a fourth voltage divider resistor R8, a capacitor C5, an LED D2, a Zener diode D3, and a phototransistor D4. One end of the third voltage divider resistor R7 and the anode of the LED D2 are electrically connected to the secondary coil of the transformer. The other end of the third voltage divider resistor R7 is electrically connected to one end of the capacitor C5, one end of the fourth voltage divider resistor R8, and the third terminal of the Zener diode D3. The anode of the Zener diode D3 and the other end of the fourth voltage divider resistor R8 are both grounded. The cathode of the Zener diode D3 is electrically connected to the other end of the capacitor C5 and the cathode of the LED D2. The collector of the phototransistor D4 is electrically connected to the secondary constant voltage feedback input terminal COMP, and the emitter of the phototransistor D4 is grounded. The LED D2 inputs a feedback signal to the phototransistor D4. The phototransistor D4 can output a large current signal to the constant current and constant voltage control unit 200. The LED D2 and the phototransistor D4 are essentially an optocoupler. The LED D2 can be understood as the input terminal of the optocoupler, and the phototransistor D4 can be understood as the output terminal of the optocoupler. The Zener diode D3 in this scheme can be a TL431, whose third terminal is the control terminal.
[0046] The constant current and constant voltage control unit 200 includes a power supply terminal VCC, a sampling current input terminal CS, a sampling voltage input terminal FB, a secondary constant voltage feedback input terminal COMP, and a drive output terminal GD. The sampling current input terminal CS is used to obtain the induced current Ip from the primary current sampling resistor Rcs. The sampling voltage input terminal FB is used to obtain the voltage signal FBS corresponding to the battery. The secondary constant voltage feedback input terminal COMP, when a secondary constant voltage feedback circuit is selectively provided on the secondary side of the transformer, obtains the feedback signal during the constant voltage charging stage. The power supply terminal VCC is used to drive the constant current and constant voltage control unit 200 to operate normally. The drive output terminal GD is used to drive the first switching transistor T1 to turn on or off, allowing energy from the primary side of the transformer to be transferred to the secondary side. Optionally, the constant current and constant voltage control unit 200 is also equipped with a ground terminal GND and a PTC terminal. The PTC terminal obtains the battery temperature at the output circuit through a thermistor, which can promptly stop the charging process in case of abnormal temperature, preventing thermal runaway caused by abnormal battery temperature. The constant current and constant voltage control unit 200 can be configured as either primary-side feedback mode or secondary-side feedback mode as needed; the wiring method differs depending on the feedback mode selected, please refer to the following for details. Figure 3 or Figure 4 When the secondary-side feedback mode is used, the secondary constant voltage feedback input terminal COMP inputs a signal to the constant voltage control circuit 201; when the primary-side feedback mode is used, the input signal of the constant voltage control circuit 201 comes from the sampling voltage input terminal FB to obtain the voltage signal FBS corresponding to the battery.
[0047] The output terminal of the input circuit is electrically connected to the power supply terminal VCC of the constant current and constant voltage control unit 200, one end of the secondary voltage sampling circuit, and one end of the primary coil of the transformer, respectively; the other end of the secondary voltage sampling circuit is grounded; the output terminal of the secondary voltage sampling circuit is electrically connected to the sampling voltage input terminal FB of the constant current and constant voltage control unit 200; the secondary coil of the transformer is electrically connected to the output circuit; the output circuit is equipped with a first threshold voltage and a second threshold voltage; the input circuit can use a bridge rectifier circuit.
[0048] The secondary voltage sampling circuit specifically includes an auxiliary coil L1, a first voltage-dividing resistor R1, a second voltage-dividing resistor R2, and a diode D1. The primary and secondary coils of the transformer are coupled to each other. One end of the auxiliary coil L1 is electrically connected to one end of the first voltage-dividing resistor R1 and the anode of the diode D1. The cathode of the diode D1 is electrically connected to the power supply terminal VCC of the constant current and constant voltage control unit 200. The other end of the first voltage-dividing resistor R1 is electrically connected to the sampling voltage input terminal FB and one end of the second voltage-dividing resistor R2. The other end of the second voltage-dividing resistor R2 and the other end of the auxiliary coil L1 are grounded. The auxiliary coil L1 acquires the induced voltage on the secondary side of the transformer. The induced voltage is divided by the series circuit composed of resistors R1 and R2 and then sent to the sampling voltage input terminal FB. The diode D1 can also supply power to the capacitor C0 to maintain the voltage stability of the power supply terminal VCC. The auxiliary coil L1 acquires the induced signal of the secondary coil of the transformer.
[0049] The other end of the primary coil of the transformer is electrically connected to the drain of the first switching transistor T1. The gate of the first switching transistor T1 is electrically connected to the drive output terminal GD of the constant current and constant voltage control unit 200. The source of the first switching transistor T1 and the sampling current input terminal CS of the constant current and constant voltage control unit 200 are both electrically connected to one end of the primary current sampling resistor Rcs. The other end of the primary current sampling resistor Rcs is grounded. The sampling current input terminal CS obtains the current flowing through the primary coil of the transformer.
[0050] The working process of this invention is as follows: The constant current and constant voltage control unit 200 acquires the current battery voltage at the output circuit. When the current battery voltage is lower than a first threshold voltage, it enters a pre-charging stage, increasing the output voltage of the secondary coil of the output voltage transformer until it reaches the first threshold voltage, and timing the pre-charging stage. When the current battery voltage is between the first threshold voltage and the second threshold voltage REFCV, it enters a constant current charging stage, increasing the output voltage of the secondary coil of the transformer until it reaches the second threshold voltage REFCV, and timing the constant current charging stage. When the current battery voltage equals the second threshold voltage REFCV, it enters a constant voltage charging stage, maintaining the output voltage of the secondary coil of the output voltage transformer unchanged, and timing the constant voltage charging stage. Here, the first threshold voltage is... Figure 2 The pre-charge threshold voltage; the second threshold voltage is... Figure 2 The position of the highest point of the voltage curve corresponding to the constant current charging stage.
[0051] like Figure 3 As shown in Figure 13, the constant current and constant voltage control unit 200 includes a constant voltage control circuit 201, a constant current control circuit 202, a battery overvoltage and short circuit protection circuit 204, an oscillator, a logic judgment circuit 205, a push-pull output circuit 206, a timing circuit 207, several comparators, and a transconductance amplifier.
[0052] like Figure 3 and Figure 4 As shown, the circuits for the secondary-side feedback mode and the primary-side feedback mode are different. The secondary constant voltage feedback input terminal COMP only has an input in the secondary-side feedback mode. Therefore, the constant voltage control circuit 201 has two possible implementations: 1. The constant voltage control circuit 201 performs slope compensation on the transformer primary current sampling signal input at the sampling current input terminal CS, and then compares it with the signal input at the secondary constant voltage feedback input terminal COMP in a comparator. The comparator outputs the constant voltage loop peak current signal QCV and sends it to the logic judgment circuit 205; 2. After performing slope compensation on the transformer primary current sampling signal input at the sampling current input terminal CS, the constant voltage control circuit 201 compares it with the signal FBS input at the sampling voltage input terminal FB after processing by the transconductance amplifier and the output result of the second threshold voltage REFCV, i.e., the constant voltage loop compensation signal COMPCV, and sends it to the comparator. The comparator outputs the constant voltage loop peak current signal QCV and sends it to the logic judgment circuit 205. The latter implementation is preferred. The constant voltage loop peak current signal QCV is a binary signal.
[0053] The structures of the two constant voltage control circuits 201 described above are explained below. Figure 6 As shown in the figure above, the constant voltage control circuit 201 includes a slope compensation unit 301 and a first comparator U1. The signal of the input sampling current input terminal CS is superimposed with the slope compensation signal Vslope output by the slope compensation unit 301 to obtain the CS_slope signal. The CS_slope signal is sent to the non-inverting input terminal of the first comparator U1, and the input signal of the secondary constant voltage feedback input terminal COMP is sent to the inverting input terminal of the first comparator U1. After comparison by the first comparator U1, the constant voltage loop peak current signal QCV is output.
[0054] like Figure 6 As shown in the figure below, the constant voltage control circuit 201 includes a slope compensation unit 301, a first transconductance amplifier U2, and a second comparator U3. The non-inverting input of the first transconductance amplifier U2 receives the second threshold voltage REFCV, the inverting input of the first transconductance amplifier U2 is electrically connected to the sampling voltage input FB, the output of the first transconductance amplifier U2 is electrically connected to one end of resistor R5 and the inverting input of the second comparator U3, the other end of resistor R5 is electrically connected to one end of capacitor C5, and the other end of capacitor C5 is grounded. The signal sent to the sampling current input CS by the primary current sampling resistor is superimposed with the slope compensation signal Vslope output by the slope compensation unit 301 to obtain the CS_slope signal, which is then sent to the non-inverting input of the second comparator U3. The output of the first transconductance amplifier U2 outputs the constant voltage loop compensation signal COMPCV, and the output of the second comparator U3 outputs the constant voltage loop peak current signal QCV.
[0055] like Figure 6 and 7 As shown, both constant voltage control circuits 201 utilize a slope compensation unit 301. The slope compensation unit 301 includes a fourth switch K4, a fifth switch K5, a capacitor C4, and a first inverter U4. The output of the logic judgment circuit 205 is electrically connected to the inputs of the fourth switch K4 and the first inverter U4, respectively. The output of the first inverter U4 is electrically connected to the fifth switch K5. The normally open contact of the fourth switch K4 is electrically connected to the power supply terminal VCC, one normally open contact of the fifth switch K5, and one end of the capacitor C4. One end of the capacitor C4 serves as the output of the slope compensation signal Vslope. The other normally open contact of the fifth switch K5 and the other end of the capacitor C4 are both grounded. The fourth switch K4 and the fifth switch K5 are alternately turned on. When Ton is high, the fourth switch K4 is closed and the fifth switch K5 is open. The VCC terminal charges the capacitor C4, and the level of the slope compensation signal Vslope gradually increases to its maximum value. When Ton is low, the fifth switch K5 is closed and the fourth switch K4 is open. The VCC terminal charges the capacitor C4, and the level of the slope compensation signal Vslope gradually increases to its maximum value. The capacitor C4 is grounded and discharged, and the level of the slope compensation signal Vslope gradually decreases.
[0056] In the above content, I is the current supplied to the VCC terminal, c is the capacitance value of capacitor C4, and Ton refers to the conduction time of the fourth switch K4 in each cycle, that is, the time when Ton is high level in each cycle.
[0057] The oscillator is electrically connected to the logic judgment circuit 205, providing a reference pulse signal to the logic judgment circuit 205. The constant voltage control circuit 201 also provides the constant current control circuit 202 with a slope-compensated transformer primary current sampling signal. The constant voltage loop compensation signal COMPCV is also sent to the timing circuit 207. The timing circuit 207 is used to count the charging time of the pre-charging stage, the constant current charging stage, and the constant voltage charging stage, respectively. The advantage of counting the charging time is that it can help determine whether the charging process or battery performance / capacity is abnormal.
[0058] like Figure 8As shown, the constant current control circuit 202 includes an operational amplifier U5, a first switch K1, a second switch K2, a third switch K3, a first RC filter circuit, a second transconductance amplifier U6, a second RC filter circuit, and a third comparator U7. The sampling current input terminal CS is electrically connected to one normally open contact of the first switch K1, and the other normally open contact of the first switch K1 is electrically connected to the non-inverting input terminal of the operational amplifier U5. The inverting input terminal of the operational amplifier U5 is electrically connected to its output terminal. The output terminal of the operational amplifier U5 is electrically connected to one normally open contact of the second switch K2. The other normally open contact of the second switch K2 is electrically connected to one normally open contact of the third switch K3 and the input terminal of the first RC filter circuit. The other normally open contact of the third switch K3 is grounded. The output terminal of the first RC filter circuit is electrically connected to the inverting input terminal of the second transconductance amplifier U6, and the non-inverting input terminal of the second transconductance amplifier U6 is connected to the reference current. The voltage REFCC is electrically connected, and the output of the second transconductance amplifier U6 is electrically connected to the input of the second RC filter circuit and the inverting input of the third comparator U7, respectively. The transformer primary current sampling signal input at the sampling current input CS is fed into the non-inverting input of the third comparator U7 after slope compensation. The first switch K1 is turned on when Ton / 2 is high, the second switch K2 is turned on when TDM is high, and the third switch is turned on only when TDM is low. Ton / 2 is the midpoint pulse signal of the PWM signal Ton. TDM and TDMB are both demagnetization time signals of the transformer secondary winding, and TDMB is the inverting signal of TDM. The first RC filter circuit is used to output the voltage signal VIO corresponding to the transformer secondary current. The output of the second transconductance amplifier U6 is used to output the constant current loop compensation signal COMPCC, and the output of the third comparator U7 outputs the constant current loop peak current signal QCC.
[0059] The basis for calculating the transformer secondary coil current using the primary coil parameters described above is as follows:
[0060] ; Where Io is the secondary output current, T is the period of the PWM signal Ton, tdm is the demagnetization time of the transformer secondary coil; N is the turns ratio of the transformer primary coil to the secondary coil; Is(avg) is the average current of the secondary coil; Ip(avg) is the average current of the primary coil; when the circuit is stable, there are... Where Ipmid is the midpoint current of the induced current Ip corresponding to the primary coil; .
[0061] The constant current control circuit 202 works as follows: At time Ton / 2, the first switch K1 is closed, and the current input terminal CS is sampled to obtain the CSmid signal. Then, the CSmid signal is averaged during the TDM period using operational amplifier U1 buffer, second switches K2 and K3, and a first RC low-pass filter. The second switch K2 is only turned on when the TDM signal is high, and the third switch K3 is only turned on when the TDM signal is low, i.e., when the TDMB signal is high. This allows the voltage signal VIO of the output current to be obtained, which is expressed by the following expression:
[0062] Substituting the above Io expression into the equation yields... After acquiring the voltage signal VIO corresponding to the transformer secondary current, the voltage signal VIO and the reference voltage REFCC are further processed by the second transconductance amplifier U6 to obtain the constant current loop compensation signal COMPCC. The constant current loop compensation signal COMPCC is then compared with the slope-compensated transformer primary current sampling signal CS_slope and sent to the third comparator U7 for comparison. The third comparator U7 outputs the constant current loop peak current signal QCC and sends it to the logic judgment circuit 205. The constant current loop compensation signal COMPCC is also sent to the timing circuit 207. The constant current loop peak current signal QCC is also a binary signal.
[0063] Combination Figure 5 , Figure 11 , Figure 12 and Figure 13 It can be seen that the secondary voltage sampling signal FBS is also input to the battery overvoltage and short circuit protection circuit 204. The battery overvoltage and short circuit protection circuit 204 outputs a precharge signal QPRE to the timing circuit 207 or a fault signal to the logic judgment circuit 205 according to the magnitude of the signal FBS. The timing circuit 207 also inputs a timing termination signal TO to the logic judgment circuit 205.
[0064] Specifically, the battery overvoltage and short-circuit protection circuit 204 includes a sixth comparator U10, a seventh comparator U11, an eighth comparator U12, and a first OR gate U13. The signal FBS input to the sampling voltage input terminal FB is electrically connected to the non-inverting input terminals of the sixth comparator U10, the seventh comparator U11, and the eighth comparator U12, respectively. The inverting input terminal of the sixth comparator U10 is connected to the battery undervoltage threshold voltage. The inverting input terminal of the seventh comparator U11 is connected to the battery overvoltage threshold voltage. The inverting input terminal of the eighth comparator U12 is connected to the first threshold voltage. The output terminal of the eighth comparator U12 outputs a pre-charge signal QPRE to the timing circuit 207. The output terminals of the sixth comparator U10 and the seventh comparator U11 are electrically connected to the two input terminals of the first OR gate U13, respectively. The output terminal of the first OR gate U13 outputs a fault signal FAULT to the logic judgment circuit 205. When the current battery voltage is less than the first threshold voltage, it indicates that the battery charge is very low and pre-charging can begin. Battery undervoltage threshold voltage and battery overvoltage threshold voltage are used to determine whether the battery voltage after charging is lower or higher than the rated voltage, thus protecting the battery's safety. When FBS is less than the battery undervoltage threshold voltage, it indicates that the battery voltage is significantly lower than the rated voltage; when FBS is greater than the battery overvoltage threshold voltage, it indicates that the battery voltage is significantly higher than the rated voltage.
[0065] like Figure 11 As described in section 13, the logic judgment circuit 205 outputs a PWM signal Ton to the push-pull output circuit 206 based on the input constant voltage loop peak current signal QCV, constant current loop peak current signal QCC, oscillator input signal and timing termination signal TO. The push-pull output circuit 206 outputs the PWM signal Ton to the drive output terminal GD to drive the first switching transistor T1 to turn on or off.
[0066] The logic judgment circuit 205 includes a second OR gate U14, a two-input AND gate U15, a pulse trigger U16, a delay unit U17, and a third OR gate U18. The peak current signal QCV from the constant voltage loop and the peak current signal QCC from the constant current loop are electrically connected to the two input terminals of the second OR gate U14, respectively. The output terminal of the second OR gate U14 is electrically connected to one input terminal of the two-input AND gate U15, and the output terminal of the delay unit U17 is electrically connected to the other input terminal of the two-input AND gate U15. The output of gate U15 is electrically connected to one input of the third OR gate U18. The output of timing circuit 207 is electrically connected to the other input of the third OR gate U18. The output of the third OR gate U18 is electrically connected to the R terminal of pulse trigger U16. The pulse output of the oscillator is electrically connected to the S terminal of pulse trigger U16. The output of pulse trigger U16 is electrically connected to the input of push-pull output circuit 206 and the input of delay unit U17, respectively. Pulse trigger U16 outputs a PWM signal Ton. The oscillator outputs an OSC signal to the S terminal of pulse trigger U16, causing the Q terminal of pulse trigger U16 to output a Ton signal, which is then processed by the attached circuit. Figure 11 It can be seen that when the OSC input is high, the Ton signal is also high. A delay signal TonD is output through the delay unit U17, and the delay signal TonD returns to the two-input AND gate U15. When QCV or QCC is high, the two-input AND gate U15 has a high-level output. When the third AND gate U18 outputs a high-level signal, the Ton signal toggles to a low-level signal, waiting for the rising edge of the next oscillator output OSC signal. TonD is also called the blanking time signal. In this way, a periodic PWM signal is generated. When the TO signal at the output of the timing circuit 207 is continuously input, the level of the Ton signal is forcibly pulled low, so that the drive output terminal GD of the constant current and constant voltage control unit 200 has no output, the first switching transistor T1 is not turned on, and the battery stops charging.
[0067] Further as Figure 12As shown, the push-pull output circuit 206 includes a second inverter U18, a second switch T2, and a third switch T3. The output terminal of the logic judgment circuit 205 is electrically connected to the input terminal of the second inverter U18. The output terminal of the second inverter U18 is electrically connected to the gate of the second switch T2 and the gate of the third switch T3. The drain of the second switch T2 is electrically connected to the power supply terminal VCC of the constant current and constant voltage control unit 200. The source of the second switch T2 is electrically connected to the drain of the third switch T3, and then serves as the output terminal of the push-pull output circuit 206, which is electrically connected to the drive output terminal GD of the constant current and constant voltage control unit 200. The source of the third switch T3 is grounded. The second switch T2 is a PMOS transistor, and the third switch T3 is an NMOS transistor. The second switch T2 and the third switch T3 form a push-pull output structure, which can reduce power consumption and improve switching efficiency and speed, making it suitable for driving high-power output. The push-pull output circuit 206 can also be implemented by cascading two-stage push-pull circuits. Each stage of the push-pull circuit uses a second switch T2 and a third switch T3, and the connection method is exactly the same, so it will not be described again here.
[0068] like Figure 13 As shown, the timing circuit 207 includes a ninth comparator U19, a tenth comparator U20, a state judgment unit U21, and a timer U22. The non-inverting input of the ninth comparator U19 is connected to the constant voltage loop compensation signal COMPCV, and the inverting input of the ninth comparator U19 is connected to the upper threshold voltage of the constant voltage loop compensation signal COMPCV. The output of the ninth comparator U19 outputs a binary signal QCVS to the first input of the state judgment unit U21. The first input of the tenth comparator U20 is connected to the constant current loop compensation signal COMPCC, and the inverting input of the tenth comparator U20 outputs a binary signal QCVS to the first input of the state judgment unit U21. The upper threshold voltage of the constant current loop compensation signal COMPCC is connected to the phase input terminal. The output terminal of the tenth comparator U20 outputs the binary signal QCCS to the second input terminal of the state judgment unit U21. The pre-charge signal QPRE output by the battery overvoltage and short circuit protection circuit 204 is sent to the third input terminal of the state judgment unit U21. The output terminal of the state judgment unit U21 is electrically connected to the input terminal of the timer U22. The timer U22 counts the pre-charge stage, the constant current charging stage, or the constant voltage charging stage, and sends the timing end signal to the logic judgment circuit 205.
[0069] Depend on Figure 13As shown in the input / output state diagram below, the combination of the binary value QCVS output by the ninth comparator U19, the binary value QCCS output by the tenth comparator U20, and the pre-charge signal QPRE determines the output state, namely the constant voltage charging timing signal S_CV, the constant current charging timing signal S_CC, and the pre-charge timing signal S_PRE. Timer U22 performs the corresponding timing for each input S_CV, S_CC, or S_PRE signal, and outputs a TO signal after the timing is complete, indicating that the corresponding charging stage has ended.
[0070] To indicate different stages of battery charging and completion, the constant current / constant voltage control unit 200 of this solution also includes a light-turning control circuit 203. The light-turning control circuit 203 includes a programmable current source, a fourth comparator U8, a fifth comparator U9, a sixth switch K6, a seventh switch K7, and two LEDs. The voltage signal VIO corresponding to the transformer secondary current or the constant voltage loop compensation signal COMPCV is used as input signals and electrically connected to the non-inverting input terminals of the fourth comparator U8 and the fifth comparator U9, respectively. The inverting input terminal of the fourth comparator U8 is electrically connected to the green light threshold voltage, and the inverting input terminal of the fifth comparator U9 is electrically connected to the red light threshold voltage. The output terminal of the fourth comparator U8 is electrically connected to the sixth switch K6, the output terminal of the fifth comparator U9 is electrically connected to the seventh switch K7, and one normally open input terminal of the sixth switch K6... Both the seventh and seventh normally open input terminals are electrically connected to a programmable current source. The other normally open input terminal of the sixth switch K6 is electrically connected to the anode of the green LED, and the other normally open input terminal of the seventh switch is electrically connected to the anode of the red LED. The cathodes of both the green and red LEDs are electrically connected to one end of the current-limiting resistor R6, and the other end of R6 is grounded. When VIO or COMPCV is greater than the red LED threshold voltage, the seventh switch K7 is closed, the sixth switch K6 remains open, and the red LED illuminates. When VIO or COMPCV is lower than the green LED threshold voltage, the sixth switch K6 is closed, the seventh switch K7 remains open, and the green LED illuminates. Figure 2 As can be seen, the red light corresponds to the three stages of pre-charging, constant current charging, or constant voltage charging; when VIO or COMPCV is lower than the green light threshold voltage, the green light illuminates, indicating that the charging process is over.
[0071] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A battery charging circuit, comprising an input circuit, a transformer, a first switching transistor T1, an output circuit, a primary current sampling resistor, and a secondary voltage sampling circuit, characterized in that, It also includes a constant current and constant voltage control unit (200). The constant current and constant voltage control unit (200) includes a power supply terminal VCC, a sampling current input terminal CS, a sampling voltage input terminal FB, a secondary constant voltage feedback input terminal COMP, and a drive output terminal GD. The output terminal of the input circuit is electrically connected to the power supply terminal VCC of the constant current and constant voltage control unit (200), one end of the secondary voltage sampling circuit, and one end of the primary coil of the transformer, respectively. The other end of the secondary voltage sampling circuit is grounded. The output terminal of the secondary voltage sampling circuit is electrically connected to the sampling voltage input terminal FB of the constant current and constant voltage control unit (200). The secondary coil of the transformer is electrically connected to the output circuit. The output circuit is equipped with a first threshold voltage and a second threshold voltage. The other end of the primary coil of the transformer is electrically connected to the drain of the first switching transistor T1. The gate of the first switching transistor T1 is electrically connected to the drive output terminal GD of the constant current and constant voltage control unit (200). The source of the first switching transistor T1 and the sampling current input terminal CS of the constant current and constant voltage control unit (200) are both electrically connected to one end of the primary current sampling resistor. The other end of the primary current sampling resistor is grounded. The constant current and constant voltage control unit (200) acquires the current battery voltage at the output circuit. When the current battery voltage is lower than the first threshold voltage, it enters the pre-charging stage, increases the output voltage of the secondary coil of the transformer until the first threshold voltage, and starts timing the pre-charging stage. When the current battery voltage is between the first threshold voltage and the second threshold voltage REFCV, it enters the constant current charging stage, increases the output voltage of the secondary coil of the transformer until the second threshold voltage REFCV, and starts timing the constant current charging stage. When the current battery voltage is equal to the second threshold voltage REFCV, it enters the constant voltage charging stage, maintains the output voltage of the secondary coil of the transformer unchanged, and starts timing the constant voltage charging stage. The constant current and constant voltage control unit (200) includes a constant voltage control circuit (201), a constant current control circuit (202), a battery overvoltage and short circuit protection circuit (204), an oscillator, a logic judgment circuit (205), a push-pull output circuit (206), a timing circuit (207), several comparators and transconductance amplifiers; The constant voltage control circuit (201) performs slope compensation on the transformer primary current sampling signal input at the sampling current input terminal CS, and then compares it with the signal input at the secondary constant voltage feedback input terminal COMP. Alternatively, it obtains the constant voltage loop compensation signal COMPCV and the slope-compensated transformer primary current sampling signal, and compares them with the comparator. The comparator outputs the constant voltage loop peak current signal QCV and sends it to the logic judgment circuit (205). The constant voltage loop compensation signal COMPCV is obtained by processing the second threshold voltage REFCV and the battery voltage signal FBS input at the sampling voltage input terminal FB in the transconductance amplifier. The oscillator is electrically connected to the logic judgment circuit (205) and provides the logic judgment circuit (205) with a pulse signal. The constant voltage control circuit (201) also provides the slope-compensated transformer primary current sampling signal to the constant current control circuit (202). The constant voltage loop compensation signal COMPCV is also sent to the timing circuit (207). The constant current control circuit (202) acquires the voltage signal VIO corresponding to the secondary current of the transformer. After processing the voltage signal VIO and the reference voltage REFCC by the transconductance amplifier, the constant current loop compensation signal COMPCC is obtained. The constant current loop compensation signal COMPCC is further compared with the transformer primary current sampling signal after slope compensation, and the constant current loop peak current signal QCC is output and sent to the logic judgment circuit (205). The constant current loop compensation signal COMPCC is also sent to the timing circuit (207). The secondary voltage sampling signal FBS is also input to the battery overvoltage and short circuit protection circuit (204). The battery overvoltage and short circuit protection circuit (204) outputs a precharge signal QPRE to the timing circuit (207) or a fault signal to the logic judgment circuit (205) according to the magnitude of the signal FBS. The logic judgment circuit (205) outputs a PWM signal Ton to the push-pull output circuit (206) based on the input constant voltage loop peak current signal QCV, constant current loop peak current signal QCC, oscillator input signal and timing termination signal TO. The push-pull output circuit (206) outputs the PWM signal Ton to the drive output terminal GD to drive the first switching transistor T1 to turn on or off. The constant current control circuit (202) includes an operational amplifier U5, a first switch K1, a second switch K2, a third switch K3, a first RC filter circuit, a second transconductance amplifier U6, a second RC filter circuit, and a third comparator U7. The sampling current input terminal CS is electrically connected to one normally open contact of the first switch K1, and the other normally open contact of the first switch K1 is electrically connected to the non-inverting input terminal of the operational amplifier U5. The inverting input terminal of the operational amplifier U5 is electrically connected to its output terminal. The output terminal of the operational amplifier U5 is electrically connected to one normally open contact of the second switch K2, and the other normally open contact of the second switch K2 is electrically connected to one normally open contact of the third switch K3 and the input terminal of the first RC filter circuit. The other normally open contact of the third switch K3 is grounded. The first RC filter circuit... The output terminal is electrically connected to the inverting input terminal of the second transconductance amplifier U6, and the non-inverting input terminal of the second transconductance amplifier U6 is electrically connected to the reference voltage REFCC. The output terminal of the second transconductance amplifier U6 is electrically connected to the input terminal of the second RC filter circuit and the inverting input terminal of the third comparator U7, respectively. The transformer primary current sampling signal input at the sampling current input terminal CS is fed into the non-inverting input terminal of the third comparator U7 after slope compensation. The first switch K1 is turned on when Ton / 2 is high, the second switch K2 is turned on when TDM is high, and the third switch K3 is turned on only when TDM is low. Ton / 2 is the midpoint pulse signal of the PWM signal Ton. TDM and TDMB are both demagnetization time signals of the transformer secondary winding, and TDMB is the inverted signal of TDM. The first RC filter circuit is used to output the voltage signal VIO corresponding to the secondary current of the transformer; the output of the second transconductance amplifier U6 is used to output the constant current loop compensation signal COMPCC; and the output of the third comparator U7 outputs the constant current loop peak current signal QCC. The constant current and constant voltage control unit (200) also includes a lamp control circuit (203), which includes a programmable current source, a fourth comparator U8, a fifth comparator U9, a sixth switch K6, a seventh switch K7, and two light-emitting diodes. The timing circuit (207) includes a ninth comparator U19, a tenth comparator U20, a state judgment unit U21, and a timer U22. The non-inverting input of the ninth comparator U19 is connected to the constant voltage loop compensation signal COMPCV, and the inverting input of the ninth comparator U19 is connected to the upper threshold voltage of the constant voltage loop compensation signal COMPCV. The output of the ninth comparator U19 outputs a binary signal QCVS to the first input of the state judgment unit U21. The first input of the tenth comparator U20 is connected to the constant current loop compensation signal COMPC, and the inverting input of the tenth comparator U20 is connected to the constant current loop compensation signal COMPC. The upper threshold voltage of C, the output of the tenth comparator U20 outputs a binary signal QCCS to the second input of the state judgment unit U21; the pre-charge signal QPRE output by the battery overvoltage and short circuit protection circuit (204) is sent to the third input of the state judgment unit U21; the output of the state judgment unit U21 is electrically connected to the input of the timer U22, the timer U22 counts the pre-charge stage, the constant current charging stage or the constant voltage charging stage respectively, and sends the timing end signal to the logic judgment circuit (205); the timing circuit (207) also inputs the timing end signal TO to the logic judgment circuit (205).
2. The battery charging circuit according to claim 1, characterized in that, The constant voltage control circuit (201) includes a slope compensation unit (301) and a first comparator U1. The signal of the input sampling current input terminal CS is superimposed with the slope compensation signal Vslope output by the slope compensation unit (301) to obtain the CS_slope signal. The CS_slope signal is sent to the non-inverting input terminal of the first comparator U1. The input signal of the secondary constant voltage feedback input terminal COMP is sent to the inverting input terminal of the first comparator U1. After comparison by the first comparator U1, the constant voltage loop peak current signal QCV is output.
3. The battery charging circuit according to claim 1, characterized in that, The constant voltage control circuit (201) includes a slope compensation unit (301), a first transconductance amplifier U2, and a second comparator U3. The non-inverting input of the first transconductance amplifier U2 is connected to the second threshold voltage REFCV, the inverting input of the first transconductance amplifier U2 is electrically connected to the sampling voltage input FB, the output of the first transconductance amplifier U2 is electrically connected to one end of the resistor R5 and the inverting input of the second comparator U3, the other end of the resistor R5 is electrically connected to one end of the capacitor C5, and the other end of the capacitor C5 is grounded. The signal sent to the sampling current input CS by the primary current sampling resistor is superimposed with the slope compensation signal Vslope output by the slope compensation unit (301) to obtain the CS_slope signal, and the CS_slope signal is sent to the non-inverting input of the second comparator U3. The output of the first transconductance amplifier U2 outputs the constant voltage loop compensation signal COMPCV, and the output of the second comparator U3 outputs the constant voltage loop peak current signal QCV.
4. A battery charging circuit according to any one of claims 2 or 3, characterized in that, The slope compensation unit (301) includes a fourth switch K4, a fifth switch K5, a capacitor C4, and a first inverter U4; the output terminal of the logic judgment circuit (205) is electrically connected to the input terminals of the fourth switch K4 and the first inverter U4, respectively, and the output terminal of the first inverter U4 is electrically connected to the fifth switch K5; the normally open contact of the fourth switch K4 is electrically connected to the power supply terminal VCC, one normally open contact of the fifth switch K5, and one end of the capacitor C4, respectively, and one end of the capacitor C4 serves as the output terminal of the slope compensation signal Vslope; the other normally open contact of the fifth switch K5 and the other end of the capacitor C4 are both grounded.
5. A battery charging circuit according to claim 1, characterized in that, The battery overvoltage and short-circuit protection circuit (204) includes a sixth comparator U10, a seventh comparator U11, an eighth comparator U12, and a first OR gate U13; the signal FBS input to the sampling voltage input terminal FB is electrically connected to the non-inverting input terminals of the sixth comparator U10, the seventh comparator U11, and the eighth comparator U12, respectively; the inverting input terminal of the sixth comparator U10 is connected to the battery undervoltage threshold voltage; the inverting input terminal of the seventh comparator U11 is connected to the battery overvoltage threshold voltage; the inverting input terminal of the eighth comparator U12 is connected to the first threshold voltage; the output terminal of the eighth comparator U12 outputs a pre-charge signal QPRE to the timing circuit (207); the output terminals of the sixth comparator U10 and the seventh comparator U11 are electrically connected to the two input terminals of the first OR gate U13, respectively; the output terminal of the first OR gate U13 outputs a fault signal FAULT to the logic judgment circuit (205).
6. A battery charging circuit according to claim 5, characterized in that, The logic judgment circuit (205) includes a second OR gate U14, a two-input AND gate U15, a pulse trigger U16, a delay unit U17, and a third OR gate U18; the peak current signal QCV of the constant voltage loop and the peak current signal QCC of the constant current loop are electrically connected to the two input terminals of the second OR gate U14 respectively, the output terminal of the second OR gate U14 is electrically connected to one input terminal of the two-input AND gate U15, and the output terminal of the delay unit U17 is electrically connected to the other input terminal of the two-input AND gate U15; the two-input AND gate U18... The output terminal of 15 is electrically connected to one input terminal of the third OR gate U18, the output terminal of the timing circuit (207) is electrically connected to the other input terminal of the third OR gate U18, the output terminal of the third OR gate U18 is electrically connected to the R terminal of the pulse trigger U16, the pulse output terminal of the oscillator is electrically connected to the S terminal of the pulse trigger U16, and the output terminal of the pulse trigger U16 is electrically connected to the input terminal of the push-pull output circuit (206) and the input terminal of the delay unit U17 respectively; the pulse trigger U16 outputs the PWM signal Ton.
7. A battery charging circuit according to claim 2, characterized in that, The push-pull output circuit (206) includes a second inverter U18, a second switch T2, and a third switch T3. The output terminal of the logic judgment circuit (205) is electrically connected to the input terminal of the second inverter U18. The output terminal of the second inverter U18 is electrically connected to the gate of the second switch T2 and the gate of the third switch T3, respectively. The drain of the second switch T2 is electrically connected to the power supply terminal VCC of the constant current and constant voltage control unit (200). The source of the second switch T2 is electrically connected to the drain of the third switch T3 and then serves as the output terminal of the push-pull output circuit (206), which is electrically connected to the drive output terminal GD of the constant current and constant voltage control unit (200). The source of the third switch T3 is grounded.