Online monitoring device, online monitoring method and electronic equipment for switching power supply

By designing an online monitoring device for switching power supply integrating microcontroller and current acquisition unit, the problem of measurement accuracy and life of DC-DC switching power supply when running under complex operating conditions is solved, and high-precision performance parameter monitoring and power management automation are achieved.

CN119738746APending Publication Date: 2025-04-01ZHUHAI TAIWEI ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411817403.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

When DC-DC switching power supply is operated under complex operating conditions, the measurement accuracy and life of the current acquisition unit are affected by environmental factors such as temperature and humidity, resulting in inaccurate monitoring of performance parameters, affecting system stability and reliability.

Method used

An online monitoring device for switching power supply is designed, including components such as microcontrollers, voltage acquisition units, current acquisition units, transistors, voltage divider resistors and pull-up resistors. Through the microcontroller, specific switching control and resistance value measurement can be carried out to achieve accurate calibration of resistance values ​​and accurate monitoring of switching power supply performance parameters.

Benefits of technology

It improves the adaptability and reliability of the switching power supply monitoring device, ensures high-precision measurement and long-life operation under harsh environmental conditions, and supports power management automation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119738746A_ABST
    Figure CN119738746A_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an online monitoring device, an online monitoring method and an electronic device for a switching power supply, and relates to the field of circuits. The present application effectively improves the adaptability and reliability of the switching power supply monitoring device through technical effects such as real-time monitoring, high-precision measurement, accurate resistance calibration, output voltage and voltage-dividing resistance value calculation, fault early warning and alarm prompt, flexibility and scalability, and provides strong support for power supply management automation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of circuits, and in particular to an online monitoring device, a chip and an electronic device for a switching power supply. Background Art

[0002] With the rapid development of electronic technology, DC-DC switching power supplies have been widely used in communication equipment, industrial control, consumer electronics and other fields due to their high efficiency, small size and good voltage conversion characteristics. In order to ensure that the DC-DC switching power supply operates stably and reliably under various complex working conditions, it is particularly important to monitor its key performance parameters in real time and accurately. These performance parameters mainly include output voltage, output current, etc., which directly reflect the working status and efficiency of the power supply.

[0003] In order to achieve the above monitoring goals, a voltage or current acquisition unit is usually integrated at the output port of the DC-DC switching power supply. The acquisition unit converts the current flowing through it into a measurable voltage signal through a built-in precision resistor or other sensor element, and then obtains the specific current value and other related parameters when the switching power supply is working through subsequent circuit processing. This method has the advantages of fast response speed and low cost, and is a key link in realizing power management automation.

[0004] However, in practical applications, the working environment of DC-DC switching power supplies is often complex and changeable, especially the dramatic fluctuations in temperature and humidity, which pose a severe challenge to the components inside the acquisition unit. High temperature may cause resistance drift and accelerate component aging, while humidity changes may cause circuit short circuits or corrosion. These environmental factors will directly affect the measurement accuracy and even normal operation of the acquisition unit. In addition, long-term stress may also cause physical damage to components, such as cracking and broken wires, further exacerbating measurement errors and causing the acquired switching power supply performance parameters to deviate from the true values, thereby affecting the stability and reliability of the system.

[0005] Therefore, how to maintain the high accuracy and long life of the current acquisition unit under harsh environmental conditions and ensure accurate monitoring of the performance parameters of the DC-DC switching power supply has become an urgent problem to be solved. This not only requires the selection of high-performance and environmentally resistant components during design, but also requires the development of effective compensation and calibration technologies, as well as the implementation of regular maintenance and inspection strategies, to comprehensively improve the adaptability and reliability of the DC-DC switching power supply monitoring system. Summary of the invention

[0006] The embodiments of the present application provide an online monitoring device, an online monitoring method and an electronic device for a switching power supply, which can improve the accuracy of monitoring the switching power supply. The technical solution is as follows:

[0007] In a first aspect, an embodiment of the present application provides an online monitoring device for a switching power supply, comprising:

[0008] A microcontroller, a voltage acquisition unit, a current acquisition unit, a transistor, a first voltage-dividing resistor, a second voltage-dividing resistor, a pull-up resistor Rp, and a grounding resistor;

[0009] The switching power supply includes: MOS tube, diode, inductor, and capacitor;

[0010] The drain of the MOS tube is connected to the positive output terminal of the input power supply, the gate of the MOS tube is connected to the microcontroller, the source of the MOS tube is respectively connected to the first end of the inductor and the cathode of the diode, and the anode of the diode is connected to the negative output terminal of the input power supply; the second end of the inductor is respectively connected to the first end of the capacitor, and the second end of the capacitor is connected to the negative output terminal of the input power supply;

[0011] The first end of the first voltage-dividing resistor is connected to the first end of the capacitor, the second end of the first voltage-dividing resistor is connected to the first end of the second voltage-dividing resistor, and the second end of the second voltage-dividing resistor is connected to the first end of the voltage acquisition unit; the first end of the current acquisition unit is connected to the negative input end of the input power supply, and the second end of the current acquisition unit is connected to the second end of the voltage acquisition unit;

[0012] Wherein, the microcontroller includes: a first switch, a second switch, a third switch, a first amplifier, a second amplifier, a first analog-to-digital conversion unit, a second analog-to-digital conversion unit, a voltage source, and a current source;

[0013] Wherein, the first end of the pull-up resistor is connected to the first end of the voltage acquisition unit, and the second end of the pull-up resistor is connected to the first ends of the second switch and the third switch respectively; the second end of the second switch is connected to the positive electrode of the voltage source, and the negative electrode of the voltage source is grounded;

[0014] The second end of the third switch is connected to the second end of the voltage acquisition unit, the positive input end of the first amplifier is connected to the first end of the voltage acquisition unit, the negative input end of the first amplifier is connected to the second end of the voltage acquisition unit, and the output end of the first amplifier is connected to the first analog-to-digital conversion unit; the emitter of the transistor is connected to the second end of the voltage acquisition unit, and the collector of the transistor is connected to the power pin of the microcontroller; the base of the transistor is connected to the first output end of the current source through the first switch, and the ground end of the current source is grounded;

[0015] The second output end of the current source is connected to the first end of the current acquisition unit; the positive input end of the second amplifier is connected to the second end of the current acquisition unit, and the negative input end of the second amplifier is connected to the first end of the current acquisition unit; the output end of the second amplifier is connected to the second analog-to-digital conversion unit; the first end of the grounding resistor is connected to the first end of the current acquisition unit, and the second end of the grounding resistor is connected to the ground pin of the microcontroller;

[0016] Wherein, when the switching power supply circuit is working, the microcontroller is used to execute:

[0017] Generate a PWM signal, and send the PWM signal to the gate of the MOS tube to control the switching power supply to start working;

[0018] Control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vy1 across the current acquisition unit; control the first switch to be in a closed state, the second switch to be in an open state and the third switch to be in an open state, and then measure the voltage value Vy across the current acquisition unit; calculate the resistance value R5 of the current acquisition unit according to the formula Vy1+Is*R5=Vy; Is represents the output current value of the current source;

[0019] Control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vx1 across the voltage acquisition unit; control the first switch and the third switch to be in an open state, and the second switch to be in a closed state, and then measure the voltage value Vx2 across the voltage acquisition unit; calculate the resistance value R3 of the voltage acquisition unit according to the formula Vx1 / R3+Vs / (R3+Rp+R5+R7)=Vx2 / R3; Vs represents the output voltage value of the voltage source, Rp represents the resistance value of the pull-up resistor, and R7 represents the resistance value of the grounding resistor;

[0020] Control the third switch to be in a closed state, the first switch and the second switch to be in an open state, and then measure the voltage value Vx3 across the voltage acquisition unit; calculate the output voltage value Vo of the switching power supply and the series resistance value Ry of the first voltage-dividing resistor and the second voltage-dividing resistor according to the formula Vx1 / R3=Vo / (Ry+R3), Vx3 / Rx=Vo / (Ry+Rx); Rx represents the parallel resistance value of the voltage acquisition unit and the pull-up resistor;

[0021] If the calculated resistance value of the voltage acquisition unit, the resistance value of the current acquisition unit, and the series resistance value of the first voltage-dividing resistor and the second voltage-dividing resistor do not meet the preset expected value range, an alarm is issued and the internal calculation proportional coefficient of the power controller is modified.

[0022] In a second aspect, the present application provides an electronic device, comprising the above-mentioned online monitoring device for the switching power supply.

[0023] In a third aspect, the present application provides an online monitoring method, which is applied to the online monitoring device of the above-mentioned switching power supply, and the method comprises:

[0024] Generate a PWM signal, and send the PWM signal to the gate of the MOS tube to control the switching power supply to start working;

[0025] Control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vy1 across the current acquisition unit; control the first switch to be in a closed state, the second switch to be in an open state and the third switch to be in an open state, and then measure the voltage value Vy across the current acquisition unit; calculate the resistance value R5 of the current acquisition unit according to the formula Vy1+Is*R5=Vy; Is represents the output current value of the current source;

[0026] Control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vx1 across the voltage acquisition unit; control the first switch and the third switch to be in an open state, and the second switch to be in a closed state, and then measure the voltage value Vx2 across the voltage acquisition unit; calculate the resistance value R3 of the voltage acquisition unit according to the formula Vx1 / R3+Vs / (R3+Rp+R5+R7)=Vx2 / R3; Vs represents the output voltage value of the voltage source, Rp represents the resistance value of the pull-up resistor, and R7 represents the resistance value of the grounding resistor;

[0027] Control the third switch to be in a closed state, the first switch and the second switch to be in an open state, and then measure the voltage value Vx3 across the voltage acquisition unit; calculate the output voltage value Vo of the switching power supply and the series resistance value Ry of the first voltage-dividing resistor and the second voltage-dividing resistor according to the formula Vx1 / R3=Vo / (Ry+R3), Vx3 / Rx=Vo / (Ry+Rx); Rx represents the parallel resistance value of the voltage acquisition unit and the pull-up resistor;

[0028] If the calculated resistance value of the voltage acquisition unit, the resistance value of the current acquisition unit, and the series resistance value of the first voltage-dividing resistor and the second voltage-dividing resistor do not meet the preset expected value range, an alarm is issued and the internal calculation proportional coefficient of the power controller is modified.

[0029] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0030] Through the technical effects of real-time monitoring, high-precision measurement, precise calibration of resistance values, calculation of output voltage and voltage-dividing resistance values, fault warning and alarm prompts, as well as flexibility and scalability, the adaptability and reliability of the switching power supply monitoring device are effectively improved, providing strong support for power management automation. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 is a structural diagram of an online monitoring device for a switching power supply provided in an embodiment of the present application;

[0033] Figure 2 It is a flow chart of a calibration method of an online monitoring device of a switching power supply provided in an embodiment of the present application;

[0034] Figure 3 is an equivalent circuit diagram before and after the first switch is closed provided in an embodiment of the present application;

[0035] Figure 4 is an equivalent circuit diagram before and after the second switch is closed provided in an embodiment of the present application;

[0036] Figure 5 This is an equivalent circuit diagram before and after the third switch is closed provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] See also Figure 1The present invention provides a schematic structural diagram of an online monitoring device for a switching power supply according to an embodiment of the present invention. The online monitoring device includes: a microcontroller MCU, a voltage acquisition unit, a current acquisition unit, a transistor Q5, a first voltage-dividing resistor, a second voltage-dividing resistor, a pull-up resistor, and a grounding resistor. The resistance value of the voltage acquisition unit is represented by R3, the resistance value of the current acquisition unit is represented by R5, the resistance value of the first voltage-dividing resistor is represented by R1, the resistance value of the second voltage-dividing resistor is represented by R2, the resistance value of the pull-up resistor is represented by Rp, and the resistance value of the grounding resistor is represented by R7.

[0039] The switching power supply of the present application is a DC-DC switching power supply, for example, a BUCK digital control power supply, which includes a MOS tube M1, a diode D1, an inductor L1, and a capacitor C1.

[0040] The connection relationship of each device in the switching power supply is as follows: the drain of the MOS tube is connected to the positive output terminal Vin+ of the input power supply, the gate of the MOS tube is connected to the microcontroller MCU, and the microcontroller MCU is used to output a PWM signal with a certain duty cycle to the gate of the MOS tube. The source of the MOS tube is respectively connected to the first end of the inductor L1 and the cathode of the diode D1, and the anode of the diode D1 is connected to the negative output terminal Vin- of the input power supply; the second end of the inductor L1 is respectively connected to the first end of the capacitor C1, and the second end of the capacitor C1 is connected to the negative output terminal Vin- of the input power supply. The input power supply is a DC power supply, which is used to output a DC voltage signal to the input port of the switching power supply.

[0041] The first end of the first voltage-dividing resistor is connected to the first end of the capacitor C1, the second end of the first voltage-dividing resistor is connected to the first end of the second voltage-dividing resistor, and the second end of the second voltage-dividing resistor is connected to the first end of the voltage acquisition unit; the first end of the current acquisition unit is connected to the negative input terminal Vin- of the input power supply, and the second end of the current acquisition unit is connected to the second end of the voltage acquisition unit. The capacitor C1 of the present application can be an electrolytic capacitor, the first end of the capacitor C1 is the positive electrode, and the second end is the negative electrode.

[0042] The microcontroller MCU includes: a first switch K1, a second switch K2, a third switch K3, a first amplifier P1, a second amplifier P2, a first analog-to-digital conversion unit ADC1, a second analog-to-digital conversion unit ADC2, a voltage source, and a current source. The output voltage value of the voltage source is Vs, and the output current value of the current source is Is.

[0043] The structure of the online monitoring device further includes: a first end of the pull-up resistor is connected to a first end of the voltage acquisition unit, a second end of the pull-up resistor is connected to first ends of the second switch K2 and the third switch K3 respectively, a second end of the second switch is connected to a positive electrode of a voltage source, and a negative electrode of the voltage source is grounded;

[0044] The second end of the third switch K3 is connected to the second end of the voltage acquisition unit, the positive input end + of the first amplifier P1 is connected to the first end of the voltage acquisition unit, the negative input end of the first amplifier P1 is connected to the second end of the voltage acquisition unit, and the output end of the first amplifier is connected to the first analog-to-digital conversion unit ADC1. The emitter of the transistor Q5 is connected to the second end of the voltage acquisition unit, the collector of the transistor Q5 is connected to the power pin VDD of the microcontroller MCU, the base of the transistor Q5 is connected to the first output end of the current source through the first switch K1, and the ground end of the current source is grounded. The microcontroller MCU measures the voltage value at both ends of the voltage acquisition unit through the first analog-to-digital conversion unit ADC1 and the first amplifier P1.

[0045] The second output end of the current source is connected to the first end of the current acquisition unit; the positive input end + of the second amplifier P2 is connected to the second end of the current acquisition unit, the negative input end - of the second amplifier P2 is connected to the first end of the current acquisition unit, and the output end of the second amplifier P2 is connected to the second analog-to-digital conversion unit ADC2. The first end of the grounding resistor is connected to the first end of the current acquisition unit, and the second end of the grounding resistor is connected to the ground pin of the microcontroller MCU. The microcontroller MCU measures the voltage value at both ends of the current acquisition unit through the second analog-to-digital conversion unit ADC2 and the second amplifier P2.

[0046] The working process of the microcontroller MCU of this application includes:

[0047] S201, generating a PWM signal, and sending the PWM signal to the gate of the MOS tube to control the switching power supply to start working.

[0048] Among them, the MCU configures the frequency and duty cycle of the PWM signal through its built-in PWM module or timer. Set the output pin of the PWM signal and configure it as the output mode. Start the PWM signal generation to start the PWM signal output. Send the PWM signal to the gate of the MOS tube: connect the output pin of the PWM signal to the gate of the MOS tube. Through the switching characteristics of the PWM signal, the conduction and cutoff of the MOS tube are controlled, thereby controlling the output voltage of the switching power supply.

[0049] S202, control the first switch, the second switch and the third switch to be in the open state, and then measure the voltage value Vy1 across the current acquisition unit; control the first switch to be in the closed state, the second switch to be in the open state and the third switch to be in the open state, and then measure the voltage value Vy across the current acquisition unit; calculate the resistance value R5 of the current acquisition unit according to the formula Vy1+Is*R5=Vy.

[0050] The first switch, the second switch and the third switch are all placed in an open state through an MCU or other control device, and then the voltage value Vy1 across the current acquisition unit is measured. Next, the first switch is placed in a closed state, the second switch and the third switch remain open, and the voltage value Vy across the current acquisition unit is measured again. Figure 3 The equivalent circuit diagram of the first switch K1 before and after closing is shown. According to Ohm's law and the characteristics of the series circuit, the formula Vy1+Is*R5=Vy can be obtained. Among them, Is is the output current value of the known current source. Through this formula, the value of R5 can be solved.

[0051] S203, control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vx1 across the voltage acquisition unit; control the first switch and the third switch to be in an open state, and the second switch to be in a closed state, and then measure the voltage value Vx2 across the voltage acquisition unit; calculate the resistance value R3 of the voltage acquisition unit according to the formula Vx1 / R3+Vs / (R3+Rp+R5+R7)=Vx2 / R3.

[0052] The MCU controls the first switch, the second switch, and the third switch to be in an open state through the GPIO port. The voltage value Vx1 at both ends of the voltage acquisition unit is measured and stored in the memory of the MCU. Then, the second switch is controlled to be closed, and the first switch and the third switch remain in an open state. The voltage value Vx2 at both ends of the voltage acquisition unit is measured again and stored in the memory of the MCU. The MCU reads the stored voltage values ​​Vx1 and Vx2. Figure 4 The equivalent circuit diagram of the second switch K2 before and after closing is shown, and the formula Vx1 / R3+Vs / (R3+Rp+R5+R7)=Vx2 / R3 is obtained, where Vs is the known output voltage value of the voltage source, Rp is the resistance value of the pull-up resistor, R5 is the resistance value calculated in step S202, and R7 is the resistance value of the grounding resistor. The MCU obtains the value of R3 through calculation.

[0053] S204, control the third switch to be in a closed state, the first switch and the second switch to be in an open state, and then measure the voltage value Vx3 across the voltage acquisition unit; calculate the output voltage value Vo of the switching power supply and the series resistance value Ry of the first voltage-dividing resistor and the second voltage-dividing resistor according to the formula Vx1 / R3=Vo / (Ry+R3), Vx3 / Rx=Vo / (Ry+Rx).

[0054] The microcontroller MCU controls the third switch K3 to close through the GPIO port, and the first switch K1 and the second switch remain in the open state. The voltage value Vx3 at both ends of the voltage acquisition unit is measured and stored in the memory of the MCU. The output voltage value Vo and the series resistance value Ry are calculated: the MCU reads the stored voltage values ​​Vx1, Vx3, and the R3 value calculated previously.

[0055] See also Figure 5 The equivalent circuit diagram before and after the third switch K3 is closed is shown in the figure, and the formulas Vx1 / R3=Vo / (Ry+R3) and Vx3 / Rx=Vo / (Ry+Rx) are obtained, where Rx is the parallel resistance value of the voltage acquisition unit and the pull-up resistor (which can be calculated by R3 and Rp). The MCU calculates the values ​​of Vo and Ry

[0056] S205: If the calculated resistance value of the voltage acquisition unit, the resistance value of the current acquisition unit, and the series resistance value of the first voltage-dividing resistor and the second voltage-dividing resistor do not meet the preset expected value range, an alarm is issued and the internal calculation proportional coefficient of the power controller is modified.

[0057] Among them, the microcontroller MCU compares the calculated resistance value R3 of the voltage acquisition unit, the resistance value R5 of the current acquisition unit, and the series resistance value Ry of the first voltage-dividing resistor and the second voltage-dividing resistor with the preset expected value range. Alarm prompt: If any value does not meet the preset expected value range, the MCU controls the alarm indicator light or the buzzer to sound through the GPIO port to issue an alarm prompt. At the same time, the microcontroller MCU can also send the alarm information to the host computer or monitoring system through serial communication or other communication methods for recording and analysis.

[0058] In some embodiments of the present application, the voltage acquisition unit generally reduces the high voltage to a range suitable for MCU measurement through a voltage divider circuit. When multiple parallel resistors are used, these resistors share the voltage division task, reducing the voltage drop and current on a single resistor, thereby reducing heat generation. Parallel resistors can also improve the accuracy and stability of the voltage acquisition unit, because the average value of multiple resistors is closer to the ideal value, reducing the impact of a single resistor error on the overall measurement.

[0059] Current acquisition units usually calculate current by measuring the voltage drop across a resistor. When multiple resistors are connected in parallel, the current is divided through each resistor, reducing the current density and heat generated by a single resistor. Parallel resistors can also increase the overload capacity of the current acquisition unit. When the current is too large, multiple resistors can share the current and prevent a single resistor from overheating and being damaged.

[0060] In some embodiments of the present application, the microcontroller MCU first sets a fixed time period, which determines the frequency of periodic calculations. The selection of the time period should be determined according to the actual needs of the system to ensure that abnormalities can be discovered in time without occupying the resources of the MCU too frequently. At the beginning of each cycle, the MCU controls the state of the switch through the GPIO port and uses the ADC (analog-to-digital converter) to collect the voltage values ​​of the voltage acquisition unit and the current acquisition unit. These data will be used for subsequent calculations. The MCU uses the collected data and preset formulas and parameters (such as the output voltage value of the voltage source, the output current value of the current source, the resistance value of the pull-up resistor, etc.) to calculate the resistance value of the voltage acquisition unit, the resistance value of the current acquisition unit, the output voltage value of the switching power supply, and the series resistance value of the first voltage divider resistor and the second voltage divider resistor. The MCU compares the calculated parameter value with the preset expected value range. If any parameter value exceeds the range, the MCU will trigger an alarm mechanism and adjust the operating parameters of the switching power supply as needed. After completing the calculation and adjustment of the current cycle, the MCU will wait for the start of the next cycle and repeat the above process.

[0061] In some embodiments of the present application, the microcontroller sends a square wave signal to the control end of the first switch, the second switch or the third switch to control the opening or closing of each switch.

[0062] The MCU generates a square wave signal through its built-in timer or PWM (pulse width modulation) module. These modules can configure the frequency, duty cycle and other parameters of the square wave signal to meet the needs of different application scenarios. The MCU outputs the generated square wave signal to the control end of the switch through the GPIO (general input and output) port. The GPIO port is an important interface for the MCU to interact with external circuits. It can output digital signals (such as square wave signals) to control the working state of external circuits. When the square wave signal is at a high level, the control end of the switch receives a high level signal and the switch is turned on; when the square wave signal is at a low level, the control end of the switch receives a low level signal and the switch is turned off. By controlling the high and low level changes of the square wave signal, the MCU can control the opening or closing of the switch.

[0063] The embodiments of the present application have the following technical effects:

[0064] By integrating the voltage acquisition unit and the current acquisition unit, the output voltage and output current of the switching power supply can be monitored in real time and accurately, providing key data support for power management. The amplifier and analog-to-digital conversion unit inside the microcontroller are used to amplify and digitize the collected voltage and current signals, improving the signal's anti-interference ability and measurement accuracy.

[0065] By controlling the closing and opening of the switch by the microcontroller, the resistance values ​​of the current acquisition unit and the voltage acquisition unit can be accurately measured and calibrated. This calibration method can eliminate the resistance drift caused by factors such as component aging and temperature changes, thereby ensuring the accuracy of the measurement results.

[0066] Based on the collected voltage value and the calibrated resistance value, the microcontroller can calculate the output voltage value of the switching power supply and the series resistance value of the voltage divider resistor. These data are of great significance for the analysis and optimization of power supply performance.

[0067] Fault warning and alarm prompts:

[0068] The microcontroller can monitor the collected voltage, current, calculated resistance and voltage values ​​in real time and compare them with the preset expected value range. Once any parameter is found to be out of the preset range, the microcontroller will immediately trigger an alarm prompt to remind the operator to take timely measures to deal with it, thereby avoiding power failure or system instability caused by abnormal parameters.

[0069] The microcontroller in this technical solution has powerful processing capabilities and can easily integrate other monitoring functions, such as temperature monitoring, humidity monitoring, etc., to meet the needs of different application scenarios. At the same time, this technical solution also has good scalability and can easily communicate and exchange data with other power management systems or host computers to achieve higher-level power management and monitoring.

[0070] The electronic device provided in the embodiments of the present application includes but is not limited to communication equipment, terminal equipment, computer equipment, etc. In addition to the above-mentioned online monitoring device of the switching power supply, the electronic device may also include: a shell for accommodating various components, a display screen and an input device (for example: a keyboard, a mouse or a touch screen), etc.

[0071] The above-described implementation methods do not constitute a limitation on the protection scope of the technical solution. Any modification, equivalent replacement and improvement made within the spirit and principle of the above-described implementation methods shall be included in the protection scope of the technical solution.

Claims

1. An online monitoring device for a switching power supply, characterized in that: include: A microcontroller, a voltage acquisition unit, a current acquisition unit, a transistor, a first voltage-dividing resistor, a second voltage-dividing resistor, a pull-up resistor Rp, and a grounding resistor; The switching power supply includes: MOS tube, diode, inductor, and capacitor; The drain of the MOS tube is connected to the positive output terminal of the input power supply, the gate of the MOS tube is connected to the microcontroller, the source of the MOS tube is respectively connected to the first end of the inductor and the cathode of the diode, and the anode of the diode is connected to the negative output terminal of the input power supply; the second end of the inductor is respectively connected to the first end of the capacitor, and the second end of the capacitor is connected to the negative output terminal of the input power supply; The first end of the first voltage-dividing resistor is connected to the first end of the capacitor, the second end of the first voltage-dividing resistor is connected to the first end of the second voltage-dividing resistor, and the second end of the second voltage-dividing resistor is connected to the first end of the voltage acquisition unit; the first end of the current acquisition unit is connected to the negative input end of the input power supply, and the second end of the current acquisition unit is connected to the second end of the voltage acquisition unit; Wherein, the microcontroller includes: a first switch, a second switch, a third switch, a first amplifier, a second amplifier, a first analog-to-digital conversion unit, a second analog-to-digital conversion unit, a voltage source, and a current source; Wherein, the first end of the pull-up resistor is connected to the first end of the voltage acquisition unit, and the second end of the pull-up resistor is connected to the first ends of the second switch and the third switch respectively; the second end of the second switch is connected to the positive electrode of the voltage source, and the negative electrode of the voltage source is grounded; The second end of the third switch is connected to the second end of the voltage acquisition unit, the positive input end of the first amplifier is connected to the first end of the voltage acquisition unit, the negative input end of the first amplifier is connected to the second end of the voltage acquisition unit, and the output end of the first amplifier is connected to the first analog-to-digital conversion unit; the emitter of the transistor is connected to the second end of the voltage acquisition unit, and the collector of the transistor is connected to the power pin of the microcontroller; the base of the transistor is connected to the first output end of the current source through the first switch, and the ground end of the current source is grounded; The second output end of the current source is connected to the first end of the current acquisition unit; the positive input end of the second amplifier is connected to the second end of the current acquisition unit, and the negative input end of the second amplifier is connected to the first end of the current acquisition unit; the output end of the second amplifier is connected to the second analog-to-digital conversion unit; the first end of the grounding resistor is connected to the first end of the current acquisition unit, and the second end of the grounding resistor is connected to the ground pin of the microcontroller; Wherein, when the switching power supply circuit is working, the microcontroller is used to execute: Generate a PWM signal, and send the PWM signal to the gate of the MOS tube to control the switching power supply to start working; Control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vy1 across the current acquisition unit; control the first switch to be in a closed state, the second switch to be in an open state and the third switch to be in an open state, and then measure the voltage value Vy across the current acquisition unit; calculate the resistance value R5 of the current acquisition unit according to the formula Vy1+Is*R5=Vy; Is represents the output current value of the current source; Control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vx1 across the voltage acquisition unit; control the first switch and the third switch to be in an open state, and the second switch to be in a closed state, and then measure the voltage value Vx2 across the voltage acquisition unit; calculate the resistance value R3 of the voltage acquisition unit according to the formula Vx1 / R3+Vs / (R3+Rp+R5+R7)=Vx2 / R3; Vs represents the output voltage value of the voltage source, Rp represents the resistance value of the pull-up resistor, and R7 represents the resistance value of the grounding resistor; Control the third switch to be in a closed state, the first switch and the second switch to be in an open state, and then measure the voltage value Vx3 across the voltage acquisition unit; calculate the output voltage value Vo of the switching power supply and the series resistance value Ry of the first voltage-dividing resistor and the second voltage-dividing resistor according to the formula Vx1 / R3=Vo / (Ry+R3), Vx3 / Rx=Vo / (Ry+Rx); Rx represents the parallel resistance value of the voltage acquisition unit and the pull-up resistor; If the calculated resistance value of the voltage acquisition unit, the resistance value of the current acquisition unit, and the series resistance value of the first voltage-dividing resistor and the second voltage-dividing resistor do not meet the preset expected value range, an alarm is issued and the internal calculation proportional coefficient of the power controller is modified.

2. The circuit according to claim 1, characterized in that The voltage acquisition unit and the current acquisition unit are formed by connecting a plurality of resistors with the same resistance value in parallel.

3. The circuit according to claim 1, characterized in that The microcontroller periodically calculates the resistance value of the voltage acquisition unit, the resistance value of the current acquisition unit, the output voltage value of the switching power supply, and the series resistance value of the first voltage-dividing resistor and the second voltage-dividing resistor.

4. The circuit according to claim 1, characterized in that The microcontroller sends a square wave signal to the control end of the first switch, the second switch or the third switch to control the opening or closing of each switch.

5. The device according to claim 1, characterized in that The capacitor is an electrolytic capacitor, the first end of the capacitor is a positive electrode, and the second end of the capacitor is a negative electrode.

6. A method for online monitoring of a switching power supply, characterized in that: An online monitoring device applied to any one of claims 1 to 5; Wherein, the method comprises: Generate a PWM signal, and send the PWM signal to the gate of the MOS tube to control the switching power supply to start working; Control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vy1 across the current acquisition unit; control the first switch to be in a closed state, the second switch to be in an open state and the third switch to be in an open state, and then measure the voltage value Vy across the current acquisition unit; calculate the resistance value R5 of the current acquisition unit according to the formula Vy1+Is*R5=Vy; Is represents the output current value of the current source; Control the first switch, the second switch and the third switch to be in an open state, and then measure the voltage value Vx1 across the voltage acquisition unit; control the first switch and the third switch to be in an open state, and the second switch to be in a closed state, and then measure the voltage value Vx2 across the voltage acquisition unit; calculate the resistance value R3 of the voltage acquisition unit according to the formula Vx1 / R3+Vs / (R3+Rp+R5+R7)=Vx2 / R3; Vs represents the output voltage value of the voltage source, Rp represents the resistance value of the pull-up resistor, and R7 represents the resistance value of the grounding resistor; Control the third switch to be in a closed state, the first switch and the second switch to be in an open state, and then measure the voltage value Vx3 across the voltage acquisition unit; calculate the output voltage value Vo of the switching power supply and the series resistance value Ry of the first voltage-dividing resistor and the second voltage-dividing resistor according to the formula Vx1 / R3=Vo / (Ry+R3), Vx3 / Rx=Vo / (Ry+Rx); Rx represents the parallel resistance value of the voltage acquisition unit and the pull-up resistor; If the calculated resistance value of the voltage acquisition unit, the resistance value of the current acquisition unit, and the series resistance value of the first voltage-dividing resistor and the second voltage-dividing resistor do not meet the preset expected value range, an alarm is issued and the internal calculation proportional coefficient of the power controller is modified.

7. An electronic device, characterized in that: The online monitoring device comprises the one described in any one of claims 1 to 5.