A program-controlled resistance source and control method thereof

By using the design of relay network and compensation resistor network in the program-controlled resistor source, the problem that the existing resistor source cannot reach 0.01% in resistance accuracy is solved, high-precision analog resistor signal detection and calibration is achieved, and the advantages of small volume and simple adjustment are provided.

CN119008151BActive Publication Date: 2025-03-18CHINA JILIANG UNIV +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411465584.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-03-18
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The existing programmable resistor source cannot reach 0.01% in output resistance accuracy, resulting in errors in the detection and calibration of analog resistance signals, and high-precision detection and calibration cannot be achieved.

Method used

The design of program-controlled resistor source is adopted, including input module, main control module, relay network, main resistor network and compensation resistor network. The main control module divides the set resistance value into the main resistor network target value and the compensation resistor network target value, and controls the relay network to achieve precise adjustment of the resistance value.

Benefits of technology

Improves the accuracy of the output resistance value of the program-controlled resistor source, realizes high-precision detection and calibration of analog resistor signals, and provides the advantages of smaller volume and simple adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119008151B_ABST
    Figure CN119008151B_ABST
Patent Text Reader

Abstract

The present invention discloses a programmable resistance source and a control method thereof. The programmable resistance source includes an input module, a main control module, a relay network, a main resistance network and a compensation resistance network; the input module is used to receive a set resistance value and send the set resistance value to the main control module; the relays in the relay network are respectively arranged in parallel with the resistances in the main resistance network and the resistances in the compensation resistance network in a one-to-one correspondence, and the main resistance network and the compensation resistance network are connected in series; the main control module is used to split the set resistance value into a main resistance network target and a compensation resistance network target value, and control the conduction and disconnection of each relay in the relay network according to the main resistance network target and the compensation resistance network target value, so that the total resistance of the main resistance network is the main resistance network target, and the total resistance of the compensation resistance network is the compensation resistance network target value. The present invention can improve the accuracy of the output resistance value of the programmable resistance source, and the adjustment method is simple.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of resistor technology, and in particular to a programmable resistance source and a control method thereof. Background Art

[0002] High-precision resistance sources are mainly used in analog resistance signal detection and calibration. In the current automatic testing field, the accuracy and volume requirements of high-precision resistance sources are getting higher and higher.

[0003] However, the traditional knob-type resistor box is large in size, only supports manual adjustment, cannot realize numerical control, and cannot be integrated into the field of automatic testing. The programmable resistance source in the prior art usually uses a resistance matrix to output the target resistance, but there are many factors that affect the total resistance of the programmable resistance source in the programmable resistance source using the resistance matrix, resulting in the output resistance accuracy of the programmable resistance source in the prior art cannot reach 0.01%, resulting in certain errors in the detection and calibration of the analog resistance signal, and it is impossible to achieve high-precision detection and calibration of the analog resistance signal. Summary of the invention

[0004] The present invention provides a program-controlled resistance source and a control method thereof, so as to improve the accuracy of the output resistance value of the program-controlled resistance source.

[0005] In a first aspect, an embodiment of the present invention provides a programmable resistance source, including an input module, a main control module, a relay network, a main resistance network and a compensation resistance network;

[0006] The output end of the input module is connected to the input end of the main control module, and the input module is used to receive a set resistance value and send the set resistance value to the main control module;

[0007] The control end of the main control module is connected to the control end of the relay network, the main resistance network includes a plurality of main resistances connected in series, the compensation resistance network includes a plurality of compensation resistances connected in series, the relay network includes a plurality of relays, the relays in the relay network are respectively connected in parallel with the resistances in the main resistance network and the resistances in the compensation resistance network in a one-to-one correspondence, and the main resistance network and the compensation resistance network are connected in series;

[0008] The main control module is used to split the set resistance value into a main resistance network target value and a compensation resistance network target value, and control the on and off of each relay in the relay network according to the main resistance network target value and the compensation resistance network target value, so that the total resistance of the main resistance network is the main resistance network target value, and the total resistance of the compensation resistance network is the compensation resistance network target value.

[0009] In a second aspect, an embodiment of the present invention further provides a control method for a programmable resistance source, the control method for a programmable resistance source is applied to a main control module of a programmable resistance source described in any embodiment of the present invention, and the control method for a programmable resistance source includes:

[0010] The set resistance value is divided into a main resistance network target value and a compensation resistance network target value;

[0011] Obtaining a main relay network array of a main relay network according to the main resistor network target value, and controlling the conduction and disconnection of resistors in the main relay network according to the main relay network array;

[0012] Receive the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, obtain the sub-relay network array of the sub-relay network according to the target value of the compensation resistor network and the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, and control the on and off of the relays in the sub-relay network according to the sub-relay network array.

[0013] The present invention provides a programmable resistance source and a control method thereof. The programmable resistance source includes an input module, a main control module, a relay network, a main resistance network and a compensation resistance network. The input module receives a set resistance value and sends the set resistance value to the main control module. The main control module splits the set resistance value into a main resistance network target value and a compensation resistance network target value, and controls the on and off of each relay in the relay network according to the main resistance network target value and the compensation resistance network target value, so that the total resistance of the main resistance network is the main resistance network target value, and the total resistance of the compensation resistance network is the compensation resistance network target value, so that the total resistance of the main resistance network and the compensation resistance network is close to the set resistance value, thereby improving the accuracy of the output resistance value of the programmable resistance source. In addition, the programmable resistance source has a simple adjustment method and a small size, which provides favorable conditions for the test and calibration of resistance-type signals. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 A schematic diagram of the structure of a programmable resistance source provided by an embodiment of the present invention.

[0015] Figure 2 A schematic diagram of the structure of a relay network, a main resistor network and a compensation resistor network provided in an embodiment of the present invention.

[0016] Figure 3 A schematic diagram of the structure of a programmable resistance source provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0018] Figure 1 The present invention provides a schematic diagram of a programmable resistance source, which is used to replace the traditional resistance box to improve the intelligent calibration capability on the production line, and improve the accuracy, reliability and work efficiency of online calibration. Figure 1 As shown, the programmable resistance source includes an input module 150, a main control module 110, a relay network 120, a main resistance network 130 and a compensation resistance network 140; the output end of the input module 150 is connected to the input end of the main control module 110, and the input module 150 is used to receive a set resistance value and send the set resistance value to the main control module 110; the control end of the main control module 110 is connected to the control end of the relay network 120, the main resistance network 130 includes a plurality of main resistors connected in series, the compensation resistance network 140 includes a plurality of compensation resistors connected in series, the relay network 120 includes a plurality of relays, and the relays in the relay network 120 are respectively arranged in parallel with the resistors in the main resistance network 130 and the resistors in the compensation resistance network 140 in a one-to-one correspondence, and the main resistance network 130 and the compensation resistance network 140 are connected in series.

[0019] The main control module 110 is used to split the set resistance value into a main resistance network target value and a compensation resistance network target value, and control the on and off of each relay in the relay network 120 according to the main resistance network target value and the compensation resistance network target value, so that the total resistance of the main resistance network 130 is the main resistance network target value, and the total resistance of the compensation resistance network 140 is the compensation resistance network target value.

[0020] Among them, the resistance value of the resistors in the main resistor network 130 is relatively large, and the number of resistors can be set according to actual needs. The resistance value of the resistors in the compensation resistor network 140 is relatively small, so as to improve the accuracy of the output resistance. Exemplarily, the resistance values ​​included in the main resistor network 130 are 1Ω, 2Ω, 4Ω, 8Ω, 16Ω, 32Ω, 64Ω, 128Ω, and 256Ω, and the resistance values ​​of the compensation resistor network 140 include 0.01Ω, 0.02Ω, 0.04Ω, 0.08Ω, 0.16Ω, 0.32Ω, and 0.64Ω; the resistance output range of the programmable resistance source can be 20-500Ω, with an accuracy of 0.01%. The resistors in the main resistor network 130 and the compensation resistor network 140 can adopt customized plug-in resistors with high precision (0.01%) and low temperature drift (5ppm / ℃).

[0021] For example, Figure 2A schematic diagram of the structure of the relay network, the main resistor network and the compensation resistor network provided by the embodiment of the present invention is shown in FIG. Figure 2 As shown, the main resistor network 130 includes a plurality of main resistors (z1, z2, z3 ... z9) connected in series, the compensation resistor network 140 includes a plurality of compensation resistors (R1, R2, R3 ... R8) connected in series, and the relay network 120 includes a plurality of relays (y1, y2, y3 ... y9 and b1, b2, b3 ... b8). The relays in the relay network 120 are respectively arranged in parallel with the resistors in the main resistor network 130 and the resistors in the compensation resistor network 140 in a one-to-one correspondence. The main resistor network 130 and the compensation resistor network 140 are connected in series between the current input terminal OUTA and the current output terminal OUTB in the output loop of the programmable resistance source. The output of the resistance value in the programmable resistance source can be realized through the main resistor network 130 and the compensation resistor network 140 connected in series.

[0022] Specifically, the input module 150 receives the set resistance value from the outside, and sends the set resistance value to the main control module 110. The main control module 110 controls the relay switch in the relay network 120, so that the total resistance value of the resistors connected to the output circuit in the main resistance network 130 and the compensation resistance network 140 can be close to the set resistance value, thereby providing favorable conditions for the test and calibration of the resistance type signal. The main control module 110 divides the set resistance value into the main resistance network target value and the compensation resistance network target value, and controls the conduction and disconnection of each relay in the relay network 120 according to the main resistance network target value and the compensation resistance network target value, so that the relay network 120 can control some large resistance resistors in the main resistance network 130 and some small resistance resistors in the compensation resistance network 140 to be connected to the output circuit of the programmable resistance source, so that the total resistance of the main resistance network 130 is the main resistance network target value, and the total resistance of the compensation resistance network 140 is the compensation resistance network target value, so that the total resistance of the main resistance network and the compensation resistance network is close to the set resistance value, thereby improving the accuracy of the output resistance value of the programmable resistance source. In addition, the programmable resistance source has a simple adjustment method and a small size, which provides favorable conditions for the testing and calibration of resistance type signals.

[0023] The embodiment of the present invention uses a programmable resistance source, including an input module, a main control module, a relay network, a main resistance network and a compensation resistance network; the input module receives a set resistance value, and sends the set resistance value to the main control module, the main control module splits the set resistance value into a main resistance network target value and a compensation resistance network target value, and controls the conduction and disconnection of each relay in the relay network according to the main resistance network target value and the compensation resistance network target value, so that the total resistance of the main resistance network is the main resistance network target value, and the total resistance of the compensation resistance network is the compensation resistance network target value, so that the total resistance of the main resistance network and the compensation resistance network is close to the set resistance value, thereby improving the accuracy of the output resistance value of the programmable resistance source. In addition, the programmable resistance source has a simple adjustment method and a small size, which provides favorable conditions for the testing and calibration of resistance-type signals.

[0024] The embodiment of the present invention further provides another programmable resistance source. Figure 3 A schematic diagram of a programmable resistance source provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the relay network 120 includes a main relay network 1201 and a secondary relay network 1202; the relays in the main relay network 1201 are respectively set in a one-to-one correspondence with the resistors in the main resistor network 130; the relays in the secondary relay network 1202 are respectively set in a one-to-one correspondence with the resistors in the compensation resistor network 140.

[0025] The main control module 110 is specifically used to split the set resistance value into a main resistance network target value and a compensation resistance network target value, obtain the main relay network array of the main relay network 1201 according to the main resistance network target value, and control the conduction and disconnection of the resistances in the main relay network 1201 according to the main relay network array; the main control module 110 is also used to receive the real-time temperature of the resistances in the main resistance network 130 and the compensation resistance network 140, obtain the sub-relay network array of the sub-relay network 1202 according to the compensation resistance network target value and the real-time temperature of the resistances in the main resistance network 130 and the compensation resistance network 140, and control the conduction and disconnection of the relays in the sub-relay network 1202 according to the sub-relay network array.

[0026] Specifically, the main control module 110 can split the set resistance value into a main resistance network target value and a compensation resistance network target value, and thus obtain the optimal relay drive sequence of the relay network 120, i.e., a main relay network array and a secondary relay network array, through a compensation algorithm, and control the conduction and disconnection of the resistors in the main relay network 1201 according to the main relay network array, and control the conduction and disconnection of the relays in the secondary relay network 1202 according to the secondary relay network array.

[0027] Optional, such as Figure 3As shown, the main control module 110 includes a first control unit 1101 and a second control unit 1102;

[0028] The first control unit 1101 is used to round down the set resistance value to obtain the main resistance network target value, and obtain the main relay network array according to the main resistance network target value; the main resistance network target value satisfies:

[0029] ;

[0030] The main relay network array meets:

[0031] ;

[0032] ;

[0033] ;

[0034] in, R main is the target value of the main resistor network, R out To set the resistance value, Z is the resistance value array of each resistor in the main resistor network 130, and Y is the main relay network array; , n≥1, y i is the conduction state of the corresponding relay in the main relay network; i The value is 0 or 1. i When y is 1, the corresponding relay in the main relay network is turned on. i When it is 0, the corresponding relay in the main relay network is disconnected; The resistance value of the corresponding resistor in the main resistor network.

[0035] Specifically, the target value of the main resistor network is R main By setting the resistance value R out Round down to get the resistance value array of each resistor in the main resistor network 130 Z for , i.e. the weight of the main resistor network 130, is calculated by the target value of the main resistor network R main and the resistance value array of each resistor of the main resistor network 130 Z , the main relay network array Y can be solved, and the switching state of the corresponding relay in the main relay network 1201 can be controlled by the main relay network array Y.

[0036] The second control unit 1102 is used to receive the real-time temperatures of the resistors in the main resistor network 130 and the compensation resistor network 140, determine the sub-relay network array of the sub-relay network 1202 according to the compensation resistor network target value, the real-time temperature and the main relay network array, and control the conduction and disconnection of the relays in the sub-relay network according to the sub-relay network array.

[0037] Among them, the real-time temperature of the resistors in the main resistor network 130 and the compensation resistor network 140 can be detected by a temperature sensor. The second control unit 1102 determines the sub-relay network array of the sub-relay network 1202 according to the compensation resistor network target value, the real-time temperature and the main relay network array, and controls the conduction and disconnection of the relays in the sub-relay network according to the sub-relay network array, so that the total resistance of the compensation resistor network 140 can be the compensation resistor network target value.

[0038] The second control unit 1102 should actually also consider the contact voltage of the relay. , wire resistance, and temperature drift, the value of the compensation resistor needs to be calculated. The calculation of the relay contact resistance in the main resistor network 130 should consider three issues: first, clarify the on / off state of the relay corresponding to each resistor in the main resistor network 130, which can be known from the main relay network array Y; second, when a resistor is not connected to the resistor network, the contact resistance of the corresponding off relay is connected in parallel with its corresponding resistor to calculate its resistance; third: consider the influence of temperature on the resistor network and contact resistance.

[0039] Optionally, the second control unit 1202 includes a contact resistance calculation subunit, a wire resistance calculation subunit and a compensation resistance calculation subunit.

[0040] The contact resistance calculation subunit is used to receive the real-time temperature of the resistors in the main resistor network 130 and the compensation resistor network 140, and obtain the main relay network array, and calculate the total resistance of the relay contacts connected to the main resistor network 130 according to the main relay network array. The resistance of the relay contacts connected to the main resistor network 130 satisfies:

[0041] ;

[0042] The contact resistance calculation subunit is also used to perform temperature compensation on the total resistance of the relay contacts connected to the main resistance network 130 according to the real-time temperatures of the resistors in the main resistance network 130 and the compensation resistance network 140, so as to obtain the total resistance of the relay contacts connected to the main resistance network 130; the total resistance of the relay contacts connected to the main resistance network 130 satisfies:

[0043] ;

[0044] The wire resistance calculation unit is used to determine the wire resistance of the main resistance network 130 according to the main relay network array. The wire resistance of the main resistance network 130 satisfies:

[0045] ;

[0046] in, is the resistance of the relay contact connected to the main resistance network 130, is the total resistance of the relay contacts connected to the main resistance network 130, A relay in the main relay network 1201 is connected to a contact resistor in the main resistor network 130, is the temperature coefficient of the contact material of the relays in the main relay network 1201, Standard temperature , is the real-time temperature of the resistors in the main resistor network 130 and the compensation resistor network 140, ρ is the resistivity of the wire in the main resistor network 130, is the total length of the wiring at both ends of the current output terminal and the current input terminal of a resistor in the main resistor network 130, is the thickness of the trace in the main resistor network 130, is the width of the trace in the main resistor network 130 .

[0047] Specifically, when the number of resistors turned on in the main resistor network 130 is different, the paths are different and the wire lengths are complex and variable. Therefore, the estimated value of the wire resistance can be solved and the total length of the wiring in the main resistor network 130 is set to , is the trace thickness, is the wiring width, ρ is the resistivity parameter of the wire (which can be a copper wire) in the main resistance network 130, and the weight of the number of resistors connected to the current relative to the total number of resistors is determined according to the main relay network array, and multiplied by the total resistance of the wiring in the main resistance network 130, so as to obtain the wire resistance of the main resistance network 130 when different numbers of resistors are connected to the main resistance network 130, which can improve the accuracy of the wire resistance calculation of the main resistance network 130.

[0048] In addition, the compensation resistance calculation subunit is used to obtain the actual output resistance of the main resistance network 130 according to the wire resistance of the main resistance network 130, the total resistance of the relay contacts connected to the main resistance network 130, and the main resistance network target value; the actual output resistance of the main resistance network 130 satisfies:

[0049] ;

[0050] The compensation resistance calculation subunit is further used to obtain a compensation resistance network target value according to the actual output resistance of the main resistance network 130 and the set resistance value. The compensation resistance network target value satisfies:

[0051] ;

[0052] in, The resistor connected to the relay contact in the main resistor network, is the temperature coefficient of the resistors in the main resistor network, is the temperature coefficient of the wire in the main resistor network, is the target value of the compensation resistor network.

[0053] Specific, to any ,like , a compensation algorithm can be performed if Can directly output resistance, if , you can In the extreme case, the sum of the contact resistances of all relays when closed is less than 1Ω. Re-enter the main network calculation method to obtain the actual output resistance , compensation resistor )>0, for any , .

[0054] In the embodiment of the present invention, in the compensation resistor network 140, the resistance value of the resistor may include 0.01Ω, 0.02Ω, 0.04Ω, 0.08Ω, 0.16Ω, 0.32Ω, and 0.64Ω. The resistance value of the compensation resistor network 140 is not much different from the relay contact resistance and the wire resistance. These error resistances and temperature have a greater impact on the output of the compensation resistor network 140. If the compensation method of the main resistor network 130 is continued to be used, the resistance output accuracy cannot be improved. Therefore, the vector weight idea is introduced, and then the successive approximation algorithm is used to approximate the target resistance value to be compensated. The so-called weight compensation method is: set the secondary relay network array to Represents the value state of the relay switch in the secondary relay network 1202, which can be 0 or 1. The weight vector is set to , weight vector t setting method: for any , weight vector That is, the difference between any resistor when it is connected to the compensation resistor network 140 and when it is not connected to the compensation resistor network 140, and the total resistance value of the compensation resistor network when each compensation resistor is connected to the compensation resistor network 140 can be set to , the total resistance value of the compensation resistor network when one of the compensation resistors is disconnected , a single resistor weight vector :

[0055] ;

[0056] Similarly, all the value vectors in the compensation resistor network 140 can be obtained: Since the compensation resistor network 140 is also affected by temperature, the compensation resistor network 140 of the system is recorded in advance at different temperature coefficients. The weight of a single resistor under the above conditions is stored in the MCU in the form of a table. The main control module 110 is the MCU, and when calling, the table can be directly looked up to obtain the data.

[0057] Optionally, the second control unit 1102 further includes an output control subunit;

[0058] The output control subunit is used to obtain a sub-relay network array through a successive approximation algorithm according to the target value of the compensation resistor network, and control the conduction and disconnection of the relays in the sub-relay network 1202 according to the sub-relay network array; the actual output resistance of the compensation resistor network 140 satisfies:

[0059] ;

[0060] ;

[0061] ;

[0062] in, is the actual output resistance of the compensation resistor network 140, B is the secondary relay network array, is a weight vector for compensating the resistance value of each resistor in the resistor network 140; , n≥1, represents the switch state of the relay in the secondary relay network 1202, The value of is 0 or 1. When it is 1, the corresponding relay in the secondary relay network 1202 is turned on. When it is 0, the corresponding relay in the secondary relay network 1202 is disconnected; , is the weight of the corresponding resistor in the compensation resistor network 140 .

[0063] Specifically, for the compensation resistance target value Using the idea of ​​successive approximation, the weight vector middle , the compensation resistance target value With the first weight vector Do subtraction, if If it is established, then its corresponding resistance (i.e. ) is connected to the compensation resistor network 140, that is, the resistor Corresponding relay switch Set to 1, if , then the corresponding relay switch Set to 0, and similarly: The value of Subtraction operation, if , then the corresponding resistor (t2) is connected to the compensation resistor network 140, that is, the relay switch b2 corresponding to the resistor t1 is set to 1, , then the corresponding relay switch The above operation compares each resistance weight, so for the secondary relay network array B, a general rule is established: if If it is established, then its corresponding resistance (i.e. ) is connected to the compensation resistor network 140, that is, the resistor Corresponding relay switch Set to 1, if , then the corresponding relay switch Set to 0; until the product of relay array B and resistance weight T approaches , the actual output resistance of the compensation network is :

[0064] ;

[0065] And the total error of the compensation resistor Less than the minimum resistance value weight in the compensation resistor network 140 ,Right now:

[0066] ;

[0067] Therefore, for any set resistance value The set resistance value of the programmable resistance source is , the actual output resistance of the programmable resistance source is , then:

[0068] ;

[0069] So the actual output resistance of the programmable resistance source is Close to the set resistance value of the programmable resistance source The difference between the two is approximately 0, thereby improving the accuracy of the output resistance value of the programmable resistance source.

[0070] In addition, the main relay network array With secondary relay network array The synthesis is the optimal relay array for outputting the set resistance value. Each element in this array is used as the control signal of the relay corresponding to its resistance to control the relay to be disconnected or on. Multiple control signals can drive the relay to work through the relay driver chip ULN2803, thereby improving the accuracy of the output resistance value of the programmable resistance source.

[0071] Optional, such as Figure 2 As shown, the programmable resistance source also includes a first independent relay S1 and a second independent relay S2; the main resistance network 130 includes a first resistance group 1301 and a second resistance group 1302, the first resistance group 1301 and the second resistance group 1302 are connected in series, and the first resistance group 1301 and the second resistance group 1302 each contain at least one resistor; the first independent relay S1 is connected in parallel with the first resistance group 1301, and the second independent relay S2 is connected in parallel with the second resistance group 1302; the main control module 110 is also used to control the conduction and disconnection of the first independent relay S2 and the second independent relay S1 according to the main relay network array, and calculate the resistance of the relay contacts connected in the main resistance network 130 according to the main relay network array.

[0072] Specifically, two independent first independent relays S1 and second independent relays S2 are provided to control the length of the wire connected to the relay. The two first independent relays S1 and second independent relays S2 provided in the main resistor network 130 are connected to the main relay network array corresponding to the main resistor network 130. It is divided into a first resistor group 1301 and a second resistor group 1302, that is, and , for example, Figure 2 Only y1, y2, y3…y9 are shown, which are divided into [y1, y2, y3…y5] and [y6, y7, y8…y9]. Set the resistance value Split main resistor network target value , calculate the main relay network array .

[0073] ;

[0074] For main relay network array , there are four compensation situations:

[0075] , , relay array The corresponding resistors are , relay array The corresponding resistance is .

[0076] Case 1: If the collection The elements of the set are all 0. If any of the elements in is not 0, the first independent relay S1 is closed and the second independent relay S2 is opened.

[0077] The resistor connected to the relay contact in the main resistor network 130 for:

[0078] ;

[0079] Case 2: If the collection The elements of the set are all 0. If any of the elements in is not 0, the second independent relay S2 is closed and the first independent relay S1 is opened.

[0080] The resistance of the relay contacts connected to the main resistance network 130 is:

[0081] ;

[0082] Case 3: If If all elements of are 0, then both are closed. , , the total resistance of the relay contacts connected to the main resistance network 130 for:

[0083] ;

[0084] Case 4: Collection The elements in the set are not 0 and If the element is not 0, the resistor connected to the relay contact in the main resistor network 130 for:

[0085] ;

[0086] Optional, continue to refer to Figure 3 The programmable resistance source also includes an isolation unit 160, a display unit 170 and a temperature detection unit 180; the input module 150 includes a key input unit 1501 and a communication input unit 1502; the output end of the key input unit 1501 and the output end of the communication input unit 1502 are respectively connected to the input end of the main control module 110, the key input unit 1501 is used to receive a manually input set resistance value and send the set resistance value to the main control module 110, and the communication input unit 1502 is used to receive a remotely input set resistance value and send the set resistance value to the main control module 110.

[0087] The output end of the temperature detection unit 180 is connected to the temperature input end of the main control module 110, the input end of the display unit 170 is connected to the signal output end of the main control module 110, and the isolation unit 160 is located between the control end of the main control module 110 and the control end of the relay network 120; the isolation unit 160 is used to isolate the main control module 110 from the relay network 120; the temperature detection unit 180 is used to detect the real-time temperature of the resistors in the main resistance network 130 and the compensation resistance network 140; the main control module 110 is also used to send the set resistance value and the real-time temperature of the resistors in the main resistance network 130 and the compensation resistance network 140 to the display unit 170, and the display unit is used to display the set resistance value and the real-time temperature of the resistors in the main resistance network 130 and the compensation resistance network 140.

[0088] Specifically, the set resistance value can be set by the key of the key input unit 1501, or by the external MCU or the host computer through the RS485 interface, and the software layer communicates and sets with the communication input unit 1502 through the modbus protocol. The isolation unit 160 is used to isolate the main control module 110 from the relay network 120, and improve the ability to resist interference between the main control module 110 and the relay network 120; the main control module 110 controls the relay network 120 through the isolation unit 160 to realize the output control of the main resistance network 130 and the compensation resistance network 140.

[0089] Optionally, in another embodiment of the present invention, the relays in the relay network 120 are bistable, dual-contact signal relays. This type of relay has small contact resistance and low power consumption. When the resistor is not connected to the network, the two contacts are connected in parallel to reduce the value of the contact resistance connected to the resistor network. At the same time, the contact resistance of all relays is ensured to be consistent during selection.

[0090] Optionally, in another embodiment of the present invention, the wire resistance, relay contact resistance, and resistance in the resistance network are subjected to temperature drift analysis and compensation. For the temperature compensation in the main resistance network 130, the actual resistance offset of the main resistance network 130 can be calculated by calculation using the resistance network temperature drift coefficient, the relay contact material temperature drift coefficient, and the copper wire temperature drift coefficient; for the temperature drift of the wire resistance, relay contact resistance, and resistance in the resistance network in the compensation resistance network 140, the weight distribution method of the compensation network is used: the weight of the same resistance at different temperatures is recorded, and this method is used for each resistance in the compensation network, and the data is stored in the MCU in advance in a table form, and the different resistance weights are corresponding to the ambient temperature, and then the sub-relay network array B of the compensation resistance network 140 is calculated using a successive approximation algorithm.

[0091] Optionally, in another embodiment of the present invention, the resistors of the main resistor network 130 and the compensation resistor network 140 are both customized plug-in high-precision (0.01%) and low-temperature drift resistors (5ppm / °C). At the same time, the consistency of the accuracy and temperature drift of each resistor needs to be ensured.

[0092] The programmable resistance source in the embodiment of the present invention has high output resistance accuracy, high resolution, simple adjustment method, and small size. It introduces a comprehensive analysis and compensation method for the resistance network, contact resistance, and wire resistance by introducing temperature drift compensation, calculates the optimal combination array of relays, and supports manual setting and communication setting of resistance values, providing favorable conditions for the testing and calibration of resistance-type signals.

[0093] The embodiment of the present invention further provides a control method for a programmable resistance source. The control method for a programmable resistance source is applied to a main control module of a programmable resistance source in any embodiment of the present invention. That is, the control method for a programmable resistance source can be applied to Figure 1 and Figure 3 In the main control module 110 of the programmable resistance source, the control method of the programmable resistance source includes:

[0094] S1. Split the set resistance value into the main resistance network target and the compensation resistance network target value.

[0095] S2. Obtain a main relay network array of the main relay network according to the main resistor network target value, and control the conduction and disconnection of the resistors in the main relay network according to the main relay network array.

[0096] S3. Receive the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, obtain the sub-relay network array of the sub-relay network according to the target value of the compensated resistor network and the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, and control the on and off of the relays in the sub-relay network according to the sub-relay network array.

[0097] Specifically, by splitting the set resistance value into the main resistance network target and the compensation resistance network target value, obtaining the main relay network array of the main relay network according to the main resistance network target value, controlling the on and off of the resistance in the main relay network according to the main relay network array, receiving the real-time temperature of the resistance in the main resistance network and the compensation resistance network, obtaining the sub-relay network array of the sub-relay network according to the compensated resistance network target value and the real-time temperature of the resistance in the main resistance network and the compensation resistance network, and controlling the on and off of the relay in the sub-relay network according to the sub-relay network array, the total resistance of the main resistance network and the compensation resistance network is close to the set resistance value, thereby improving the accuracy of the output resistance value of the programmable resistance source. In addition, the programmable resistance source has a simple adjustment method and a small size, which provides favorable conditions for the testing and calibration of resistance-type signals.

[0098] The embodiment of the present invention uses a programmable resistance source, including an input module, a main control module, a relay network, a main resistance network and a compensation resistance network; the input module receives a set resistance value, and sends the set resistance value to the main control module, the main control module splits the set resistance value into a main resistance network target value and a compensation resistance network target value, and controls the conduction and disconnection of each relay in the relay network according to the main resistance network target value and the compensation resistance network target value, so that the total resistance of the main resistance network is the main resistance network target value, and the total resistance of the compensation resistance network is the compensation resistance network target value, so that the total resistance of the main resistance network and the compensation resistance network is close to the set resistance value, thereby improving the accuracy of the output resistance value of the programmable resistance source. In addition, the programmable resistance source has a simple adjustment method and a small size, which provides favorable conditions for the testing and calibration of resistance-type signals.

[0099] In another embodiment of the present invention, further, the control method of the programmable resistance source specifically includes:

[0100] Step 1: round down the set resistance value to obtain the main resistance network target value; obtain the main relay network array according to the main resistance network target value; the main resistance network target value satisfies:

[0101] ;

[0102] The main relay network array meets:

[0103] ;

[0104] ;

[0105] ;

[0106] in, R main is the target value of the main resistor network, R out To set the resistance value, Z is the resistance value array of each resistor in the main resistor network, and Y is the main relay network array; , n≥1, y i is the conduction state of the corresponding relay in the main relay network; i The value is 0 or 1. i When y is 1, the corresponding relay in the main relay network is turned on. i When it is 0, the corresponding relay in the main relay network is disconnected; The resistance value of the corresponding resistor in the main resistor network.

[0107] The real-time temperatures of the resistors in the main resistor network and the compensation resistor network are received, and the target value of the compensation resistor network is determined according to the target value of the compensation resistor network, the real-time temperature and the main relay network array.

[0108] Step 2: Reference Figure 1-Figure 3 , setting two independent first independent relays S1 and second independent relays S2 can be used to control the length of the wire connected to the relay. The two first independent relays S1 and second independent relays S2 set in the main resistance network 130 are connected to the main relay network array corresponding to the main resistance network 130. It is divided into a first resistor group 1301 and a second resistor group 1302, that is, , for example, Figure 2 Only y1, y2, y3…y9 are shown, which are divided into [y1, y2, y3…y5] and [y6, y7, y8…y9]. Set the resistance value Split main resistor network target value , calculate the main relay network array .

[0109] .

[0110] Step 3: Reference Figure 1-Figure 3 , for the main relay network array , there are four compensation situations:

[0111] , , relay array The corresponding resistors are , relay array The corresponding resistance is .

[0112] Case 1: If the collection The elements of the set are all 0. If any of the elements in is not 0, the first independent relay S1 is closed and the second independent relay S2 is opened.

[0113] The resistor connected to the relay contact in the main resistor network 130 for:

[0114] ;

[0115] Case 2: If the collection The elements of the set are all 0. If any of the elements in is not 0, the second independent relay S2 is closed and the first independent relay S1 is opened.

[0116] The resistor connected to the relay contact in the main resistor network 130 for:

[0117] ;

[0118] Case 3: If If all elements of are 0, then both are closed. , , the total resistance of the relay contacts connected to the main resistance network 130 for:

[0119] ;

[0120] Case 4: Collection The elements in the set are not 0 and If the element is not 0, the resistor connected to the relay contact in the main resistor network 130 for:

[0121] .

[0122] Step 4: Receive the real-time temperature of the resistors in the main resistor network and the compensation resistor network, and obtain the main relay network array. The total resistance of the relay contacts connected to the main resistor network is calculated based on the main relay network array. The resistance of the relay contacts connected to the main resistor network satisfies:

[0123] ;

[0124] According to the real-time temperature of the resistors in the main resistor network and the compensation resistor network, the total resistance of the relay contacts connected to the main resistor network is temperature compensated to obtain the total resistance of the relay contacts connected to the main resistor network; the total resistance of the relay contacts connected to the main resistor network satisfies:

[0125] ;

[0126] The wire resistance of the main resistor network is determined based on the main relay network array. The wire resistance of the main resistor network satisfies:

[0127] ;

[0128] in, The resistor connected to the relay contact in the main resistor network, is the total resistance of the relay contacts connected to the main resistor network, Connect a relay in the main relay network to the contact resistance in the main resistor network. is the temperature coefficient of the contact material of the relay in the main relay network, Standard temperature , is the real-time temperature of the resistors in the main resistor network and the compensation resistor network, ρ is the resistivity of the wire in the main resistor network, is the total length of the trace in the main resistor network, is the thickness of the trace in the main resistor network, The width of the trace in the main resistor network.

[0129] The actual output resistance of the main resistance network is obtained based on the wire resistance of the main resistance network, the total resistance of the relay contacts connected to the main resistance network, and the target value of the main resistance network; the actual output resistance of the main resistance network satisfies:

[0130] ;

[0131] The target value of the compensation resistor network is obtained based on the actual output resistance of the main resistor network and the set resistance value. The target value of the compensation resistor network satisfies:

[0132] ;

[0133] in, The resistor connected to the relay contact in the main resistor network, is the temperature coefficient of the resistors in the main resistor network, is the temperature coefficient of the wire in the main resistor network, is the target value of the compensation resistor network.

[0134] Step 5: Obtain a sub-relay network array through a successive approximation algorithm according to the target value of the compensation resistor network, and control the conduction and disconnection of the relays in the sub-relay network according to the sub-relay network array; the actual output resistance of the compensation resistor network satisfies:

[0135] ;

[0136] ;

[0137] ;

[0138] in, is the actual output resistance of the compensation resistor network, B is the secondary relay network array, is the weight vector of the resistance value of each resistor in the compensation resistor network; , n≥1, represents the switching state of the relay in the secondary relay network, The value of is 0 or 1. When it is 1, the corresponding relay in the secondary relay network is turned on. When it is 0, the corresponding relay in the secondary relay network is disconnected; , is the weight of the corresponding resistor in the compensation resistor network.

[0139] Step 6: Array the main relay network With secondary relay network array The synthesis is the optimal relay array for outputting the set resistance value. Each element in this array is used as the control signal of the relay corresponding to its resistance to control the relay to be disconnected or on. Multiple control signals can drive the relay to work through the relay driver chip ULN2803, thereby improving the accuracy of the output resistance value of the programmable resistance source.

[0140] The control method of the programmable resistance source in the embodiment of the present invention calculates the optimal combination array of relays by introducing a comprehensive analysis and compensation method for the resistance network, contact resistance, and wire resistance by temperature drift compensation. It also supports manual setting and communication setting of resistance values, providing favorable conditions for the testing and calibration of resistance-type signals.

[0141] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A programmable resistance source, characterized in that: It includes input module, main control module, relay network, main resistance network and compensation resistance network; The output end of the input module is connected to the input end of the main control module, and the input module is used to receive a set resistance value and send the set resistance value to the main control module; The control end of the main control module is connected to the control end of the relay network, the main resistance network includes a plurality of main resistances connected in series, the compensation resistance network includes a plurality of compensation resistances connected in series, the relay network includes a plurality of relays, the relays in the relay network are respectively connected in parallel with the resistances in the main resistance network and the resistances in the compensation resistance network in a one-to-one correspondence, and the main resistance network and the compensation resistance network are connected in series; The main control module is used to split the set resistance value into a main resistance network target value and a compensation resistance network target value, and control the on and off of each relay in the relay network according to the main resistance network target value and the compensation resistance network target value, so that the total resistance of the main resistance network is the main resistance network target value, and the total resistance of the compensation resistance network is the compensation resistance network target value; The relay network includes a main relay network and a secondary relay network; The relays in the main relay network are respectively arranged in one-to-one correspondence with the resistors in the main resistor network; the relays in the secondary relay network are respectively arranged in one-to-one correspondence with the resistors in the compensation resistor network; The main control module is specifically used to split the set resistance value into a main resistance network target value and a compensation resistance network target value, obtain a main relay network array of the main relay network according to the main resistance network target value, and control the conduction and disconnection of the resistors in the main relay network according to the main relay network array; the main control module is also used to receive the real-time temperature of the resistors in the main resistance network and the compensation resistance network, obtain the sub-relay network array of the sub-relay network according to the compensation resistance network target value and the real-time temperature of the resistors in the main resistance network and the compensation resistance network, and control the conduction and disconnection of the relays in the sub-relay network according to the sub-relay network array; The main control module includes a first control unit and a second control unit; The first control unit is used to round down the set resistance value to obtain the main resistance network target value, and obtain the main relay network array according to the main resistance network target value; the main resistance network target value satisfies: ; The main relay network array satisfies: ; ; ; in, R main is the target value of the main resistance network, R out is the set resistance value, Z is the resistance value array of each resistor in the main resistance network, and Y is the main relay network array; , n≥1, y i is the conduction state of the corresponding relay in the main relay network; i The value is 0 or 1. i When y is 1, the corresponding relay in the main relay network is turned on. i When it is 0, the corresponding relay in the main relay network is disconnected; is the resistance value of the corresponding resistor in the main resistor network; The second control unit is used to receive the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, determine the sub-relay network array of the sub-relay network according to the target value of the compensation resistor network, the real-time temperature and the main relay network array, and control the conduction and disconnection of the relays in the sub-relay network according to the sub-relay network array.

2. The programmable resistance source according to claim 1, characterized in that: The second control unit includes a contact resistance calculation subunit, a wire resistance calculation subunit and a compensation resistance calculation subunit; The contact resistance calculation subunit is used to receive the real-time temperature of the resistors in the main resistor network and the compensation resistor network, and obtain the main relay network array, and calculate the total resistance of the relay contacts connected to the main resistor network according to the main relay network array, and the resistance of the relay contacts connected to the main resistor network satisfies: ; The contact resistance calculation subunit is further used to perform temperature compensation on the total resistance of the relay contacts connected to the main resistance network according to the real-time temperatures of the resistors in the main resistance network and the compensation resistance network, so as to obtain the total resistance of the relay contacts connected to the main resistance network; the total resistance of the relay contacts connected to the main resistance network satisfies: ; The wire resistance calculation subunit is used to determine the wire resistance of the main resistance network according to the main relay network array, and the wire resistance of the main resistance network satisfies: ; in, is the wire resistance of the main resistor network, is the resistance of the relay contacts in the main resistance network, is the total resistance of the relay contacts in the main resistance network, Connecting a relay in the main relay network to a contact resistor in the main resistor network, is the temperature coefficient of the contact material of the relay in the main relay network, Standard temperature , is the real-time temperature of the resistors in the main resistor network and the compensation resistor network, ρ is the resistivity of the wire in the main resistor network, is the total length of the wiring in the main resistor network, H is the thickness of the wiring in the main resistor network, is the width of the trace in the main resistance network; The compensation resistance calculation subunit is used to obtain the actual output resistance of the main resistance network according to the wire resistance of the main resistance network, the total resistance of the relay contacts connected to the main resistance network and the target value of the main resistance network; the actual output resistance of the main resistance network satisfies: ; The compensation resistance calculation subunit is further used to obtain the compensation resistance network target value according to the actual output resistance of the main resistance network and the set resistance value, and the compensation resistance network target value satisfies: ; in, is the resistance of the relay contacts in the main resistance network, is the temperature coefficient of the resistors in the main resistor network, is the temperature coefficient of the wire in the main resistance network, is the target value of the compensation resistor network.

3. The programmable resistance source according to claim 2, characterized in that: The second control unit also includes an output control subunit; The output control subunit is used to obtain the sub-relay network array by a successive approximation algorithm according to the target value of the compensation resistor network, and control the conduction and disconnection of the relays in the sub-relay network according to the sub-relay network array; the actual output resistance of the compensation resistor network satisfies: ; ; ; in, is the actual output resistance of the compensation resistor network, B is the secondary relay network array, is a weight vector of the resistance values ​​of each resistor in the compensation resistor network; , n≥1, represents the switching state of the relay in the secondary relay network, The value of is 0 or 1. When is 1, the corresponding relay in the secondary relay network is turned on. When it is 0, the corresponding relay in the secondary relay network is disconnected; , is the weight of the corresponding resistor in the compensation resistor network.

4. The programmable resistance source according to claim 1, characterized in that: Also included is a first independent relay and a second independent relay; The main resistor network includes a first resistor group and a second resistor group, the first resistor group and the second resistor group are connected in series, and the first resistor group and the second resistor group each include at least one resistor; The first independent relay is connected in parallel with the first resistor group, and the second independent relay is connected in parallel with the second resistor group; The main control module is also used to control the on and off of the first independent relay and the second independent relay according to the main relay network array, and calculate the resistance of the relay contacts connected to the main resistance network according to the main relay network array.

5. The programmable resistance source according to claim 1, characterized in that: The programmable resistance source further includes an isolation unit, a display unit and a temperature detection unit; the input module includes a key input unit and a communication input unit; The output end of the key input unit and the output end of the communication input unit are respectively connected to the input end of the main control module, the key input unit is used to receive the set resistance value manually input, and send the set resistance value to the main control module, and the communication input unit is used to receive the set resistance value remotely input, and send the set resistance value to the main control module; The output end of the temperature detection unit is connected to the temperature input end of the main control module, the input end of the display unit is connected to the signal output end of the main control module, and the isolation unit is located between the control end of the main control module and the control end of the relay network; the isolation unit is used to isolate the main control module from the relay network; The temperature detection unit is used to detect the real-time temperature of the resistors in the main resistor network and the compensation resistor network; the main control module is also used to send the set resistance value and the real-time temperature of the resistors in the main resistor network and the compensation resistor network to the display unit, and the display unit is used to display the set resistance value and the real-time temperature of the resistors in the main resistor network and the compensation resistor network.

6. A control method for a programmable resistance source, characterized in that: The control method of the programmable resistance source is applied to the main control module of the programmable resistance source according to claim 1 or claim 3, and the control method of the programmable resistance source includes: The set resistance value is divided into a main resistance network target value and a compensation resistance network target value; Obtaining a main relay network array of a main relay network according to the main resistor network target value, and controlling the conduction and disconnection of resistors in the main relay network according to the main relay network array; Receive the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, obtain the sub-relay network array of the sub-relay network according to the target value of the compensation resistor network and the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, and control the on and off of the relays in the sub-relay network according to the sub-relay network array.

7. The control method of the programmable resistance source according to claim 6, characterized in that: The step of splitting the set resistance value into a main resistance network target value and a compensation resistance network target value, and obtaining a main relay network array of the main relay network according to the main resistance network target value comprises: Rounding down the set resistance value to obtain the main resistance network target value; The main relay network array is obtained according to the main resistor network target value; the main resistor network target value satisfies: ; The main relay network array satisfies: ; ; ; in, R main is the target value of the main resistance network, R out is the set resistance value, Z is the resistance value array of each resistor in the main resistance network, and Y is the main relay network array; , n≥1, y i is the conduction state of the corresponding relay in the main relay network; i The value is 0 or 1. i When y is 1, the corresponding relay in the main relay network is turned on. i When it is 0, the corresponding relay in the main relay network is disconnected; is the resistance value of the corresponding resistor in the main resistor network; The real-time temperatures of the resistors in the main resistor network and the compensation resistor network are received, and the compensation resistor network target value is determined according to the compensation resistor network target value, the real-time temperatures and the main relay network array.

8. The control method of the programmable resistance source according to claim 6, characterized in that: The receiving real-time temperatures of resistors in the main resistor network and the compensation resistor network, and determining the compensation resistor network target value according to the compensation resistor network target value, the real-time temperature and the main relay network array, comprises: The real-time temperatures of the resistors in the main resistor network and the compensation resistor network are received, and the main relay network array is obtained. The total resistance of the relay contacts connected to the main resistor network is calculated according to the main relay network array. The resistance of the relay contacts connected to the main resistor network satisfies: ; According to the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, the total resistance of the relay contacts connected to the main resistor network is temperature compensated to obtain the total resistance of the relay contacts connected to the main resistor network; the total resistance of the relay contacts connected to the main resistor network satisfies: ; The wire resistance of the main resistor network is determined according to the main relay network array, and the wire resistance of the main resistor network satisfies: ; in, is the wire resistance of the main resistor network, is the resistance of the relay contacts in the main resistance network, is the total resistance of the relay contacts in the main resistance network, Connecting a relay in the main relay network to a contact resistor in the main resistor network, is the temperature coefficient of the contact material of the relay in the main relay network, Standard temperature , is the real-time temperature of the resistors in the main resistor network and the compensation resistor network, ρ is the resistivity of the wire in the main resistor network, is the total length of the wiring in the main resistor network, is the thickness of the trace in the main resistor network, is the width of the trace in the main resistance network; The actual output resistance of the main resistance network is obtained according to the wire resistance of the main resistance network, the total resistance of the relay contacts connected to the main resistance network and the target value of the main resistance network; the actual output resistance of the main resistance network satisfies: ; The target value of the compensation resistor network is obtained according to the actual output resistance of the main resistor network and the set resistance value, and the target value of the compensation resistor network satisfies: ; in, is the resistance of the relay contacts in the main resistance network, is the temperature coefficient of the resistors in the main resistor network, is the temperature coefficient of the wire in the main resistance network, is the target value of the compensation resistor network; The method of obtaining a sub-relay network array of the sub-relay network according to the target value of the compensation resistor network and the real-time temperatures of the resistors in the main resistor network and the compensation resistor network, and controlling the on and off of the relays in the sub-relay network according to the sub-relay network array, further comprises: The secondary relay network array is obtained by a successive approximation algorithm according to the target value of the compensation resistor network, and the conduction and disconnection of the relays in the secondary relay network are controlled according to the secondary relay network array; the actual output resistance of the compensation resistor network satisfies: ; ; ; in, is the actual output resistance of the compensation resistor network, B is the secondary relay network array, is a weight vector of the resistance values ​​of each resistor in the compensation resistor network; , n≥1, represents the switching state of the relay in the secondary relay network, The value of is 0 or 1. When is 1, the corresponding relay in the secondary relay network is turned on. When it is 0, the corresponding relay in the secondary relay network is disconnected; , is the weight of the corresponding resistor in the compensation resistor network.

Citation Information

Patent Citations

  • High-precision digital potentiometer

    CN111857036A

  • Voltage reference circuit and method for generating reference voltage

    CN115599156A