A single-gpio-based dual-power seamless switching and overcharge protection circuit
By using a single-channel GPIO multiplexing dual-power seamless switching and overcharge protection circuit, and integrating power-down detection and overvoltage switching circuits, the overcharge risk and GPIO resource occupation problem of the TPS630 series buck-boost converter during dual-power switching is solved, achieving seamless switching and overcharge protection.
Patent Information
- Application Number
- CN202511183403.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-22
AI Technical Summary
In the existing technology, the TPS630 series buck-boost converters lack overvoltage protection during dual power supply switching, which leads to overcharge risk and requires additional GPIO resources, increasing system control complexity and reducing hardware scalability.
It adopts a dual-power seamless switching and overcharge protection circuit with single-channel GPIO multiplexing. The charging shutdown and power failure detection functions are integrated through the power failure detection circuit and the overvoltage switching circuit. Hardware logic control is implemented using optocouplers and operational amplifiers to avoid software dependence.
It achieves seamless switching and overcharge protection, reduces GPIO resource consumption, lowers system control complexity, improves hardware scalability and reliability, and avoids overcharge risks.
Smart Images

Figure CN120675268B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of electronic circuits, in particular to a dual-power seamless switching and overcharge protection circuit based on a single GPIO. BACKGROUND
[0002] In a TCU communication circuit board power supply system, to deal with the risk of sudden power failure of the main power supply, a chargeable and dischargeable backup power supply (such as a super capacitor) is usually configured; the backup power supply needs to seamlessly take over the power supply when the main power supply fails, and maintain the continuous operation of the system to complete the key data saving operation; therefore, a dual-power architecture based on a boost-buck converter is developed, and the TITPS630 series is widely used due to its high efficiency and wide voltage adaptability, but there are still the following technical bottlenecks in engineering implementation:
[0003] Lack of overvoltage protection function: although the TPS630 series device supports bidirectional energy flow, its charge control end (PS / SYNC pin) lacks an independent voltage detection mechanism; when the backup power supply is charged to the full pressure state, the converter cannot automatically cut off the charging circuit, and there is a risk of overcharge leading to battery degradation or failure; the existing scheme needs to additionally occupy a GPIO pin of a microcontroller (MCU), forcibly stops charging by actively pulling down the PS / SYNC level, which significantly increases the system control complexity.
[0004] Power-down detection resource consumption: real-time monitoring of the main power supply needs to configure a dedicated voltage detection circuit (such as a comparator or ADC sampling), which further occupies another GPIO pin and supporting peripheral elements; in the embedded system with limited GPIO resources, the double-pin occupation scheme reduces the hardware expandability and increases the software scheduling burden.
[0005] System reliability risks: in the discrete control scheme, the charge cutoff and power-down detection signals need to be coordinated through software logic; if the MCU fails to respond in time due to program runaway or reset exception, it may cause backup power supply overcharge damage or main and backup power supply switching delay, resulting in data saving failure.
[0006] Therefore, the current industry urgently needs an innovative dual-power switching circuit to achieve the following core goals while ensuring seamless switching and overcharge protection:
[0007] Integrate the charge cutoff and power-down detection functions and use a single GPIO control to reduce hardware resource consumption;
[0008] Seamlessly switch the main power supply and backup power supply paths through pure hardware logic, and simultaneously implement the full-pressure self-stop charging of the backup power supply to eliminate software dependency risks;
[0009] Avoid using high-cost dedicated management chips to maintain the economic nature of the scheme. SUMMARY
[0010] The present application aims at overcoming the deficiencies in the prior art, and provides a dual-power seamless switching and overcharge protection circuit based on single GPIO multiplexing.
[0011] To achieve the above-mentioned object / To solve the above-mentioned technical problems, the present application is implemented by using the following technical solutions:
[0012] In a first aspect, the present application provides a dual-power seamless switching and overcharge protection circuit based on single GPIO, comprising:
[0013] A main power supply circuit is used for supplying power to a subsequent circuit, and the main power supply circuit is further connected with a backup power supply circuit through a current-limiting anti-reverse circuit, and is used for pre-charging the backup power supply;
[0014] The backup power supply circuit is connected with the subsequent circuit through a boost-buck converter, and is used for charging the backup power supply in reverse through the boost-buck converter when the voltage of the backup power supply is pre-charged to the minimum starting voltage of the boost-buck converter, and is used for supplying power to the subsequent circuit through the boost-buck converter when the main power supply is powered off;
[0015] A power-off detection circuit is connected with the main power supply circuit and the backup power supply circuit, and is further electrically connected with a master control unit, and is used for detecting whether the main power supply is powered off;
[0016] An overvoltage switching circuit is connected with the power-off detection circuit, the backup power supply circuit and the boost-buck converter, and is used for cutting off the reverse charging loop of the backup power supply and switching back to the pre-charging loop when the backup power supply is charged to the full pressure state;
[0017] The boost-buck converter is a TPS630 series.
[0018] In combination with the first aspect, optionally, the power-off detection circuit comprises an optical coupler U3, a first pin end of the optical coupler U3 is connected with a positive pole of the main power supply through a resistor RA, a second pin end of the optical coupler U3 is connected with a negative pole of the main power supply, a fourth pin end of the optical coupler U3 is connected with the backup power supply, a third pin end of the optical coupler U3 is grounded through a resistor RB and a resistor RC in sequence, and an end of the resistor RB close to the resistor RC is connected with the master control unit.
[0019] Optionally, the overvoltage switching circuit comprises an operational amplifier U4, a first pin end of the operational amplifier U4 is connected with a PS pin end of the buck-boost converter, a fourth pin end of the operational amplifier U4 is grounded, an eighth pin end of the operational amplifier U4 is connected with a positive pole of the backup power supply, a third pin end of the operational amplifier U4 is connected with a 5V voltage through a resistor RF, one side of the resistor RF connected with the third pin end of the operational amplifier U4 is further connected with a resistor RG and then grounded, a third pin end of the optocoupler U3 is further connected with a resistor RD and then a resistor RE and then grounded, and a second pin end of the operational amplifier U4 is connected with one end of the resistor RD close to the resistor RE.
[0020] Optionally, the main power supply circuit comprises a main power supply, the main power supply is connected with an input end of the current-limiting anti-reverse circuit through a reverse protection circuit, an isolation filter circuit and a voltage stabilizing circuit in sequence, an output end of the voltage stabilizing circuit is connected with an input end of the anti-backflow circuit, and an output end of the anti-backflow circuit is connected with a subsequent circuit.
[0021] Optionally, the current-limiting anti-reverse circuit comprises a resistor R6 and a diode D3, one end of the resistor R6 is connected with an output end of the voltage stabilizing circuit, the other end of the resistor R6 is connected with an anode of the diode D3, and a cathode of the diode D3 is connected with the backup power supply circuit.
[0022] Optionally, the backup power supply circuit comprises a backup power supply and a filter circuit connected in sequence, a positive pole of the backup power supply is connected with an output end of the current-limiting anti-reverse circuit, and an output end of the filter circuit is connected with a VIN / EN pin end of the buck-boost converter.
[0023] Optionally, the backup power supply is a farad capacitor, a positive pole of the farad capacitor is connected with an output end of the current-limiting anti-reverse circuit, and a negative pole of the farad capacitor is grounded, the filter circuit comprises a capacitor C4 and a capacitor C5, the capacitor C4 and the capacitor C5 are connected in parallel to both ends of the farad capacitor, and non-grounded ends of the capacitor C4 and the capacitor C5 are connected with a VIN / EN pin end of the buck-boost converter.
[0024] Compared with the prior art, the application has the following beneficial effects:
[0025] The power failure detection circuit is connected with the main power supply circuit, the backup power supply circuit and the main control unit respectively, when the main power supply of the main power supply circuit is powered off, the GPIO port connected with the power failure detection circuit of the main control unit is lowered from high level to low level, and when the main power supply of the main power supply circuit is powered on, it is raised to high level again, so that whether the main power supply circuit is powered off can be judged, when the main power supply circuit is detected to be powered off, the main control unit needs to arrange the uploading and saving of necessary data; the overvoltage switching circuit is connected with the power failure detection circuit, the backup power supply circuit and the boost-buck converter respectively, when the overvoltage switching circuit detects that the voltage of the backup power supply is greater than the preset voltage value, the overvoltage switching circuit outputs low level to the boost-buck converter, then the boost-buck converter stops reverse work immediately, and the main power supply circuit cannot charge the backup power supply quickly through the boost-buck converter in reverse, then it is automatically switched to the main power supply circuit to pre-charge the backup power supply through the current limiting anti-reverse circuit, the power failure detection and charging shutdown functions are integrated into a single pin in the application, the GPIO resource occupation of the main control unit is reduced, the shortage of chip pins is relieved, the seamless switching of the main power supply and the backup power supply path is realized through the pure hardware logic of the power failure detection circuit and the overvoltage switching circuit, the backup power supply full-pressure self-stopping charging is realized, and the overcharging risk caused by software response delay is eliminated. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 is the circuit module diagram of the application;
[0027] Figure 2 is the power failure detection circuit and overvoltage switching circuit diagram of the application;
[0028] Figure 3 is the main power supply circuit diagram of the application;
[0029] Figure 4 is the backup power supply circuit and boost-buck converter circuit diagram of the application. DETAILED DESCRIPTION
[0030] The technical scheme of the application will be described in detail below through the drawings and specific embodiments, and it should be understood that the specific features in the embodiments and the embodiments of the application are detailed description of the technical scheme of the application, and are not limitation of the technical scheme of the application, and the technical features in the embodiments and the embodiments of the application can be combined with each other without conflict.
[0031] In the description of the application, the description of the terms "one embodiment", "some embodiments", "exemplary embodiment", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the application. In this specification, the exemplary description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0032] The term "and / or" herein is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " herein generally represents that the front and rear associated objects are in an "or" relationship.
[0033] Embodiment one:
[0034] As shown in Figure 1 The application provides a single-GPIO-based dual-power seamless switching and overcharge protection circuit, which comprises:
[0035] A main power supply circuit is used to supply power to a subsequent circuit, and the main power supply circuit is also connected with a backup power supply circuit through a current-limiting anti-reverse circuit, and is used to pre-charge the backup power supply.
[0036] In some embodiments, the main power supply circuit comprises a main power supply, which is connected with the input end of the current-limiting anti-reverse circuit in sequence through an anti-reverse protection circuit, an isolation filter circuit and a voltage stabilizing circuit, the output end of the voltage stabilizing circuit is connected with the input end of the anti-backflow circuit, and the output end of the anti-backflow circuit is connected with the subsequent circuit.
[0037] The four-level cascade design of anti-reverse protection, isolation filtering, voltage stabilization and anti-backflow ensures the stable output of the main power supply under surge impact.
[0038] The backup power supply circuit is connected with the subsequent circuit through a boost-buck converter, and is used to charge the backup power supply in reverse through the boost-buck converter when the voltage of the backup power supply is pre-charged to the minimum starting voltage of the boost-buck converter, and is also used to supply power to the subsequent circuit through the boost-buck converter when the main power supply is powered off.
[0039] The backup power supply circuit comprises a backup power supply and a filter circuit connected in sequence, the positive electrode of the backup power supply is connected with the output end of the current-limiting anti-reverse circuit, and the output end of the filter circuit is connected with the VIN / EN pin end of the boost-buck converter.
[0040] A power-off detection circuit is connected with the main power supply circuit and the backup power supply circuit, and is also electrically connected with the control unit, and is used for detecting whether the main power supply is powered off;
[0041] An overvoltage switching circuit is connected with the power-off detection circuit, the backup power supply circuit and the voltage-lifting and voltage-lowering converter, and is used for cutting off the backup power supply reverse charging loop and switching back to the pre-charging loop when the backup power supply is charged to the full voltage state.
[0042] The voltage-lifting and voltage-lowering converter is a TPS630 series.
[0043] Embodiment two
[0044] On the basis of embodiment one, a single-GPIO-based dual-power seamless switching and overcharge protection circuit is provided.
[0045] As shown in Figure 3 The main power supply circuit includes a main power supply JP1, the first pin of the main power supply is connected with the ground, the third pin of the main power supply is connected with the anode of a diode D1, the cathode of the diode D1 is connected with a fuse RF1, the other end of the fuse RF1 is connected with the VIN pin of an isolation power supply module U1, the second pin of the main power supply is connected with the GND pin of the isolation power supply module U1, the VIN pin and the GND pin of the isolation power supply module U1 are connected in parallel with a capacitor C1, the +V0 pin and the -V0 pin of the isolation power supply module U1 are connected in parallel with a capacitor C2 and a capacitor C3; the +V0 pin of the isolation power supply module U1 is also connected with the emitter of a triode Q3, the emitter of the triode Q3 is sequentially connected with the base of the triode Q3 through a resistor R1 and a resistor R2, the base of the triode Q3 is connected with the cathode of a diode D2 through the resistor R2, the anode of the diode D2 is connected with the collector of the triode Q3 through a resistor R3, and the anode of the diode D2 is connected with the ground; the emitter of the triode Q3 is also connected with the source of a MOS tube Q1, the collector of the triode Q3 is connected with the gate of the MOS tube Q1, the drain of the MOS tube Q1 is the output end of a voltage stabilizing circuit and is used for being connected with the input 0 end of a current-limiting anti-reverse circuit; the drain of the MOS tube Q1 is also connected with the drain of a MOS tube Q2, the drain of the MOS tube Q2 is connected with the emitter of a triode Q4, the collector of the triode Q4 is connected with the collector of a triode Q5 through a resistor R4 and a resistor R5, the collector of the triode Q4 is also connected with the ground through the resistor R4, the collector of the triode Q4 is connected with the base of the triode Q4, the base of the triode Q4 is connected with the base of a triode Q5, the collector of the triode Q5 is connected with the gate of the MOS tube Q2, the source of the MOS tube Q2 is connected with the collector of the triode Q5, and the source of the MOS tube Q2 is also used for being connected with a subsequent circuit.
[0046] The mirror current source voltage stabilizing circuit composed of MOS transistors Q1-Q2 and triodes Q3-Q5 reduces the output voltage ripple.
[0047] In some illustrative embodiments, the model of the isolation power supply module U1 is RD15DB-24S05D.
[0048] In some specific examples, as shown in Figure 4 The current-limiting anti-reverse circuit includes a resistor R6 and a diode D3, one end of the resistor R6 is connected with the output end of the voltage stabilizing circuit, the other end of the resistor R6 is connected with the anode of the diode D3, and the cathode of the diode D3 is connected with the backup power supply circuit.
[0049] The resistor R6 limits the pre-charge current to prevent the initial power-on impact from damaging the farad capacitor; and the diode D3 blocks the reverse discharge of the backup power supply, eliminating the risk of the main power supply being reversely fed.
[0050] The backup power supply circuit includes a backup power supply and a filter circuit connected in sequence, as shown in Figure 4 The backup power supply is a farad capacitor CJ1, the positive electrode of the farad capacitor CJ1 is connected with the output end of the current-limiting anti-reverse circuit, the negative electrode of the farad capacitor CJ1 is grounded, the filter circuit includes a capacitor C4 and a capacitor C5, the capacitor C4 and the capacitor C5 are connected in parallel to the two ends of the farad capacitor CJ1, and the non-grounded ends of the capacitor C4 and the capacitor C5 are connected with the VIN / EN pin end of the buck-boost converter U2.
[0051] As shown in Figure 4 The L1 pin end of the buck-boost converter U2 is connected with the L2 pin end thereof through an inductor L1, the PG pin end of the buck-boost converter U2 is connected with the VOUT pin end thereof through a resistor R14, the PGND pin end and the GND pin end of the buck-boost converter U2 are both grounded, the VINA pin end of the buck-boost converter U2 is grounded through a capacitor C11, the FB pin end of the buck-boost converter U2 is connected with the VOUT pin end thereof in sequence through a capacitor C9 and a resistor R8, the FB pin end of the buck-boost converter U2 is also connected with the VOUT pin end thereof through a resistor R9, the VOUT pin end of the buck-boost converter U2 is grounded in sequence through a resistor R9 and a resistor R12, the VOUT pin end of the buck-boost converter U2 is also grounded through a capacitor C6, the two ends of the capacitor C6 are connected in parallel with a capacitor C7 and a capacitor C8, and the VOUT pin end of the buck-boost converter U2 is used to be connected with a subsequent circuit.
[0052] In some illustrative embodiments, the model of the buck-boost converter U2 is TPS630 series, and in some specific examples, the model of the buck-boost converter U2 is TPS63020.
[0053] As shown in Figure 2As shown, the power failure detection circuit includes a photo-coupler U3, a first pin end of the photo-coupler U3 is connected with a positive pole of a main power supply through a resistor RA, the positive pole of the main power supply is a third pin end of a main power supply JP1, a second pin end of the photo-coupler U3 is connected with a negative pole of the main power supply, the negative pole of the main power supply is a second pin end of the main power supply JP1, a fourth pin end of the photo-coupler U3 is connected with a backup power supply, that is, connected with a positive pole of a farad capacitor CJ1, a third pin end of the photo-coupler U3 is connected with the ground in sequence through a resistor RB and a resistor RC, and one end of the resistor RB close to the resistor RC is connected with a main control unit.
[0054] The resistors RB and RC constitute a voltage division network, and convert the photo-coupler output signal into a recognizable standard logic level without an additional level conversion chip.
[0055] As shown in the figure, Figure 2 The overvoltage switching circuit includes an operational amplifier U4, a first pin end of the operational amplifier U4 is connected with a PS pin end of the boost-buck converter U2, a fourth pin end of the operational amplifier U4 is connected with the ground, an eighth pin end of the operational amplifier U4 is connected with a positive pole of the backup power supply, that is, connected with a positive pole of the farad capacitor CJ1, a third pin end of the operational amplifier U4 is connected with a 5V voltage through a resistor RF, one side of the resistor RF connected with the third pin end of the operational amplifier U4 is further connected with a resistor RG and then connected with the ground, the third pin end of the photo-coupler U3 is further connected with the ground in sequence through a resistor RD and a resistor RE, and a second pin end of the operational amplifier U4 is connected with one end of the resistor RD close to the resistor RE.
[0056] The operational amplifier U4 and the resistors RD-RE / RF-RG constitute a window comparator, and the backup power supply full voltage threshold value can be accurately set by adjusting the resistance value of the resistor RE; the resistors RD-RE network also has a leakage current discharge function, and when the switching is to the pre-charging mode, the pre-charging current can compensate the network loss, so as to avoid the voltage drop of the backup power supply.
[0057] In some embodiments, the photo-coupler U3 can be selected from a general photo-coupler, a high-speed photo-coupler or a solid-state relay, and the selection can be determined according to the specific application scene, and the application scene is not limited here.
[0058] In some illustrative embodiments, the model of the operational amplifier U4 is selected from LM358.
[0059] The working principle of the application is as follows: Figure 1As shown, the main power supply circuit supplies power to the subsequent circuit, and at the same time, the main power supply circuit pre-charges the backup power supply in the backup power supply circuit through the current-limiting anti-reverse circuit. Since the backup power supply circuit is connected with the boost-buck converter, when the backup power supply voltage is pre-charged to the minimum starting voltage of the boost-buck converter, the main power supply circuit supplies power to the backup power supply in reverse through the boost-buck converter. Since the reverse charging current is much larger than the pre-charging current, the backup power supply can be quickly charged in a short time. When the main power supply circuit is powered off, the backup power supply circuit supplies power to the subsequent circuit through the positive buck converter.
[0060] As shown in Figure 1 As shown, the power failure detection circuit is connected with the main power supply circuit, the backup power supply circuit and the master control unit respectively. When the main power supply of the main power supply circuit is powered off, the GPIO port connected with the power failure detection circuit of the master control unit is lowered from high level to low level, and is raised to high level again when the main power supply of the main power supply circuit is powered on. Thus, it can be judged whether the main power supply circuit is powered off. When the main power supply circuit is detected to be powered off, the master control unit needs to arrange the uploading and saving of necessary data. As shown in Figure 2 As shown, the first pin and the second pin of the optocoupler U3 are connected with the positive and negative of the main power supply respectively, the fourth pin of the optocoupler U3 is connected with the positive of the backup power supply, and the middle end of the resistor RB and the resistor RC is connected with the GPIO port of the master control unit. Therefore, when the main power supply is powered on, the optocoupler U3 is turned on, and the connection with the GPIO port is raised to high level. When the main power supply is powered off, the optocoupler U3 is not turned on, and the connection with the GPIO port is low voltage to ground.
[0061] As shown in Figure 1 As shown, the overvoltage switching circuit is connected with the power failure detection circuit, the backup power supply circuit and the boost-buck converter respectively. When the overvoltage switching circuit detects that the backup power supply voltage is greater than the preset voltage value, the overvoltage switching circuit outputs low level to the boost-buck converter, and then the boost-buck converter immediately stops reverse working. The main power supply circuit cannot quickly charge the backup power supply in reverse through the boost-buck converter, and then automatically switches to pre-charge the backup power supply through the current-limiting anti-reverse circuit. Specifically, as shown in Figure 2As shown, the third pin end of the photocoupler U3 is connected with the resistor RD and the resistor RE by branch, thereby detecting the voltage at the backup power supply, and the overvoltage switching circuit is formed by the resistor RD, the resistor RE, the resistor RF, the resistor RG and the operational amplifier U4 as a comparator, when the voltage at the second pin end of the operational amplifier U4 is greater than the preset voltage, the first pin end of the operational amplifier U4 outputs low level to the PS pin end of the boost-buck converter, specifically, the preset voltage is the full voltage of the backup power supply, which can be flexibly set by adjusting the resistance value of the resistor RE, when the reverse charging path is disconnected, the main power supply circuit still pre-charges the backup power supply through a small current, but since the resistor RD and the resistor RE are connected to ground, there is a leakage current here, and the operational amplifier U4 also has a certain leakage current, therefore the leakage current can be compensated by the pre-charging current, when the pre-charging current is less than the discharge current, the voltage at the backup power supply is lower than the preset voltage, at this time the first pin end of the operational amplifier U4 outputs high level to the PS pin end of the boost-buck converter, and the main power supply circuit again rapidly reversely charges the backup power supply through the boost-buck converter.
[0062] Therefore, by the integrated setting of the power-down detection circuit and the overvoltage switching circuit, the charging-off and the power-down detection can be realized by a single GPIO, thereby saving the hardware resources, the seamless switching of the path of the main power supply and the backup power supply is realized by pure hardware logic, and the full-pressure self-stopping charging of the backup power supply is realized, thereby eliminating the software dependent risk, and meanwhile, the entire power-down detection circuit and the overvoltage switching circuit only use one photocoupler, one operational amplifier and seven resistors, thereby avoiding using high-cost special management chips, and the cost is low and the connection relationship is simple.
[0063] The above only describes the preferred embodiments of the present application, and it should be noted that for those skilled in the art, without departing from the technical principles of the present application, a number of improvements and modifications can be made, and these improvements and modifications should also be considered as the protection scope of the present application.
Claims
1. A single GPIO based dual power seamless switchover and overcharge protection circuit, characterized in that, The application relates to a power supply circuit, which comprises a main power supply circuit, a backup power supply circuit, a power-off detection circuit and an overvoltage switching circuit. The main power supply circuit is used for supplying power to a subsequent circuit and is connected with the backup power supply circuit through a current-limiting anti-reverse circuit to pre-charge the backup power source. The backup power supply circuit is connected with the subsequent circuit through a step-up and step-down converter, and is used for charging the backup power source through the step-up and step-down converter when the voltage of the backup power source is pre-charged to the minimum starting voltage of the step-up and step-down converter, and is used for supplying power to the subsequent circuit through the step-up and step-down converter when the main power source is powered off. The power-off detection circuit is connected with the main power supply circuit and the backup power supply circuit, and is electrically connected with the IO port of a master control unit, and is used for detecting whether the main power source is powered off. The overvoltage switching circuit is connected with the power-off detection circuit, the backup power supply circuit and the step-up and step-down converter, and is used for cutting off the reverse charging loop of the backup power source and switching back to the pre-charging loop when the backup power source is charged to the full voltage state. The step-up and step-down converter is a TPS630 series. The power-off detection circuit comprises an optical coupler U3, the first pin end of the optical coupler U3 is connected with the positive pole of the main power source through a resistor RA, the second pin end of the optical coupler U3 is connected with the negative pole of the main power source, the fourth pin end of the optical coupler U3 is connected with the backup power source, the third pin end of the optical coupler U3 is grounded through a resistor RB and a resistor RC in sequence, one end of the resistor RB is connected with the third pin end of the optical coupler U3, and the other end of the resistor RB is connected with the IO port of the master control unit. The overvoltage switching circuit comprises an operational amplifier U4, the first pin end of the operational amplifier U4 is connected with the PS pin end of the step-up and step-down converter, the fourth pin end of the operational amplifier U4 is grounded, the eighth pin end of the operational amplifier U4 is connected with the positive pole of the backup power source, the third pin end of the operational amplifier U4 is connected with a 5V voltage through a resistor RF, the side of the resistor RF connected with the third pin end of the operational amplifier U4 is further connected with a resistor RG and then grounded, the third pin end of the optical coupler U3 is further grounded through a resistor RD and a resistor RE in sequence, one end of the resistor RD is connected with the third pin end of the optical coupler U3, and the other end of the resistor RD is connected with the second pin end of the operational amplifier U4.
2. The single GPIO based dual power seamless switchover and overcharge protection circuit according to claim 1, wherein, The main power supply circuit comprises a main power source, the main power source is connected with the input end of the current-limiting anti-reverse circuit through a reverse protection circuit, an isolation filter circuit and a voltage stabilizing circuit in sequence, the output end of the voltage stabilizing circuit is connected with the input end of the reverse prevention circuit, and the output end of the reverse prevention circuit is connected with the subsequent circuit.
3. The single GPIO based dual power seamless switchover and overcharge protection circuit according to claim 2, wherein, The current-limiting anti-reverse circuit comprises a resistor R6 and a diode D3, one end of the resistor R6 is connected with the output end of the voltage stabilizing circuit, the other end of the resistor R6 is connected with the anode of the diode D3, and the cathode of the diode D3 is connected with the backup power supply circuit.
4. The single GPIO based dual supply seamless switchover and overcharge protection circuit of claim 1, wherein, The backup power supply circuit comprises a backup power source and a filter circuit connected in sequence, the positive pole of the backup power source is connected with the output end of the current-limiting anti-reverse circuit, and the output end of the filter circuit is connected with the VIN / EN pin end of the step-up and step-down converter.
5. The single GPIO based dual power seamless switchover and overcharge protection circuit according to claim 4, wherein, The standby power supply is a farad capacitor, a positive electrode of the farad capacitor is connected with an output end of the current-limiting anti-reverse circuit, a negative electrode of the farad capacitor is grounded, the filter circuit comprises a capacitor C4 and a capacitor C5, the capacitor C4 and the capacitor C5 are connected in parallel to two ends of the farad capacitor, and non-grounded ends of the capacitor C4 and the capacitor C5 are connected with a VIN / EN pin end of the buck-boost converter.
Citation Information
Patent Citations
Dual-channel DC power supply automatic switching device
CN105119365A
Switching control device for main and standby power sources
CN201830014U