High-side switch chip feedback current detection method
By controlling the switching circuit of MOSFETs or transistors with a microcontroller and measuring the feedback current of large and small loads using resistors of different values, the problem of small feedback current detection range of high-side switching chips is solved, and reliable measurement of small load current and reduction of noise interference are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-03-13
AI Technical Summary
Existing high-side switch chips have a small feedback current detection range, and noise interference causes large errors in the feedback current and voltage values for small loads, making it difficult to accurately measure the load current.
The GPIO pins of a microcontroller are used to control the switching circuit of a MOSFET or a transistor. The feedback current of large and small loads is measured by sampling resistors R3 and R9 with different resistance values. The switching function of the MOSFET or transistor is used to reduce noise interference and increase the detection range.
It enables reliable measurement of smaller load currents, reduces errors caused by noise interference, and increases the detection range of the current feedback circuit of the high-side switch chip.
Smart Images

Figure CN121656629A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of circuit control technology, and specifically to a method for detecting feedback current of a high-side switching chip. Background Technology
[0002] In circuits, load switching control, fault protection, and status monitoring are often achieved using a high-side switch connected in series between the positive terminal of the power supply (high potential end) and the load. When detecting the load's operating status in the high-side switch circuit architecture, calculations are typically performed using the feedback current and a sampling resistor. Existing circuit architectures generally use a single sampling resistor to directly measure the voltage of the load feedback current. However, the magnitude of the load feedback current is positively correlated with the load current. To accommodate larger load currents and the microcontroller in the protection circuit (microcontroller operating voltage is generally 5V or below), the single sampling resistor's resistance value must be below a certain fixed value. When measuring the voltage of a smaller load feedback current, because the sampling resistor's resistance value is below this fixed value, the product of the current and the load feedback current is smaller. Furthermore, noise in the circuit board can cause significant errors in the voltage value of smaller feedback currents. This type of circuit has a limited detection range for the load feedback voltage. Therefore, a method needs to be proposed to redesign the current feedback circuit of the high-side switch chip to increase its detection range.
[0003] Titled "Self-Learning Diagnostic System and Method for LED Light Source" (Document No. CN113163547A, hereinafter referred to as Document 1), this paper discloses that the LED light source of the load is directly connected in series with a first resistor R1 in parallel and a second resistor R2 with a transistor in series, and the conduction status of the control transistor is connected through a fourth interface 204. It can be seen that Document 1 mainly uses the first resistor R1 and the second resistor R2 to divide the load current I, so that the voltage received by the processor 20 is within the working voltage. However, in Document 1, the load current I is directly connected to the feedback circuit, and the magnitude of the load current I needs to be determined in advance to determine whether the control transistor is turned on, thereby determining whether the second resistor R2 is connected to the circuit. Document 1 only shows the judgment of whether the load current I is normal by the temperature function curve of the thermistor, but does not show how to judge the magnitude of the load current I. Its circuit flow logic has defects. If the second resistor R2 is not connected to the circuit and the load current I is too large, there is a possibility that the voltage received by the processor 20 is too large, which may damage the processor 20.
[0004] Titled "A Solid State Relay and Its Abnormal State Restart Method" (Document No. CN114553200A, hereinafter referred to as Document 2), it discloses a control switch module 1 and a feedback current circuit that provides voltage for its conduction. When the diagnostic feedback pin IS of the high-side switch outputs a high-level feedback current, it flows through R1 to form a feedback voltage, which connects J1 at both ends of the control switch module 1 to the ground terminal, forming a low level. This low level continues until the high-side switch U1 is reset after a preset time. If the high-side switch U1 returns to its normal state, it outputs a low-level feedback current through the diagnostic feedback pin IS. This low-level feedback current flows through R1 to form a lower feedback voltage that cannot turn on the switch module 1. Thus, it can be seen that the scheme in Document 2 mainly uses the high and low level feedback currents to act as start and stop signals for the control switch module 1. It cannot limit the voltage received by the processor in the circuit, nor is it convenient to use the feedback current to calculate the load operation. Summary of the Invention
[0005] The purpose of this invention is to provide a feedback current detection method for high-side switching chips, which aims to increase the detection range of feedback current.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A method for detecting feedback current of a high-side switch chip includes the following detection circuit: a microcontroller 10 and a high-side switch 20. The GPIO pins on the microcontroller 10 are connected to the IN0, IN1, EN, and SEL pins of the high-side switch via current-limiting resistors R4, R6, R7, and R8, respectively. The OUT0 and OUT1 pins of the high-side switch 20 are also connected. The pins are respectively connected to the second load 2 and the first load 1. The ADC pin on the microcontroller 10 is connected to the IS pin of the high-side switch through current-limiting resistors R1 and R2. The cathode of the Zener diode D1 is connected between the current-limiting resistors R1 and R2 and the anode is connected to GND. The gates of the first and second MOSFETs Q1 and Q2 are connected to the GPIO pins of the microcontroller. The sources of the first and second MOSFETs Q1 and Q2 are connected to GND. The drain of the first MOSFET Q1 is connected to the current-limiting resistor R2 and the IS pin of the high-side switch 20 through resistor R3 and the drain of the second MOSFET Q2 is connected to the current-limiting resistor R2 and the IS pin of the high-side switch 20 through resistor R9, respectively. Alternatively, the bases of the first and second transistors Q1' and Q2' are connected to the two GPIO pins of the microcontroller 10. The emitters of the first and second transistors Q1' and Q2' are connected to GND. The collector of the first transistor Q1' is connected to the current-limiting resistor R2 and the IS pin of the high-side switch 20 through resistor R3 and the collector of the second transistor Q2' is connected to the current-limiting resistor R2 and the IS pin of the high-side switch 20, respectively.
[0008] The testing steps are as follows:
[0009] S1. When the GPIO output of the microcontroller 10 is high, the first MOSFET Q1 or the first transistor Q1' is turned on, the resistor R3 is grounded through the first MOSFET Q1 or the first transistor Q1', and the second MOSFET Q2 or the second transistor Q2' is turned off. The microcontroller 10 collects the feedback voltage at the resistor R3 and calculates the load value. The relationship between the feedback voltage and the drive load current is: VSEN1=IL / K*R3. If the voltage is within the threshold range, it is considered that the load condition has been collected normally, and the detection ends.
[0010] S2. If the voltage collected in step S1 is lower than the judgment threshold, the microcontroller 10 controls the GPIO to output a low level, the first MOSFET Q1 or the first transistor Q1' is cut off, the second MOSFET or the second transistor Q2' is turned on, and the resistor R9 is grounded through the second MOSFET Q2 or the second transistor Q2'. The microcontroller 10 collects the feedback voltage at the resistor R9 and calculates the load value. The relationship between the feedback voltage and the drive load current is: VSEN2=IL / K*R9, and the detection ends.
[0011] In the above scheme, the feedback current circuit of the high-side switch chip is equipped with sampling resistors with large resistance differences. When the feedback current is small, the feedback current flows through the sampling resistor with large resistance through the circuit switching function of MOSFET or transistor, reducing the error caused by noise, making the feedback voltage value obtained by the feedback current and sampling resistor higher and easier to collect, and enabling the current generated by a small load to be measured, thereby increasing the detection range of the current feedback circuit of the high-side switch chip. Attached Figure Description
[0012] Figure 1 , 2 These are circuit schematics of two embodiments of the present invention;
[0013] Figure 3 This is a flowchart of the detection process of the present invention. Detailed Implementation
[0014] See Figure 1 , 2 The detection circuit used in the feedback current detection method of the high-side switch chip is shown. The detection circuit includes a microcontroller 10 and a high-side switch 20. The GPIO pins on the microcontroller 10 are connected to the IN0, IN1, EN, and SEL pins of the high-side switch through current-limiting resistors R4, R6, R7, and R8, respectively. The OUT0 and OUT1 pins of the high-side switch 20 are connected to the second load 2 and the first load 1, respectively. The ADC pin on the microcontroller 10 is connected to the IS pin of the high-side switch through current-limiting resistors R1 and R2. The cathode of the Zener diode D1 is connected between the current-limiting resistors R1 and R2, and the anode is connected to GND.
[0015] See Figure 1The cathode of the Zener diode D1 is connected between the current-limiting resistors R1 and R2, and the anode is connected to GND. The gates of the first and second MOSFETs Q1 and Q2 are connected to the GPIO pin of the microcontroller. The sources of the first and second MOSFETs Q1 and Q2 are connected to GND. The drain of the first MOSFET Q1 is connected to the current-limiting resistor R2 and the IS pin of the high-side switch 20 through resistor R3 and the drain of the second MOSFET Q2 is connected to resistor R9, respectively.
[0016] See Figure 2 As shown, the MOSFET is replaced with a transistor. The bases of the first and second transistors Q1' and Q2' are connected to the two GPIO pins of the microcontroller 10. The emitters of the first and second transistors Q1' and Q2' are connected to GND. The collector of the first transistor Q1' is connected to the current limiting resistor R2 and the IS pin of the high-side switch 20 through resistor R3 and the collector of the second transistor Q2' is connected to resistor R9, respectively.
[0017] In the above scheme, the microcontroller 10 provides control signals to the high-side switch 20 via GPIO pins, and simultaneously uses the ADC pin to acquire the current feedback signal from the high-side drive IS pin. When the high-side switch receives the control signal from the microcontroller, it will perform an output operation or provide a current feedback signal of the current output current. Resistors R1, R2, R4, R6, R7, and R8 are current-limiting resistors, whose main function is to consume power through their own voltage division and control the branch current to stabilize. Zener diode D1 is used to ensure that the voltage of the microcontroller's ADC pin is within the chip's tolerance range. Resistor R3 is a sampling resistor, responsible for converting the current signal into a voltage signal. The IN0 and IN1 pins of the high-side switch are output control pins. When IN0 or IN1 receives a high level from the microcontroller, the corresponding OUT0 or OUT1 pin will perform an output action (output voltage is VS voltage), thereby realizing the function of turning on the load. The EN pin is the enable pin for the current feedback function of the high-side switch. When the EN pin receives a high level from the microcontroller, the high-side switch will start the current feedback function, generate an induced current (ISEN) through the internal sensing circuit, and receive the induced current from the EN pin. The IS pin output has the following relationship between the induced current and the high-side switch output current (IL): ISEN = IL / K, where K is a proportionality coefficient (usually a fixed value, the value of which will be clearly indicated in the high-side drive datasheet). The product of the sampling resistor and the feedback current ISEN is the voltage value across the sampling resistor. The microprocessor can determine the magnitude of the current load by acquiring the voltage value across the sampling resistor through the ADC pin. By determining the magnitude of the load current, the microcontroller can identify and diagnose whether the load is within the set value. If it is less than or higher than the set value, the load fault reporting function can be implemented. The SEL pin of the high-side switch is a selection pin, used to select whether the IS pin feedback is OUT0 or OUT1 for the load condition. In conventional circuits, only a single sampling resistor is used. The sampling resistor needs to maintain a voltage less than or equal to the microcontroller's operating voltage and needs to meet the requirements of a large load current. The resistance value of the sampling resistor often needs to be less than a certain fixed value. Its lower resistance value determines that the feedback resistor voltage VSEN value of the sampling resistor is smaller when performing feedback current and voltage measurement for a small load. The lower VSEN value has a larger error under the interference of circuit board noise and is difficult for the microprocessor 10 to acquire.
[0018] In the above scheme, resistors R3 and R9 are connected to the circuit via two MOSFETs Q1 and Q2 or two transistors Q1' and Q2'. The circuit switching is achieved through the two MOSFETs Q1 and Q2 or the two transistors Q1' and Q2'. During load measurement, the feedback current of a large load is measured through resistor R3, and the feedback current of a small load is measured through R9. When the load is connected to the circuit, the relationship between the voltage across resistor R3 and the output current can be expressed as: VSEN3 = IL / K*R3, and the relationship between the voltage across resistor R9 and the output current can be expressed as: VSEN9 = IL / K*R9. Since the resistance of resistor R9 is N times the resistance of resistor R3, we can obtain VSEN9 = N*V. SEN3, the microcontroller 10 acquires VSEN3 or VSEN9 through the ADC pin. When the load current is small, the value of VSEN9 is larger and easier for the microcontroller 10 to receive. This ensures that while high-power loads can be detected, low-power loads can also be reliably identified. It should be noted that the above scheme can use MOSFETs or transistors as needed. MOSFETs are more expensive, but they can operate with lower power consumption and have a faster switching speed than transistors. Transistors are cheaper, and only a small amount of current needs to be injected into the base to turn them on. Transistor control circuits are simpler, and their anti-static and surge protection capabilities are better than those of MOSFETs.
[0019] See Figure 1 , 2 The resistance value of resistor R9 is N times the resistance value of resistor R3. It should be noted that N>1. The resistance value of R9 can be adjusted according to the power of the load under test or the current flowing through the load. The smaller the current flowing through the load, the larger the required N should be, and the larger the resistance value of R9 should be.
[0020] The detection method provided by this invention includes the following steps:
[0021] S1. When the GPIO output of the microcontroller 10 is high, the first MOSFET Q1 or the first transistor Q1' is turned on, the resistor R3 is grounded through the first MOSFET Q1 or the first transistor Q1', and the second MOSFET Q2 or the second transistor Q2' is turned off. The microcontroller 10 collects the feedback voltage at the resistor R3 and calculates the load value. The relationship between the feedback voltage and the drive load current is: VSEN1=IL / K*R3. If the voltage is within the threshold range, it is considered that the load condition has been collected normally, and the detection ends.
[0022] S2. If the voltage acquired in step S1 is lower than the judgment threshold, the microcontroller 10 controls the GPIO to output a low level. The first MOSFET Q1 or the first transistor Q1' is cut off, and the second MOSFET Q2 or the second transistor Q2' is turned on. The resistor R9 is grounded through the second MOSFET Q2 or the second transistor Q2'. The microcontroller 10 acquires the feedback voltage at resistor R9 and calculates the load value. The relationship between the feedback voltage and the drive load current is: VSEN2 = IL / K * R9. The detection ends.
[0023] See Figure 1 , 2 The flowchart shown in Figure 3 is explained below:
[0024] Microcontroller 10 controls the GPIO output connected to MOSFET Q1 or transistor Q1' to output a high level, turning on MOSFET Q1 or transistor Q1' and grounding resistor R3. MOSFET Q2 or transistor Q2' remains off, therefore resistor R9 remains floating. Microcontroller 10 acquires the feedback voltage. The relationship between the feedback voltage and the drive load current is: VSEN1 = IL / K * R3. Microprocessor 10 compares VSEN1 with the threshold V. If VSEN1 > V, the voltage is within the threshold range, and the load condition is considered to have been normally acquired. After calculating the load current, the detection ends. If VSEN1 < V, the voltage is within the threshold range, and the load condition is considered to have been normally acquired.
Claims
1. A method for detecting feedback current of a high-side switch chip, characterized in that: The detection method includes the following detection circuit: a microcontroller (10) and a high-side switch (20). The GPIO pins on the microcontroller (10) are connected to the IN0, IN1, EN, and SEL pins of the high-side switch through current-limiting resistors R4, R6, R7, and R8, respectively. The OUT0 and OUT1 pins of the high-side switch (20) are connected to the second load (2) and the first load (1), respectively. The ADC pin on the microcontroller (10) is connected to the IS pin of the high-side switch through current-limiting resistors R1 and R2. The negative terminal of the Zener diode D1 is connected between the current-limiting resistors R1 and R2, and the positive terminal is connected to GND. The gates of the first and second MOSFETs Q1 and Q2 are connected to the GPIO pins of the microcontroller. The sources of the first and second MOSFETs Q1 and Q2 are connected to GND. The drain of the first MOSFET Q1 is connected to the GPIO pins of the microcontroller through resistors R3 and R4, R6, R7, and R8, respectively. The drains of two MOSFETs Q2 are connected via resistor R9 to the current-limiting resistor R2 and the IS pin of the high-side switch (20); or, the bases of the first and second transistors Q1' and Q2' are connected to the two GPIO pins of the microcontroller (10), the emitters of the first and second transistors Q1' and Q2' are connected to GND, and the collector of the first transistor Q1' is connected via resistor R3 and the collector of the second transistor Q2' is connected via resistor R9 to the current-limiting resistor R2 and the IS pin of the high-side switch (20); The testing steps are as follows: S1. When the GPIO output of the microcontroller (10) is high, the first MOS transistor Q1 or the first transistor Q1' is turned on, the resistor R3 is grounded through the first MOS transistor Q1 or the first transistor Q1', and the second MOS transistor Q2 or the second transistor Q2' is turned off. The microcontroller (10) collects the feedback voltage at the resistor R3 and calculates the load value. The relationship between the feedback voltage and the drive load current is: VSEN1=IL / K*R3. If the voltage is within the threshold range, it is considered that the load condition has been collected normally, and the detection ends. S2. If the voltage collected in step S1 is lower than the judgment threshold, the microcontroller (10) controls the GPIO to output a low level, the first MOS transistor Q1 or the first transistor Q1' is cut off, the second MOS transistor Q2 or the second transistor Q2' is turned on, and the resistor R9 is grounded through the second MOS transistor Q2 or the second transistor Q2'. The microcontroller (10) collects the feedback voltage at the resistor R9 and calculates the load value. The relationship between the feedback voltage and the drive load current is: VSEN2=IL / K*R9, and the detection ends.
2. The feedback current detection method for high-side switch chips according to claim 1, characterized in that: The resistance of resistor R9 is N times the resistance of resistor R3.
Citation Information
Patent Citations
Self-learning diagnosis system and diagnosis method for LED light source
CN113163547A
Solid-state relay and abnormal state restarting method thereof
CN114553200A