Device test circuit and method
By using a switching circuit to control the connection of the constant current source circuit in the device test circuit, the problem of inconsistent rising edge of the output current of the constant current source circuit is solved, the resolution requirements of the logarithmic-analog converter are reduced, and the testing accuracy is achieved.
Patent Information
- Application Number
- CN202510155248.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, when the constant current source circuit is expanded in parallel, the rising edge of the output current is inconsistent, and the resolution requirements of the digital-to-analog converter are high.
By introducing a switching circuit into the device test circuit, the communication between the digital-to-analog converter and each constant current source circuit is controlled, so as to adjust the output current of the constant current source circuit while keeping the output voltage of the digital-to-analog converter basically unchanged or changes in a small range.
The requirements for digital-to-analog converter resolution are reduced, the consistency of the rising edge of the output current of the constant current source circuit is ensured, and the testing accuracy is improved.
Smart Images

Figure CN119916168A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device testing, and in particular to a device testing circuit and method. Background Art
[0002] With the development of semiconductor technology and materials, power devices are gradually developing towards high voltages of 6600V and high currents of more than 1,000A. This poses a higher challenge to how test equipment can quickly and accurately test the static parameters of this type of power device. At the same time, in the field of Hall sensor testing, it is necessary to test the Hall response time, so a higher current change rate is required. The full current stage requires a faster rising edge without overshoot and oscillation.
[0003] When testing power devices and Hall sensors, multiple parallel constant current source circuits are usually used to provide high current to the device under test. However, there are the following disadvantages in achieving current expansion by connecting constant current source circuits in parallel: multiple constant current source circuits are controlled by a digital-to-analog converter (DAC). When the total output current of multiple constant current source circuits needs to be changed, the output voltage of the DAC needs to be adjusted. If the total output current decreases, the output voltage of the DAC decreases, and if the total output current increases, the output voltage of the DAC increases. The DAC output voltage changes greatly, resulting in the inability to keep the output current rising edge of the constant current source circuit consistent. In addition, this control method requires high resolution of the DAC.
[0004] Reference Figure 1 , shows a schematic diagram of a constant current source circuit parallel current expansion circuit in the prior art provided by the present invention. The device under test includes a power device or a Hall sensor, the device under test is connected in series with N constant current source circuits, the N constant current source circuits are connected in parallel, the N constant current source circuits are controlled by DAC, and the DAC is controlled by a microcontroller unit (MCU).
[0005] Set the DAC output voltage to When the maximum output current of a single constant current source circuit is I , Load the comparator's non-inverting input terminal to drive Q1 to work in the linear region to achieve current output. Rs is the feedback sampling resistor of the constant current source. The output current of a single constant current source circuit is:
[0006] When multiple constant current source circuits are connected in parallel, the number of parallel constant current source circuits is set to N, and the total output current of the corresponding N constant current source circuits is:
[0007] Using this control method, the total output current is set to , the corresponding DAC output size is:
[0008] At this time, set the ratio K of DAC output to full scale:
[0009] It can be deduced from this formula that when Less than The corresponding DAC output Relative to It is reduced by N times. When N is larger and K is smaller, the corresponding DAC output voltage is required to be lower, the DAC resolution is required to be higher, and the DAC output range is required to be wider.
[0010] use Figure 1 The constant current source shown in parallel to achieve current expansion has the following disadvantages: 1. The DAC output has a wide variation range, which causes the output of the constant current source circuit to change from small current to large current, and the rising edge varies greatly.
[0011] 2. Due to the above problem 1, a lower DAC output voltage is required when outputting a small current, which puts higher requirements on the DAC output.
[0012] 3. Due to the large voltage range of the comparator input, combined with the comparator characteristics, the current rising edge of the constant current source circuit output changes greatly. Especially when the output current is small, the DAC setting value is smaller and the rising edge is slower. Summary of the invention
[0013] In view of this, it is necessary to provide a device testing circuit and method to solve the problem of inconsistent output current rising edges of constant current source circuits when testing a device under test in the prior art.
[0014] In order to solve the above problems, in a first aspect, the present invention provides a device testing circuit, comprising: N constant current source circuits, N switching circuits and a digital-to-analog converter; wherein N is an integer greater than 1; The first ends of the N switching circuits are connected to the first end of the digital-to-analog converter, and the second ends of the N switching circuits are respectively connected to the first ends of the N constant current source circuits, for controlling the shutdown and connection between the digital-to-analog converter and each of the constant current source circuits; The second end and the third end of the N constant current source circuits are used to be connected to the two ends of the device under test when testing the device under test, and the N constant current source circuits are used to output current to the device under test according to the voltage output by the digital-to-analog converter when connected to the digital-to-analog converter.
[0015] Optionally, it also includes: a negative power supply; The third terminals of the N switching circuits are connected to the first terminal of the negative power supply; When the second end of the switching circuit is connected to the third end, the constant source current circuit connected to the switching circuit stops outputting current; when the second end of the switching circuit is connected to the first end, the constant source current circuit connected to the switching circuit outputs current to the device under test according to the voltage output by the digital-to-analog converter.
[0016] Optionally, before testing the device under test, the second ends of the N switching circuits are connected to the third end.
[0017] Optionally, it also includes: a microcontroller; The first end of the microcontroller is connected to the fourth end of the N switching circuits respectively, and is used to control the second end of the N switching circuits to be connected to the third end, or to control the second end of the N switching circuits to be connected to the first end.
[0018] Optionally, the microcontroller is used to control the second end of the first switching circuit among the N switching circuits to be connected to the first end; wherein, the first switching circuit is determined based on a set total current output to the device under test and a maximum output current of the constant current source circuit.
[0019] Optionally, when the ratio of the total current to the maximum output current is a positive integer, the number of the first switching circuits is the ratio of the total current to the maximum output current; when the ratio of the total current to the maximum output current is not a positive integer, the number of the first switching circuits is the ratio of the total current to the maximum output current plus one.
[0020] Optionally, the microcontroller is also used to control the second end of the first switching circuit to be connected to the first end according to a preset frequency, so that the voltage output by the digital-to-analog converter to the first constant current source circuit is a pulse voltage with a preset pulse width; wherein, the first constant current source circuit is a constant current source circuit connected to the first switching circuit.
[0021] Optionally, the second end of the microcontroller is connected to the second end of the digital-to-analog converter, and is used to control the digital-to-analog converter to output a preset voltage; the preset voltage is determined based on the total current and the number of first constant current source circuits connected to the first switching circuit.
[0022] Optionally, the constant current source circuit includes a comparator; The second ends of the N switching circuits are respectively connected to the non-inverting input ends of the comparators in the N constant current source circuits.
[0023] In a second aspect, the present invention further provides a device testing method, applicable to any one of the above-mentioned device testing circuits, comprising: Obtaining the maximum output current of a single constant current source circuit and the total current set to be output to the device under test; According to the magnitude relationship between the maximum output current and the total current, determining, from the N constant current source circuits, a turned-on first constant current source circuit and a turned-off second constant current source circuit, a first switching circuit connected to the first constant current source circuit, and a second switching circuit connected to the second constant current source circuit; Controlling the digital-to-analog converter to be connected to the first constant current source circuit through the first switching circuit, so that the first constant current source circuit outputs current to the device under test according to the voltage output by the digital-to-analog converter, for testing; The digital-to-analog converter and the second constant current source circuit are controlled to be turned off through the second switching circuit.
[0024] The beneficial effects of the present invention are: The device testing circuit of the present invention comprises: N constant current source circuits, N switching circuits and a digital-to-analog converter; the first end of the N switching circuits is connected to the first end of the digital-to-analog converter, and the second end is respectively connected to the first end of the N constant current source circuits, and is used to control the switching off and connecting of the digital-to-analog converter with each constant current source circuit; the second end and the third end of the N constant current source circuits are used to connect to the two ends of the device under test when testing the device under test, and the N constant current source circuits are used to output current to the device under test according to the voltage output by the digital-to-analog converter when connected to the digital-to-analog converter.
[0025] The present invention can control the connection between the digital-to-analog converter and each constant current source circuit through a switching circuit, so that when the total current output by each constant current source circuit to the device under test needs to be changed, for example, when the total current needs to be reduced, the digital-to-analog converter can be controlled by the switching circuit to be connected to a part of the constant current source circuit and disconnected from another part of the constant current source circuit, so that when the output voltage of the digital-to-analog converter remains basically unchanged or changes in a small range, the total current output to the device under test by the connected part of the constant current source circuit meets the requirements. The present invention reduces the requirements for the resolution of the digital-to-analog converter, and can ensure that the rising edge of the output current of the constant current source circuit is consistent in the full current stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of a constant current source circuit parallel current expansion circuit in the prior art provided by the present invention; Figure 2 A schematic structural diagram of an embodiment of a device testing circuit provided by the present invention; Figure 3 A schematic structural diagram of another embodiment of a device testing circuit provided by the present invention; Figure 4 The present invention provides a Figure 3 A magnified view of module 1; Figure 5 A schematic flow chart of an embodiment of a device testing method provided by the present invention; Figure 6 A pulse current output control timing diagram provided by the present invention. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0028] In the description of the embodiments of the present invention, unless otherwise specified, "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0029] The terms "first", "second", etc., involved in the embodiments of the present invention are used to distinguish similar objects, but are not used to describe a specific order or sequence, nor are they used to indicate or imply their relative importance or implicitly indicate the number of technical features indicated. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more.
[0030] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0031] Reference Figure 2 , shows a schematic structural diagram of an embodiment of a device test circuit provided by the present invention, comprising: N constant current source circuits, N switching circuits and a digital-to-analog converter; wherein N is an integer greater than 1; The first ends of the N switching circuits are connected to the first end of the digital-to-analog converter, and the second ends of the N switching circuits are respectively connected to the first ends of the N constant current source circuits, for controlling the shutdown and connection between the digital-to-analog converter and each constant current source circuit; The second end and the third end of the N constant current source circuits are used to connect to the two ends of the device under test when testing the device under test, and the N constant current source circuits are used to output current to the device under test according to the voltage output by the digital-to-analog converter when connected to the digital-to-analog converter.
[0032] The device under test may include a power device or a Hall sensor.
[0033] The first ends of the N constant current source circuits are respectively connected to the second ends of the N switching circuits, for example, the first end of the constant current source circuit 1 is connected to the second end of the switching circuit 1; the first end of the constant current source circuit 2 is connected to the second end of the switching circuit 2. When the device under test is tested, the second ends and the third ends of the N constant current source circuits can be respectively connected to the two ends of the device under test, and the N constant current source circuits are in parallel with each other.
[0034] The first ends of the N switching circuits are connected to the first ends of the digital-to-analog converter. The N switching circuits are used to control the disconnection and connection between the digital-to-analog converter and the N constant current source circuits. For example, switching circuit 1 is used to control the disconnection and connection between the digital-to-analog converter and the constant current source circuit 1; switching circuit 2 is used to control the disconnection and connection between the digital-to-analog converter and the constant current source circuit 2. When the digital-to-analog converter is connected to the constant current source circuit, the constant current source circuit outputs current to the device under test according to the output voltage of the digital-to-analog converter; when the digital-to-analog converter is disconnected from the constant current source circuit, the constant current source circuit stops outputting current to the device under test.
[0035] The present invention can control the connectivity between the digital-to-analog converter and each constant current source circuit through a switching circuit, so that when the total current output by each constant current source circuit to the device under test needs to be changed, the digital-to-analog converter can be controlled by the switching circuit to be connected to a part of the constant current source circuits and disconnected from another part of the constant current source circuits, so that when the output voltage of the digital-to-analog converter remains basically unchanged or changes in a small range, the total current output by the connected part of the constant current source circuits to the device under test meets the requirements.
[0036] For example, N=10. Initially, the DAC is connected to 10 constant current source circuits. The output voltage of the DAC is 1 V, the output current of each constant current source circuit is 1 A, and the total current output to the device under test by the 10 constant current source circuits is 10 A. Now the total current output to the device under test needs to be changed to 5 A. In this case, the DAC can be connected to only 5 constant current source circuits, the output voltage of the DAC is maintained at 1 V, and the total current output to the device under test by the 5 constant current source circuits connected to the DAC is 5 A.
[0037] The present invention reduces the requirement on the resolution of the digital-to-analog converter and can ensure the consistency of the rising edge of the output current of the constant current source circuit.
[0038] In one embodiment, the device test circuit also includes: a negative power supply; the third ends of the N switching circuits are connected to the first end of the negative power supply; when the second end of the switching circuit is connected to the third end, the constant source current circuit connected to the switching circuit stops outputting current; when the second end of the switching circuit is connected to the first end, the constant source current circuit connected to the switching circuit outputs current to the device under test according to the voltage output by the digital-to-analog converter.
[0039] In one embodiment, before testing the device under test, the second terminals of the N switching circuits are connected to the third terminal.
[0040] In one embodiment, the device test circuit also includes: a microcontroller; the first end of the microcontroller is connected to the fourth end of the N switching circuits respectively, and is used to control the second end of the N switching circuits to be connected to the third end, or to control the second end of the N switching circuits to be connected to the first end.
[0041] In one embodiment, the microcontroller is used to control the second end of the first switching circuit among N switching circuits to be connected to the first end; wherein the first switching circuit is determined according to the set total current output to the device under test and the maximum output current of the constant current source circuit.
[0042] In one embodiment, when the ratio of the total current to the maximum output current is a positive integer, the number of first switching circuits is the ratio of the total current to the maximum output current; when the ratio of the total current to the maximum output current is not a positive integer, the number of first switching circuits is the ratio of the total current to the maximum output current rounded off plus one.
[0043] In one embodiment, the microcontroller is also used to control the second end of the first switching circuit to be connected to the first end according to a preset frequency, so that the voltage output by the digital-to-analog converter to the first constant current source circuit is a pulse voltage with a preset pulse width; wherein the first constant current source circuit is a constant current source circuit connected to the target switching circuit.
[0044] In one embodiment, the second end of the microcontroller is connected to the second end of the digital-to-analog converter for controlling the digital-to-analog converter to output a preset voltage; the preset voltage is determined according to the total current and the number of first constant current source circuits connected to the first switching circuit.
[0045] In one embodiment, the constant current source circuit includes a comparator; the second ends of the N switching circuits are respectively connected to the same-direction input ends of the comparators in the N constant current source circuits.
[0046] Reference Figure 3, shows a schematic diagram of the structure of another embodiment of a device test circuit provided by the present invention. The circuit includes an MCU, a DAC, a negative power supply, modules 1 to N and a device under test. The device under test includes a power device or a Hall sensor, the device under test is connected in series with N constant current source circuits, the N constant current source circuits are connected in parallel, the N constant current source circuits are controlled by DAC, and the DAC is controlled by the MCU.
[0047] Reference Figure 4 , showing a method provided by the present invention Figure 3 The enlarged view of module 1 in FIG. 1 includes a switching circuit 1 and a constant current source circuit 1. The constant current source circuit 1 includes a comparator, a MOS tube (Q1), a resistor R, a resistor Rs, a diode and a capacitor C. The non-inverting input of the comparator is connected to the output of the DAC, the reverse input is grounded through a resistor Rs, and the output is connected to the gate of the MOS tube through a resistor R. The source of the MOS tube is connected to the anode of the diode and to the first end of the capacitor C through a resistor Rs. The second end of the capacitor C is connected to the second end of the device under test. The drain of the MOS tube is connected to the cathode of the diode and to the first end of the device under test. There is a normally closed switch K1-NC and a normally open switch K1-NO in the switching circuit 1. The default state negative power supply output V2 is given to the non-inverting input of the comparator in the constant current source circuit 1. In the power-on state, it is ensured that the output of the comparator is a negative voltage, so that the MOS tube is in the off state. The structure of modules 2~N is the same as that of module 1. The MCU controls the switching circuit 1~switching circuit N respectively through the CR1~CRN signals.
[0048] Reference Figure 5 , showing a flow chart of an embodiment of a device testing method provided by the present invention, which is applicable to any of the above-mentioned device testing circuits; comprising: S501, obtaining the maximum output current of a single constant current source circuit and the total current set to be output to the device under test.
[0049] S402, according to the relationship between the maximum output current and the total current, determine from N constant current source circuits the first constant current source circuit that is turned on and the second constant current source circuit that is turned off, and the first switching circuit connected to the first constant current source circuit and the second switching circuit connected to the second constant current source circuit.
[0050] S503, controlling the digital-to-analog converter to communicate with the first constant current source circuit through the first switching circuit, so that the first constant current source circuit outputs current to the device under test according to the voltage output by the digital-to-analog converter, for testing.
[0051] S504, controlling the digital-to-analog converter and the second constant current source circuit to be turned off through the second switching circuit.
[0052] The execution subject of this embodiment may be a device testing device, which may include the device testing circuit in the above embodiment.
[0053] The present invention can control the connection between the digital-to-analog converter and each constant current source circuit through a switching circuit, so that when it is necessary to change the total current output by each constant current source circuit to the device under test, the first constant current source circuit to be turned on and the second constant current source circuit to be turned off, the first switching circuit connected to the first constant current source circuit and the second switching circuit connected to the second constant current source circuit are determined from N constant current source circuits according to the relationship between the maximum output current of each constant current source circuit and the total current output to the device under test set; the digital-to-analog converter is controlled to be connected to the first constant current source circuit through the first switching circuit, so that the first constant current source circuit outputs current to the device under test according to the voltage output by the digital-to-analog converter. When the output voltage of the digital-to-analog converter remains basically unchanged or changes in a small range, the total current output to the device under test by the connected part of the constant current source circuit meets the requirements. The present invention reduces the requirements for the resolution of the digital-to-analog converter, and can ensure that the rising edge of the output current of the constant current source circuit is consistent.
[0054] In one embodiment, based on the relationship between the maximum output current and the total current, the step of determining the first constant current source circuit to be turned on and the second constant current source circuit to be turned off from N constant current source circuits includes: when the ratio of the total current to the maximum output current is a positive integer, determining the first constant current source circuit to be turned on from the N constant current source circuits; when the ratio is not a positive integer, taking the integer part of the ratio plus one to obtain the number of the first constant current source circuits to be turned on.
[0055] For example, if the total current is the maximum output current 5 times, then it can be determined that the number of first constant current source circuits is 5, that is, 5 first constant current source circuits can be determined from N constant current source circuits. is the maximum output current 5.1 times, it can be determined that the number of first constant current source circuits is 6, that is, 6 first constant current source circuits can be determined from N constant current source circuits. Then, the output current of the first constant current source is determined according to the number of first constant current source circuits and the total current. ,according to Determines the output voltage of the DAC.
[0056] In one embodiment, the method further includes: determining the output current of the first constant current source according to the total current and the number of the first constant current source circuits ,according to and the resistance of the first constant current source circuit Determines the output voltage of the DAC.
[0057] Specific: When I ≥ I set At this time, the output current of module 1 can be controlled, and the MCU is based on the total current I set , combined with the first formula, calculate the DAC output size at this time:
[0058] MCU controls DAC to output V set Then, by controlling the CR1 signal, K1 is controlled to switch K1-NC to the normally open state and K1-NO to the normally closed state. V set Added to the non-inverting input terminal of the comparator, the comparator output voltage controls the operation of MOS Q1 to achieve the output of the set current.
[0059] When I<I set At this time, the output current of module 1 to module M (M≤N, and is a positive integer) can be controlled. The MCU outputs the total current I set , combined with the first formula, calculate the size of M and get the number of control boards:
[0060] According to the value of M (if M is not an integer, then M = the integer part of M plus one), the current value that a single board needs to output is calculated iteratively , from the above formula we can know:
[0061] Computational At this time, the current is set for the corresponding single board, and the corresponding DAC output voltage is calculated as:
[0062] In one embodiment, the step of controlling the connection between the digital-to-analog converter and the first constant current source circuit through the first switching circuit includes: controlling the connection and disconnection between the digital-to-analog converter and the first constant current source circuit according to a preset frequency through the first switching circuit, so that the voltage output by the digital-to-analog converter to the first constant current source circuit is a pulse voltage with a preset pulse width.
[0063] Considering the delay in DAC output control, and the high requirements on the timeliness of pulse current output and pulse width accuracy, the embodiment of the present invention can achieve precise control of pulse current width by controlling switch K1. When the switch cuts the negative power supply V2 into the same direction end, in order to turn off the MOS tube, it is generally required that the negative power supply V2 is greater than V DAC The maximum value of .
[0064] Reference Figure 6, shows a pulse current output control timing diagram provided by the present invention. The output voltage of the digital-to-analog converter remains unchanged, and the MCU controls the connectivity between the digital-to-analog converter and the constant source current circuits 1-N respectively by controlling the CR1-N signals, so that the total current output by the constant source current circuits 1-N is a pulse current. And by controlling the frequency of the CR1-N signals, the width of the pulse current can be precisely controlled.
[0065] In summary, compared with the prior art, the present invention ① reduces the requirements for DAC and reduces the cost. Under the same DAC condition, the output accuracy and resolution are higher; ② the output has a faster rising edge under low current conditions and high pulse control accuracy; ③ better scalability.
[0066] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0067] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A device testing circuit, characterized in that: include: N constant current source circuits, N switching circuits and a digital-to-analog converter; wherein N is an integer greater than 1; The first ends of the N switching circuits are connected to the first end of the digital-to-analog converter, and the second ends of the N switching circuits are respectively connected to the first ends of the N constant current source circuits, for controlling the digital-to-analog converter and each of the constant current source circuits to be turned off and connected; The second end and the third end of the N constant current source circuits are used to be connected to the two ends of the device under test when testing the device under test, and the N constant current source circuits are used to output current to the device under test according to the voltage output by the digital-to-analog converter when connected to the digital-to-analog converter.
2. The device testing circuit according to claim 1, characterized in that: Also includes: Negative power supply; The third terminals of the N switching circuits are connected to the first terminal of the negative power supply; When the second end of the switching circuit is connected to the third end, the constant source current circuit connected to the switching circuit stops outputting current; when the second end of the switching circuit is connected to the first end, the constant source current circuit connected to the switching circuit outputs current to the device under test according to the voltage output by the digital-to-analog converter.
3. The device testing circuit according to claim 1, characterized in that: Before testing the device under test, the second terminals of the N switching circuits are connected to the third terminal.
4. The device testing circuit according to claim 2, characterized in that: Also includes: Microcontroller; The first end of the microcontroller is connected to the fourth end of the N switching circuits respectively, and is used to control the second end of the N switching circuits to be connected to the third end, or to control the second end of the N switching circuits to be connected to the first end.
5. The device testing circuit according to claim 4, characterized in that: The microcontroller is used to control the second end of the first switching circuit among the N switching circuits to be connected to the first end; wherein, the first switching circuit is determined according to the set total current output to the device under test and the maximum output current of the constant current source circuit.
6. The device testing circuit according to claim 5, characterized in that: When the ratio of the total current to the maximum output current is a positive integer, the number of the first switching circuits is the ratio of the total current to the maximum output current; When the ratio of the total current to the maximum output current is not a positive integer, the number of the first switching circuits is the integer of the ratio of the total current to the maximum output current plus one.
7. The device testing circuit according to claim 5, characterized in that: The microcontroller is also used to control the second end of the first switching circuit to be connected to the first end according to a preset frequency, so that the voltage output by the digital-to-analog converter to the first constant current source circuit is a pulse voltage with a preset pulse width; wherein the first constant current source circuit is a constant current source circuit connected to the first switching circuit.
8. The device testing circuit according to claim 5, characterized in that: The second end of the microcontroller is connected to the second end of the digital-to-analog converter, and is used to control the digital-to-analog converter to output a preset voltage; the preset voltage is determined according to the total current and the number of first constant current source circuits connected to the first switching circuit.
9. The device testing circuit according to claim 1, characterized in that: The constant current source circuit includes a comparator; The second ends of the N switching circuits are respectively connected to the non-inverting input ends of the comparators in the N constant current source circuits.
10. A device testing method, characterized in that: A device testing circuit applicable to any one of claims 1 to 9; comprising: Obtaining the maximum output current of a single constant current source circuit and the total current set to be output to the device under test; According to the magnitude relationship between the maximum output current and the total current, determining, from the N constant current source circuits, a turned-on first constant current source circuit and a turned-off second constant current source circuit, a first switching circuit connected to the first constant current source circuit, and a second switching circuit connected to the second constant current source circuit; Controlling the digital-to-analog converter to be connected to the first constant current source circuit through the first switching circuit, so that the first constant current source circuit outputs current to the device under test according to the voltage output by the digital-to-analog converter, for testing; The digital-to-analog converter and the second constant current source circuit are controlled to be turned off through the second switching circuit.