A power supply circuit

CN122932438APending Publication Date: 2026-10-16HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510439356.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]在控制器控制变压电路调节母线电压的过程中,需要实时采集母线电压,由于母线电压位于强电区域,而控制器位于弱电区域,目前的母线电压采集方案涉及到隔离采样技术,成本较高

Benefits of technology

[0021]In one possible implementation, the first comparator and the second comparator are integrated within the second microcontroller. Using the comparators inside the second microcontroller can further reduce the cost of bus voltage detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122932438A_ABST
    Figure CN122932438A_ABST
Patent Text Reader

Abstract

The application provides a power supply circuit, relates to the technical field of power supply, and is used for realizing low-cost bus voltage isolation detection. The power supply circuit comprises a first microcontroller, a first comparator, a second comparator, a first isolation device, a second isolation device and a voltage dividing circuit. The first input end of the first comparator is used for receiving a first reference voltage. The second end of the first comparator is connected with a DC bus through the voltage dividing circuit. The output end of the first comparator is connected with the first IO port of the first microcontroller through the first isolation device. The first input end of the second comparator is used for receiving a second reference voltage. The second end of the first comparator is connected with the DC bus through the voltage dividing circuit. The output end of the second comparator is connected with the second IO port of the first microcontroller through the second isolation device. The first reference voltage is greater than the second reference voltage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power supply technology, and in particular to a power supply circuit. Background Technology

[0002] The power supply unit includes an energy storage element, a transformer circuit, a controller, a bus, and an inverter circuit. The energy storage element is used to provide energy to the bus. The controller controls the transformer circuit to transform the voltage output by the energy storage element to the bus voltage so that the bus voltage meets the user's needs. The inverter circuit is used to invert the bus voltage into AC output to connect the load and supply power to the load.

[0003] During the process of the controller controlling the transformer circuit to regulate the bus voltage, it is necessary to collect the bus voltage in real time. Since the bus voltage is located in the high voltage area and the controller is located in the low voltage area, the current bus voltage acquisition scheme involves isolated sampling technology, which is costly. Summary of the Invention

[0004] This application provides a power supply circuit to improve the high cost of current power supply devices that isolate and sample bus voltage.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0006] This application provides a power supply circuit including a battery, an isolation transformer circuit, and a DC bus. The battery is connected to the DC bus via the isolation transformer circuit. The power supply circuit also includes a first microcontroller, a first comparator, a second comparator, a first isolation device, a second isolation device, and a voltage divider circuit. The first input terminal of the first comparator is used to receive a first reference voltage, the second terminal of the first comparator is connected to the DC bus via the voltage divider circuit, and the output terminal of the first comparator is connected to the first input-output (IO) port of the first microcontroller via the first isolation device. The first input terminal of the second comparator is used to receive a second reference voltage, the second terminal of the first comparator is connected to the DC bus via the voltage divider circuit, and the output terminal of the second comparator is connected to the second IO port of the first microcontroller via the second isolation device. The first reference voltage is greater than the second reference voltage.

[0007] The power supply circuit provided in this application uses a comparator to compare the voltage division of the bus voltage in the high-voltage region with a reference voltage, and outputs the comparison result to the first microcontroller in the low-voltage region through an isolation device. By comparing the voltage division of the bus voltage with two reference voltages, the specific range of the bus voltage can be obtained, and the isolation detection of the bus voltage can be achieved safely, reliably and at low cost.

[0008] In one possible implementation, a first isolation device and a second isolation device are used to receive a first electrical signal and isolate the output of either the first or second electrical signal, wherein the voltage levels of the first and second electrical signals are opposite. For example, the isolation device can input a low-level signal and isolate the output of either a low-level or high-level signal. Alternatively, the isolation device can also input a high-level signal and isolate the output of either a high-level or low-level signal. Using isolation devices can achieve electrical isolation between high-voltage and low-voltage areas, preventing damage to devices in low-voltage areas such as the first microcontroller.

[0009] In one possible implementation, the first isolation device and the second isolation device include optocoupler-type isolation devices or digital isolation devices. The digital isolation devices may further include capacitive isolation, magnetic isolation, and optocoupler-type isolation devices.

[0010] In one possible implementation, the first isolation device includes a light emitter and a photodetector. A first electrode of the light emitter is connected to a first power supply terminal, a second electrode of the light emitter is connected to the output terminal of a first comparator, and a first electrode of the photodetector is connected to a second power supply terminal and a first I / O port of a first microcontroller. The second isolation device also includes a light emitter and a photodetector. A first electrode of the light emitter is connected to the first power supply terminal, a second electrode of the light emitter is connected to the output terminal of a second comparator, a first electrode of the photodetector is connected to a second power supply terminal, and a second electrode of the photodetector is connected to a second I / O port of the first microcontroller.

[0011] In one possible implementation, the power supply circuit further includes a second microcontroller, which includes a third I / O terminal and a fourth I / O port; the third I / O port of the second microcontroller is connected to the first input terminal of the first comparator to output a first reference voltage to the first comparator; the fourth I / O port of the second microcontroller is connected to the first input terminal of the second comparator to output a second reference voltage to the second comparator.

[0012] In one possible implementation, the power supply circuit further includes a second microcontroller, a first filter circuit, and a second filter circuit; the second microcontroller includes a third I / O port and a fourth I / O port; the third I / O port is connected to the first input terminal of the first comparator through the first filter circuit to output a first reference voltage to the first comparator; the fourth I / O port is connected to the first input terminal of the second comparator through the second filter circuit to output the first reference voltage to the second comparator.

[0013] In one possible implementation, the first filter circuit includes a first resistor and a first capacitor. The first end of the first resistor is connected to the third I / O port of the second microcontroller, the second end of the first resistor is connected to the first input terminal of the first comparator, the first end of the first capacitor is connected to the second end of the resistor, and the second end of the first capacitor is grounded. The second filter circuit includes a second resistor and a second capacitor. The first end of the second resistor is connected to the fourth I / O port of the second microcontroller, the second end of the second resistor is connected to the first input terminal of the second comparator, the first end of the second capacitor is connected to the second end of the second resistor, and the second end of the second capacitor is grounded.

[0014] In one possible implementation, the first reference voltage and the second reference voltage are variable voltages. This can reduce the voltage difference between the first reference voltage and the second reference voltage, thereby improving the accuracy of bus voltage detection.

[0015] In one possible implementation, the voltage divider circuit includes a third resistor and a fourth resistor. The first end of the third resistor is connected to the DC bus, the second end of the third resistor and the first end of the fourth resistor are coupled to the voltage divider node, the second end of the fourth resistor is grounded, and the second input terminal of the first comparator and the second input terminal of the second comparator are connected to the voltage divider node.

[0016] In one possible implementation, the first comparator is used to compare the voltage of the voltage divider node with a first reference voltage and output a first comparison result to a first microcontroller through a first isolation device; the second comparator is used to compare the voltage of the voltage divider node with a second reference voltage and output a second comparison result to the first microcontroller through a second isolation device; the first microcontroller is used to determine the voltage range of the DC bus based on the first comparison result and the second comparison result.

[0017] In one possible implementation, the first microcontroller is used to determine the voltage range of the DC bus when the voltage at the voltage divider node is less than a first reference voltage and the voltage at the voltage divider node is greater than a second reference voltage:

[0018] Vref2 / k <Vbus<Vref1 / k

[0019] Where Vref1 is the first reference voltage, Vref2 is the second reference voltage, and k is the voltage division ratio of the voltage divider circuit.

[0020] In one possible implementation, the second microcontroller is used to reduce the voltage difference between the first and second reference voltages when the voltage at the voltage divider node is less than the first reference voltage but greater than the second reference voltage. This can improve the accuracy of bus voltage detection.

[0021] In one possible implementation, the first comparator and the second comparator are integrated within the second microcontroller. Using the comparators inside the second microcontroller can further reduce the cost of bus voltage detection. Attached Figure Description

[0022] Figure 1 A schematic diagram of a power supply circuit provided in an embodiment of this application;

[0023] Figure 2 A schematic diagram of bus voltage detection provided in an embodiment of this application;

[0024] Figure 3 A schematic diagram illustrating another bus voltage detection method provided in this application embodiment;

[0025] Figure 4 A schematic diagram of a power supply circuit provided in an embodiment of this application;

[0026] Figure 5 A schematic diagram of another power supply circuit provided in an embodiment of this application;

[0027] Figure 6 This is a schematic diagram of another power supply circuit provided in an embodiment of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0029] In the following description, the terms "first," "second," etc., are used for descriptive convenience only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0030] In the embodiments of this application, unless otherwise explicitly specified and limited, the term "connection" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral part; it can be a direct connection or an indirect connection through an intermediate medium.

[0031] Power systems are an important part of production and daily life. They can use energy stored in energy storage devices to supply power to loads. For example, a power system can be an outdoor power source, a power battery for a new energy vehicle, or other forms of power system.

[0032] Figure 1A schematic diagram of a power supply circuit is shown, including an energy storage element (such as a battery 160), an isolation transformer circuit 180, a DC bus, and an inverter circuit 170. The battery 160 can be connected to the DC bus via the isolation transformer circuit 180, which transforms the voltage supplied by the battery 160 and outputs it to the DC bus, ensuring that the voltage of the DC bus (hereinafter referred to as the bus voltage) reaches a target voltage. The power supply circuit also includes an AC output terminal, which is connected to the DC bus via the inverter circuit 170. The inverter circuit 170 converts the DC power on the DC bus into AC power for output, which is then connected to a load to supply power.

[0033] The power supply circuit also includes microcontroller units (MCUs) 1 and 2, where MCU 1 is used to control the voltage of battery 160 to rise to the target voltage. MCU 2 is used to control inverter circuit 170 to convert DC power on the DC bus into AC power.

[0034] For example, the isolation transformer circuit 180 includes a phase-shift converter circuit 181 and a transformer 182. MCU 1 can output a pulse width modulation (PWM) signal to the phase-shift converter circuit 181. Based on this PWM signal, the phase-shift converter circuit 181 converts the DC power output from the battery 160 into a pulse signal with a certain duty cycle. After being boosted by the transformer 182, the pulse signal is output to the DC bus. Therefore, MCU 1 can adjust the voltage output to the transformer 182 by adjusting the duty cycle of the PWM signal. With a fixed turns ratio in the transformer 182, adjusting the input voltage of the transformer 182 also allows adjustment of the output voltage, thereby regulating the DC bus voltage. For example, when the duty cycle of the PWM signal increases, the DC bus voltage increases; when the duty cycle of the PWM signal decreases, the DC bus voltage decreases.

[0035] Combination Figure 1 As can be seen, MCU 1 is located in the low-voltage region or low-voltage side of the power supply circuit, while MCU 2 is located in the high-voltage region or high-voltage side of the power system. The bus voltage, as the power control output of MCU 1, needs to be acquired in real time to ensure that it can be adjusted to be closer to the target voltage. However, the voltage environments of the high-voltage and low-voltage regions differ significantly. To ensure the normal operation of electronic components, there is usually electrical isolation between the high-voltage and low-voltage regions. Conventional voltage detection schemes cannot meet this requirement, necessitating the use of isolated sampling to obtain the bus voltage.

[0036] One possible sampling method is to use an isolation operational amplifier 120 to acquire the bus voltage amplitude in high-voltage areas. For example, see [link to relevant documentation]. Figure 2 , Figure 2This is a schematic diagram of bus voltage detection provided in an embodiment of this application. A voltage divider circuit 101 is set up to divide the bus voltage. For example, the voltage divider circuit 101 includes a third resistor R3 and a fourth resistor R4. The first end of the third resistor R3 is connected to the DC bus, and the second end of the third resistor R3 and the first end of the fourth resistor R4 are coupled to the voltage divider node N1. The second end of the fourth resistor R4 is grounded (GND). The voltage divider circuit 101 can divide the bus voltage, and the voltage at the voltage divider node can be expressed as: Vn = Vbus * R4 / (R3 + R4). Vn represents the voltage at the voltage divider node, that is, the voltage divider circuit 101 divides the bus voltage. Vbus is the bus voltage, and R3 and R4 represent the resistance values ​​of the corresponding resistors.

[0037] The input of the isolation operational amplifier 150 is electrically connected to the voltage divider node N1 to obtain the divided bus voltage. The output of the isolation operational amplifier 150 is connected to MCU 1 to provide the sampled bus voltage to MCU 1 in an isolated manner. For example, the output of the isolation operational amplifier 150 can be connected to the first IO port IO1 of MCU 1, and the analog-to-digital converter inside MCU 1 can convert the signal output by the isolation operational amplifier 150 into a voltage value. The isolation operational amplifier 150 refers to an amplifier with isolated input and output sections and no conductive contact. Since the DC bus is located in a high-voltage region, while devices such as MCU 1 are located in a low-voltage region, the input and output isolation characteristics of the isolation operational amplifier 150 can be used to isolate and detect the bus voltage in the high-voltage region and transmit the sampled bus voltage to MCU 1 located in the low-voltage region. MCU 1 can adjust the operating state of the isolation transformer circuit 180 according to the sampled bus voltage to make the bus voltage reach the set target voltage. The isolation operational amplifier 150 can effectively achieve electrical isolation between high-voltage and low-voltage areas, but the cost of the isolation operational amplifier 150 is relatively high, and the use of the isolation operational amplifier 150 will also lead to a higher overall cost of the power supply circuit.

[0038] Another way to achieve isolated sampling is through a voltage regulator and an optocoupler 120; for example, the voltage regulator could be a TL431 or similar device. See also... Figure 3 A voltage divider circuit 101 is set up to divide the bus voltage. The voltage at the voltage divider node can be expressed as: Vn = Vbus * R4 / (R3 + R4). Vn represents the voltage at the voltage divider node, which is the voltage division of the bus voltage by the voltage divider circuit 101. Vbus is the bus voltage, and R3 and R4 represent the resistance values ​​of the corresponding resistors.

[0039] The TL431 is a three-terminal device, consisting of an A terminal, a R terminal, and a K terminal. The A terminal of the TL431 is grounded (GND). The K terminal of the TL431 is connected to the second terminal (e.g., cathode) of the LED emitter in the optocoupler 120. The R terminal of the TL431 is electrically connected to the voltage divider node N1. The first terminal (e.g., anode) of the LED emitter in the optocoupler 120 is connected to power supply VDD2. The first terminal of the photodetector in the optocoupler 120 is connected to power supply VDD1. The second terminal of the photodetector in the optocoupler 120 is connected to the first I / O port IO1 of MCU 1. The second terminal of the photodetector in the optocoupler 120 is also grounded (GND) through a resistor.

[0040] The resistor (R) of the TL431 can be used to adjust the voltage regulation value. By adjusting the voltage at the R terminal, the voltage regulation value of the TL431 can be adjusted. When the voltage connected to the R terminal is greater than 2.5V, which is greater than the internal reference voltage of the TL431 (approximately equal to 2.5V), current flows between the K and A terminals of the TL431. When the voltage connected to the R terminal is less than 2.5V, the TL431 exhibits a high-impedance state; no current flows or only a very small current flows.

[0041] Based on the principle of TL431, the above-described scheme combining TL431 and optocoupler 120 can achieve isolated detection of bus voltage. When Vn is greater than 2.5V, TL431 conducts, and current flows from the base (K) terminal to the anode (A) terminal of TL431. The LED in optocoupler 120 receives current and emits light. The photodetector in optocoupler 120 detects light, and current flows between its first and second terminals, outputting a high-level signal to the I / O port of MCU 1.

[0042] Vn is the voltage divider of the bus voltage. When Vn is greater than 2.5V, it is equivalent to Vbus > (R3 + R4) * 2.5 / R4. This means that when Vbus > (R3 + R4) * 2.5 / R4 is detected, MCU1 can detect a high-level signal. When Vn is less than 2.5V, the TL431 exhibits a high-impedance state, the optocoupler 120 has no output, and the MCU1's I / O port detects a low level.

[0043] Using a TL431 combined with an optocoupler 120 for isolated bus voltage sampling is a low-cost solution, but it can only detect preset voltage values; it cannot detect bus voltages below the preset value. For example, combining... Figure 3 The preset voltage value is (R3+R4)*2.5 / R4. When the bus voltage is greater than (R3+R4)*2.5 / R4, it can be detected; when the bus voltage is less than (R3+R4)*2.5 / R4, it cannot be detected.

[0044] In summary, there is currently no bus voltage isolation detection scheme that balances voltage detection accuracy and cost. To address the above issues, this application provides a power supply circuit that achieves bus voltage isolation detection at a lower cost.

[0045] This application provides a power supply circuit, such as an outdoor power supply, a power battery 160, or other power supply circuits. Combined with... Figure 4 The power supply circuit includes a battery 160, an isolation transformer circuit 180, a DC bus, an inverter circuit 170, and an AC output terminal. The battery 160 is connected to the DC bus via the isolation transformer circuit 180, and the bus is connected to the AC output terminal via the inverter circuit 170. The isolation transformer circuit 180 transforms the low-voltage DC power supplied by the battery 160 into high-voltage DC power on the DC bus. The DC bus is connected to the AC output terminal via the inverter circuit 170, which converts the DC power on the DC bus into AC power, which is then output through the AC output terminal.

[0046] The power supply circuit also includes a first microcontroller 110, which controls the operation of the isolation transformer circuit 180 to transform the voltage provided by the battery 160 to the target voltage and output it to the DC bus. The isolation transformer circuit 180 includes a phase-shifting converter circuit 181 and a transformer 182, the principles of which have been described in the previous examples and will not be repeated here.

[0047] To ensure that the DC bus voltage can be adjusted to the target voltage, the first microcontroller 110 needs to acquire the bus voltage in real time. Since the first microcontroller 110 operates in a low-voltage region while the DC bus operates in a high-voltage region, this application provides a low-cost isolated sampling scheme for achieving isolated sampling of the bus voltage.

[0048] The power supply circuit also includes a voltage divider circuit 101, a first comparator 151, a second comparator 152, a first isolation device 121, and a second isolation device 122. The voltage divider circuit 101 divides the voltage of the bus. The first comparator 151 receives the voltage at voltage divider node N1, i.e., the voltage of the DC bus, compares the DC bus voltage with a first reference voltage, and outputs a first comparison result to the first microcontroller 110 through the first isolation device 121. The second comparator 152 receives the voltage at voltage divider node N1, i.e., the DC bus voltage, compares the DC bus voltage with a second reference voltage, and outputs a second comparison result to the first microcontroller 110 through the second isolation device 122. The first microcontroller 110 determines the voltage range of the DC bus based on the first and second comparison results. The second reference voltage is different from the first reference voltage. For example, the first reference voltage may be greater than the second reference voltage. The first comparator 151 and the second comparator 152 mentioned above can be implemented using a comparator (COMP), or they can also be implemented using an operational amplifier (OPAMP), or they can be other devices with similar functions.

[0049] The first comparison result can be that the divided voltage of the bus voltage is greater than the first reference voltage, or the divided voltage of the bus voltage is less than the first reference voltage. The second comparison result can be that the divided voltage of the bus voltage is greater than the second reference voltage, or the divided voltage of the bus voltage is less than the second reference voltage. Since the first reference voltage is greater than the second reference voltage, when the first comparison result is that the divided voltage of the bus voltage is less than the first reference voltage and the second comparison result is that the divided voltage of the bus voltage is greater than the second reference voltage and less than the first reference voltage, the voltage range of the bus voltage can be determined. Further reducing the voltage difference between the first and second reference voltages can further refine the accuracy of the bus voltage range.

[0050] Voltage divider circuit 101 includes a third resistor R3 and a fourth resistor R4. The first terminal of R3 is connected to the DC bus, the second terminals of R3 and R4 are coupled to voltage divider node N1, and the second terminal of R4 is grounded. Voltage divider circuit 101 can divide the bus voltage, and the voltage at the voltage divider node can be expressed as:

[0051] Vn = Vbus * R4 / (R3 + R4)

[0052] In the above formula, Vn represents the voltage at the voltage divider node, that is, the voltage divider circuit 101 divides the bus voltage. Vbus is the bus voltage, and R3 and R4 represent the resistance values ​​of the corresponding resistors.

[0053] The first input terminal of the first comparator 151 is used to receive the first reference voltage. The second terminal of the first comparator 151 is electrically connected to the voltage divider node N1 and is used to receive the voltage division of the bus voltage. The output terminal of the first comparator 151 is electrically connected to the first IO port IO1 of the first microcontroller 110 through the first isolation device 121.

[0054] For example, the first input terminal of the first comparator 151 can be a non-inverting input terminal, and the second input terminal can be an inverting input terminal. Alternatively, the first input terminal of the first comparator 151 can be an inverting input terminal, and the second input terminal can be a non-inverting input terminal. The first comparator 151 can compare the divided voltage of the bus voltage with the first reference voltage to obtain a first comparison result, and transmit the comparison result to the first microcontroller 110 through the first isolation device 121.

[0055] Isolating devices can achieve electrical isolation between high-voltage and low-voltage areas. For example, an isolating device receives a first electrical signal and outputs either a first electrical signal or a second electrical signal. The voltage levels of the first and second electrical signals are opposite. For instance, if the isolating device receives a low voltage level, it outputs either a low voltage level or a high voltage level. As another example, if the isolating device receives a high voltage level, it outputs either a high voltage level or a low voltage level.

[0056] Isolation devices come in various types, such as optocoupler-type isolation devices and digital isolation devices. Digital isolation devices further include capacitive isolation, magnetic isolation, and optical isolation types, among others.

[0057] In this embodiment, the first isolation device 121 is used to achieve electrical isolation between the high-voltage and low-voltage regions, and outputs a comparison result between the voltage Vn of the voltage divider node N1 and the first reference voltage to the first microcontroller 110. Taking the first isolation device 121 as an optocoupler as an example, the first isolation device 121 includes a light emitter and a detector. When the light emitter receives a valid signal and emits light, the detector can sense the light and generate current, outputting a signal to achieve isolated signal transmission. The first terminal of the light emitter of the first isolation device 121 is connected to the power supply VDD2, and the second terminal of the light emitter of the first isolation device 121 is connected to the output terminal of the first comparator 151. The first terminal of the detector of the first isolation device 121 is connected to the power supply VDD1, and the second terminal of the detector of the first isolation device 121 is connected to the first IO port IO1 of the first microcontroller 110. The second terminal of the detector of the first isolation device 121 is also grounded through resistor R5.

[0058] The first comparison result can be that the voltage division of the bus voltage is greater than the first reference voltage, or the voltage division of the bus voltage is less than the first reference voltage.

[0059] If the first comparison result shows that the voltage division of the bus voltage is greater than the first reference voltage, that is, the voltage at the inverting input terminal of the first comparator 151 is greater than the voltage at the non-inverting input terminal, the first comparator 151 outputs a low level. When the first electrode (e.g., anode) of the light emitter of the first isolation device 121 is at a high level and the second electrode (e.g., cathode) is at a low level, current flows through the light emitter of the first isolation device 121, causing it to emit light. This triggers the photodetector of the first isolation device 121 to conduct, generating current. When the first isolation device 121 is conducting, the first IO port IO1 of the first microcontroller 110 detects a high level.

[0060] If the first comparison result is that the voltage division of the bus voltage is less than the first reference voltage, that is, the voltage at the inverting input terminal of the first comparator 151 is less than the voltage at the non-inverting input terminal, the first comparator 151 outputs a high level. The first electrode (e.g., anode) of the first isolation device 121's emitter is at a high level, and the second electrode (e.g., cathode) of the first isolation device 121's emitter is also at a high level. No current flows through the emitter of the first isolation device 121, so it does not emit light, and the detector of the first isolation device 121 is not conducting. When the first isolation device 121 is not conducting, the first IO port IO1 of the first microcontroller 110 detects a low level.

[0061] Therefore, for the first microcontroller 110, if the first IO port IO1 detects a high level, it indicates that the voltage of the voltage divider node N1 (the voltage divider of the bus voltage) is greater than the first reference voltage. This can be expressed as:

[0062]

[0063] In the above formula, Vref1 represents the first reference voltage. Converting the above formula yields:

[0064] Vbus>Vref1*(R1+R2) / R2

[0065] If the first I / O port IO1 detects a low level, it indicates that the voltage at voltage divider node N1 (the voltage divider of the bus voltage) is less than the first reference voltage. This can be expressed as:

[0066]

[0067] The conversion yields:

[0068] Vbus <Vref1*(R3+R4) / R4

[0069] The first input terminal of the second comparator 152 is used to receive the second reference voltage. The second terminal of the second comparator 152 is electrically connected to the voltage divider node N1 to receive the voltage division of the bus voltage. The output terminal of the second comparator 152 is electrically connected to the second IO port IO2 of the first microcontroller 110 through the second isolation device 122.

[0070] For example, the first input terminal of the second comparator 152 can be a non-inverting input terminal, and the second input terminal can be an inverting input terminal. Alternatively, the first input terminal of the second comparator 152 can be an inverting input terminal, and the second input terminal can be a non-inverting input terminal. The second comparator 152 can compare the divided voltage of the bus voltage with the second reference voltage to obtain a second comparison result, and transmit the comparison result to the first microcontroller 110 through the second isolation device 122.

[0071] The second isolation device 122 can be an optocoupler. For example, the second isolation device 122 includes a light emitter and a photodetector. The first terminal (e.g., anode) of the light emitter of the second isolation device 122 is connected to power supply VDD2, and the second terminal (e.g., cathode) of the light emitter of the second isolation device 122 is connected to the output terminal of the second comparator 152. The first terminal of the photodetector of the second isolation device 122 is connected to power supply VDD1, and the second terminal of the photodetector of the second isolation device 122 is connected to the second IO port IO2 of the first microcontroller 110. The second terminal of the photodetector of the second isolation device 122 is also grounded through resistor R6.

[0072] The second comparison result may include a bus voltage division that is greater than the second reference voltage, or a bus voltage division that is less than the second reference voltage.

[0073] If the second comparison result shows that the voltage division of the bus voltage is greater than the second reference voltage, that is, the voltage at the inverting input terminal of the second comparator 152 is greater than the voltage at the non-inverting input terminal, the second comparator 152 outputs a low level. The first stage (anode) of the light emitter of the second isolation device 122 is at a high level, and the second stage (cathode) of the light emitter of the second isolation device 122 is at a low level. Current flows through the light emitter of the second isolation device 122, causing it to emit light. This triggers the photodetector of the second isolation device 122 to conduct, generating current. When the second isolation device 122 is conducting, the second IO port IO2 of the first microcontroller 110 detects a high level.

[0074] If the second comparison result shows that the voltage division of the bus voltage is less than the second reference voltage, that is, the voltage at the inverting input terminal of the second comparator 152 is less than the voltage at the non-inverting input terminal, the second comparator 152 outputs a high level. When the first electrode (anode) of the emitter of the second isolation device 122 is at a high level, and the second electrode (cathode) of the emitter of the second isolation device 122 is also at a high level, no current flows through the emitter of the second isolation device 122, it does not emit light, and the photodetector of the second isolation device 122 is not conducting. When the second isolation device 122 is not conducting, the second IO port IO2 of the first microcontroller 110 detects a low level.

[0075] Therefore, for the first microcontroller 110, if the second IO port IO2 detects a high level, it indicates that the voltage of the voltage divider node N1 (the voltage divider of the bus voltage) is greater than the second reference voltage. This can be expressed as:

[0076]

[0077] In the above formula, Vref2 represents the second reference voltage. Converting the above formula yields:

[0078] Vbus>Vref2*(R3+R4) / R4

[0079] If the second IO port IO2 detects a low level, it indicates that the voltage at voltage divider node N1 (the voltage divider of the bus voltage) is less than the second reference voltage. This can be expressed as:

[0080]

[0081] The conversion yields:

[0082] Vbus <Vref2*(R3+R4) / R2

[0083] In this embodiment of the application, the first reference voltage is greater than the second reference voltage, that is, Vref1>Vref2. Based on this, the first microcontroller 110 can determine the voltage range of the bus voltage according to the first comparison result and the second comparison result.

[0084] For example, when the first I / O port IO1 of the first microcontroller 110 detects a high level and the second I / O port IO2 detects a high level, that is, when the first comparison result is that the voltage division of the bus voltage is greater than the first reference voltage and the second comparison result is that the voltage division of the bus voltage is greater than the second reference voltage, the voltage range of the bus voltage can be determined as follows:

[0085]

[0086] For another example, when the first IO port IO1 of the first microcontroller 110 detects a high level, and the second IO port IO2 detects a low level, that is, the first comparison result is that the divided voltage of the bus voltage is less than the first reference voltage, and the second comparison result is that the divided voltage of the bus voltage is less than the second reference voltage, it can be determined that the voltage range of the bus voltage is:

[0087] Vbus<Vref2*(R3+R4) / R4

[0088] For another example, when the first IO port IO1 of the first microcontroller 110 detects a low level, and the second IO port IO2 detects a high level, the first comparison result is that the divided voltage of the bus voltage is less than the first reference voltage, and the second comparison result is that the divided voltage of the bus voltage is greater than the second reference voltage, that is:

[0089]

[0090] Through conversion, it can be obtained that:

[0091]

[0092] Wherein, is the voltage division ratio of the voltage divider circuit 101, let then the above formula can be transformed into:

[0093] Vref2 / k<Vbus<Vref1 / k

[0094] Based on this, the first microcontroller 110 can determine the voltage range of the bus voltage.

[0095] In a possible implementation, the accuracy of the voltage range of the bus voltage can be improved by adjusting the magnitudes of the first reference voltage and the second reference voltage. When Vref2 / k<Vbus<Vref1 / k is satisfied, that is, when the comparison result output by the first comparator 151 is that the divided voltage of the bus voltage is less than the first reference voltage and the comparison result output by the second comparator 152 is that the divided voltage of the bus voltage is greater than the second reference voltage, the difference between the first reference voltage and the second reference voltage is adjusted to be reduced, so as to improve the accuracy of the voltage range of the bus voltage. For example, while keeping the first reference voltage unchanged, increase the second reference voltage; or, while keeping the second reference voltage unchanged, decrease the first reference voltage; or synchronously increase the second reference voltage and decrease the first reference voltage.

[0096] For example, the power supply circuit further includes a second microcontroller 130, a first filter circuit 141, and a second filter circuit 142. The second microcontroller 130 includes a third I / O port IO3 and a fourth I / O port IO4. The third I / O port IO3 is connected to the first input terminal of a first comparator 151 through the first filter circuit 141 to output a first reference voltage to the first comparator 151. The fourth I / O port IO4 is connected to the first input terminal of a second comparator 152 through the second filter circuit 142 to output a second reference voltage to the second comparator 152. By adjusting the signals of the third I / O port IO3 and the fourth I / O port IO4 of the second microcontroller 130, the magnitudes of the first and second reference voltages can be adjusted.

[0097] For example, see Figure 4 The first filter circuit 141 includes a first resistor R1 and a first capacitor C1. The first end of the first resistor R1 is connected to the third I / O port IO3 of the second microcontroller 130, and the second end of the first resistor R1 is connected to the first input terminal of the first comparator 151. The first end of the first capacitor C1 is connected to the second end of the first resistor R1, and the second end of the first capacitor C1 is grounded. The third I / O port IO3 of the second microcontroller 130 can output a first pulse modulation signal, such as a pulse width modulation (PWM) signal. The first pulse modulation signal is rectified by the first filter circuit 141 to obtain a first reference voltage. The amplitude of the first reference voltage can be adjusted by adjusting the duty cycle of the first pulse modulation signal.

[0098] The second filter circuit 142 includes a second resistor R2 and a second capacitor C2. The first end of the second resistor R2 is connected to the fourth I / O port IO4 of the second microcontroller 130, and the second end of the second resistor R2 is connected to the first input terminal of the second comparator 152. The first end of the second capacitor C2 is connected to the second end of the second resistor R2, and the second end of the second capacitor C2 is grounded. The fourth I / O port IO4 of the second microcontroller 130 can output a second pulse modulation signal, such as a PWM signal. The second pulse modulation signal is rectified by the second filter circuit 142 to obtain a second reference voltage. The amplitude of the second reference voltage can be adjusted by regulating the duty cycle of the second pulse modulation signal.

[0099] In the above example, the second microcontroller 130 outputs a pulse-modulated signal, which is rectified by a filter circuit to obtain a first reference voltage and a second reference voltage. In another implementation of this application, the second microcontroller 130 can also output the first reference voltage through a first output terminal and the second reference voltage through a second output terminal. For example, see [reference needed]. Figure 5The third I / O port IO3 of the second microcontroller 130 is connected to the first input terminal of the first comparator 151 to output a first reference voltage to the first comparator 151; the fourth I / O port IO4 of the second microcontroller 130 is connected to the first input terminal of the second comparator 152 to output a second reference voltage to the second comparator 152.

[0100] For example, the second microcontroller 130 internally includes multiple digital-to-analog converters, such as a first digital-to-analog converter 131 and a second digital-to-analog converter 132. The output terminal of the first digital-to-analog converter 131 is connected to the third I / O port IO3 of the second microcontroller 130 for outputting a first reference voltage; the output terminal of the second digital-to-analog converter 132 is connected to the fourth I / O port IO4 of the second microcontroller 130 for outputting a second reference voltage. The second microcontroller 130 can adjust the output first and second reference voltages by controlling the operating states of the first digital-to-analog converter 131 and the second digital-to-analog converter 132.

[0101] In the aforementioned example, the first comparator 151 and the second comparator 152 are independent devices. In another example of this application, see, for example, [reference needed]. Figure 6 The first comparator 151 and the second comparator 152 mentioned above can also be built-in comparators or built-in operational amplifiers of the second microcontroller 130. The third IO port IO3 of the second microcontroller 130 outputs a first comparison result to the first microcontroller 110 through the first isolation device 121, and the fourth IO port IO4 of the second microcontroller 130 outputs a second comparison result to the first microcontroller 110 through the second isolation device 122. The first microcontroller 110 determines the voltage range of the bus voltage based on the first comparison result and the second comparison result.

[0102] In one possible implementation, the second microcontroller 130 can adjust the amplitudes of the first reference voltage and the second reference voltage based on the comparison results output by the first comparator 151 and the second comparator 152. For example, when the comparison result output by the first comparator 151 is that the divided voltage of the bus voltage is less than the first reference voltage, and the comparison result output by the second comparator 152 is that the divided voltage of the bus voltage is greater than the second reference voltage, the second microcontroller 130 is further used to adjust and reduce the difference between the first reference voltage and the second reference voltage to improve the accuracy of the bus voltage range. For example, while keeping the first reference voltage constant, the second reference voltage can be increased; or, while keeping the second reference voltage constant, the first reference voltage can be decreased; or the second reference voltage can be increased and the first reference voltage decreased simultaneously.

[0103] The power supply circuit provided in this application embodiment requires only two comparators and two optocouplers to compare the divided bus voltage with a first reference voltage and a second reference voltage, thereby obtaining the voltage range of the bus voltage and achieving isolated sampling of the bus voltage at low cost. Furthermore, this application embodiment can change the amplitude of the first and second reference voltages, for example, by adjusting the duty cycle of the pulse modulation waveform output by the second microcontroller, or by changing the voltage output by the digital-to-analog converter inside the second microcontroller, thereby improving the detection accuracy of the bus voltage. Compared to detection schemes using isolated operational amplifiers or TL431, the solution provided in this application embodiment is lower in cost and higher in sampling accuracy.

[0104] The above description is only a specific implementation of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application.

Claims

1. A power supply circuit, characterized in that, The power supply circuit includes a battery, an isolation transformer circuit, and a DC bus, with the battery connected to the DC bus via the isolation transformer circuit. The power supply circuit also includes a first microcontroller, a first comparator, a second comparator, a first isolation device, a second isolation device, and a voltage divider circuit. The first input terminal of the first comparator is used to receive the first reference voltage, the second terminal of the first comparator is connected to the DC bus through the voltage divider circuit, and the output terminal of the first comparator is connected to the first input / output (IO) port of the first microcontroller through the first isolation device. The first input terminal of the second comparator is used to receive the second reference voltage, the second terminal of the first comparator is connected to the DC bus through the voltage divider circuit, and the output terminal of the second comparator is connected to the second I / O port of the first microcontroller through the second isolation device. The first reference voltage is greater than the second reference voltage.

2. The power supply circuit according to claim 1, characterized in that, The first isolation device and the second isolation device are used to receive the first electrical signal and isolate the output of the first electrical signal or the second electrical signal, wherein the level states of the first electrical signal and the second electrical signal are opposite.

3. The power supply circuit according to claim 1 or 2, characterized in that, The first isolation device and the second isolation device include optocoupler-type isolation devices or digital isolation devices.

4. The power supply circuit according to any one of claims 1 to 3, characterized in that, The first isolation device includes a light emitter and a photodetector. The first electrode of the light emitter of the first isolation device is connected to a first power supply terminal, the second electrode of the light emitter of the first isolation device is connected to the output terminal of the first comparator, the first electrode of the photodetector of the first isolation device is connected to a second power supply terminal, and the second electrode of the photodetector of the first isolation device is connected to the first I / O port of the first microcontroller. The second isolation device includes a light emitter and a photodetector. The first electrode of the light emitter of the second isolation device is connected to a first power supply terminal, the second electrode of the light emitter of the second isolation device is connected to the output terminal of the second comparator, the first electrode of the photodetector of the second isolation device is connected to a second power supply terminal, and the second electrode of the photodetector of the second isolation device is connected to the second I / O port of the first microcontroller.

5. The power supply circuit according to any one of claims 1 to 4, characterized in that, The power supply circuit also includes a second microcontroller, which includes a first output terminal and a second output terminal. The first output terminal of the second microcontroller is connected to the first input terminal of the first comparator to output the first reference voltage to the first comparator; The second output terminal of the second microcontroller is connected to the first input terminal of the second comparator to output the second reference voltage to the second comparator.

6. The power supply circuit according to any one of claims 1 to 4, characterized in that, The power supply circuit also includes a second microcontroller, a first filter circuit, and a second filter circuit. The second microcontroller includes a first output terminal and a second output terminal; The first output terminal is connected to the first input terminal of the first comparator through the first filter circuit to output the first reference voltage to the first comparator; The second output terminal is connected to the first input terminal of the second comparator through the second filter circuit to output the first reference voltage to the second comparator.

7. The power supply circuit according to claim 6, characterized in that, The first filter circuit includes a first resistor and a first capacitor. The first end of the first resistor is connected to the first output terminal of the second microcontroller, the second end of the first resistor is connected to the first input terminal of the first comparator, the first end of the first capacitor is connected to the second end of the resistor, and the second end of the first capacitor is grounded. The second filter circuit includes a second resistor and a second capacitor. The first end of the second resistor is connected to the second output terminal of the second microcontroller, the second end of the second resistor is connected to the first input terminal of the second comparator, the first end of the second capacitor is connected to the second end of the second resistor, and the second end of the second capacitor is grounded.

8. The power supply circuit according to any one of claims 1 to 7, characterized in that, The first reference voltage and the second reference voltage are variable voltages.

9. The power supply circuit according to any one of claims 1 to 8, characterized in that, The voltage divider circuit includes a third resistor and a fourth resistor. The first end of the third resistor is connected to the DC bus. The second end of the third resistor and the first end of the fourth resistor are coupled to the voltage divider node. The second end of the fourth resistor is grounded. The second input terminal of the first comparator and the second input terminal of the second comparator are connected to the voltage divider node.

10. The power supply circuit according to claim 9, characterized in that, The first comparator is used to compare the voltage of the voltage divider node with the first reference voltage, and outputs the first comparison result to the first microcontroller through the first isolation device; The second comparator is used to compare the voltage of the voltage divider node with the second reference voltage, and outputs a second comparison result to the first microcontroller through the second isolation device; The first microcontroller is used to determine the voltage range of the DC bus based on the first comparison result and the second comparison result.

11. The power supply circuit according to claim 10, characterized in that, The first microcontroller is configured to determine the voltage range of the DC bus as follows when the first comparison result indicates that the voltage of the voltage divider node is less than the first reference voltage and the second comparison result indicates that the voltage of the voltage divider node is greater than the second reference voltage: Vref2 / k <Vbus<Vref1 / k Wherein, Vref1 is the first reference voltage, Vref2 is the second reference voltage, and k is the voltage division ratio of the voltage divider circuit.

12. The power supply circuit according to any one of claims 5 to 7, characterized in that, The second microcontroller is used to reduce the voltage difference between the first reference voltage and the second reference voltage when the voltage of the voltage divider node is less than the first reference voltage and greater than the second reference voltage.

13. The power supply circuit according to any one of claims 5 to 7, characterized in that, The first comparator and the second comparator are integrated within the second microcontroller.