A Procedure for Precise Determination and Compensation of Lead-Wire Resistance of a Two-Wire Resistance Temperature Detector

A procedure for the precise determination and compensation of the lead-wire resistance of a resistance transducer is presented. The proposed technique is suitable for a two-wire resistance transducer, especially the resistance temperature detector (RTD). The proposed procedure provides a technique to compensate for the lead-wire resistance using a three-level pulse signal to excite the RTD via the long lead wire. In addition, the variation in the lead-wire resistance disturbed by the change in the ambient temperature can also be compensated by using the proposed technique. The determination of the lead-wire resistance from the proposed procedure requires a simple computation method performed by a digital signal processing unit. Therefore, the calculation of the RTD resistance and the lead-wire resistance can be achieved without the requirement of a high-speed digital signal processing unit. The proposed procedure is implemented on two platforms to confirm its effectiveness: the LabVIEW computer program and the microcontroller board. Experimental results show that the RTD resistance was accurately acquired, where the measured temperature varied from 0 °C to 300 °C and the lead-wire resistance varied from 0.2 Ω to 20 Ω, corresponding to the length of the 26 American wire gauge (AWG) lead wire from 1.5 m to 150 m. The average power dissipation to the RTD was very low and the self-heating of the RTD was minimized. The measurement error of the RTD resistance observed for pt100 was within ±0.98 Ω or ±0.27 °C when the lead wire of 30 m was placed in an environment with the ambient temperature varying from 30 °C to 70 °C. It is evident that the proposed procedure provided a performance that agreed with the theoretical expectation.


Introduction
Temperature is the most monitored and controlled variable in industrial control systems. A temperature sensor plays the important role in industrial applications of maintaining a certain temperature for a specific process. There are several common types of temperature sensors used in industrial process applications, such as a negative coefficient thermistor (NTC), resistance temperature detector (RTD), thermocouple, and semiconductor junction-based sensor [1][2][3]. The NTC, thermocouple, and semiconductor junction-based sensor require a complex signal conditioning circuit to measure the temperature. The RTD is a passive sensor and produces a positive variation in its resistance to the variation of ambient temperature. The RTD is constructed from platinum wire, which provides distinctive behaviors in terms of high accuracy, high linearity, high stability, and a low hysteresis effect [4][5][6]. In industrial applications, the RTD has become the most considered sensor for temperature measurement due to its behaviors. The distance from the RTD sensor to the signal conditioning circuit requires a long-range lead wire, which is considered as the parasitic resistance for each lead wire. The lead-wire resistance of the wire connected from the RTD to the control station includes the RTD resistance. This is introduced as a large error of temperature measurement in the industrial process. Moreover, the change in the ambient temperature causes variation in the lead-wire resistance due to the thermal property of the metals used for the lead wire, which causes an uncertain error in the measured temperature quantity. If the lead-wire resistance of about 1 Ω is added to the RTD resistance, then the measured temperature error occurs at about 2.4 • C for a pt100 two-wire RTD [7][8][9][10][11]. In addition, the contact resistance of the terminal between the control station and the RTD is added to the lead-wire resistance. The contact resistance including the lead-wire resistance is collectively called the lead-wire resistance in this paper. A drawback of the RTD sensor is the lead-wire resistance, which can be compensated using the RTD with three or four lead wires [2][3][4][5]12,13]. The range of all the lead wires is set to equal, which provides equal lead-wire resistance. Usually, the determination of the process temperature is based on the use of a bridge circuit [1][2][3]11,[13][14][15]. A disadvantage of the bridge circuit is that the signal readout directly from the bridge circuit is nonlinear. The technique for a linear readout of the signal from the bridge circuit using a microcontroller and relaxation oscillator is proposed in the literature [10]. The compensation of the lead-wire resistance using a threeor four-wire RTD is also proposed in the recent literature [12,16]. These techniques require several amplifiers and a current source, which adds complexity to the signal conditioning circuit. However, the compensation of lead-wire resistance for three-and four-wire RTDs is efficient only when there is equal resistance in each lead wire. In addition, the RTD with three or four lead wires increases the cost and complexity of the control system, especially for the remote measurement and the multipoint measurements. Therefore, the use of a two-wire RTD sensor is a simple and economical attraction. There are many techniques to reduce the error due to the lead-wire resistance, including the contact resistance of the twowire resistive sensor, proposed in the literature [7][8][9][10]13,17]. An approach to compensate for the error caused by the lead-wire in a two-wire RTD using a precision shunt voltage reference and current source is proposed in [18]. This technique provides two kinds of excitation signals, a voltage signal and a current signal, for the RTD. The voltage signal from the precision voltage reference of this approach is used to measure the lead-wire resistance, whereas the current signal from the current source is used to obtain the resistance of the RTD, including the lead-wire resistance. Unfortunately, the high magnitude of the voltage signal across the RTD during the lead-wire resistance measurement causes a self-heating effect in the RTD. Therefore, this approach is suitable for when the RTD has a high resistance, such as the pt1000 RTD has, to reduce the current flowing through the RTD. Other approaches based on two diodes acting as an electronic switch connected to the terminal of the RTD to measure the lead-wire resistance are proposed in the recent literature [7][8][9][10]18]. The operation of these approaches is based on the relaxation oscillator and microcontroller. These approaches require the bidirectional current signal to obtain the resistance of the RTD. However, the threshold voltage of the diodes must be equal to avoid the error of the measured variable. For the mismatch of a diode threshold voltage of about 1 mV, the measured error of about 2.5 • C was observed for the pt100 RTD with a 1 mA excitation current [11]. Furthermore, the diode threshold voltage is dependent on the variation in the ambient temperature due to the thermal voltage that is characteristic of diodes. This error becomes a significant parameter, same as the lead-wire resistance. To avoid the error mentioned above, closely matched diodes are required. Unfortunately, the closely matched diodes are impossible for discrete devices. The technique using two diodes is low cost and simple without using specific devices. If the threshold voltage of the diode can be compensated for, then the advantage of this technique will be gained.
In this paper, the procedure to determine and compensate for the lead-wire resistance and the resistance of the RTD using two diodes is proposed. The lead-wire resistance, the RTD resistance, and the diode threshold voltage are accurately determined. The effect of the mismatch of the diodes in terms of the threshold voltage can be prevented with the proposed technique. The proposed procedure provides the bidirectional current signal with three-step pulse levels in the amplitude of the series to excite the RTD sensor. The amplitude of each step of the current signal is doubled in the amplitude of the series. The RTD resistance, the lead-wire resistance, and the diode threshold voltage are determined via a digital signal processing unit using the simple mathematic operations add and subtract. Therefore, the operation time of the proposed procedure is fast and accurate. The proposed procedure is implemented to confirm the accuracy and performance using commercial devices. The temperature readout from the proposed technique exhibits that a maximum error of about 0.27 • C is observed, where the ambient temperature varies from 30 • C to 70 • C. It should be noted that the proposed technique can be applied to many types of resistive sensors in related fields such as civil engineering [19][20][21][22][23][24], automobile engineering [25,26], and mechanical engineering [27], and in the use of scientific and medical equipment [3][4][5][6]28], to measure the quantity of gas, humidity, airflow, force, pressure, and strain. For the example of the application in the field of civil engineering, the resistive sensors are provided for the measurement of the structural parameters to evaluate the structural behaviors of the structural health monitoring system [19][20][21][22][23][24]. In addition, the proposed technique can be applied to investigate the behaviors of construction materials such as fly-ash-based concrete and non-autoclaved silicate materials [29,30]. The resistance readout from the resistive sensor requires an accurate value to make a decision regarding the safety of civil infrastructure [20,24]. Therefore, the proposed technique is suitable for this requirement. The organization of this paper is divided into five sections as follows: Section 2 introduces a conventional technique to compensate for the lead-wire resistance. The proposed procedure and circuit to determine the resistance of the lead wire and the RTD using a three-step pulse signal are also presented in this section. In Section 3, the accuracy of the proposed circuit is analyzed and discussed in detail. Section 4 describes the experimental results of the proposed procedure using two signal processing units. The first signal processing unit is the LabVIEW computer-based program interfaced with an analog input/output board. Another signal processing unit is a microcontroller board. Finally, the conclusion of this paper is described in Section 5.

Principle of the Proposed Procedure
The accuracy of the temperature measurement using the RTD is disturbed by the parasitic resistance of the lead wire. The resistance readout from the RTD includes the lead-wire resistance. In addition, the lead-wire resistance is dependent on the change in the ambient temperature, which can cause an uncertain readout of the resistance from the RTD. The compensation of the lead-wire resistance using two diodes is a useful technique and the procedure for determining the lead-wire resistance is described in this section.

Conventional Procedure
A diagram of the RTD connected with two diodes is shown in Figure 1a, where R t is the RTD resistance [7][8][9][10]17]. Two diodes are laid close to the terminals of the RTD to ignore the wiring resistance between the RTD resistance R t and the diodes. The lead-wire resistance is determined from the RTD to the control station as shown in Figure 1b, where R w1 and R w2 are the intrinsic resistances of two lead wires. For recent approaches, the voltages across the diodes D 1 and D 2 were assumed to be equal. The lead-wire resistance was compensated for in these approaches using bidirectional excitation current i ex . From Figure 1c, the excitation current i ex = I 1 is applied; then, the diodes D 1 and D 2 are conducted and turned off, respectively, as shown in Figure 1c. The relationship between the voltage signal v ep and the excitation current i ex can be given by: (1) where V D1 is the voltage across the diode D 1 . For the excitation current i ex = −I 1 , the operations of the diodes D 1 and D 2 are opposite from the previous state, as shown in Figure 1d. Therefore, the voltage v en can be stated as: where V D2 is the voltage across the diode D 2 . If the closely matched diodes are chosen for diodes D 1 and D 2 , then V D1 = V D2 is obtained. Practically, the intrinsic resistances R w1 and R w2 are equal due to the same length of the two lead wires. Therefore, the RTD resistance R t can be simply obtained by the subtraction of Equations (1) and (2) as: where VD1 is the voltage across the diode D1. For the excitation current iex = I1, the operations of the diodes D1 and D2 are opposite from the previous state, as shown in Figure 1d. Therefore, the voltage ven can be stated as: where VD2 is the voltage across the diode D2. If the closely matched diodes are chosen for diodes D1 and D2, then VD1 = VD2 is obtained. Practically, the intrinsic resistances Rw1 and Rw2 are equal due to the same length of the two lead wires. Therefore, the RTD resistance Rt can be simply obtained by the subtraction of Equations (1) and (2) as: (3) It should be noted that the RTD resistance of Equation (3) is accurately determined only for the constant ambient temperature of the lead wire and the diodes in Figure 1b. In addition, the mismatch of the diodes causes the incomplete cancellation of the voltage across the diodes D1 and D2. The voltage VD across the diode is dependent on the ambient temperature and can be expressed as: where  and IS are the empirical constant and the reverse saturated current of the diode, It should be noted that the RTD resistance of Equation (3) is accurately determined only for the constant ambient temperature of the lead wire and the diodes in Figure 1b. In addition, the mismatch of the diodes causes the incomplete cancellation of the voltage across the diodes D 1 and D 2 . The voltage V D across the diode is dependent on the ambient temperature and can be expressed as: where η and I S are the empirical constant and the reverse saturated current of the diode, respectively, k = 1.38 × 10 −23 J/K is the Boltzmann constant, q = 1.602 × 10 −19 C is the electron charge, and T = (273 + • C) is the absolute temperature in Kelvin. It should be noted that the term kT/q is usually called the thermal voltage V T [31]. The thermal voltage V T is approximated as 25.67 mV at 25 • C of the ambient temperature. In Equation (4), the mismatched diodes are exhibited in terms of the reverse saturated current I S of each diode. Practically, the perfectly matched diodes are not enough in the discrete device and also in the integrated circuit form. In Equation (3), the incomplete cancellation of the diode voltages V D1 and V D2 causes the calculation error of the resistance R t . The voltage across the diode can be accurately determined using the proposed procedure. Therefore, the requirement of perfectly matched diodes is unnecessary.

Proposed Procedure
To determine the voltage across diodes V D1 and V D2 , the current signal in the form of a three-step pulse signal is provided to excite the RTD as shown in Figure 2a. Each step of the current signal is double the previous current quantity. All resistances in the current signal path can also be simply determined. The circuit diagram for the operation of the proposed procedure is shown in Figure 2b. In Figure 2b, the three-step pulse signal is simplified by three current sources for the explanation of the circuit operation. The microprocessor and controller unit (MCU) is used for the digital signal processing and controlling the analog switch S C to generate the three-step pulse signal. The operation of the circuit diagram in Figure 2b can be considered in two stages of the excitation signals: stage I for the positive current signal and stage II for the negative current signal. For stage I of the procedure, the magnitude I 1 of the excitation current i ex in the second step in Figure 2a is set as the reference current. The current magnitudes of the first step and third step are assigned to equal I 1 /2 and 2I 1 , respectively. An operating diagram for stage I is shown in Figure 2c. In Figure 2c, the diodes D 1 and D 2 are conduct and cutoff, respectively. For the first step of the excitation current i ex = I 1 /2, the voltage v ep1 can be stated as: where I S1 denotes the reverse saturated current of the diode D 1 . The voltage v ep1 is converted to digital form by an analog-to-digital converter (ADC) and transferred to the MCU. For the second step of the excitation current i ex = I 1 , the voltage v ep2 can be given by: The voltage v ep22 is assigned as double the magnitude of the voltage v ep2 , which is calculated by the MCU. Therefore, the voltage v ep22 can be written as: It should be noted that doubling the voltage across diode V D1 , written as 2V D1 , corresponds to the term of ηV T ln(I 1 /I S1 ) 2 . Therefore, Equation (7) can be rewritten as:  From Equation (17) the voltage VD2 across diode D2 is obtained. The diode voltage VD2 is subtracted from Equation (13) as: From Equation (18), the lead-wire resistance Rw = vens2/I1 is obtained. It should be noted that the RTD resistance Rt can be achieved by substituting Equation (18) in Equation (12) as: The advantage of the proposed procedure is that the RTD resistance Rt, the resistances Rw1 = Rw2, and the diode voltages VD1 and VD2 can be accurately determined. For the third step, the excitation current i ex = 2I 1 is set. Then, the voltage v ep3 can be expressed as: From Equations (8) and (9), the subtraction result v eps1 of the voltages v ep22 and v ep3 can be given by: To subtract Equation (5) by Equation (10), the resulting voltage v eps2 can be given as: Equations (10) and (11) exhibit only the voltage across diode V D1 and all resistances in the current path, respectively. Practically, the resistances R w1 = R w2 = R w are assigned due to the same length of the lead wire. Therefore, Equation (11) can be rewritten as: The resistance R w can be obtained by stage II of the proposed procedure. The operating circuit for stage II is shown in Figure 2d. The magnitude of the excitation current i ex for stage II is set as a negative current. Therefore, the magnitudes of the excitation currents of each step are set as -I 1 /2, −I 1 , and −2I 1 . From Figure 2d, the excitation current i ex = −I 1 /2 is applied, which forces the diodes D 1 and D 2 to cutoff and conduct, respectively. Therefore, the voltage v en1 across nodes X and Y can be given by: where I S2 is the reverse saturated current of the diode D 2 . As the same with stage I, the voltage v en2 can be expressed for the excitation current i ex = −I 1 in the second step as: The voltage v en2 in Equation (14) is multiplied by two as: For the excitation current i ex = −2I 1 in the third step, the voltage v en3 across nodes X and Y can be stated as: The subtraction result v ens1 of the Equations (15) and (16) can be given by: From Equation (18), the lead-wire resistance R w = v ens2 /I 1 is obtained. It should be noted that the RTD resistance R t can be achieved by substituting Equation (18) in Equation (12) as: The advantage of the proposed procedure is that the RTD resistance R t , the resistances R w1 = R w2 , and the diode voltages V D1 and V D2 can be accurately determined.

Implementation of the Proposed Procedure
The proposed procedure is realized using a mixed-signal circuit technique, which contains both analog and digital properties. The three-step pulse signal of Figure 2a can be realized as shown in Figure 3, which is separated into two parts, a three-step voltage source and a voltage-to-current converter. The voltage-to-current converter, shown on the right side of the circuit in Figure 3, consists of an operational amplifier (opamp) A 1 , transistor Q 1 , and resistors R 1 , R 2 , and R C . From the routine circuit analysis, the relationship between the excitation current i ex and the voltage V ref can be expressed as: where V CC is the power-supply voltage of the opamp A 1 . From Equation (20), if the conditions of R 1 = R 2 , V of = V CC /2, and R 2 >> R C are fulfilled, then the excitation current i ex can be stated as: be realized as shown in Figure 3, which is separated into two parts, a three-step voltag source and a voltage-to-current converter. The voltage-to-current converter, shown on th right side of the circuit in Figure 3, consists of an operational amplifier (opamp) A1, tran sistor Q1, and resistors R1, R2, and RC. From the routine circuit analysis, the relationsh between the excitation current iex and the voltage Vref can be expressed as: where VCC is the power-supply voltage of the opamp A1. From Equation (20), if the cond tions of R1 = R2, Vof = VCC/2, and R2 >> RC are fulfilled, then the excitation current iex can b stated as: (21), the current quantity of each step of the excitation current iex ca be obtained by changing the reference voltage Vref to an appropriate value. The referenc voltage Vref in Equation (21) is provided from the three-step voltage source on the left sid of the circuit in Figure 3. The analog switches SC1, SC2, and SC3, and the resistances Rr1, Rr2, and Rr3 are one-b one controlled by the MCU to achieve the currents for each step. The voltage source V provides the constant voltage to generate the reference voltage Vref. The opamp A2 acts a the voltage follower used to prevent the loading effect. For the proposed procedure, th resistances Rr1 to Rr3 are successively connected by means of the MCU-controlled analo switches SC1, SC2, and SC3 to provide the magnitude of each step for the excitation curren iex as I1/2, I1, and 2I1. The reference voltage Vref can be simply calculated as: The voltage Vref is applied to the voltage-to-current converter to generate the thre step current signal. Therefore, the excitation currents iex of each step, I1/2, I1, and 2I1, a obtained.
The block diagram of the proposed circuit technique is shown in Figure 4a. As see in Figure 4a, the analog signal circuit consists of the three-step current source, the diffe ence amplifier Adiff, and the phase-inversion-switched amplifier Apn [32].  (21) is provided from the three-step voltage source on the left side of the circuit in Figure 3.
The analog switches S C1 , S C2 , and S C3 , and the resistances R r1 , R r2 , and R r3 are oneby-one controlled by the MCU to achieve the currents for each step. The voltage source V S provides the constant voltage to generate the reference voltage V ref . The opamp A 2 acts as the voltage follower used to prevent the loading effect. For the proposed procedure, the resistances R r1 to R r3 are successively connected by means of the MCU-controlled analog switches S C1 , S C2 , and S C3 to provide the magnitude of each step for the excitation current i ex as I 1 /2, I 1 , and 2I 1 . The reference voltage V ref can be simply calculated as: The voltage V ref is applied to the voltage-to-current converter to generate the threestep current signal. Therefore, the excitation currents i ex of each step, I 1 /2, I 1 , and 2I 1 , are obtained.
The block diagram of the proposed circuit technique is shown in Figure 4a. As seen in Figure 4a, the analog signal circuit consists of the three-step current source, the difference amplifier A diff , and the phase-inversion-switched amplifier A pn [32].  The digital signal circuit comprises the analog-to-digital converter (ADC) and the MCU, where both ADC and MCU are integrated into the microcontroller board for practical implementation. The simplified diagram of the proposed procedure is shown in Figure 4b. In Figure 4b, the set of an analog switch unit SP is used to control the flow direction of the excitation current iex. The operation of the diagram in Figure 4b can be explained as follows. For stage I of the proposed procedure, the MCU controls the switch unit SP and sets to the position "A". The excitation current iex flows through the resistance Rw1, the diode D1, the resistance Rt, and the resistance Rw2. In Figure 4b, the analog voltage ves is amplified to a proper value by the difference amplifier Adiff. The schematic diagram of the difference amplifier Adiff is shown in Figure 4c. From Figure 4c, the resistances R61 = R62 = R6 and R71 = R72 = R73 = R74 = R7 are assigned. Then, output signal vdiff of the difference amplifier Adiff can be expressed as [28,33]: The phase-inversion-switched amplifier Apn, consisting of the opamps A3 and A4, the resistors R3 to R5, and analog switch Spn, is provided to invert the negative voltage signal vdiff of the second stage of the proposed procedure to the positive voltage signal for the ADC. The opamp A4 acts as a comparator to investigate the polarity of the voltage signal ves. If the voltage signal ves is positive for stage I and the switch Spn is controlled to "open" by the opamp A4, then the phase-inversion-switched amplifier Apn is formed as the noninverting amplifier with unity gain. For stage II, the voltage signal ves is negative and the switch Spn is controlled to "close" by the opamp A4. Therefore, the phase-inversionswitched amplifier Apn acts as the inverting amplifier with unity gain. The transfer char- The digital signal circuit comprises the analog-to-digital converter (ADC) and the MCU, where both ADC and MCU are integrated into the microcontroller board for practical implementation. The simplified diagram of the proposed procedure is shown in Figure 4b. In Figure 4b, the set of an analog switch unit S P is used to control the flow direction of the excitation current i ex . The operation of the diagram in Figure 4b can be explained as follows. For stage I of the proposed procedure, the MCU controls the switch unit S P and sets to the position "A". The excitation current i ex flows through the resistance R w1 , the diode D 1 , the resistance R t , and the resistance R w2 . In Figure 4b, the analog voltage v es is amplified to a proper value by the difference amplifier A diff . The schematic diagram of the difference amplifier A diff is shown in Figure 4c. From Figure 4c, the resistances R 61 = R 62 = R 6 and R 71 = R 72 = R 73 = R 74 = R 7 are assigned. Then, output signal v diff of the difference amplifier A diff can be expressed as [28,33]: The phase-inversion-switched amplifier A pn , consisting of the opamps A 3 and A 4 , the resistors R 3 to R 5 , and analog switch S pn , is provided to invert the negative voltage signal v diff of the second stage of the proposed procedure to the positive voltage signal for the ADC. The opamp A 4 acts as a comparator to investigate the polarity of the voltage signal v es . If the voltage signal v es is positive for stage I and the switch S pn is controlled to "open" by the opamp A 4 , then the phase-inversion-switched amplifier A pn is formed as the noninverting amplifier with unity gain. For stage II, the voltage signal v es is negative and the switch S pn is controlled to "close" by the opamp A 4 . Therefore, the phase-inversion-switched amplifier A pn acts as the inverting amplifier with unity gain. The transfer characteristic of the phase-inversion-switched amplifier A pn can be expressed as: where i = 1, 2, 3 for the signal currents I 1 /2, I 1 , and 2I 1 . The voltage signals v es1 , v es2 , and v es3 of each step are successively obtained and transferred to the MCU. In the same way, the analog switch unit S P is controlled by MCU to position "B", which causes the excitation current i ex to flow in the opposite direction. The excitation current i ex flows through the resistance R w2 , the diode D 2 , and the resistance R w1 . Each step of the voltage signals v es1 to v es3 is sequentially transferred to the MCU. Therefore, the resistances R w1 , R w2 , and the voltage across the diode D 2 in the excitation current path are determined by the proposed procedure mentioned in Section 2.2.

Performance Analysis
The accuracy of the proposed technique to determine the lead-wire resistance, the RTD resistance, and the voltage across the diode can be disturbed by the nonideal characteristic of the devices used in the experimental circuit. There are three major factors that cause an error in the proposed technique. The first factor, the derivation from the expected magnitude of the excitation current i ex for each step in stage I and stage II, causes an inaccuracy of the calculated resistances and diode voltages in the proposed procedure. For the voltage-to-current converter circuit in Figure 3, the tolerance of the resistors used in the experimental circuit causes an error on the excitation current i ex . From Equation (20), the relationship between the current i ex and the reference voltage source V ref including the tolerance of the resistors can be approximately given by: where ∆ R denotes the tolerance of the resistor. From Equation (25), the tolerance ∆ R of the resistors causes the error ε i on the converted current i ex in the first term on the right. This error can be avoided by replacing the resistor R 1 in Figure 3 with the variable resistor and fine-tuning the resistance to match the resistance R 2 . In addition, the offset current I offset in Equation (27) can be canceled by adjusting the voltage V of to an appropriate value. The second factor, the gain error of the phase-inversion-switched amplifier in Figure 4c causes the error in the voltage signal v adc . The voltage signal v adc , from the phase-inversion-switched amplifier for the resistors R 3 and R 4 having the tolerance ∆ P , can be approximated as: G a v es f or v es < 0 In Equation (28), the closely matched selection of the resistors R 3 and R 4 can minimize the gain error of the phase-inversion-switched amplifier. The third factor is when the gain error occurs due to the mismatched resistors in the schematic diagram of the difference amplifier A diff . However, the difference amplifier A diff used for the experiment in this paper is commercially available, and the resistances in the schematic circuit are trimmed by laser to ensure the closely matched resistors [33]. Therefore, the gain error is very small and too insignificant to disturb the performance of the experimental implementation in this paper. It should be noted that the contact resistance of the analog switch unit S P is unaffected by the signal v es transferred to the difference amplifier A diff .

Experimental Results
To confirm the effectiveness of the proposed procedure, the interfacing circuits in Figures 3 and 4b were breadboarded. The active devices used in this experiment were the AD620 for difference amplifier A diff , LF353 for opamps A 1 , A 2 , A 3 , and A 4 , REF3025 for the constant voltage source V S , 2N3906 for PNP transistor Q 1 , 1N4148 for diodes D 1 and D 2 , CD4066 for analog switches S C1 to S C3 and S pn , and CD4053 for analog switch unit S p . The constant voltage source V S provided the constant voltage of 2.5 V. The resistors R 1 = R 2 = R 3 = R 4 = R 5 = 50 kΩ were assigned. The amplification factors G a for pt100 and pt1000 were set as 4 and 2, respectively. From the simplified schematic of AD620, the resistances R 61 and R 62 = 24.7 kΩ were provided [21]; therefore, the resistance R G for the amplification factors G a of 4 and 2 were calculated from Equation (23) as 8.23 kΩ and 49.4 kΩ, respectively. The variable resistor was used for the resistor R G to acquire the calculated resistance. The RTDs were pt100 and pt1000 with nominal resistances of 100 Ω and 1000 Ω, respectively, at 0 • C. The power supplies of the opamps and the MCU were V CC = −V EE = ± 15 V and V DD = 5 V, respectively. The voltage V of was set as 7.5 V. The prototype board of the practical circuit is shown in Figure 5.
insignificant to disturb the performance of the experimental impl It should be noted that the contact resistance of the analog switc the signal ves transferred to the difference amplifier Adiff.

Experimental Results
To confirm the effectiveness of the proposed procedure, t Figures 3 and 4b were breadboarded. The active devices used in AD620 for difference amplifier Adiff, LF353 for opamps A1, A2, A3 constant voltage source VS, 2N3906 for PNP transistor Q1, 1N41 CD4066 for analog switches SC1 to SC3 and Spn, and CD4053 for a constant voltage source VS provided the constant voltage of 2.5 R3 = R4 = R5 = 50 k Ω were assigned. The amplification factors Ga f set as 4 and 2, respectively. From the simplified schematic of A and R62 = 24.7 k Ω were provided [21]; therefore, the resistance factors Ga of 4 and 2 were calculated from Equation (23) as 8.23 k tively. The variable resistor was used for the resistor RG to ac sistance. The RTDs were pt100 and pt1000 with nominal resistan respectively, at 0 °C. The power supplies of the opamps and the 15 V and VDD = 5 V, respectively. The voltage Vof was set as 7.5 V the practical circuit is shown in Figure 5.  It should be noted that the diodes D 1 and D 2 were placed at the same ambient temperature as the lead wire. The reverse saturated currents I S1 and I S2 were calculated from Equation (4) as 1.59 nA and 1.45 nA, respectively, where the voltage across diodes V D1 and V D2 were measured for the forward bias current I D of 1 mA. The empirical constant η =1.765 was achieved. The excitation current I 1 was set as 1 mA. Therefore, each step of the three-step current I 1 /2, I 1 , and 2I 1 was 0.5 mA, 1 mA, and 2 mA, respectively. The reference voltage V ref of each step was given as 0.5 V, 1 V, and 2 V. From Equation (22), the resistors R C , R rf , R r1 , R r2 , and R r3 were calculated as 1 kΩ, 2 kΩ, 8 kΩ, 3 kΩ, and 500 Ω, respectively. It should be noted that the variable resistors were provided for the resistors R r1 to R r3 and adjusted the resistance to meet the calculated values. The time period of each step for the excitation current of stage I and stage II was assigned as 10 ms. To avoid self-heating, the duty cycle of the excitation signal for RTD was assigned as 15%. Only the excitation current of stage I flowed through the RTD. The power dissipations in the pt100 and pt1000 RTDs were about 3.06 µW and 30.62 µW, respectively, which is very small. Therefore, the change of the RTD resistance due to self-heating can be neglected. There are two signal processing units provided for the verification of the proposed technique performance in this experiment. The first signal processing unit, the MCU in Figure 4b, was replaced by the LabVIEW computer-based measurement and control program (NI LabVIEW 2014) and interfaced with the analog input/output (AIO) board from National Instruments (NI-USB-6361). It should be noted that other programming languages, such as Python, C, and C++, can also be used instead of the LabVIEW program. However, the specific programming for interfacing between the computer and AIO board, screen display, and signal processing need to be developed, which is inconvenient to implement in this experiment. The LabVIEW exhibits the ability to control, interface, and display, which has fulfilled the objectives of many researchers [34][35][36]. The second signal processing unit, the microcontroller provided by the ARM cortex STM32 Nucleo-64 board and including the LCD display, was used for the MCU [37]. The RTD resistances R t for pt100 and pt1000 were simulated via the resistance decade box for the variation in temperature from 0 • C to 300 • C, corresponding to the resistance 100 Ω to 213.93 Ω and 1000 Ω to 2139.3 Ω, respectively. The length of the lead wire, made of 26AWG copper wire, was simulated by the resistance decade box to achieve the equivalent length [11]. In this paper, the lead-wire resistance varied from 0.2 Ω to 20 Ω for the equivalent length of 1.5 m to 150 m, respectively.
For the first signal processing unit, Equations (5) to (10) and Equations (11) to (16) for stage I and stage II, respectively, of the proposed procedure including the three-step pulse signal were established by the LabVIEW program. The AIO board was provided to interface with the LabVIEW program to acquire the voltage signal v adc from the prototype board and, simultaneously, control the prototype board to generate the three-step current signal i ex to excite the RTD. Figure 6a,b show the connection diagram and the experimental setup of the proposed technique based on the LabVIEW program, respectively. From Figure 3, the excitation signal i ex was generated by removing the dashed line a and a'; then, the three-step pulse signal established from the LabVIEW program interfaced with the AIO board was applied as a voltage signal v ni . The bidirectional current signal was controlled by the switch S p and commanded from the LabVIEW program. The waveform of the three-step current signal i ex generated from the prototype board is shown in Figure 6c. The determinations of the RTD resistance R t and the diode voltages V D1 and V D2 are exhibited in Table 1, where the pt100 RTD is provided for this implementation. The error ε 1 of the measured temperature from the RTD is shown in Figure 7a. The maximum error of the measured temperature of about 0.18 • C was observed. As seen in Figure 7a, the root mean square error (RMSE) for the dataset of the measured error ε 1 was in the range of 0.08 • C to 0.15 • C, respectively. Subsequently, Table 2 and Figure 7b show the measured values and the error ε 2 of the measured temperature, respectively, for pt1000 with the same condition as the previous experiment. As seen in Figure 7b, the maximum error was about 0.15 • C and the RMSE varied in the range of 0.04 • C to 0.11 • C. It should be noted that the error ε 1 is slightly higher than error ε 2 due to the sensitivity of the pt1000 being higher than that of th pt100. In addition, both errors ε 1 and ε 2 were caused by the residue error of the determination for the reverse saturated currents I S1 and I S2 of the diodes D 1 and D 2 , respectively.
for the microcontroller included the display, and the RTD is shown in Figure 8a. The experiment prototype for the second experiment is shown in Figure 8b. The RTD and the length of the lead wire are represented by the resistance decade box. The evaluation of the second experiment is under the same condition as the first experiment. Tables 3 and 4 show the measured resistances Rt and the diode voltages VD1 and VD2 for pt100 and pt1000, respectively. The errors 3 and 4 of the measured temperature for pt100 and pt1000 are shown in Figure 9a,b, respectively.  The maximum errors of about 0.25 °C and 0.21 °C for the pt100 and pt1000, respectively, were achieved. The maximum errors of 3 and 4 were higher than the maximum errors of 1 and 2, respectively. This is because the resolution of the ADC provided in the Nucleo-64 microcontroller board was less than the AIO board. The RMSE for the dataset of the measured errors 3 and 4 was in the range of 0.10 °C to 0.21 °C and 0.11 °C to 0.15  For the second signal processing unit, Equations (5) to (11) were placed on the microcontroller board. The dashed line a and a was connected by the jumper. The analog switches S C1 to S C3 and S p were governed by the microcontroller board to generate the reference voltage signal V ref . The voltage signal V ref was converted to the excitation current i ex by the voltage-to-current converter, same as the three-step current signal shown in Figure 6c. It should be noted that the ADC was included with the microcontroller board. Therefore, the AIO board was not required for the second experiment. The block diagram for the microcontroller included the display, and the RTD is shown in Figure 8a. The experiment prototype for the second experiment is shown in Figure 8b. The RTD and the length of the lead wire are represented by the resistance decade box. The evaluation of the second experiment is under the same condition as the first experiment. Tables 3 and 4 show the measured resistances R t and the diode voltages V D1 and V D2 for pt100 and pt1000, respectively. The errors ε 3 and ε 4 of the measured temperature for pt100 and pt1000 are shown in Figure 9a,b, respectively.    The maximum errors of about 0.25 • C and 0.21 • C for the pt100 and pt1000, respectively, were achieved. The maximum errors of ε 3 and ε 4 were higher than the maximum errors of ε 1 and ε 2 , respectively. This is because the resolution of the ADC provided in the Nucleo-64 microcontroller board was less than the AIO board. The RMSE for the dataset of the measured errors ε 3 and ε 4 was in the range of 0.10 • C to 0.21 • C and 0.11 • C to 0.15 • C, respectively. It should be noted that the second experiment is attractive in terms of low cost, small size, and simple configuration.
The ambient temperature of the lead wire and the diodes varied from 30 °C to 70 °C. Table  5 shows the measured temperature, resistance Rt, and the diode voltages VD1 and VD2. The measurement error 5 of the measured temperature for the variation of the RTD temperature varied from 0 °C to 300 °C, as shown in Figure 10.    In addition, the lead wires of the pt100 RTD were extended to 30 m for remote temperature measurement using the Nucleo-64 microcontroller board. The extended lead wire used in this experiment was a 26AWG two-conductor copper wire. The resistance of the extended lead wire and the temperature coefficient were 0.134 Ω/m and 0.0039 Ω/Ω • C, respectively [38]. Therefore, the lead-wire resistance of about 2.04 Ω was calculated [11]. The ambient temperature of the lead wire and the diodes varied from 30 • C to 70 • C. Table 5 shows the measured temperature, resistance R t , and the diode voltages V D1 and V D2 . The measurement error ε 5 of the measured temperature for the variation of the RTD temperature varied from 0 • C to 300 • C, as shown in Figure 10. A maximum error of about 0.27 • C was observed. The RMSE for the dataset of the measured error ε 5 was in the range of 0.10 • C to 0.22 • C.
The first and second experiments show that the proposed procedure can accurately readout the RTD resistance Rt and the diode voltages VD1 and VD2. The proposed technique exhibits the effectiveness of the remote measurement systems using the resistive transducer. Furthermore, this technique can be provided to determine and compensate the wire resistance for the long-distance communication between the control station and the sensor or actuator to acquire a certain signal. . Errors of temperature measurement for MCU using microcontroller: (a) temperature error for pt100; (b) temperature error for pt1000. Figure 9. Errors of temperature measurement for MCU using microcontroller: (a) temperature error for pt100; (b) temperature error for pt1000.
The first and second experiments show that the proposed procedure can accurately readout the RTD resistance R t and the diode voltages V D1 and V D2 . The proposed technique exhibits the effectiveness of the remote measurement systems using the resistive transducer. Furthermore, this technique can be provided to determine and compensate the wire resistance for the long-distance communication between the control station and the sensor or actuator to acquire a certain signal.

Conclusions
A procedure for the precise determination of the RTD resistance and the lead-wire resistance was introduced. The technique is based on the use of a three-step current signal to excite the RTD, where the magnitude of each step of the three-step current signal is double that of the previous step. The power dissipation in the RTD used in this experiment was about 3.06W for the pt100 RTD, which is very small. Therefore, the self-heating error in the temperature of the RTD can be prevented. The performance of the proposed technique was confirmed by the experimental implementation. The experimental results show that the RTD resistance and the lead-wire resistance can be accurately determined without the requirement of well-matched devices used in the traditional approaches. The maximum error of the temperature measurement from the pt100 RTD of about 0.27 °C was observed when the lead wire was placed in various temperatures of the environment, from 30 °C to 70 °C. The proposed technique using a microcontroller exhibits the advantages in terms of high accuracy, simple configuration, low cost, and compactness. The proposed circuit technique is suitable for two-wire resistive transducers such as the RTD,

Conclusions
A procedure for the precise determination of the RTD resistance and the lead-wire resistance was introduced. The technique is based on the use of a three-step current signal to excite the RTD, where the magnitude of each step of the three-step current signal is double that of the previous step. The power dissipation in the RTD used in this experiment was about 3.06 µW for the pt100 RTD, which is very small. Therefore, the self-heating error in the temperature of the RTD can be prevented. The performance of the proposed technique was confirmed by the experimental implementation. The experimental results show that the RTD resistance and the lead-wire resistance can be accurately determined without the requirement of well-matched devices used in the traditional approaches. The maximum error of the temperature measurement from the pt100 RTD of about 0.27 • C was observed when the lead wire was placed in various temperatures of the environment, from 30 • C to 70 • C. The proposed technique using a microcontroller exhibits the advantages in terms of high accuracy, simple configuration, low cost, and compactness. The proposed circuit technique is suitable for two-wire resistive transducers such as the RTD, strain gauge, and resistive displacement transducer, and can be operated in a harsh environment.
Funding: This work is financially supported by School of Engineering, King Mongkut's Institute of Technology Ladkrabang (KMITL), Thailand.