Control device for switching power supply and switching power supply
By integrating a transformer and a controllable switch into the switching power supply, and combining this with processor control, the size problem caused by the independent setting of the switching power supply and the current fingerprint module is solved, thus realizing the generation of current fingerprints and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
- Filing Date
- 2021-08-17
- Publication Date
- 2026-06-26
AI Technical Summary
Existing switching power supply products require separate setup of the switching power supply and current fingerprint module, resulting in a large product size.
The power supply integrates a transformer, a controllable switch, and a processor. The processor controls the on/off state of the controllable switch to generate a current fingerprint, thus avoiding the need for a separate current fingerprint module.
This technology enables the generation of current fingerprints at the input of switching power supplies, reducing product size and lowering costs.
Smart Images

Figure CN115706533B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of switching power supply technology, and in particular to a control device for a switching power supply and a switching power supply. Background Technology
[0002] With the continuous development of electronic technology, more and more hardware products based on current fingerprint technology are emerging. These products can realize the access and operation status diagnosis of electrical appliances by extracting and analyzing current fingerprints. For example, in the research of wireless smart energy meters and external circuit breaker wireless technology, Bluetooth communication technology is usually used to generate current fingerprints on the line that can be used for communication. The operation status of the energy meter is detected by analyzing the current fingerprints.
[0003] Currently, in products with switching power supplies, an additional current fingerprint module is required to generate current fingerprints. Furthermore, existing technologies typically add a current encoding circuit to the circuit breaker, which includes a series-connected switch K1 and a load RL to generate the fingerprint current. While this approach can generate current fingerprints, the need for separate switching power supplies and current fingerprint modules results in a larger product size. Summary of the Invention
[0004] The main objective of this invention is to provide a control device and a switching power supply for a switching power supply, aiming to solve the technical problem that existing products with switching power supplies require separate installation of the switching power supply and current fingerprint module, resulting in a large product size.
[0005] To achieve the above objectives, a first aspect of the present invention provides a control device for a switching power supply, the control device comprising:
[0006] A transformer includes a primary winding, a first secondary winding, and a second secondary winding;
[0007] The first controllable switch is connected in series with the primary winding;
[0008] Energy storage devices;
[0009] A charging device, including a second controllable switch, is electrically connected to a first secondary winding and is used to transmit the electrical energy generated by the first secondary winding to an energy storage device.
[0010] A discharge device, including a third controllable switch, is electrically connected to a second secondary winding for transmitting electrical energy stored in the energy storage device to the primary winding via the second secondary winding; and
[0011] The processor is configured as follows:
[0012] Determine the operating mode of the switching power supply;
[0013] When the switching power supply is in discharge mode, the first controllable switch is kept on, the second controllable switch is turned off, and a PWM signal is sent to the third controllable switch.
[0014] In this embodiment of the invention, the processor is further configured to:
[0015] When the switching power supply is in charging mode, a PWM signal is sent to the first controllable switch to control the second controllable switch to remain on and to control the third controllable switch to be off.
[0016] In this embodiment of the invention, the processor is further configured to:
[0017] When the switching power supply is in hold mode, the first controllable switch, the second controllable switch, and the third controllable switch are disconnected respectively.
[0018] In this embodiment of the invention, the charging device further includes:
[0019] The first diode has its anode electrically connected to the first terminal of the first secondary winding, and its cathode electrically connected to the first terminal of the energy storage device.
[0020] The first driving device has its input terminal electrically connected to the input / output port of the processor, and its output terminal electrically connected to the controlled terminal of the second controllable switch.
[0021] In this embodiment of the invention, the second controllable switch includes a first NMOS transistor, the gate of which is electrically connected to the output terminal of the first driving device, the source of which is electrically connected to the second terminal of the energy storage device, and the drain of which is electrically connected to the second terminal of the first secondary winding.
[0022] In this embodiment of the invention, the first driving device includes:
[0023] The collector of the first transistor is used to apply a positive voltage, and the emitter of the first transistor is electrically connected to the gate of the first NMOS transistor.
[0024] The first resistor is connected in series between the collector and base of the first transistor;
[0025] The emitter of the second transistor is electrically connected to the emitter of the first transistor, the base of the second transistor is electrically connected to the base of the first transistor, and the collector of the second transistor is electrically connected to the source of the first NMOS transistor.
[0026] The collector of the third transistor is electrically connected to the base of the second transistor. The base of the third transistor is used to output a positive voltage, and the emitter of the third transistor is used as the input terminal of the first driving device.
[0027] In this embodiment of the invention, the first transistor and the third transistor are NPN transistors, and the second transistor is a PNP transistor.
[0028] In this embodiment of the invention, the first driving device further includes:
[0029] The second resistor and the base of the third transistor are used to output a positive voltage through the second resistor;
[0030] The emitter of the third transistor is electrically connected to the first end of the third resistor, and the second end of the third resistor is used as the input terminal of the first driving device.
[0031] In this embodiment of the invention, the discharge device further includes:
[0032] The anode of the second diode is electrically connected to the first terminal of the second secondary winding, and the cathode of the second diode is electrically connected to the second terminal of the energy storage device.
[0033] The second driving device has its input terminal electrically connected to the first PWM signal output port of the processor, and its output terminal electrically connected to the controlled terminal of the third controllable switch.
[0034] In this embodiment of the invention, the third controllable switch includes a PMOS transistor, the gate of which is electrically connected to the output terminal of the second driving device, the source of which is electrically connected to the first terminal of the energy storage device, and the drain of which is electrically connected to the second terminal of the second secondary winding.
[0035] In this embodiment of the invention, the second driving device includes:
[0036] The emitter of the fourth transistor is used as the output terminal of the second driving device, and the collector of the fourth transistor is grounded.
[0037] The emitter of the fifth transistor is electrically connected to the emitter of the fourth transistor, the collector of the fifth transistor is electrically connected to the source of the PMOS transistor, and the base of the fifth transistor is electrically connected to the base of the fourth transistor.
[0038] The fourth resistor is connected in series between the collector and base of the fifth transistor;
[0039] The collector of the sixth transistor is electrically connected to the base of the fourth transistor. The base of the sixth transistor is used as the input terminal of the second driving device, and the emitter of the sixth transistor is grounded.
[0040] In this embodiment of the invention, the fourth transistor is a PNP transistor, and the fifth and sixth transistors are NPN transistors.
[0041] In this embodiment of the invention, the second driving device further includes:
[0042] The emitter of the fourth transistor is electrically connected to the first terminal of the fifth resistor, and the second terminal of the fifth resistor is used as the output terminal of the second driving device.
[0043] The base of the sixth transistor is electrically connected to the first terminal of the sixth resistor, and the second terminal of the sixth resistor is used as the input terminal of the second driving device.
[0044] In this embodiment of the invention, the control device further includes:
[0045] The third driving device has its input terminal electrically connected to the second PWM signal output port of the processor, and its output terminal electrically connected to the controlled terminal of the first controllable switch.
[0046] The processor is also configured to:
[0047] The first controllable switch is turned on and off by a third driving device.
[0048] In this embodiment of the invention, the first controllable switch includes a second NMOS transistor, the source of the second NMOS transistor is grounded, the gate of the second NMOS transistor is electrically connected to the output terminal of the third driving device, and the drain of the second NMOS transistor is electrically connected to the first terminal of the primary winding.
[0049] In this embodiment of the invention, the third driving device includes:
[0050] The seventh resistor has its first end electrically connected to the second PWM signal output port and its second end electrically connected to the gate of the second NMOS transistor.
[0051] In this embodiment of the invention, the control device further includes:
[0052] A rectifier, electrically connected to the primary winding, is used to obtain alternating current and perform half-wave rectification on the alternating current;
[0053] The processor is also configured to:
[0054] During the positive half-cycle of the AC current, a PWM signal is sent to the first controllable switch to control the second controllable switch to remain on and to control the third controllable switch to be off.
[0055] During the negative half-cycle of the AC power, the first controllable switch is kept on, the second controllable switch is turned off, and a PWM signal is sent to the third controllable switch.
[0056] In this embodiment of the invention, the rectifier includes a third diode, the anode of which is used to connect to alternating current, and the cathode of which is connected to the second end of the primary winding.
[0057] In this embodiment of the invention, the control device further includes:
[0058] Input voltage sampling device, used to collect the input voltage signal of alternating current;
[0059] Output voltage sampling device, used to collect the output voltage signal of switching power supply;
[0060] The processor is configured to determine the operating mode of the switching power supply, including: The processor is configured to:
[0061] Acquire the input voltage signal and the output voltage signal;
[0062] The operating mode of the switching power supply is determined based on the input voltage signal and the output voltage signal.
[0063] In this embodiment of the invention, the output voltage sampling device includes:
[0064] The eighth resistor has its first terminal electrically connected to the first terminal of the energy storage device.
[0065] The ninth resistor has its first terminal electrically connected to the second terminal of the eighth resistor, and its second terminal is grounded.
[0066] The first bidirectional protection diode has its first terminal electrically connected to the second terminal of the eighth resistor, and its second terminal is grounded.
[0067] The tenth resistor has its first end electrically connected to the first end of the first bidirectional protection diode, and its second end electrically connected to the second analog-to-digital converter port.
[0068] The first capacitor has its first terminal electrically connected to the second analog-to-digital converter port, and its second terminal grounded.
[0069] In this embodiment of the invention, the control device further includes:
[0070] A voltage absorption device is connected in series across the primary winding to absorb voltage spikes generated by the transformer when the first controllable switch is open.
[0071] In this embodiment of the invention, the voltage absorption device includes:
[0072] The eleventh resistor, the first end of which is electrically connected to the rectifier;
[0073] The first terminal of the second capacitor is electrically connected to the first terminal of the eleventh resistor and the second terminal of the primary winding, respectively.
[0074] The twelfth resistor has its first terminal electrically connected to the second terminal of the second capacitor, and its second terminal is electrically connected to the second terminal of the eleventh resistor.
[0075] The fourth diode has its cathode electrically connected to the second terminal of the eleventh resistor, and its anode electrically connected to the first terminal of the primary winding.
[0076] In this embodiment of the invention, the control device further includes:
[0077] The DC power supply equipment is electrically connected to the first end of the primary winding and the power supply port of the processor, respectively. It is used to obtain voltage from the first end of the primary winding, convert the obtained voltage, obtain the converted voltage, and output the converted voltage to the processor.
[0078] In this embodiment of the invention, the DC power supply device includes:
[0079] DC power supply equipment includes:
[0080] The thirteenth resistor, the first end of the thirteenth resistor is electrically connected to the first end of the primary winding;
[0081] The fourteenth resistor has its first terminal electrically connected to the second terminal of the thirteenth resistor.
[0082] The anode of the fifth diode is electrically connected to the second terminal of the fourteenth resistor;
[0083] The sixth diode has its cathode electrically connected to the cathode of the fifth diode, and its anode is grounded.
[0084] The third capacitor has its first terminal electrically connected to the cathode of the fifth diode, while its anode is grounded.
[0085] In this embodiment of the invention, the control device further includes:
[0086] The primary current monitoring device is electrically connected to the processor's third analog-to-digital converter port and the first controllable switch, respectively, and is used to collect the primary current signal of the transformer and send the primary current signal to the processor.
[0087] The processor is also configured to:
[0088] Receive the primary current signal;
[0089] If the value of the primary current signal is detected to be greater than the preset current, the first controllable switch is opened.
[0090] In this embodiment of the invention, the primary-side current monitoring device includes:
[0091] Primary current monitoring equipment includes:
[0092] The fifteenth resistor, with its first terminal electrically connected to the third analog-to-digital converter port;
[0093] The second bidirectional protection diode has its first terminal electrically connected to the second terminal of the fifteenth resistor, and its second terminal is grounded.
[0094] The sixteenth resistor has its first end electrically connected to the first controllable switch and the second end of the fifteenth resistor, and its second end is grounded.
[0095] The seventeenth resistor has its first terminal electrically connected to the first terminal of the sixteenth resistor, and its second terminal grounded.
[0096] The fourth capacitor has its first terminal electrically connected to the first terminal of the fifteenth resistor, and its second terminal is grounded.
[0097] A second aspect of the present invention provides a switching power supply, the switching power supply including the control device for the switching power supply described above.
[0098] This invention, through the integration of a control device into a switching power supply, includes: a transformer comprising a primary winding, a first secondary winding, and a second secondary winding; a first controllable switch connected in series with the primary winding; an energy storage device; a charging device including a second controllable switch, electrically connected to the first secondary winding, for transmitting electrical energy generated by the first secondary winding to the energy storage device; a discharging device including a third controllable switch, electrically connected to the second secondary winding, for transmitting electrical energy stored in the energy storage device to the primary winding via the second secondary winding; and a processor configured to: determine the operating mode of the switching power supply; when the operating mode of the switching power supply is in discharging mode, control the first controllable switch to remain on, control the second controllable switch to be off, and send a PWM signal to the third controllable switch. By integrating hardware devices into the switching power supply and combining them with processor control, a current fingerprint is generated at the input of the power supply, avoiding the problem of large product size caused by independently setting up the power supply and current fingerprint module.
[0099] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0100] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0101] Figure 1 This is a functional block diagram of an embodiment of the control device for a switching power supply according to the present invention;
[0102] Figure 2 This is a functional block diagram of another embodiment of the control device for a switching power supply of the present invention;
[0103] Figure 3 This is a functional block diagram of another embodiment of the control device for a switching power supply of the present invention;
[0104] Figure 4 This is a functional block diagram of another embodiment of the control device for a switching power supply of the present invention;
[0105] Figure 5 This is a functional block diagram of another embodiment of the control device for a switching power supply of the present invention;
[0106] Figure 6 This is a functional block diagram of another embodiment of the control device for a switching power supply of the present invention;
[0107] Figure 7 This is a functional block diagram of another embodiment of the control device for a switching power supply of the present invention;
[0108] Figure 8 This is a schematic diagram of an embodiment of the control device for a switching power supply according to the present invention.
[0109] Explanation of icon numbers:
[0110]
[0111] Detailed Implementation
[0112] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0113] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.
[0114] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0115] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0116] This invention provides a control device for a switching power supply.
[0117] Reference Figure 1 , Figure 1 This is a functional block diagram of an embodiment of the control device for a switching power supply according to the present invention.
[0118] In this embodiment of the invention, the control device may include a transformer T, including a primary winding (not shown), a first secondary winding (not shown), and a second secondary winding (not shown); a first controllable switch K1, connected in series with the primary winding; an energy storage device 300; a charging device 100, including a second controllable switch K2, electrically connected to the first secondary winding, for transmitting electrical energy generated by the first secondary winding to the energy storage device 300; a discharging device 200, including a third controllable switch K3, electrically connected to the second secondary winding, for transmitting electrical energy stored in the energy storage device 300 to the primary winding through the second secondary winding; and a processor MCU, configured to: determine the operating mode of the switching power supply; when the operating mode of the switching power supply is in the discharging mode, control the first controllable switch K1 to remain on, control the second controllable switch K2 to be off, and send a pulse width modulation (PWM) signal to the third controllable switch K3.
[0119] It should be noted that existing switching power supplies can output power after a load is connected, but they cannot generate a current fingerprint at the input terminal using the switching power supply itself. Current research on wireless smart meters and external circuit breakers typically relies on Bluetooth communication technology and includes a separate current fingerprint module in the circuit to generate a current fingerprint applicable to communication. This invention, based on the existing switching power supply structure, only requires the addition of a charging device 100 and a discharging device 200 to generate a current fingerprint at the input terminal of the switching power supply, reducing size and product cost.
[0120] In one example, the switching power supply is a flyback switching power supply. A flyback switching power supply means that when the primary winding of the transformer is excited by a DC pulse voltage, the secondary winding of the transformer does not provide power output to the load. Only after the excitation voltage of the primary winding of the transformer is turned off does the secondary winding of the transformer provide power output to the load.
[0121] A transformer (T) is a device that uses the principle of electromagnetic induction to change alternating current voltage. Its main components are the primary winding, secondary winding, and magnetic core. The main functions of a transformer include voltage transformation, current transformation, impedance transformation, isolation, and voltage stabilization.
[0122] The processor MCU can have at least three analog-to-digital conversion ports, two PWM signal output ports, and one input / output port. It can use a processor with a Cortex-M0 core, Cortex-M3 core, or other types of processors. This embodiment of the invention does not limit this.
[0123] The energy storage device 300 is a component for storing electrical energy. It can be a single capacitor or multiple capacitors. The specific number of capacitors can be determined according to the product and the size of the capacitors.
[0124] In the specific implementation, the first controllable switch K1 is electrically connected to the second PWM signal output port G3 of the processor MCU, the second controllable switch K2 is electrically connected to the input / output port G1 of the processor MCU, and the third controllable switch K3 is electrically connected to the first PWM signal output port G2 of the processor MCU. The processor MCU controls the three controllable switches separately through the above three ports.
[0125] Furthermore, the processor MCU is also configured to: send a PWM signal to the first controllable switch K1, control the second controllable switch K2 to remain on, and control the third controllable switch K3 to be off when the switching power supply is in charging mode.
[0126] In one example, the duty cycle of the PWM signal sent by the processor MCU does not exceed 50%. When the duty cycle exceeds 50%, it can easily lead to excessive current in the switching power supply, which in turn can burn out the switching power supply.
[0127] Furthermore, the processor MCU is also configured to: when the switching power supply is in hold mode, control the first controllable switch K1, the second controllable switch K2 and the third controllable switch K3 to disconnect respectively.
[0128] By controlling three controllable switches through the processor MCU, the energy storage device 300 can be programmed to charge when the switching power supply is in charging mode, neither charge nor discharge when the switching power supply is in holding mode, and discharge when the switching power supply is in discharging mode. When the energy storage device 300 discharges, it generates current pulses on the primary side of the transformer T. Regularly controlling the charging and discharging rhythm produces regular current pulses, which can be used as a current fingerprint for communication.
[0129] The hardware design of this embodiment differs from that of traditional AC / DC switching power supplies. In addition to adding a charging device 100 and a discharging device 200, it does not use a dedicated PWM control chip, but instead uses a processor MCU for control. The control process can be implemented more flexibly through software programming.
[0130] This invention embodiment includes a control device in the switching power supply. The control device comprises: a transformer T, including a primary winding, a first secondary winding, and a second secondary winding; a first controllable switch K1, connected in series with the primary winding; an energy storage device 300; a charging device 100, including a second controllable switch K2, electrically connected to the first secondary winding, for transmitting electrical energy generated by the first secondary winding to the energy storage device 300; a discharging device 200, including a third controllable switch K3, electrically connected to the second secondary winding, for transmitting electrical energy stored in the energy storage device 300 to the primary winding via the second secondary winding; and a processor MCU configured to: determine the operating mode of the switching power supply; when the operating mode of the switching power supply is in the discharging mode, control the first controllable switch K1 to remain on, control the second controllable switch K2 to be off, and send a PWM signal to the third controllable switch K3. By integrating hardware devices into the switching power supply and combining them with the control of the processor MCU, a current fingerprint is generated at the input of the power supply, avoiding the problem of large product size caused by setting up the power supply and current fingerprint modules separately.
[0131] Figure 2 This is a functional block diagram of another embodiment of the control device for a switching power supply according to the present invention. (Refer to...) Figure 2In this embodiment of the invention, the charging control unit may include: a first diode D1, the anode of the first diode D1 being electrically connected to the first end of the first secondary winding, and the cathode of the first diode D1 being electrically connected to the first end of the energy storage device 300; a first driving device 110, the input end of the first driving device 110 being electrically connected to the input / output port G1 of the processor MCU, and the output end of the first driving device 110 being electrically connected to the controlled end of the second controllable switch K2.
[0132] Reference Figure 2 and Figure 8 In one example, the second controllable switch K2 may include a first NMOS transistor, the gate of which is electrically connected to the output terminal of the first driving device 110, the source of which is electrically connected to the second terminal of the energy storage device 300, and the drain of which is electrically connected to the second terminal of the first secondary winding.
[0133] In one example, the first driving device 110 may include: a first transistor Q1, the collector of which is used to receive a positive voltage, and the emitter of which is electrically connected to the gate of a first NMOS transistor; a first resistor R1, connected in series between the collector and base of the first transistor Q1; a second transistor Q2, the emitter of which is electrically connected to the emitter of the first transistor Q1, the base of which is electrically connected to the base of the first transistor Q1, and the collector of which is electrically connected to the source of the first NMOS transistor; and a third transistor Q3, the collector of which is electrically connected to the base of the second transistor Q2, the base of which is used to output a positive voltage, and the emitter of which is used as an input terminal of the first driving device 110.
[0134] Among them, the first transistor Q1 and the third transistor Q3 are NPN transistors, and the second transistor Q2 is a PNP transistor.
[0135] In another example, the first driving device 110 may further include: a second resistor R2, the base of the third transistor Q3 being used to output a positive voltage through the second resistor R2; a third resistor R3, the emitter of the third transistor Q3 being electrically connected to the first end of the third resistor R3, and the second end of the third resistor R3 being used as the input terminal of the first driving device 110.
[0136] It should be understood that MOS transistors are divided into PMOS transistors and NMOS transistors. An NMOS transistor refers to a transistor with an N-type metal-oxide-semiconductor (NMOS) structure. A PMOS transistor refers to a MOS transistor with an N-type substrate and a P-channel, which carries current through the flow of holes.
[0137] In this embodiment of the invention, the discharge device 200 may further include: a second diode D2, the anode of the second diode D2 being electrically connected to the first end of the second secondary winding, and the cathode of the second diode D2 being electrically connected to the second end of the energy storage device 300; and a second driving device 210, the input end of the second driving device 210 being electrically connected to the first PWM signal output port G2 of the processor MCU, and the output end of the second driving device 210 being electrically connected to the controlled end of the third controllable switch K3.
[0138] In one example, the third controllable switch K3 may include a PMOS transistor, the gate of which is electrically connected to the output terminal of the second driving device 210, the source of which is electrically connected to the first terminal of the energy storage device 300, and the drain of which is electrically connected to the second terminal of the second secondary winding.
[0139] In a specific implementation, the first NMOS transistor and PMOS transistor can be AO4611 or other types of MOS transistors, and the embodiments of the present invention do not limit this.
[0140] In one example, the second driving device 210 may include: a fourth transistor Q4, the emitter of which serves as the output terminal of the second driving device 210, and the collector of which is grounded; a fifth transistor Q5, the emitter of which is electrically connected to the emitter of the fourth transistor Q4, the collector of which is electrically connected to the source of the PMOS transistor, and the base of which is electrically connected to the base of the fourth transistor Q4; a fourth resistor R4, which is connected in series between the collector and the base of the fifth transistor Q5; and a sixth transistor Q6, the collector of which is electrically connected to the base of the fourth transistor Q4, the base of which serves as the input terminal of the second driving device 210, and the emitter of which is grounded.
[0141] Among them, the fourth transistor Q4 is a PNP transistor, while the fifth transistor Q5 and the sixth transistor Q6 are NPN transistors.
[0142] In another example, the second driving device may further include: a fifth resistor R5, the emitter of the fourth transistor Q4 being electrically connected to the first end of the fifth resistor R5, and the second end of the fifth resistor R5 serving as the output terminal of the second driving device 210; and a sixth resistor R6, the base of the sixth transistor Q6 being electrically connected to the first end of the sixth resistor R6, and the second end of the sixth resistor R6 serving as the input terminal of the second driving device 210.
[0143] It should be noted that due to the limited driving capability of the processor MCU itself, additional driving devices are needed to indirectly control the second controllable switch K2 and the third controllable switch K3. The first driving device 110 and the second driving device 210 mentioned above adopt a push-pull structure. The push-pull structure can use a combination of SS8550 and SS8050 transistors, keeping the circuit delay within 1µs. Of course, other types of transistors can also be used, and even the first driving device 110 and the second driving device 210 can each use only a single resistor to drive the controllable switches. Driving the controllable switches using a push-pull structure provides better driving performance.
[0144] In this embodiment of the invention, the control device may further include: a third driving device 400, the input terminal of the third driving device 400 being electrically connected to the second PWM signal output port G3 of the processor MCU, and the output terminal of the third driving device 400 being electrically connected to the controlled terminal of the first controllable switch K1; the processor MCU is further configured to control the on / off state of the first controllable switch K1 through the third driving device 400.
[0145] In one example, the first controllable switch K1 may include a second NMOS transistor, the source of which is grounded, the gate of which is electrically connected to the output of the third driving device 400, and the drain of which is electrically connected to the first end of the primary winding.
[0146] In one example, the third driving device 400 may include: a seventh resistor R7, the first end of which is electrically connected to the second PWM signal output port G3, and the second end of which is electrically connected to the gate of the second NMOS transistor.
[0147] In a specific implementation, the second NMOS transistor can be IN60 or other types of MOS transistors, and the embodiments of the present invention do not limit this.
[0148] The embodiments of the present invention improve the driving capability of the controllable switch through the specific design of hardware such as the charging device 100 and the discharging device 200 in the control device, and ensure the effective control of the controllable switch by the processor MCU.
[0149] Figure 3 This is a functional block diagram of another embodiment of the control device for a switching power supply according to the present invention. (Refer to...) Figure 3In this embodiment of the invention, the control device for the switching power supply may further include: a rectifier 500 electrically connected to the primary winding for acquiring AC power and performing half-wave rectification on the AC power; the processor MCU is further configured to: send a PWM signal to the first controllable switch K1 during the positive half-cycle of the AC power, control the second controllable switch K2 to remain on, and control the third controllable switch K3 to remain off; and control the first controllable switch K1 to remain on, control the second controllable switch K2 to remain off, and send a PWM signal to the third controllable switch K3 during the negative half-cycle of the AC power.
[0150] Reference Figure 3 and Figure 8 In one example, rectifier 500 may include a third diode D3, the anode of which is connected to AC power and the cathode of which is connected to the second end of the primary winding.
[0151] In a specific implementation, the third diode D3 can be an IN4007 or other types of diodes, and the embodiments of the present invention do not limit this.
[0152] The processor MCU controls the charging time of the energy storage device 300 during the positive half-cycle of the AC current, and the discharging time of the energy storage device 300 during the negative half-cycle of the AC current. When the energy storage device 300 discharges, it generates current pulses on the primary side of the transformer T. By regularly controlling the charging and discharging rhythm, regular current pulses are generated, which can be used as a current fingerprint for communication.
[0153] This invention provides a basis for charging and discharging energy storage device 300 by incorporating a rectifier device 500 in the control device for switching power supply, thereby achieving half-wave rectification of AC power.
[0154] Figure 4 This is a functional block diagram of another embodiment of the control device for a switching power supply according to the present invention. (Refer to...) Figure 4 In this embodiment of the invention, the control device for the switching power supply may further include: an input voltage sampling device 600 for acquiring the input voltage signal of AC power; an output voltage sampling device 700 for acquiring the output voltage signal of the switching power supply; and a processor MCU configured to determine the operating mode of the switching power supply including: acquiring the input voltage signal and the output voltage signal; and determining the operating mode of the switching power supply based on the input voltage signal and the output voltage signal.
[0155] In a specific implementation, the processor MCU is configured to determine the operating mode of the switching power supply based on the input voltage signal and the output voltage signal, including: the processor MCU is configured to: set a flag bit of the operating mode of the switching power supply based on the input voltage signal and the output voltage signal; poll the flag bit of the operating mode of the switching power supply at a preset period; and determine the operating mode of the switching power supply based on the polled flag bit.
[0156] Reference Figure 4 and Figure 8 In one example, the output voltage sampling device 700 may include: an eighth resistor R8, the first end of which is electrically connected to the first end of the energy storage device 300; a ninth resistor R9, the first end of which is electrically connected to the second end of the eighth resistor R8, and the second end of the ninth resistor R9 is grounded; a first bidirectional protection diode TVS1, the first end of which is electrically connected to the second end of the eighth resistor R8, and the second end of the first bidirectional protection diode TVS1 is grounded; a tenth resistor R10, the first end of which is electrically connected to the first end of the first bidirectional protection diode TVS1, and the second end of the tenth resistor is electrically connected to the second analog-to-digital converter port AD2; and a first capacitor C1, the first end of which is electrically connected to the second analog-to-digital converter port AD2, and the second end of the first capacitor C1 is grounded.
[0157] It should be understood that the processor MCU needs to have two analog-to-digital conversion interfaces. The analog output terminal needs to be connected in parallel with a limiting element, namely the first bidirectional protection diode TVS1. The first bidirectional protection diode TVS1 can be BAV99 or other models. This embodiment of the invention does not limit this.
[0158] It should be noted that after acquiring the input and output voltage signals, the processor MCU can determine the current operating mode based on these signals and set the corresponding mode flag. The processor MCU polls the operating mode flag and determines the operating mode of the switching power supply based on the polled flags.
[0159] It should be understood that the processor MCU, as the control core, stores the software program required to implement current fingerprinting. The program structure adopts a foreground / background system approach, with external event responses handled in interrupts and event processing returning to the polling system. The main program first initializes the device, including the clock, timers, A / D module, PWM module, GPIO module, etc., and then enters the main loop, where it polls the flags of the working state to process the corresponding operation. Interrupts are handled by timer interrupts, which collect the AC input voltage signal and the switching power supply output voltage signal to determine the current working state and set the corresponding state flags.
[0160] The main program steps are as follows:
[0161] (1) Device initialization;
[0162] (2) Detect the flag bit of the working status;
[0163] (3) When the flag indicates that the working state is charging, a PWM signal is sent to the first controllable switch K1 to control the second controllable switch K2 to be continuously turned on and the third controllable switch K3 to be turned off, so as to control the energy storage device to charge.
[0164] (4) When the flag indicates that the working state is in the hold state, cut-off signals are sent to the first controllable switch K1, the second controllable switch K2 and the third controllable switch K3 respectively to control the energy storage device to stop working.
[0165] (5) When the flag indicates that the working state is the discharge state, control the first controllable switch K1 to continue to be turned on, control the second controllable switch K2 to be turned off, and send a PWM signal to the third controllable switch K3 to control the energy storage device to discharge.
[0166] The interruption steps are as follows:
[0167] (1) Interrupt entry point;
[0168] (2) Check if the interrupt flag is set;
[0169] (3) Clear the interrupt flag if it is set;
[0170] (4) Determine whether the switching power supply meets the charging state conditions;
[0171] (5) Set the charging status flag when the switching power supply meets the charging status conditions;
[0172] (6) Determine whether the switching power supply meets the discharge state conditions;
[0173] (7) Set the discharge status flag bit when the switching power supply meets the discharge status conditions;
[0174] (8) Determine whether the switching power supply meets the holding state condition;
[0175] (9) Set the holding state flag bit when the switching power supply meets the holding state conditions;
[0176] (10) Exit interrupt.
[0177] This invention, by setting an input voltage sampling device 600 and an output voltage sampling device 700 in the control device for the switching power supply, enables the determination of the operating mode of the switching power supply based on the input voltage signal and the output voltage signal.
[0178] Figure 5 This is a functional block diagram of another embodiment of the control device for a switching power supply according to the present invention. (Refer to...) Figure 5 In this embodiment of the invention, the control device may further include a voltage absorption device 800 connected in series at both ends of the primary winding, for absorbing the peak voltage generated by the transformer T when the first controllable switch K1 is open.
[0179] Reference Figure 5 and Figure 8 In one example, the voltage absorption device 800 may include: an eleventh resistor R11, the first end of which is electrically connected to the rectifier device 500; a second capacitor C2, the first end of which is electrically connected to both the first end of the eleventh resistor R11 and the second end of the primary winding; a twelfth resistor R12, the first end of which is electrically connected to the second end of the second capacitor C2, and the second end of which is electrically connected to the second end of the eleventh resistor R11; and a fourth diode D4, the cathode of which is electrically connected to the second end of the eleventh resistor R11, and the anode of which is electrically connected to the first end of the primary winding.
[0180] In a specific implementation, the fourth diode D4 can be a fast recovery diode, such as US1M, or other types of diodes. This embodiment of the invention does not limit this.
[0181] The present invention provides an embodiment of a voltage absorption device 800 in the control device for a switching power supply, which can effectively absorb the peak voltage generated by the transformer T when the first controllable switch K1 is turned off, thereby protecting the transformer T and improving the stability and safety of the control device.
[0182] Figure 6 This is a functional block diagram of another embodiment of the control device for a switching power supply of the present invention, referred to... Figure 6 In this embodiment of the invention, the control device may further include a DC power supply device 900, which is electrically connected to the first end of the primary winding and the power supply port (not shown) of the processor MCU, respectively, for obtaining voltage from the first end of the primary winding, converting the obtained voltage to obtain the converted voltage, and outputting the converted voltage to the processor MCU.
[0183] Reference Figure 6 and Figure 8In one example, the DC power supply device 900 may include: a thirteenth resistor R13, the first end of which is electrically connected to the first end of the primary winding; a fourteenth resistor R14, the first end of which is electrically connected to the second end of the thirteenth resistor R13; a fifth diode D5, the anode of which is electrically connected to the second end of the fourteenth resistor R14; a sixth diode D6, the cathode of which is electrically connected to the cathode of the fifth diode D5, and the anode of which is grounded; and a third capacitor C3, the first end of which is electrically connected to the cathode of the fifth diode D5, and the anode of which is grounded.
[0184] In a specific implementation, the sixth diode D6 can be a Zener diode, which can be a GLZ8.2B or other types. This embodiment of the invention does not limit this.
[0185] It should be noted that the DC power supply device 900 can supply power not only to the processor MCU, but also to drive devices, such as connecting to the first drive device 110 to provide the first power supply VCC to the first drive device 110.
[0186] The embodiments of the present invention can realize the power supply of the processor MCU and the driving device by setting a DC power supply device in the control device for the switching power supply.
[0187] Figure 7 This is a functional block diagram of another embodiment of the control device for a switching power supply of the present invention, referred to... Figure 7 In this embodiment of the invention, the control device for the switching power supply may further include a primary current monitoring device 1000, which is electrically connected to the third analog-to-digital conversion port AD3 of the processor MCU and the first controllable switch K1, respectively, for collecting the primary current signal of the transformer T and sending the primary current signal to the processor MCU; the processor MCU is further configured to: receive the primary current signal; and control the first controllable switch K1 to open when the value of the primary current signal is detected to be greater than a preset current.
[0188] Reference Figure 7 and Figure 8In one example, the primary-side current monitoring device 1000 may include: a fifteenth resistor R15, the first end of which is electrically connected to the third analog-to-digital converter port AD3; a second bidirectional protection diode TVS2, the first end of which is electrically connected to the second end of the fifteenth resistor R15, and the second end of the second bidirectional protection diode TVS2 is grounded; a sixteenth resistor R16, the first end of which is electrically connected to the first controllable switch K1 and the second end of the fifteenth resistor R15, and the second end of the sixteenth resistor R16 is grounded; a seventeenth resistor R17, the first end of which is electrically connected to the first end of the sixteenth resistor R16, and the second end of the seventeenth resistor R17 is grounded; and a fourth capacitor C4, the first end of which is electrically connected to the first end of the fifteenth resistor R15, and the second end of the fourth capacitor C4 is grounded.
[0189] It should be understood that by monitoring the primary current signal, the first controllable switch K1 can be disconnected in time when the value of the primary current signal is greater than the preset value, thus avoiding damage to the first controllable switch K1 and improving the safety of the control device.
[0190] Figure 8 This is a schematic diagram of an embodiment of the control device for a switching power supply according to the present invention, with reference to... Figure 8 In this embodiment of the invention, the control device for the switching power supply may include a charging device 100, a discharging device 200, an energy storage device 300, a third driving device 400, a rectifier device 500, an output voltage sampling device 700, a voltage absorption device 800, a DC power supply device 900, a primary current monitoring device 1000, a processor MCU, and a transformer T, etc. The specific structure of each device can be referred to the diagram, and will not be described in detail here.
[0191] The processor MCU acts as the control core, controlling the on / off state of the controllable switch through three pins: input / output port G1, first PWM signal output port G2, and second PWM signal output port G3. Due to the limited driving capability of the processor MCU itself, a driver device is needed to indirectly control the controllable switch. The processor MCU and driver device are powered by a DC power supply device 900. The processor MCU acquires three analog signals: primary current I_PR, input voltage signal ADC_220V, and output voltage signal ADC_VISE. The sampling frequency is no less than the PWM signal frequency, and feedback control is performed by acquiring these analog signals.
[0192] The above design enables the switching power supply to generate current fingerprints while simultaneously outputting power, thus improving the scalability of the switching power supply.
[0193] This invention also proposes a switching power supply, which includes the control device for the switching power supply described in the above embodiments. The structure of the control device in the switching power supply can be referred to the above embodiments, and will not be repeated here; it is understood that since the switching power supply of this invention adopts the above-described technical solution for the control device for the switching power supply, the switching power supply has all the above-described beneficial effects.
[0194] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A control device for a switching power supply, characterized in that, include: A transformer includes a primary winding, a first secondary winding, and a second secondary winding; The first controllable switch is connected in series with the primary winding; Energy storage devices; A charging device includes a second controllable switch, the charging device being electrically connected to the first secondary winding, and used to transmit the electrical energy generated by the first secondary winding to the energy storage device; A discharge device, including a third controllable switch, is electrically connected to the second secondary winding and is used to transmit the electrical energy stored in the energy storage device to the primary winding through the second secondary winding. as well as The processor is configured as follows: Determine the operating mode of the switching power supply; When the operating mode of the switching power supply is in discharge mode, the first controllable switch is controlled to remain on, the second controllable switch is controlled to be off, and a PWM signal is sent to the third controllable switch.
2. The control device according to claim 1, characterized in that, The processor is also configured to: When the switching power supply is in charging mode, a PWM signal is sent to the first controllable switch to control the second controllable switch to remain on and to control the third controllable switch to be off.
3. The control device according to claim 1, characterized in that, The processor is also configured to: When the operating mode of the switching power supply is in hold mode, the first controllable switch, the second controllable switch and the third controllable switch are respectively controlled to be disconnected.
4. The control device according to any one of claims 1 to 3, characterized in that, The charging device also includes: The first diode has its anode electrically connected to the first end of the first secondary winding, and its cathode electrically connected to the first end of the energy storage device. A first driving device, wherein the input terminal of the first driving device is electrically connected to the input / output port of the processor, and the output terminal of the first driving device is electrically connected to the controlled terminal of the second controllable switch.
5. The control device according to claim 4, characterized in that, The second controllable switch includes a first NMOS transistor, the gate of which is electrically connected to the output terminal of the first driving device, the source of which is electrically connected to the second terminal of the energy storage device, and the drain of which is electrically connected to the second terminal of the first secondary winding.
6. The control device according to claim 5, characterized in that, The first driving device includes: The first transistor has its collector connected to a positive voltage, and its emitter is electrically connected to the gate of the first NMOS transistor. The first resistor is connected in series between the collector and the base of the first transistor; The second transistor has its emitter electrically connected to the emitter of the first transistor, its base electrically connected to the base of the first transistor, and its collector electrically connected to the source of the first NMOS transistor. The collector of the third transistor is electrically connected to the base of the second transistor. The base of the third transistor is used to output a positive voltage, and the emitter of the third transistor is used as the input terminal of the first driving device.
7. The control device according to claim 6, characterized in that, The first transistor and the third transistor are NPN transistors, and the second transistor is a PNP transistor.
8. The control device according to claim 6, characterized in that, The first driving device further includes: The second resistor is used to output a positive voltage through the base of the third transistor. The emitter of the third transistor is electrically connected to the first end of the third resistor, and the second end of the third resistor is used as the input terminal of the first driving device.
9. The control device according to claim 4, characterized in that, The discharge device also includes: The second diode has its anode electrically connected to the first end of the second secondary winding and its cathode electrically connected to the second end of the energy storage device. The second driving device has its input terminal electrically connected to the first PWM signal output port of the processor, and its output terminal electrically connected to the controlled terminal of the third controllable switch.
10. The control device according to claim 9, characterized in that, The third controllable switch includes a PMOS transistor, the gate of which is electrically connected to the output terminal of the second driving device, the source of which is electrically connected to the first terminal of the energy storage device, and the drain of which is electrically connected to the second terminal of the second secondary winding.
11. The control device according to claim 10, characterized in that, The second drive device includes: The fourth transistor has its emitter used as the output terminal of the second driving device, and its collector is grounded. The fifth transistor has its emitter electrically connected to the emitter of the fourth transistor, its collector electrically connected to the source of the PMOS transistor, and its base electrically connected to the base of the fourth transistor. The fourth resistor is connected in series between the collector and base of the fifth transistor; The sixth transistor has its collector electrically connected to the base of the fourth transistor. The base of the sixth transistor is used as the input terminal of the second driving device, and the emitter of the sixth transistor is grounded.
12. The control device according to claim 11, characterized in that, The fourth transistor is a PNP transistor, while the fifth and sixth transistors are NPN transistors.
13. The control device according to claim 12, characterized in that, The second drive device further includes: The fifth resistor is electrically connected to the first end of the fourth transistor, and the second end of the fifth resistor is used as the output terminal of the second driving device. The sixth resistor is electrically connected to the base of the sixth transistor and the first end of the sixth resistor. The second end of the sixth resistor is used as the input terminal of the second driving device.
14. The control device according to claim 9, characterized in that, Also includes: The third driving device has its input terminal electrically connected to the second PWM signal output port of the processor, and its output terminal electrically connected to the controlled terminal of the first controllable switch. The processor is also configured to: The third driving device controls the on / off state of the first controllable switch.
15. The control device according to claim 14, characterized in that, The first controllable switch includes a second NMOS transistor, the source of which is grounded, the gate of which is electrically connected to the output terminal of the third driving device, and the drain of which is electrically connected to the first terminal of the primary winding.
16. The control device according to claim 15, characterized in that, The third driving device includes: The seventh resistor has its first end electrically connected to the second PWM signal output port and its second end electrically connected to the gate of the second NMOS transistor.
17. The control device according to any one of claims 1 to 3, characterized in that, Also includes: A rectifier, electrically connected to the primary winding, is used to obtain alternating current and perform half-wave rectification on the alternating current; The processor is further configured to: During the positive half-cycle of the alternating current, a PWM signal is sent to the first controllable switch to control the second controllable switch to remain on and to control the third controllable switch to be off. During the negative half-cycle of the AC current, the first controllable switch is controlled to remain on, the second controllable switch is controlled to be off, and a PWM signal is sent to the third controllable switch.
18. The control device according to claim 17, characterized in that, The rectifier includes a third diode, the anode of which is connected to the alternating current, and the cathode of which is connected to the second end of the primary winding.
19. The control device according to claim 17, characterized in that, Also includes: An input voltage sampling device is used to collect the input voltage signal of the alternating current. An output voltage sampling device is used to collect the output voltage signal of the switching power supply; The processor is configured to determine the operating mode of the switching power supply, including: the processor is configured to: Acquire the input voltage signal and the output voltage signal; The operating mode of the switching power supply is determined based on the input voltage signal and the output voltage signal.
20. The control device according to claim 19, characterized in that, The processor is configured to determine the operating mode of the switching power supply based on the input voltage signal and the output voltage signal, including: the processor is configured to: The operating mode flag of the switching power supply is set according to the input voltage signal and the output voltage signal; The flag bit of the operating mode of the switching power supply is polled at a preset period. The operating mode of the switching power supply is determined based on the flag bits obtained from the polling.
21. The control device according to claim 19, characterized in that, The output voltage sampling device includes: The eighth resistor, the first end of which is electrically connected to the first end of the energy storage device; The ninth resistor has its first end electrically connected to the second end of the eighth resistor, and its second end is grounded. A first bidirectional protection diode, wherein the first terminal of the first bidirectional protection diode is electrically connected to the second terminal of the eighth resistor, and the second terminal of the first bidirectional protection diode is grounded; The tenth resistor has its first end electrically connected to the first end of the first bidirectional protection diode, and its second end electrically connected to the second analog-to-digital conversion port of the processor. A first capacitor, the first end of which is electrically connected to the second analog-to-digital conversion port of the processor, and the second end of which is grounded.
22. The control device according to claim 17, characterized in that, Also includes: A voltage absorption device is connected in series across the primary winding to absorb the voltage spikes generated by the transformer when the first controllable switch is open.
23. The control device according to claim 22, characterized in that, The voltage absorption device includes: The eleventh resistor, the first end of which is electrically connected to the rectifier; The second capacitor has its first terminal electrically connected to the first terminal of the eleventh resistor and the second terminal of the primary winding, respectively. The twelfth resistor has its first end electrically connected to the second end of the second capacitor, and its second end electrically connected to the second end of the eleventh resistor. The fourth diode has its cathode electrically connected to the second terminal of the eleventh resistor and its anode electrically connected to the first terminal of the primary winding.
24. The control device according to claim 17, characterized in that, Also includes: A DC power supply device is electrically connected to the first end of the primary winding and the power supply port of the processor, respectively, for obtaining voltage from the first end of the primary winding, converting the obtained voltage to obtain a converted voltage, and outputting the converted voltage to the processor.
25. The control device according to claim 24, characterized in that, The DC power supply equipment includes: The thirteenth resistor, the first end of which is electrically connected to the first end of the primary winding; The fourteenth resistor, the first end of which is electrically connected to the second end of the thirteenth resistor; The fifth diode, the anode of which is electrically connected to the second terminal of the fourteenth resistor; A sixth diode, the cathode of which is electrically connected to the cathode of the fifth diode, and the anode of which is grounded; The third capacitor has its first terminal electrically connected to the cathode of the fifth diode, and its anode grounded.
26. The control device according to claim 17, characterized in that, Also includes: The primary current monitoring device is electrically connected to the third analog-to-digital converter port of the processor and the first controllable switch, respectively, and is used to collect the primary current signal of the transformer and send the primary current signal to the processor. The processor is also configured to: Receive the primary-side current signal; If the value of the primary current signal is detected to be greater than the preset current, the first controllable switch is controlled to open.
27. The control device according to claim 26, characterized in that, The primary-side current monitoring device includes: The fifteenth resistor, the first end of which is electrically connected to the third analog-to-digital converter port; The second bidirectional protection diode has its first terminal electrically connected to the second terminal of the fifteenth resistor, and its second terminal is grounded. The sixteenth resistor has its first end electrically connected to the second end of the first controllable switch and the fifteenth resistor, and its second end is grounded. The seventeenth resistor has its first end electrically connected to the first end of the sixteenth resistor, and its second end grounded. The fourth capacitor has its first terminal electrically connected to the first terminal of the fifteenth resistor, and its second terminal grounded.
28. A switching power supply, characterized in that, Includes a control device for a switching power supply according to any one of claims 1 to 27.