Industrial personal computer UPS power supply method based on commercial power interruption seamless switching

Through the coordinated switching of the BQ24610 charging management chip and the LM5176 buck-boost controller, combined with MCU and RS232 communication, seamless switching of the industrial computer UPS power supply path and intelligent power management are achieved, solving the problem of asynchronous power supply path switching and industrial computer system response, and improving the coordinated linkage capabilities of the power supply system and industrial control system.

CN120810907AActive Publication Date: 2025-10-17CHONGQING BANGRUIDA TECH CO LTD

Patent Information

Application Number
CN202511307874.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-10-17
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

When the existing industrial computer UPS power supply solution experiences a mains power anomaly, the power supply path switching and the industrial computer system protection response are out of sync, resulting in a response delay of 300-500ms in the data protection process. In addition, the solution lacks a real-time power feedback mechanism, making it impossible to dynamically adjust the data preservation strategy based on the remaining battery capacity.

Method used

By configuring the BQ24610 charging management chip and the LM5176 buck-boost controller, combined with MCU monitoring and RS232 communication, real-time collection of the lithium battery power status and seamless switching of power supply paths are achieved, triggering the industrial computer data protection process and sending a delayed shutdown command based on the battery power status, realizing intelligent interaction between the power supply system and the industrial control system.

Benefits of technology

Millisecond-level seamless power supply path switching is achieved, the industrial computer data protection process is precisely synchronized with the power supply switching action, and a dynamic power management mechanism is built. The industrial computer can intelligently adjust the data storage strategy according to the battery capacity, improving the collaborative linkage capability of the power supply system and the industrial control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120810907A_ABST
    Figure CN120810907A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial personal computer UPS power supply method based on commercial power interruption seamless switching, and relates to the field of uninterruptible power supply control, and the method comprises the steps: configuring a UPS input unit to receive a DC power supply converted from commercial power, charging a lithium battery pack through a BQ24610 charging management chip, collecting a current detection signal of the BQ24610 charging management chip through an MCU, obtaining the electric quantity state of a lithium battery, and outputting the electric quantity state of the lithium battery. An LM5176 buck-boost controller is arranged to be synchronously connected with the input unit and the lithium battery pack to form a bidirectional energy path; the voltage of the UPS input unit is monitored through the MCU, and a switching instruction is triggered. According to the invention, the MCU controls the EN pin of the LM5176 buck-boost controller and the CE pin of the BQ24610 to cooperatively switch a power supply path, millisecond-level seamless switching of a hardware level is realized, and meanwhile, an RS232 bus is matched to transmit a state signal in real time, so that the data protection process of the industrial personal computer and the power supply switching action are precisely synchronized, and the reliability of the industrial personal computer is improved. The problem that hardware switching and software protection are not synchronized in a traditional scheme is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of uninterrupted power supply control, in particular to a UPS power supply method for industrial computer based on seamless switching of power interruption. BACKGROUND

[0002] In the field of industrial automation control, as the core control device, the reliability of the industrial computer power supply system is directly related to the continuity of the production system and data security. The mainstream UPS power supply scheme for industrial computers currently mainly adopts a double-conversion online architecture, which realizes the switching of mains and battery through AC-DC rectification and DC-AC inversion. The IGBT inversion technology is used in combination with the DSP digital signal processor to realize the mains / battery switching within 10ms, and the SNMP protocol remote monitoring is supported. The PFC power factor correction circuit is usually included to improve the input efficiency, and multi-stage filtering is used to ensure that the output voltage is stable within a precision range of ±1%.

[0003] The existing technology still has room for improvement in terms of power supply path switching and industrial computer system coordination control. When the mains are abnormal, the UPS hardware can quickly complete the power supply switching, but the industrial computer software system needs to obtain the power-off state through an independent detection circuit or an operating system polling method. This decoupling design causes a response delay of 300-500ms in the data protection process. Due to the lack of real-time power feedback mechanism, the industrial computer cannot dynamically adjust the data saving strategy according to the remaining battery capacity. The traditional scheme only provides local LED alarm when the battery is abnormal (such as over-temperature), which is difficult to notify the remote monitoring in a timely manner. SUMMARY

[0004] In view of the above existing problems, the present application is proposed.

[0005] Therefore, the present application provides a UPS power supply method for industrial computer based on seamless switching of power interruption to solve the problem of asynchronous response of power supply path switching and industrial computer system protection in the prior art.

[0006] To solve the above technical problems, the present application provides the following technical solutions: In a first aspect, the present application provides a UPS power supply method for industrial computer based on seamless switching of power interruption, which includes configuring a UPS input unit to receive mains converted DC power supply, charging a lithium battery pack through a BQ24610 charge management chip, collecting the current detection signal of the BQ24610 charge management chip through an MCU to obtain the lithium battery power state, and setting a LM5176 step-down controller to synchronously connect the input unit and the lithium battery pack to form a bidirectional energy path. The input unit voltage of the UPS is monitored by the MCU, a switching instruction is triggered, the EN pin of the LM5176 step-up / down controller is controlled to supply power to the lithium battery in the mode, the power supply path is seamlessly switched, and the data protection process of the industrial computer is triggered; According to the lithium battery power state and the delay time set by the upper computer software, a delay shutdown instruction is sent to the industrial computer, the input voltage is detected by the MCU, and the industrial computer is triggered to power on and start automatically; The MCU collects the lithium battery voltage, temperature and charging and discharging current in real time, detects the battery over-temperature, over-current and voltage abnormality, and alarms through the LED indicator and RS232 communication.

[0007] As a preferred scheme of the UPS power supply method for the industrial computer based on seamless switching of commercial power interruption, wherein: the input unit receives the converted DC power supply of commercial power, the lithium battery pack is charged through the BQ24610 charging management chip, and the following steps are included, The commercial power is converted into DC power supply by an AC-DC adapter and output to the UPS input unit, and the converted DC power supply is input into the VCC pin of the BQ24610 charging management chip after being filtered by a capacitor. The BQ24610 charging management chip sets the charging current according to the resistance of the ISET1 pin, and enters the constant current charging stage The BQ24610 charging management chip monitors the lithium battery pack voltage in real time through the voltage dividing resistor, and matches the number of battery series connection. Based on the number of matched battery series connection and the voltage threshold set by the voltage dividing resistor, when the voltage of the lithium battery pack is less than or equal to the voltage threshold, the BQ24610 charging management chip automatically switches to the constant voltage charging mode to charge the lithium battery pack.

[0008] As a preferred scheme of the UPS power supply method for the industrial computer based on seamless switching of commercial power interruption, wherein: the current detection signal of the BQ24610 charging management chip is collected by the MCU to obtain the lithium battery power state, and the following steps are included, The MCU collects the voltage difference between the two ends of the current detection resistor through the SRN / SRP pin of the BQ24610 charging management chip, and the MCU converts the voltage difference into the real-time charging and discharging current value according to Ohm's law; The MCU synchronously reads the total voltage signal of the battery pack output by the BQ24610 charging management chip voltage dividing circuit, the MCU obtains the resistance value of the NTC thermistor through the TS pin of the BQ24610 charging management chip, and converts it into battery temperature, the MCU time integrates the real-time current value, and combines the initial power to obtain the lithium battery power state.

[0009] As a preferred scheme of the uninterrupted switching UPS power supply method for industrial computer based on interruption of commercial power, wherein: the input unit is connected to the lithium battery group through the LM5176 step-up and step-down controller, forming a bidirectional energy path, including the following steps, The converted DC power supply is connected to the VIN pin of the LM5176, the output end of the lithium battery group is connected to the VBAT pin of the LM5176, and the output voltage of the LM5176 is set through the FB pin resistor network, and the step-up and step-down mode is automatically switched when the input voltage fluctuates; The SW node of the LM5176 is configured with low DCR inductance and low ESR capacitance to suppress output ripple, low Qg MOSFET is selected and HIDRV / LODRV drive signal is optimized, the MCU controls the working mode through the EN pin of the LM5176, and the CE pin of the BQ24610 charging management chip is coordinated to charge and discharge, forming a bidirectional energy path.

[0010] As a preferred scheme of the uninterrupted switching UPS power supply method for industrial computer based on interruption of commercial power, wherein: the input unit is connected to the lithium battery group through the LM5176 step-up and step-down controller, forming a bidirectional energy path, including the following steps, The MCU collects the voltage signal of the UPS input unit in real time through the ADC module, sets the undervoltage signal threshold through the UVLO function of the LM5176, compares the voltage signal with the undervoltage threshold, and judges the state of the commercial power; When the voltage signal is lower than the undervoltage threshold, a switching instruction is generated; The MCU outputs a low-level signal to the EN pin of the LM5176 through the GPIO, closes the input power supply path, switches to the battery power supply mode, and outputs a low-level signal to the CE pin of the BQ24610 charging management chip through the GPIO, stops the charging function and disconnects the connection path between the input power supply and the battery, and performs seamless switching of the power supply path.

[0011] As a preferred scheme of the uninterrupted switching UPS power supply method for industrial computer based on interruption of commercial power, wherein: a power failure warning signal is sent to the industrial computer through the RS232 bus to trigger the data protection process of the industrial computer, including the following steps, Based on the seamless switching of the power supply path, a power failure warning signal is generated, The MCU encapsulates the power failure warning signal and the state of the lithium battery into a data frame according to the RS232 protocol format; The MCU loads the data frame into the TX register through the USART module, and automatically converts it into a serial signal of RS232 level standard; MAX3232 chip converts the MCU's TTL level into RS232 signal, which is transmitted to the industrial computer COM port through the DB9 connector, triggering the industrial computer data protection process.

[0012] As a preferred scheme of the seamless switching based on power interruption of the industrial computer UPS power supply method, wherein: according to the state of charge of the lithium battery and the delay time set by the host computer software, a delay shutdown instruction is sent to the industrial computer, the MCU detects the input voltage, triggers the power-on self-start of the industrial computer, including the following steps, The MCU compares the state of charge of the lithium battery collected by the BQ24610 charging management chip with the power threshold set by the host computer software in real time, and the MCU reads the shutdown delay time parameter set by the host computer software from the EEPROM; When the state of charge of the lithium battery is lower than the power threshold, the MCU calculates the actual shutdown time according to the remaining power and the shutdown delay time parameter, and generates the RS232 instruction of the countdown parameter; The MCU encapsulates the RS232 instruction of the countdown parameter into a data frame through the USART module, and sends it to the industrial computer after level conversion by the MAX3232, and executes the safe shutdown process; The MCU continuously monitors the UPS input unit voltage, and when the voltage is detected to return to the normal range, it is determined that the power supply is restored, and the MCU outputs high level to the PS_ON pin of the industrial computer through the GPIO, triggering the power-on self-start of the industrial computer.

[0013] As a preferred scheme of the seamless switching based on power interruption of the industrial computer UPS power supply method, wherein: the MCU collects the voltage, temperature and charging and discharging current of the lithium battery in real time, detects the over-temperature, over-current and voltage abnormality of the battery, and alarms through the LED indicator and RS232 communication, including the following steps, The MCU collects the voltage, temperature and charging and discharging current of the lithium battery in real time through the BQ24610 charging management chip, and sets the three-tuple threshold based on the safe working range of the lithium battery pack; Compare the voltage, temperature and charging and discharging current of the lithium battery with the three-tuple threshold to detect overvoltage, undervoltage, overtemperature and overcurrent abnormality; When an abnormality is detected, the LED indicator and RS232 communication alarm are triggered.

[0014] As a preferred scheme of the seamless switching based on power interruption of the industrial computer UPS power supply method, wherein: the overall size of the industrial computer UPS is controlled within the range of 149*58*64.5mm, and the lithium battery pack uses replaceable Yee Wei 4*21700 / 5000mAh battery cells.

[0015] In a second aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program, when executed by the processor, implements any step of the method for seamless switching of UPS power supply of an industrial computer based on interruption of commercial power as described in the first aspect of the present application.

[0016] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any step of the method for seamless switching of UPS power supply of an industrial computer based on interruption of commercial power as described in the first aspect of the present application.

[0017] The present application has the following beneficial effects: by controlling the EN pin of the LM5176 step-up / down controller and the CE pin of the BQ24610 in cooperation to switch the power supply path, millisecond-level seamless switching at the hardware level is achieved, and by cooperating with the RS232 bus to transmit the state signal in real time, the data protection process of the industrial computer is accurately synchronized with the power supply switching action, the problem of asynchronous hardware switching and software protection in the traditional scheme is solved, the technical effect of cooperative linkage of the power supply system and the industrial system is achieved, the dynamic power management mechanism is constructed by the MCU to calculate the power state of the lithium battery in real time based on the current / voltage signal collected by the BQ24610 and generate a delay shutdown instruction combined with the parameters set by the upper computer, so that the industrial computer can intelligently adjust the data saving strategy according to the actual battery capacity, and intelligent interaction between the power supply system and the industrial system is realized. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0019] Fig. 1 Flowchart of the method for seamless switching of UPS power supply of an industrial computer based on interruption of commercial power.

[0020] Fig. 2 Schematic diagram of the data protection process of the industrial computer.

[0021] Fig. 3 Flowchart of the power state. DETAILED DESCRIPTION

[0022] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.

[0023] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the present application.

[0024] Second, the "one embodiment" or "an embodiment" referred to herein means a specific embodiment that can include one or more features, structures, or characteristics. In this description, "one embodiment" or "an embodiment" does not necessarily refer to the same embodiment, although it can. The terms "one embodiment" or "an embodiment" do not necessarily refer to the same embodiment or to a particular feature, structure, or characteristic, but can refer to different embodiments or to different features, structures, or characteristics.

[0025] Reference Figs. 1-3 For one embodiment of the present application, the embodiment provides a UPS power supply method for industrial computer based on seamless switching of mains interruption, comprising the following steps: S1, configure the input unit to receive the converted DC power supply of the mains, and charge the lithium battery pack through the BQ24610 charging management chip.

[0026] S1.1, the mains is converted into DC power supply by the AC-DC adapter and output to the UPS input unit, and the converted DC power supply is input to the VCC pin of the BQ24610 charging management chip after being filtered by the input capacitor.

[0027] Further, the mains is converted into 12V / 10A DC power supply by the AC-DC adapter and output to the UPS input unit, and the converted DC power supply is input to the VCC pin of the BQ24610 charging management chip after being filtered by the input capacitor to eliminate high-frequency noise. The VCC pin of the BQ24610 charging management chip receives the filtered DC power supply as charging input. The input capacitor is a ceramic capacitor arranged close to the VCC pin and GND pin of the BQ24610 charging management chip to reduce high-frequency loop noise. The BQ24610 charging management chip starts the charging management function after obtaining stable DC power supply through the VCC pin.

[0028] S1.2, the BQ24610 charging management chip sets the charging current according to the resistance of the ISET1 pin and enters the constant current charging phase.

[0029] Further, the BQ24610 charging management chip sets the charging current value through the resistance RlSET1 connected to the ISET1 pin, the internal reference voltage VISET1 of the ISET1 pin and the resistance RlSET1 jointly determine the charging current size, after the setting is completed, the BQ24610 charging management chip enters the constant current charging phase, in this phase, the charging current remains constant, at the same time, the actual charging current is monitored in real time through the current detection resistance RSR connected to the SRN and SRP pins, when the actual charging current deviates from the set value, the internal adjustment circuit of the BQ24610 charging management chip automatically adjusts the charging current to maintain the constant current state; the constant current charging phase continues until the lithium battery pack voltage approaches the set voltage threshold value; Specifically, the expression is,

[0030] wherein, is the constant current charging current value, is the reference voltage, is the external resistance.

[0031] S1.3, the BQ24610 charging management chip monitors the lithium battery pack voltage in real time through the voltage dividing resistance, and the number of battery series connection is matched.

[0032] Further, the BQ24610 charging management chip monitors the lithium battery pack voltage in real time through the voltage dividing resistance network connected to the VFB pin, the voltage dividing resistance network is composed of R22 and R28, R22 is connected between the positive electrode of the lithium battery pack and the VFB pin, and R28 is connected between the VFB pin and the ground; the VFB pin receives the voltage signal after voltage division, the internal comparator of the BQ24610 charging management chip compares the voltage division voltage with the reference voltage, the proportion of the voltage dividing resistance value is adjusted according to the number of lithium battery series connection, for example, when 2 lithium batteries are connected in series, the voltage dividing resistance is set as R22=100kΩ, R28=20kΩ; the parameters of the voltage dividing resistance network are matched with the number of lithium battery series connection to ensure that the voltage of the VFB pin accurately reflects the total voltage of the lithium battery pack, and the BQ24610 charging management chip judges the switching time of the charging phase according to the voltage of the VFB pin.

[0033] S1.4, based on the matched number of battery series connection and the voltage dividing resistance, the voltage threshold value is set, when the voltage of the lithium battery pack is less than or equal to the voltage threshold value, the BQ24610 charging management chip automatically switches to the constant voltage charging mode to charge the lithium battery pack.

[0034] Further, the BQ24610 charging management chip sets the voltage threshold according to the voltage dividing resistor network parameter configured according to the number of lithium battery series, when the lithium battery pack voltage reaches the preset threshold is detected through the VFB pin, the internal control circuit of the BQ24610 charging management chip automatically switches from constant current charging mode to constant voltage charging mode; in the constant voltage charging mode, the BQ24610 charging management chip maintains the lithium battery pack voltage at the set threshold by adjusting the charging current, while continuously monitoring the charging current value fed back by the current detection resistor RSR connected through the SRN and SRP pins; as the charging proceeds, when the charging current gradually decreases to the termination current threshold set by the BQ24610 charging management chip, the charging process is completed, and the BQ24610 charging management chip outputs a charging completion status signal through the STAT1 and STAT2 pins.

[0035] S2, the MCU collects the current detection signal of the BQ24610 charging management chip to obtain the lithium battery power state.

[0036] S2.1, the MCU collects the voltage difference across the current detection resistor through the SRN / SRP pins of the BQ24610 charging management chip, and the MCU converts the voltage difference into real-time charging and discharging current value according to Ohm's law.

[0037] Further, the MCU connects the SRN and SRP pins of the BQ24610 charging management chip through the ADC input channel, the SRN and SRP pins are connected across the precision current detection resistor RSR, the MCU collects the voltage difference between the SRN and SRP pins at a fixed sampling frequency, and according to Ohm's law, the MCU divides the collected voltage difference by the known resistance value of the current detection resistor RSR to obtain the real-time charging and discharging current value. The current detection resistor RSR is arranged in Kelvin connection mode, and the voltage sampling line is directly connected to the pad of the RSR resistor body, avoiding the influence of PCB parasitic resistance on measurement accuracy; the MCU stores the calculated current value in the register for subsequent power calculation, and compares it with the preset overcurrent protection threshold to determine whether protection is triggered.

[0038] S2.2, the MCU synchronously reads the battery pack total voltage signal output by the BQ24610 charging management chip voltage dividing circuit, the MCU obtains the resistance value of the NTC thermistor through the TS pin of the BQ24610 charging management chip, and converts it into battery temperature, the MCU time integrates the real-time current value, and combines the initial power to obtain the lithium battery power state.

[0039] Further, the MCU connects the VFB pin of the BQ24610 charging management chip through the ADC input channel, reads the lithium battery pack total voltage signal output by the R22 and R28 voltage dividing resistor network; at the same time, the MCU connects the NTC thermistor through the TS pin of the BQ24610 charging management chip, measures the voltage across the NTC thermistor using the constant current source method, and converts the resistance value to the lithium battery temperature value according to the NTC thermistor scale; the MCU time integrates the real-time charging and discharging current value collected and calculated through the SRN / SRP pin, the integration interval is from the initial power time to the current time, and the integration result is added to the initial power to obtain the current lithium battery power state. The MCU stores the lithium battery pack total voltage signal, the lithium battery temperature value and the lithium battery power state to the register for subsequent state judgment and protection control.

[0040] S3, set the LM5176 step-up / down controller to synchronously connect the input unit with the lithium battery pack, and form a bidirectional energy path.

[0041] S3.1, connect the converted DC power supply to the VIN pin of the LM5176, connect the output end of the lithium battery pack to the VBAT pin of the LM5176, set the output voltage of the LM5176 through the FB pin resistor network, and automatically switch the step-up / down mode when the input voltage fluctuates.

[0042] Further, the positive electrode of the converted 12V / 10A DC power supply is connected to the VIN pin of the LM5176 step-up / down controller, and the negative electrode is connected to the GND pin of the LM5176 step-up / down controller; the positive electrode output end of the lithium battery pack is connected to the VBAT pin of the LM5176 step-up / down controller, and the negative electrode is connected to the PGND pin of the LM5176 step-up / down controller; the FB pin of the LM5176 step-up / down controller is connected to the voltage dividing resistor network composed of R1 and R2, R1 is connected between the output voltage end and the FB pin, and R2 is connected between the FB pin and the GND, the FB pin voltage is set to 0.8V reference voltage by adjusting the resistance ratio of R1 and R2, and the output voltage of the LM5176 step-up / down controller is stabilized at 12V; when the input voltage is higher than 12V, the LM5176 step-up / down controller works in the step-down mode, and when the input voltage is lower than 12V, it automatically switches to the step-up mode, realizing automatic mode switching when the input voltage fluctuates.

[0043] S3.2, configure low DCR inductance and low ESR capacitance at the SW node of the LM5176 to suppress output ripple, select low Qg MOSFET and optimize HIDRV / LODRV drive signal, and the MCU controls the working mode through the EN pin of the LM5176, coordinates the charging and discharging through the CE pin of the BQ24610 charging management chip, and forms a bidirectional energy path.

[0044] Further, the SW node of the LM5176 step-up / down controller is connected with a low DCR inductor and a low ESR output capacitor to form an LC filter network. The inductor is wound with a ferrisilicon-aluminum core, and the DCR value is controlled below 10 mΩ. The output capacitor is connected with multiple ceramic capacitors in parallel, and the total ESR is below 5 mΩ. The high-side MOSFET and the low-side MOSFET of the LM5176 step-up / down controller are selected from a model with a Qg value below 30 nC. The rising / falling time of the drive signal of the HIDRV and the LODRV is optimized by adjusting the gate drive resistor, so as to ensure the integrity of the switching waveform. The EN pin of the LM5176 step-up / down controller is connected with the GPIO of the MCU. When the EN pin is at a high level, the LM5176 step-up / down controller works, and when the EN pin is at a low level, the LM5176 step-up / down controller is turned off. The CE pin of the BQ24610 charging management chip is also controlled by the MCU. When the LM5176 step-up / down controller is powered by the battery, the CE pin is pulled low to prohibit charging. When the LM5176 step-up / down controller is powered by the mains, the CE pin is pulled high to allow charging, so as to realize the bidirectional energy path management between the input power supply and the lithium battery.

[0045] S4. The voltage of the input unit is monitored by the MCU, and a switching instruction is triggered to control the EN pin of the LM5176 step-up / down controller to perform the power supply mode for the lithium battery and to perform seamless switching of the power supply path.

[0046] S4.1. The voltage signal of the UPS input unit is collected in real time by the MCU through the ADC module, and the under-voltage signal threshold is set through the UVLO function of the LM5176. The voltage signal is compared with the under-voltage threshold to determine the mains state.

[0047] Further, the voltage sampling point of the UPS input unit is connected with the ADC input channel of the MCU, and the voltage signal of the input unit is collected in real time at a sampling frequency of 1 kHz. The under-voltage threshold is set through the resistance voltage dividing network of the UVLO function of the LM5176 step-up / down controller, for example, the under-voltage lock is triggered when the input voltage is below 10.5 V. The input unit voltage signal collected by the MCU is compared with the under-voltage threshold set by the LM5176 step-up / down controller. When the input unit voltage is below the under-voltage threshold for 5 sampling periods, the MCU determines that the mains is abnormal, and the state register in the MCU records the change of the mains state, which provides a basis for judging the subsequent power supply path switching.

[0048] S4.2. When the voltage signal is below the under-voltage threshold, a switching instruction is generated.

[0049] Further, after the MCU detects that the voltage signal of the UPS input unit continuously falls below the under-voltage threshold set by the LM5176 buck-boost controller, the internal state machine switches to an abnormality processing state, generates a switching instruction containing a switching timestamp and an abnormality type, and writes the switching instruction into the instruction register of the MCU. The instruction content includes two operations: pulling down the EN pin level of the LM5176 buck-boost controller and pulling down the CE pin level of the BQ24610 charge management chip. The MCU transmits the switching instruction to the GPIO controller through the internal bus, and the GPIO controller prepares to perform the pin level switching operation. The switching instruction also triggers the interrupt service program of the MCU, starting a switching process timer for recording the response time of the power supply path switching.

[0050] S4.3, the MCU outputs a low-level signal to the EN pin of the LM5176 through the GPIO, closes the input power supply path, switches to the battery power supply mode, and outputs a low-level signal to the CE pin of the BQ24610 charge management chip through the GPIO, stops the charging function and disconnects the connection path between the input power supply and the battery, for seamless switching of the power supply path.

[0051] Further, the GPIO controller of the MCU outputs a low-level signal to the GPIO port connected to the EN pin of the LM5176 buck-boost controller according to the switching instruction. The LM5176 buck-boost controller detects the low level of the EN pin and immediately closes the input power supply path. The internal four-switch Buck-Boost circuit switches to the working mode powered by the VBAT pin. At the same time, the GPIO controller of the MCU outputs a low-level signal to the GPIO port connected to the CE pin of the BQ24610 charge management chip. The BQ24610 charge management chip detects the low level of the CE pin and immediately stops the charging function. The internal MOSFET disconnects the connection path between the input power supply and the lithium battery. The LM5176 buck-boost controller completes the power supply switching within 100μs after the EN pin goes low, and the BQ24610 charge management chip stops charging within 50μs after the CE pin goes low. The two work together to achieve seamless switching of the power supply path. After the switching is completed, the MCU confirms the switching success by reading the PGOOD pin level of the LM5176 buck-boost controller and the STAT pin state of the BQ24610 charge management chip.

[0052] S5, send a power failure warning signal to the industrial computer through the RS232 bus to trigger the data protection process of the industrial computer.

[0053] S5.1, based on the seamless switching of the power supply path, generate a power failure warning signal.

[0054] Further, the MCU generates a power-off warning signal containing event type code 0x01 (mains interruption), current lithium battery percentage and estimated power supply time immediately after confirming that the LM5176 step-up / down controller completes the power supply switching; the power-off warning signal is written into the sending buffer of the MCU, the signal format conforms to the frame structure defined by the RS232 communication protocol, containing start bit 0xAA, 1 byte length, 1 byte type code, 2 bytes of power data, 2 bytes of time data and 1 byte of checksum; the USART module of the MCU reads the power-off warning signal from the sending buffer, adds start bit, stop bit and parity bit and then converts it into serial data stream; the MAX3232 level conversion chip receives the TTL level serial data output by the MCU and converts it into ±12V level signal conforming to the RS232 standard, which is output to the COM port of the industrial computer through the TXD pin of the DB9 connector; after receiving the complete data frame, the serial port driver of the industrial computer confirms the data integrity through CRC check and extracts the power-off warning information to trigger the data protection process.

[0055] S5.2, the MCU encapsulates the power-off warning signal and the lithium battery power state into a data frame according to the RS232 protocol format.

[0056] Further, S5.3, the MCU loads the data frame into the TX register through the USART module and automatically converts it into serial signal of RS232 level standard.

[0057] Further, the USART module of the MCU reads the encapsulated RS232 protocol data frame from the sending buffer and loads it into the TX data register of the USART module byte by byte according to the preset baud rate (for example, 9600bps) and frame format (1-bit start bit, 8-bit data bit, no parity bit, 1-bit stop bit); the transmitter of the USART module automatically converts the parallel data in the TX data register into serial bit stream and adds start bit and stop bit to form a complete serial data frame; the converted serial signal is output through the TX pin of the USART module, and the signal level is TTL standard (0V represents logic 0 and 3.3V represents logic 1); the MAX3232 level conversion chip receives the TTL level serial signal output by the USART module, converts the signal level to RS232 standard (+3V to +15V represents logic 0 and -3V to -15V represents logic 1) through the internal charge pump circuit, and outputs the converted signal to the COM port of the industrial computer through the TXD pin of the DB9 connector.

[0058] S5.4, the MAX3232 chip converts the TTL level of the MCU into RS232 signal and transmits it to the COM port of the industrial computer through the DB9 connector to trigger the data protection process of the industrial computer.

[0059] Further, the TTL level input end of the MAX3232 chip is connected to the TX pin of the USART module of the MCU to receive a 3.3V TTL level serial data signal; the internal charge pump circuit of the MAX3232 chip converts the input TTL level into a ±12V level signal conforming to the RS232 standard, and the converted signal is output from the RS232 level output end of the MAX3232 chip; the RS232 level signal is transmitted to the 2nd pin (RXD) of the COM port of the industrial computer through the 2nd pin (TXD) of the DB9 connector; after the RS232 signal start bit is detected by the industrial computer UART receiver, a complete data frame is received at a preset baud rate, and after CRC check, the power-off warning information is parsed; the preset emergency processing script of the industrial computer operating system is called to immediately start the data cache writing, process suspension and key state saving data protection processes, and at the same time, a reception confirmation signal ACK is returned to the MCU through the COM port.

[0060] S6. According to the lithium battery power state and the delay time set by the host computer software, a delay shutdown instruction is sent to the industrial computer, and the MCU detects the input voltage to trigger the power-on self-start of the industrial computer.

[0061] S6.1, the MCU real-time monitors the lithium battery power state collected by the BQ24610 charging management chip and compares it with the power threshold set by the host computer software, and the MCU reads the shutdown delay time parameter set by the host computer software from the EEPROM.

[0062] Further, the MCU accesses the EEPROM memory through the I2C interface, reads the lithium battery power threshold parameter (for example, 20%) and shutdown delay time parameter (for example, 90 minutes) set by the host computer software in advance, and stores the parameters in the internal register of the MCU; at the same time, the MCU continuously acquires the real-time lithium battery power state data collected by the BQ24610 charging management chip SRN / SRP pin, compares the current power percentage with the power threshold read from the EEPROM; when the lithium battery power is detected to be lower than the set threshold, the MCU calculates the actual shutdown time according to the shutdown delay time parameter stored in the EEPROM, generates a control instruction containing the countdown information; the MCU integrates the control instruction and the real-time power data, and sends it to the industrial computer through the RS232 communication interface to trigger the delay shutdown process.

[0063] S6.2, when the lithium battery power state is lower than the power threshold, the MCU calculates the actual shutdown time in combination with the remaining power and the shutdown delay time parameter, and generates an RS232 instruction of the countdown parameter.

[0064] Further, when the MCU detects that the lithium battery power state is lower than the power threshold parameter stored in the EEPROM, it immediately starts the shutdown countdown calculation process: first read the shutdown delay time parameter stored in the EEPROM, then dynamically adjust the delay time according to the difference between the current remaining power percentage and the power threshold, for example, when the remaining power is 15%, the preset 90-minute delay is shortened by a certain proportion, the MCU generates RS232 instructions containing countdown time, remaining power and alarm level, including 0xAA start bit, 1 byte instruction type (0x02 represents delay shutdown), 2 bytes countdown time (in minutes), 2 bytes remaining power data and 1 byte checksum; The generated RS232 instruction is written into the USART send buffer of the MCU, ready to be converted to RS232 level signal by MAX3232 chip and sent to the industrial computer.

[0065] S6.3, the MCU encapsulates the RS232 instruction of the countdown parameter into a data frame through the USART module, sends it to the industrial computer after level conversion by MAX3232, and executes the safe shutdown process.

[0066] Further, the USART module of the MCU reads the RS232 instruction data frame containing the countdown parameter from the send buffer, loads the data frame into the TX register of the USART module according to the preset 9600 bps baud rate and 8N1 frame format (1-bit start bit, 8-bit data bit, no check bit, 1-bit stop bit); The transmitter of the USART module automatically converts the parallel data into a serial bit stream and outputs a TTL level signal to the TTL level input terminal of the MAX3232 chip through the TX pin; The internal charge pump circuit of the MAX3232 chip converts the 3.3V TTL level to ±12V RS232 level signal, which is transmitted to the COM port of the industrial computer through the 2nd pin of the DB9 connector; After the industrial computer UART receiver completely receives the data frame, it checks the CRC and parses the countdown time parameter if there is no error, calls the preset shutdown script to perform data buffer writing, process termination and system shutdown operation, and returns an execution status confirmation signal to the MCU through the COM port.

[0067] S6.4, the MCU continuously monitors the UPS input unit voltage, and when it detects that the voltage has returned to the normal range, it determines that the mains power has been restored, and the MCU outputs a high level to the PS_ON pin of the industrial computer through the GPIO, triggering the industrial computer to power on and start automatically.

[0068] Further, the MCU continuously samples the voltage signal of the UPS input unit through the ADC input channel at a frequency of 1 kHz, and when the 10 consecutive sampling values are all higher than the recovery threshold (for example, 12V) set by the UVLO function of the LM5176 step-up / down controller, it is determined that the mains power is restored; the GPIO controller of the MCU outputs a high-level signal to the GPIO port connected to the PS_ON pin of the industrial computer and maintains it for 500 ms, and after the industrial computer ATX power supply detects the high level of the PS_ON pin, it starts the power-on process; at the same time, the MCU sets the EN pin of the LM5176 step-up / down controller to high level through the GPIO, restores the mains power supply mode, and sets the CE pin of the BQ24610 charge management chip to high level, re-enables the charging function; after the industrial computer completes the power-on self-test, it sends a start completion confirmation signal to the MCU through the COM port, and the MCU records the system recovery timestamp after receiving the signal.

[0069] S7, the MCU real-time collects lithium battery voltage, temperature and charge-discharge current, detects battery over-temperature, over-current and voltage abnormality, and alarms through LED indicator and RS232 communication.

[0070] S7.1, the MCU real-time collects lithium battery voltage, temperature and charge-discharge current through the BQ24610 charge management chip, and sets three-element threshold based on the safe working range of lithium battery pack.

[0071] Further, the MCU obtains the lithium battery pack voltage signal through the VFB pin of the BQ24610 charge management chip, obtains the NTC thermistor temperature signal through the TS pin, and obtains the charge-discharge current signal through the SRN / SRP pin, sets the voltage threshold (for example, single 4.3V overvoltage / 2.8V undervoltage), temperature threshold (for example, 50℃ over-temperature) and current threshold (for example, 3A over-current) based on the technical specifications of lithium battery pack, and the internal comparator of the MCU compares the real-time collected lithium battery voltage, temperature and current signal with the preset threshold, and when any parameter exceeds the threshold, the corresponding abnormal flag bit is immediately set. The abnormal flag bit state is updated to the state register of the MCU in real time.

[0072] S7.2, compare the lithium battery voltage, temperature and charge-discharge current with the three-element threshold, and detect overvoltage, undervoltage, over-temperature and over-current abnormality.

[0073] Further, the MCU compares the lithium battery voltage collected by the BQ24610 charging management chip VFB pin with the preset overvoltage threshold (for example, 4.3V) and undervoltage threshold (for example, 2.8V) in real time through the internal comparator, compares the temperature signal obtained by the TS pin with the overtemperature threshold (for example, 50℃), and compares the charging and discharging current detected by the SRN / SRP pin with the overcurrent threshold (for example, 3A); when the lithium battery voltage exceeds 4.3V, the overvoltage flag is set, when the lithium battery voltage is lower than 2.8V, the undervoltage flag is set, when the temperature exceeds 50℃, the overtemperature flag is set, and when the charging and discharging current exceeds 3A, the overcurrent flag is set; the MCU scans the flag bit state every 100ms, and triggers the protection process when the abnormal flag bit is set, and writes the abnormal type and current parameter value into the event log register.

[0074] S7.3, when detecting an abnormality, triggering the LED indicator light and RS232 communication alarm.

[0075] Further, after the MCU detects the overvoltage, undervoltage, overtemperature or overcurrent abnormal flag bit, the alarm triggering process is immediately executed: first, control the GPIO port connected to the LED indicator light to output a square wave signal of a specific frequency (for example, overvoltage 1Hz, overtemperature 2Hz), drive the LED indicator light to flash in a preset mode; at the same time, the abnormal type code, current lithium battery voltage value, temperature value and current value are packaged into an alarm data frame in RS232 protocol format, including 0xAA start bit, 1 byte alarm type, 2 bytes voltage data, 2 bytes temperature data, 2 bytes current data and 1 byte checksum; the USART module of the MCU sends the alarm data frame to the MAX3232 chip to convert it into an RS232 level signal, which is transmitted to the COM port of the industrial computer through the DB9 connector; after the industrial computer receives and analyzes the alarm data, a warning window is popped up on the monitoring interface and the abnormal event is recorded.

[0076] The embodiment also provides a computer device suitable for the case of the industrial computer UPS power supply method based on seamless switching of mains interruption, which comprises a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the industrial computer UPS power supply method based on seamless switching of mains interruption as proposed in the above embodiment.

[0077] The computer device can be a terminal, which comprises a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved by WIFI, an operator network, NFC (Near Field Communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0078] The embodiment also provides a storage medium having a computer program stored thereon, the program being executed by a processor to implement the method for seamlessly switching the UPS power supply of an industrial computer based on interruption of commercial power as described in the above embodiment. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.

[0079] To sum up, the application realizes millisecond seamless switching at the hardware level by cooperating the EN pin of the LM5176 step-up and step-down controller and the CE pin of the BQ24610 to switch the power supply path, and at the same time, the state signal is transmitted in real time through the RS232 bus, so that the data protection process of the industrial computer is accurately synchronized with the power supply switching action, the problem of asynchronous hardware switching and software protection in the traditional scheme is solved, the technical effect of the power supply system and the industrial control system is achieved, the current / voltage signal collected by the MCU based on the BQ24610 is used to calculate the state of the lithium battery in real time, and the delay shutdown instruction is generated by combining the parameters set by the upper computer, so that the dynamic power management mechanism is constructed, the industrial computer can intelligently adjust the data saving strategy according to the actual battery capacity, and intelligent interaction between the power supply system and the industrial control system is realized.

[0080] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it, although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, which should be covered in the scope of the claims of the present application.

Claims

1. A UPS power supply method for industrial computers based on seamless switching during mains power outages, characterized by: include, The UPS input unit is configured to receive DC power converted from the mains electricity. The BQ24610 charge management chip is used to charge the lithium battery pack. The MCU collects the current detection signal from the BQ24610 charge management chip to obtain the lithium battery charge status. The LM5176 buck-boost controller is configured to synchronously connect the input unit and the lithium battery pack to form a bidirectional energy path. The MCU monitors the UPS input unit voltage, triggers the switching command, controls the EN pin of the LM5176 buck-boost controller to power the lithium battery, seamlessly switches the power supply path, and triggers the industrial computer data protection process; According to the lithium battery power status and the delay time set by the host computer software, a delayed shutdown command is sent to the industrial computer. The MCU detects the input voltage and triggers the industrial computer to power on and restart automatically. The MCU collects the lithium battery voltage, temperature, and charge and discharge current in real time, detects battery overtemperature, overcurrent, and voltage anomalies, and issues alarms through LED indicators and RS232 communication.

2. The UPS power supply method for industrial computers based on seamless switching during mains power outages according to claim 1, characterized in that: The configuration input unit receives the DC power converted from the mains electricity and charges the lithium battery pack through the BQ24610 charging management chip, including the following steps: The AC power is converted to DC power by the AC-DC adapter and output to the UPS input unit. The converted DC power input capacitor is filtered and connected to the VCC pin of the BQ24610 charging management chip. The BQ24610 charge management chip sets the charging current according to the ISET1 pin resistance and enters the constant current charging stage; The BQ24610 charge management chip monitors the voltage of the lithium battery pack in real time through a voltage divider resistor to match the number of batteries in series; The voltage threshold is set based on the matching number of batteries in series and the voltage divider resistor. When the voltage of the lithium battery pack is less than or equal to the voltage threshold, the BQ24610 charge management chip automatically switches to constant voltage charging mode to charge the lithium battery pack.

3. The UPS power supply method for industrial computers based on seamless switching during mains power outages according to claim 2, wherein: The current detection signal of the BQ24610 charging management chip is collected by MCU to obtain the lithium battery power status, including the following steps: The MCU collects the voltage difference across the current detection resistor through the SRN / SRP pin of the BQ24610 charge management chip. The MCU converts the voltage difference into real-time charge and discharge current values ​​according to Ohm's law. The MCU synchronously reads the total battery pack voltage signal output by the voltage divider circuit of the BQ24610 charging management chip. The MCU obtains the resistance value of the NTC thermistor through the TS pin of the BQ24610 charging management chip and converts it into battery temperature. The MCU integrates the real-time current value over time and combines it with the initial power to obtain the lithium battery power status.

4. The UPS power supply method for industrial computers based on seamless switching during mains power outages according to claim 3, wherein: Setting up the LM5176 buck-boost controller to synchronously connect the input unit and the lithium battery pack to form a bidirectional energy path includes the following steps: Connect the DC power source converted from the mains to the VIN pin of the LM5176, and the output of the lithium battery pack to the VBAT pin of the LM5176. Set the output voltage of the LM5176 through the resistor network on the FB pin, and automatically switch to buck-boost mode when the input voltage fluctuates. A low-DCR inductor and low-ESR capacitor are configured at the SW node of the LM5176 to suppress output ripple. A low-Qg MOSFET is selected, and the HIDRV / LODRV drive signals are optimized. The MCU controls the operating mode through the EN pin of the LM5176 and coordinates charging and discharging with the CE pin of the BQ24610 charge management chip to form a bidirectional energy path. When the mains power is normal, the input unit directly outputs regulated DC to the industrial computer through the LM5176 buck-boost controller. When the mains power is interrupted, it automatically switches to the lithium battery pack to output regulated DC through the LM5176 buck-boost controller.

5. The UPS power supply method for industrial computers based on seamless switching during mains power outages according to claim 4, characterized in that: The MCU monitors the input unit voltage, triggers the switching instruction, controls the EN pin of the LM5176 buck-boost controller to power the lithium battery, and seamlessly switches the power supply path, including the following steps: The MCU collects the voltage signal of the UPS input unit in real time through the ADC module, sets the undervoltage signal threshold through the UVLO function of the LM5176, compares the voltage signal with the undervoltage threshold, and determines the mains power status; When the voltage signal is lower than the undervoltage threshold, a switching instruction is generated; The MCU outputs a low-level signal to the EN pin of the LM5176 through the GPIO, shutting down the input power supply path and switching to battery power supply mode. The MCU also outputs a low-level signal to the CE pin of the BQ24610 charging management chip through the GPIO, stopping the charging function and disconnecting the connection path between the input power supply and the battery, seamlessly switching the power supply path.

6. The UPS power supply method for industrial computers based on seamless switching during mains power outages according to claim 5, characterized in that: Send power failure warning signal to industrial computer via RS232 bus, triggering the data protection process of industrial computer. The following steps are included: Generate power outage warning signals based on seamless switching of power supply paths; The MCU encapsulates the power-off warning signal and the lithium battery power status into a data frame according to the RS232 protocol format; The MCU loads the data frame into the TX register through the USART module and automatically converts it into a serial signal of the RS232 level standard; The MAX3232 chip converts the MCU's TTL level into an RS232 signal, transmits it to the industrial computer's COM port through the DB9 connector, and triggers the industrial computer's data protection process.

7. The UPS power supply method for industrial computers based on seamless switching during mains power outages according to claim 6, characterized in that: According to the lithium battery power status and the delay time set by the host computer software, a delayed shutdown command is sent to the industrial computer. The MCU detects the input voltage and triggers the industrial computer to power on and start automatically. The process includes the following steps: The MCU monitors the lithium battery power status collected by the BQ24610 charging management chip in real time and compares it with the power threshold set by the host computer software. The MCU reads the shutdown delay time parameter set by the host computer software from the EEPROM. When the lithium battery power level is lower than the power threshold, the MCU calculates the actual shutdown time based on the remaining power and the shutdown delay time parameter, and generates an RS232 command for the countdown parameter; The MCU encapsulates the RS232 command of the countdown parameter into a data frame through the USART module, and sends it to the industrial computer after level conversion by the MAX3232 to execute the safety shutdown process; The MCU continuously monitors the UPS input unit voltage. When it detects that the voltage has returned to the normal range, it determines that the mains power has been restored. The MCU outputs a high level to the PS_ON pin of the industrial computer through GPIO, triggering the industrial computer to power on and restart.

8. The UPS power supply method for industrial computers based on seamless switching during mains power outages according to claim 7, characterized in that: The MCU collects the lithium battery voltage, temperature, and charge and discharge current in real time, detects battery overtemperature, overcurrent, and voltage abnormalities, and sends an alarm through the LED indicator and RS232 communication. The steps include: The MCU uses the BQ24610 charge management chip to collect real-time data on the lithium battery voltage, temperature, and charge and discharge current, and sets the ternary threshold based on the safe operating range of the lithium battery pack. Compare the lithium battery voltage, temperature, and charge and discharge current with the ternary threshold to detect overvoltage, undervoltage, overtemperature, and overcurrent anomalies; When an abnormality is detected, the LED indicator and RS232 communication alarm are triggered.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the UPS power supply method for industrial computers based on seamless switching during mains power outage according to any one of claims 1 to 8 are implemented. The overall size of the industrial computer UPS is controlled within the range of 149×58×64.5mm, and the lithium battery pack uses replaceable Yiwei 4*21700 / 5000mAh battery cells.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the industrial computer UPS power supply method based on seamless switching during mains interruption according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • UPS maintenance and state monitoring method and system

    CN117559627A

  • On-line capacity checking and charge-discharge control system for wide-voltage storage battery pack

    CN120150311A

  • A UPS uninterrupted power supply

    CN203166618U

  • Bidirectional energy flow synchronous boost-buck micro energy storage management system

    CN216390567U

  • Power supply apparatus and power supply system

    US20220149651A1

Cited By

  • Power UPS power supply parameter real-time acquisition and display screen cooperative control method

    CN122292649A

  • A method for real-time acquisition and coordinated control of power UPS parameters and display screen

    CN122292649B