Disclosure of Invention
The invention aims to solve the technical problem of providing a singlechip-controlled synchronous rectification charging control circuit which can meet the charging function of outputting different voltages by the same charger.
The invention is realized in the following way: a synchronous rectification charging control circuit controlled by a singlechip comprises:
the power terminal is used for being connected with an external direct current power supply;
the charging terminal is used for being connected with the battery module;
the half-bridge power switch module is connected with the power supply wiring terminal;
the singlechip is connected with the half-bridge power switch module and sends a first PWM signal and a second PWM signal to the half-bridge power switch module;
the BUCK circuit module is connected with the half-bridge power switch module and receives synchronous rectification signals sent by the half-bridge power switch module;
the charging switch circuit module is connected with the BUCK circuit module and also connected with the charging wiring terminal;
the power supply voltage detection module is connected with the power supply wiring terminal and also connected with the singlechip;
and the battery voltage detection module is connected with the charging terminal and also connected with the singlechip.
Further, the half-bridge power switch module comprises a VIN end, a VSW end, a TG end and a BG end;
the singlechip comprises a PSW1 end, a PSW2 end, a P1.2 end, a P1.4 end and a P1.7 end;
the BUCK circuit module comprises an inductor L2, a capacitor C5, a capacitor C6, a capacitor C7 and a resistor RS2;
the charging switch circuit module comprises a P-type MOS tube Q1, a P-type MOS tube Q2, an NPN triode Q3, a resistor R7, a resistor R8 and a resistor R9;
the power supply voltage detection module comprises a resistor R10, a resistor R11 and a capacitor C9;
the battery voltage detection module comprises a diode D2, a resistor R12, a resistor R13 and a capacitor C10;
the power supply terminal is connected with the VIN end, one end of the resistor R11 and one end of the capacitor C1, the other end of the resistor R11 is connected with one end of the resistor R10, one end of the capacitor C9 and the end P1.4, and the other end of the resistor R10, the other end of the capacitor C9 and the other end of the capacitor C1 are grounded;
the PSW1 end is connected with one end of a resistor R3, the other end of the resistor R3 is connected with the TG end, the PSW2 end is connected with one end of a resistor R5, the other end of the resistor R5 is connected with the BG end, the P1.7 end is connected with one end of a capacitor C10, one end of a resistor R12 and one end of a resistor R13, the other end of the resistor R13 is connected with the negative electrode of a diode D2, the positive electrode of the diode D2 is connected with the positive electrode of the charging terminal, and the other end of the capacitor C10 and the other end of the resistor R12 are grounded;
the VSW end is connected with one end of an inductor L2, the other end of the inductor L2 is connected with one end of a capacitor C5, one end of a capacitor C6 and one end of a resistor RS2, the other end of the resistor RS2 is connected with one end of a capacitor C7 and the drain electrode of a P-type MOS tube Q1, and the other end of the capacitor C5, the other end of the capacitor C6 and the other end of the capacitor C7 are grounded;
the source electrode of the P-type MOS tube Q1 is connected with the source electrode of the P-type MOS tube Q2 and one end of a resistor R7, the grid electrode of the P-type MOS tube Q1 is connected with the grid electrode of the P-type MOS tube Q2, the other end of the resistor R7, one end of a resistor R8 and the collector electrode of an NPN-type triode Q3, the drain electrode of the P-type MOS tube Q2 is connected with the positive electrode of the charging terminal, the other end of the resistor R8 is connected with the drain electrode of the P-type MOS tube Q1, the base electrode of the NPN-type triode Q3 is connected with one end of a resistor R9, the other end of the resistor R9 is connected with the end P1.2, and the emitter electrode of the NPN-type triode Q3 and the negative electrode of the charging terminal are grounded.
Further, the method further comprises the following steps: and the charging current detection module is connected with the BUCK circuit module and also connected with the singlechip.
Further, the charging current detection module comprises a resistor RS1;
the singlechip also comprises a P1.0 end and a P1.1 end;
one end of the resistor RS1 is connected with the end P1.1 and one end of the resistor RS2, and the other end of the resistor RS1 is connected with the end P1.0 and the other end of the resistor RS 2.
Further, the method further comprises the following steps: the voltage conversion module is connected with the power supply terminal, and generates a 5V power supply and sends the power supply to the power supply end of the singlechip.
Further, the voltage conversion module comprises a voltage stabilizing tube, a capacitor C2, a capacitor C3, a resistor R1, a resistor R2 and a resistor R01;
the power terminal is connected with one end of the capacitor C2 and the Vin end of the voltage stabilizing tube, the Vout end of the voltage stabilizing tube is connected with one end of the capacitor C3, one end of the resistor R2, one end of the resistor R01 and the power supply end of the singlechip, the other end of the resistor R2 is connected with the ADJ end of the stabilizing tube and one end of the resistor R1, and the other end of the resistor R1, the other end of the capacitor C2, the other end of the capacitor C3 and the other end of the resistor R01 are grounded.
Further, the method further comprises the following steps: and the synchronous rectification signal detection module is connected with the half-bridge power switch module and also connected with the singlechip.
Further, the synchronous rectification signal detection module comprises a capacitor C8, a resistor R6 and a resistor R4;
one end of the resistor R4 is connected with the TGR end of the singlechip, the other end of the resistor R4 is connected with one end of the capacitor C8, the VSW end and the TGR end of the half-bridge power switch module, the other end of the capacitor C8 is connected with one end of the resistor R6, and the other end of the resistor R6 is grounded.
Further, the method further comprises the following steps: and the EMC circuit module is connected with the charging switch circuit module and also connected with the charging terminal.
Further, the EMC circuit module includes a capacitor C4 and an inductor L1;
one end of the capacitor C4 is connected to the first input end of the common-mode inductor L1 and the drain electrode of the P-type MOS transistor Q2, the first output end of the common-mode inductor L1 is connected to the positive electrode of the charging terminal, the other end of the capacitor C4 and the second input end of the common-mode inductor L1 are grounded, and the second output end of the common-mode inductor L1 is connected to the negative electrode of the charging terminal.
The invention has the advantages that: 1. the singlechip outputs two paths of PWM signals to the half-bridge power switch module, realizes multiple voltage outputs by adjusting the duty ratio of the two paths of PWM signals, detects the charging state of the battery in the charging process and adjusts the charging parameters at any time, thereby meeting the charging function of outputting different voltages by the same charger. 2. The singlechip automatically outputs PWM waveform signals when detecting that the battery module is connected with an external direct current power supply. 3. The singlechip detects whether synchronous rectification signals output by the half-bridge power switch module are synchronous or not, and timely adjusts the staggered conduction time of the two paths of PWM signals.
Detailed Description
The embodiment of the invention solves the defect that the charger in the prior art can only charge with single voltage by providing the synchronous rectification charging control circuit controlled by the singlechip, and realizes the technical effect of charging with different voltages output by the same charger.
The technical scheme in the embodiment of the invention aims to solve the defects, and the general idea is as follows: the singlechip outputs two paths of PWM signals to the half-bridge power switch module, realizes various voltage outputs by adjusting the duty ratio of the two paths of PWM signals, detects the charging state of the battery in the charging process and adjusts the charging parameters at any time.
In order to better understand the above technical solutions, the following detailed description will refer to the accompanying drawings and specific embodiments.
Referring to fig. 1 to 3, a preferred embodiment of the present invention.
A synchronous rectification charging control circuit controlled by a singlechip comprises: the power terminal is used for being connected with an external direct current power supply; the external DC power supply is 18V. The charging terminal is used for being connected with the battery module; and charging the battery module. The power terminal and the charging terminal are integrated in the connection terminal J1.
The half-bridge power switch module U2 is connected with the power supply wiring terminal; the model of the half-bridge power switch module U2 is CSD87333Q3D. The singlechip U1 is connected with the half-bridge power switch module U2, and the singlechip U1 sends a first PWM signal and a second PWM signal to the half-bridge power switch module U2; the model of the singlechip U1 is CM9M745. The half-bridge power switch module U2 outputs synchronous rectification signals, and the half-bridge power switch module U2 outputs various voltages by adjusting the duty ratio of two paths of PWM signals.
The BUCK circuit module is connected with the half-bridge power switch module U2, and receives synchronous rectification signals sent by the half-bridge power switch module U2; the BUCK circuit module steps down the synchronous rectification signal, for example, 18V down to 15V.
The charging switch circuit module is connected with the BUCK circuit module and also connected with the charging wiring terminal; when the charging switch circuit module is turned on, the battery module is charged, and when the charging switch circuit module is turned off, the charging is stopped.
The power supply voltage detection module is connected with the power supply terminal and also connected with the singlechip U1; the power supply voltage detection module detects whether the power supply terminal is electrified or not and the power supply voltage value and feeds the power supply voltage value back to the singlechip U1.
And the battery voltage detection module is connected with the charging terminal and also connected with the singlechip U1. The power supply voltage detection module detects the voltage of the battery module and feeds back the voltage to the singlechip U1.
When the singlechip U1 detects that the power terminal is normally connected with the charging terminal, two paths of PWM signals are output to the half-bridge power switch module U2, and the duty ratio of the first PWM signal and the second PWM signal is automatically adjusted according to the collected voltage of the battery module in the charging process. The duty cycle of the first PWM signal and the second PWM signal is minimized when the battery voltage is detected in the constant voltage phase.
And the charging current detection module is connected with the BUCK circuit module and also connected with the singlechip U1. The charging current detection module detects the charging current in the charging process and feeds the charging current back to the singlechip U1. The singlechip U1 is combined with the collected charging current to further adjust the duty ratio of the first PWM signal and the second PWM signal. When the battery is detected to be in the constant current charging stage, the duty ratio of the first PWM signal and the second PWM signal is maximum. The purpose of adjusting the charging parameters according to the charging state of the battery module is achieved, and the charging state of the battery module is divided into constant voltage, constant current and floating charge. The duty cycle is the ratio of the high level to the low level in the PWM waveform, and is between the minimum and maximum during the float charge.
The voltage conversion module is connected with the power supply terminal, and generates a 5V power supply and sends the 5V power supply to the power supply end of the singlechip U1. The voltage conversion module converts an external 18V direct current power supply into a 5V power supply; so that a 5V power supply device does not need to be additionally arranged.
And the synchronous rectification signal detection module is connected with the half-bridge power switch module U2 and also connected with the singlechip U1. The singlechip U1 detects whether synchronous rectification signals output by the half-bridge power switch module U2 are synchronous or not, so that the staggered conduction time of the first PWM signal and the second PWM signal is timely adjusted.
And the EMC circuit module is connected with the charging switch circuit module and also connected with the charging terminal. The EMC circuit module reduces electromagnetic radiation and susceptibility to external disturbances generated by the circuits on the circuit board.
Describing with specific circuits, the half-bridge power switch module U2 includes a VIN end, a VSW end, a TG end, and a BG end; the singlechip U1 comprises a PSW1 end, a PSW2 end, a P1.2 end, a P1.4 end and a P1.7 end; the BUCK circuit module comprises an inductor L2, a capacitor C5, a capacitor C6, a capacitor C7 and a resistor RS2; the charging switch circuit module comprises a P-type MOS tube Q1, a P-type MOS tube Q2, an NPN triode Q3, a resistor R7, a resistor R8 and a resistor R9; the power supply voltage detection module comprises a resistor R10, a resistor R11 and a capacitor C9; the battery voltage detection module comprises a diode D2, a resistor R12, a resistor R13 and a capacitor C10; the power supply terminal is connected with the VIN end, one end of the resistor R11 and one end of the capacitor C1, the other end of the resistor R11 is connected with one end of the resistor R10, one end of the capacitor C9 and the end P1.4, and the other end of the resistor R10, the other end of the capacitor C9 and the other end of the capacitor C1 are grounded; the P1.4 end of the singlechip U1 indirectly detects the voltage of the power supply terminal.
The PSW1 end is connected with one end of a resistor R3, the other end of the resistor R3 is connected with the TG end, the PSW2 end is connected with one end of a resistor R5, the other end of the resistor R5 is connected with the BG end, the PSW1 end of a singlechip U1 sends out a first PWM signal, and the PSW2 end of the singlechip U1 generates a second PWM signal.
The end P1.7 is connected with one end of a capacitor C10, one end of a resistor R12 and one end of a resistor R13, the other end of the resistor R13 is connected with the negative electrode of a diode D2, the positive electrode of the diode D2 is connected with the positive electrode B+ of the charging terminal, and the other end of the capacitor C10 and the other end of the resistor R12 are grounded; the P1.7 end of the singlechip U1 indirectly detects the voltage of the charging connecting wire, namely the battery module.
The VSW end is connected with one end of an inductor L2, the other end of the inductor L2 is connected with one end of a capacitor C5, one end of a capacitor C6 and one end of a resistor RS2, the other end of the resistor RS2 is connected with one end of a capacitor C7 and the drain electrode of a P-type MOS tube Q1, and the other end of the capacitor C5, the other end of the capacitor C6 and the other end of the capacitor C7 are grounded; the VSW end of the half-bridge power switch module U2 outputs a synchronous rectification signal, and the synchronous rectification signal is sent to the drain electrode of the P-type MOS tube Q1 after being reduced in voltage.
The source electrode of the P-type MOS tube Q1 is connected with the source electrode of the P-type MOS tube Q2 and one end of a resistor R7, the grid electrode of the P-type MOS tube Q1 is connected with the grid electrode of the P-type MOS tube Q2, the other end of the resistor R7, one end of a resistor R8 and the collector electrode of an NPN-type triode Q3, the drain electrode of the P-type MOS tube Q2 is connected with the positive electrode B+ of the charging terminal, the other end of the resistor R8 is connected with the drain electrode of the P-type MOS tube Q1, the base electrode of the NPN-type triode Q3 is connected with one end of a resistor R9, the other end of the resistor R9 is connected with the end P1.2, and the emitter electrode of the NPN-type triode Q3 and the negative electrode B-of the charging terminal are grounded. The P1.2 end of the singlechip U1 sends high level to act on the base electrode of the NPN triode Q3 through the resistor R9, the NPN triode Q3 is conducted, the grid electrode of the P type MOS tube Q1 and the grid electrode of the P type MOS tube Q2 are both low level, the P type MOS tube Q1 and the P type MOS tube Q2 are both conducted, and at the moment, the positive electrode B+ and the negative electrode B-of the charging terminal charge the battery module. The P1.2 end of the singlechip U1 sends low level to act on the base electrode of the NPN triode Q3 through the resistor R9, the NPN triode Q3 is cut off, the grid electrode of the P type MOS tube Q1 and the grid electrode of the P type MOS tube Q2 are both high level, the P type MOS tube Q1 and the P type MOS tube Q2 are both cut off, and the charging of the battery module is stopped at the moment.
The charging current detection module comprises a resistor RS1; the singlechip U1 also comprises a P1.0 end and a P1.1 end; one end of the resistor RS1 is connected with the end P1.1 and one end of the resistor RS2, and the other end of the resistor RS1 is connected with the end P1.0 and the other end of the resistor RS 2. The P1.0 end and the P1.1 end of the singlechip U1 respectively detect the voltage at two ends of the resistor RS1, calculate the resistance value of the resistor RS1, and indirectly detect the charging current in the charging process.
The voltage conversion module comprises a voltage stabilizing tube U9, a capacitor C2, a capacitor C3, a resistor R1, a resistor R2 and a resistor R01; the model of the voltage stabilizing tube is NCV1117DTARKG. The power terminal is connected with one end of the capacitor C2 and the Vin end of the voltage stabilizing tube, the Vout end of the voltage stabilizing tube is connected with one end of the capacitor C3, one end of the resistor R2, one end of the resistor R01 and the power supply end of the singlechip U1, the other end of the resistor R2 is connected with the ADJ end of the stabilizing tube and one end of the resistor R1, and the other end of the resistor R1, the other end of the capacitor C2, the other end of the capacitor C3 and the other end of the resistor R01 are grounded. And converting the 18V direct current power supply into a 5V direct current power supply to supply power for the singlechip U1.
The synchronous rectification signal detection module comprises a capacitor C8, a resistor R6 and a resistor R4; one end of the resistor R4 is connected with the TGR end of the singlechip, the other end of the resistor R4 is connected with one end of the capacitor C8, the VSW end and the TGR end of the half-bridge power switch module, the other end of the capacitor C8 is connected with one end of the resistor R6, and the other end of the resistor R6 is grounded. The TGR end of the singlechip U1 detects whether synchronous rectification signals output by the VSW end of the half-bridge power switch are synchronous or not.
The EMC circuit module comprises a capacitor C4 and an inductor L1; one end of the capacitor C4 is connected to the first input end of the common-mode inductor L1 and the drain electrode of the P-type MOS transistor Q2, the first output end of the common-mode inductor L1 is connected to the positive electrode b+ of the charging terminal, the other end of the capacitor C4 and the second input end of the common-mode inductor L1 are grounded, and the second output end of the common-mode inductor L1 is connected to the negative electrode B-of the charging terminal.
The singlechip U1 also comprises a P1.3 end, one end of the key SW1 is connected with the P1.3 end, and the other end of the key SW1 is grounded. When the singlechip detects that the SW1 acts, the singlechip U1 adjusts an internal program according to the level change to control PWM signal output, and the duty ratio of the PWM signal can adjust charging voltage to form different charging voltage types.
The working mode of the synchronous rectification charging control circuit is controlled by the singlechip: the wiring terminal J1 is connected with an external direct current power supply and the battery module, when the singlechip U1 detects the voltage of the power supply terminal and the voltage of the charging terminal, two paths of PWM signals are output to the half-bridge power switch module U2, meanwhile, the singlechip U1 controls the charging switch circuit module to be conducted, and the half-bridge power switch module U2 outputs synchronous rectification signals to reach the charging switch circuit module after being subjected to BUCK voltage reduction, and then the battery module is charged through the EMC circuit module. In the charging process, the singlechip U1 collects whether the voltage, the charging current and the synchronous rectification signal of the battery module are synchronous or not, and timely adjusts the duty ratio and the staggered conduction time of the two paths of PWM signals. The purpose of charging that the same charger outputs different voltages is achieved. The voltage of the battery module is collected, so that the duty ratio of the two paths of PWM signals is adjusted to output different charging voltage types, and the charging voltage types can be selected through the key SW 1.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that the specific embodiments described are illustrative only and not intended to limit the scope of the invention, and that equivalent modifications and variations of the invention in light of the spirit of the invention will be covered by the claims of the present invention.