1. Introduction
Sensors interfacing with digital devices may be one of the most popular topics in electronics today. We can find a multitude of very different applications where this type of circuit plays a fundamental role, such as checking on patients [
1], soil pore-water salinity sensors [
2], monitoring composting processes [
3], or specially piezoresistive tactile sensors [
4]. Direct interface circuits (DICs) [
5] are a series of circuits based on methods that use a small number of additional components to make the connection between a sensor and a programmable digital device (PDD). There are DICs for resistive sensors [
6,
7,
8,
9,
10,
11,
12,
13,
14], capacitive [
15,
16,
17] or inductive [
18,
19,
20,
21,
22] sensors, and even DICs built to measure any of them [
23].
In some cases, the DICs use, together with the sensor, only additional passive components. In other cases, the additional components may be a transistor or even a logic gate. Another important difference between the various types of DICs is the use of analogue elements that may be included in the PDDs. For example, we currently find microprocessors that can include analogue-to-digital converters (ADCs) or analogue comparators. With performances being equal, DICs that do not require additional active components or analogue elements within the PDDs will obviously be preferred. This type of DICs usually performs a time-to-digital conversion in the PDD in order to obtain the value of the physical magnitude to be measured and will be used in this paper for the specific case of resistive sensors. Using a DIC can result in a reduction in costs, complexity, and power consumption in the measurement chain compared to the use of a traditional scheme with ADCs and signal conditioning circuits.
DIC parameters such as uncertainties, effective numbers of bits, calibrations, resolution, or response to dynamic signals have already been well explored and analyzed [
9,
22,
24,
25,
26,
27,
28]. However, the time needed to perform the conversion has received little attention when this parameter is in fact one of the most important characteristics for sensors, given the need for data acquisition speeds. This is crucial in the case of DICs for resistive sensors based on time-to-digital conversion since the sensor’s resistance value range can be very broad, meaning an extensive time range is necessary for conversion. Furthermore, in order to improve accuracy in estimating the resistance value of the sensor,
R, it is necessary to carry out additional readings of certain calibration resistors, therefore increasing the total time necessary to obtain
R. This problem is increased when reading groups or arrays of resistive sensors, as usually happens in applications with tactile sensors or electronic skins.
The aim of the calibration resistors is to eliminate the influence that different parameters have on accuracy in estimating R. Apart from the internal resistance of the buffers of the pins of the PDDs, Ro, other factors that introduce errors in the measurement are the variability in: the capacitance used in the estimation process, C, the value in the supply voltage, VDD, and the threshold voltage of the pins of the PDDs, Vf. All these possible sources of error can be compensated thanks to calibration resistors. Another possible source of error would be the self-heating of the resistors. However, this phenomenon can be neglected in DICs, since the current does not pass through the resistors continuously and its value is low due to the high resistance normally shown by resistive sensors.
Since calibration resistors must also increase their value in line with the increase in the maximum resistance value to be measured [
26], the total time needed to estimate
R,
TE(R), can result in a high value. If the resistance value of a sensor is only to be measured sporadically, this problem may not be particularly important. However, if repetitive measurements are to be made for a single sensor or information can be obtained for different sensors (or even if these two situations occur simultaneously), then
TE(R) becomes a fundamental parameter that can considerably slow down an application, or, in certain cases, even prevent the use of DIC
s. Finding a method to reduce
TE(R) can be crucial in some practical applications, such as tactile sensors, where the number of resistive sensors to be read can be very high and, moreover, a high reading frequency of the sensors is required in order to calculate characteristics such as grips or slippages [
29,
30].
This paper presents a method for estimating R which allows TE(R) to be reduced without the need for additional hardware while maintaining adequate accuracy in the measurement, making it possible to use DICs in applications such as those indicated above.
The structure of the paper is as follows. In
Section 2 different calibrations methods are evaluated regarding accuracy and time needed to estimate
R.
Section 3 presents two new calibration methods to increase the speed of a DIC. In
Section 4, experimental results and discussion about these new methods are performed. Finally,
Section 5 presents the main conclusions.
2. Evaluating R Estimation Time in Classical Calibration Methods
There are three classic calibration methods for a DIC, differing in the number of calibration resistors and how these resistors are used to discharge the capacitor. The circuits used in each of the methods are shown in
Figure 1.
Figure 1a shows the circuit for the single-point calibration method (SPCM). In this circuit, a capacitor is first charged to
VDD through the Pp pin of the PDD (resistor
Rp is optional and only necessary if the current through the pin needs to be limited, although in the literature we can also find that this resistor can reduce the influence of the power-supply noise [
31]). After charging, a discharge is made either through
R or through a calibration resistor,
Rc0. This is done by configuring the pin connected to the resistor that discharges as a logic 0 output, while the pin of the other resistor is configured as a high-impedance output. This way of proceeding in the discharge of a resistor will be called the normal discharge procedure. The discharge ends when the Pp pin (configured as the high-impedance input during discharge) detects a change to the logic 0 input. The capacitor is then re-charged and finally discharged again through the other resistor until a new logic 0 input is detected.
This method, taking into account the discharge equations of a capacitor, obtains [
5]:
where
TR and
TRc0 are the discharge times from
VDD to
Vf through
R and
Rc0, respectively (the sub-index of the time measurement will always indicate which resistor it is discharged through). These times will be expressed as the number of PDD clock cycles occurring during the discharge process. Since
Ro is unknown, we cannot obtain the value of
R based on Equation (1). However, if, as usually occurs,
Ro is a small value compared to those of the different resistors to be measured, it is possible to approximate:
Improving estimation of
R provided by Equation (2) and eliminating error due to
Ro requires methods and circuits that use two calibration resistors: two-point calibration method (TPCM) and three-signal calibration method (TSCM) [
5]. The TPCM, as shown in
Figure 1b, carries out the same processes as the SPCM, but with two calibration resistors,
Rc1 and
Rc2. In this method, the calculation of
R is given [
5] by:
For its part, the TSCM, as shown in
Figure 1c, performs three discharge processes, like the TPCM, but through
Rc1,
R+
Rc1, and
Rc2+
Rc1. Proceeding in this way makes the equation for determining
R simpler [
32], which can be written as:
TE(R) is different for each of the aforementioned methods. If we define
Tcharge as the time necessary for the capacitor charge, the values of
TE(R) for the different methods are given by:
where the second term in parenthesis for
TE indicates which calibration method it is calculated with.
Two aspects must be considered with regard to Equations (5)–(7). Firstly,
Tcharge is much lower than the other times of these equations, since, as mentioned,
Rp is either very small or not necessary, meaning we can eliminate this term from these equations. Secondly, calibration resistors are not the same in all methods. A common choice for the SPCM is to place
Rc0 in the middle of the range of resistors to be measured [
Rmin, Rmax], in order to minimize the maximum error when using Equation (2). Given this, Equation (5) becomes:
where we have taken into consideration that
Ro is very small compared to those of the resistors to be measured.
For its part, optimal performance in the TPCM requires
Rc1 and
Rc2 to be, respectively, in 15% and 85% of the resistance value range to be measured in order to minimize errors in estimation [
26], meaning Equation (6) can be written as:
The literature does not describe any criteria for choosing
Rc1 and
Rc2 in the TSCM, and, although it is at least possible to maintain the 85% criterion for
Rc2, it is obvious that
Rc1 cannot be in 15% of the range as its minimum value is
Rmin +
Rc1. The systematic error made by this method will therefore always be greater than that obtained by the TPCM [
33]. In any case, if we maintain the same criteria of 15% and 85% to situate the calibration resistors, we will have:
Comparing Equations (9) and (10), it is obvious that
TE(R,TSCM
) >
TE(R,TPCM
), meaning that, in terms of temporal performances for the same accuracy, the TPCM outperforms the TSCM [
33]. It is also obvious that
TE(R,SPCM
) <
TE(R,TPCM
), although the TPCM is more accurate and thus, the application for which the DIC is used will determine which one to use. Given the foregoing, the ideal situation would be to find a calibration method with a
TE(R) similar to or lower than
TE(R,SPCM
) and an accuracy equivalent to that obtained by the TPCM. The following section presents two new calibration methods that meet these two requirements when measuring the resistance value of a large number of sensors using the same DIC or carrying out repetitive measurements of the same sensor. We call these new methods quasi single-point calibration methods (QSPCMs).
3. Quasi Single-Point Calibration Methods
3.1. Quasi Single-Point Calibration Method
Let us suppose that, as in the TPCM, we want to use two calibration resistors in order to repetitively obtain the resistance value of a sensor (with the aim of achieving the maximum accuracy). Let
,
and
be the discharge times to obtain the
nth estimation of
R,
Rn (the superscript will be used to indicate the estimation number in all variables). Since the calibration resistors are fixed, we have the following relationship if Equation (3) is used for an initial estimation of
R:
It should be remembered that in Equation (11) VDD, Vf, and R are considered to be the same for the three measurements, since the temporal moments of the discharges of the series of measurements for an estimation are very close to each other (this approximation is one of the sources of error in any type of DIC). , , and are measured again in any new estimation of R and Rn, thus updating the values of the voltages and Ro.
However, if the aim is to speed up the estimation of
Rn, we can also use the data from the initial estimation of
R as follows:
With Equation (12), we can solve
Rn:
The first quotient of the member on the right of this equation is a term very close to one, since
Ro <<
Rc1, and, moreover, the variations of
Ro over time (due to the circuit conditions) are even smaller, meaning
. Hence, if we define:
based on Equation (13), we can write Equation (15) that describes the QSPCM:
According to the method determined by Equation (15), when estimating R0 we will need to evaluate the discharges through Rc1 and Rc2; for any other estimate of R, we only need to evaluate the discharge through Rc1. Equation (15) can be applied not only for a succession of measurements of the same sensor, but also when a series of resistive sensors is being measured (in this situation, Rn would be the nth resistive sensor of the series).
As the value of Rc2 is close to the highest value to be measured and its discharge time is only necessary in evaluating R0, it is significantly time-saving in the estimations of Rn. Moreover, it is obvious that the hardware necessary to use Equation (15) in a DIC is the same as for the TPCM, meaning there is no additional hardware cost. There may only be a computational cost in estimating R0 derived from a quotient and an added multiplication in Equation (15) compared to with Equation (3). However, if the product is stored in the PDD memory, starting from R1, the number of arithmetic operations is lower in the QSPCM than in the TPCM, since subtraction of the denominator of the quotient is removed.
The main drawback in using the QSPCM is the small increase in error due to use of the approximation that eliminates the first quotient of the term on the right side of Equation (13). This phenomenon is studied in
Section 4.
The QSPCM allows for an additional reduction in the uncertainty of the estimation of
R if a mean of the discharge times of the calibration resistors of the first
j measurement cycles is used instead of
and
. This mean value,
, is defined by:
where 1 <
j <<
n is necessary in order to achieve significant time-savings in the measurements. We can also define a new
A j, similar to
A that appears in Equation (14), taking these means into account:
Proceeding in this way, we obtain Equation (18) equivalent to Equation (15):
Equation (18) presents a lower uncertainty in estimating R and only a small increase in the temporal cost, thanks to the fact that j << n. Equation (18) defines a variant of the QSPCM that we will call QSPCM-j.
Obviously, QSPCM
-j increases the total measurement time and the information to be stored in the PDD. However, in
Section 4, we show how very low values of
j are enough to improve uncertainty in the measurements and reduce the maximum errors.
3.2. Fast Quasi Single-Point Calibration Method
The total time needed to estimate
R can still be reduced by applying the methods described in Reference [
33], called fast calibration methods I and II (FCM I and FCM II). In essence, the FCM I aims to reduce the discharge time through the highest resistances. To achieve this, the discharge through
R stops after a preset time
Tx (
Tx >
TRc1), followed immediately by the discharge of the capacitor through
Rc1 until completion. This discharge procedure will be referred to as the
R accelerates the discharge procedure. There is therefore a reduction in the measurement times of all resistors with
TR >
Tx, and this reduction increases as the value of
R increases. Using the FCM I, the value that
TR would have with the normal discharge procedure can be found, according to the expression:
where
is the time discharging through
Rc1 after discharging through
R for time
Tx. If we call the time used in the accelerated discharge procedure
, this can be calculated using the following expression:
Let Δ
TR = Δ
TR(R,Rc1,Tx) be the difference in measurement times between the normal discharge procedure and the accelerated discharge procedure for
R. Its value is therefore given by:
Equation (21) shows that, obviously, the reduction in measurement time increases as
Tx decreases. However, the choice of
Tx also has implications for the maximum error in estimating
R. Thus, the smaller
Tx (and also, in consequence, the time needed to find
TR), the greater the error in estimating
R may be, although Reference [
33] shows that there may be an optimal
Tx values zone where this phenomenon does not occur.
For its part, in the FCM II, the accelerated discharge procedure applies to both R and Rc2, with TE(R) decreasing even more. This method will be used to reduce TE(R), even though it also comes at a small cost in terms of accuracy of results. Obviously, TRc1 < Tx < TRc2 must occur in order to apply the method.
In the FCM II, using Equation (19) for both
R and
Rc2, the estimation of
R is given by:
Using
and
calculated from the measurements made by the accelerated discharge procedure, we obtain a new calibration method determined by the equations equivalent to Equations (14) and (15). This method, which we will call Fast-QSPCM, is defined by:
where
is the time for which the capacitor is discharged through
Rc1 after having done so through
R in the
nth estimation. For its part,
A* is described as:
Operating in the same way with Equations (17) and (18), the equation that defines another calibration method, Fast-QSPCM-
j, is obtained:
where
A*j is the same as
A defined in Equation (17) but is with
TRc2 of each estimation calculated from the measurements of the accelerated discharge procedure, similarly to that in Equation (24).
In order to compare
TE(R) in the new methods to those obtained in Equations (8) and (9), we are going to use the mean values of
TE(R) (
R being constant) in estimating
n resistive sensors (or
n estimations of the same sensor),
. In the case of the SPCM and the TPCM:
and
match the values of
TE(R) in Equations (8) and (9), since
TE(R) is the same in any estimation of
Rn. However, in the QSPCM and in the Fast-QSPCM, the values of
TE(R) differ in the first estimation. For its part, in QSPCM
-j and Fast-QSPCM-
j, the first
j estimations have a different
TE(R) value from those of the others.
Table 1 shows the
for each method when
n estimations of
R are made.
4. Experimental Results and Discussion
The performances obtained with the QSPCM
s, SPCM, and TPCM have been compared using an FPGA (Xilinx XC3S50AN-4TQG144C, Xilinx Inc., San Jose, CA, USA) [
34] as a PDD mounted on a FR-4 fiberglass substrate with four layers. The FPGA uses a quartz crystal to generate a 50 MHz operating frequency and needs two regulators (TPS79912 and TPS79633, Texas Instruments, Dallas, TX, USA) to power the core of the device at 1.2 V and the I/O buffers at 3.3 V. This limits the noise that digital activity can generate on the device’s input and output pins. The I/O buffers have been programmed to provide the maximum current allowed by the manufacturer (i.e., 24 mA) in order to maintain digital integrity of the signals. The resistance measurement results are transmitted via an SPI to a controller and finally sent to a PC via a USB flash drive.
A series of 20 resistors with values between 267.56 Ω and 7464.5 Ω was used in order to evaluate the performances of the different methods, as these values are within the range of a large number of resistive sensors and, in particular, tactile sensors. Selecting a 47 nF capacitor ensured the discharge times for all these resistors were measured using a 14-bit counter implemented in the FPGA, and, moreover, that the relative maximum error using any method never exceeded 3%. Besides, three additional resistors of 8170 Ω, 9056.1 Ω, and 9963.7 Ω were used solely for the Fast-QSPCM and Fast-QSPCM-j methods, since these methods allow the discharge time of these resistors to be measured with the 14-bit counter.
Apart from these resistors, Rc0 = 3486.8 Ω was used as a calibration resistor for the SPCM, and Rc1 = 1098.1 Ω and Rc2 = 6165.3 Ω were used for the other methods. All the resistors were measured using an Agilent 34401A digital multimeter. A number of 500 measurement cycles were performed for each of the 23 resistors used in order to measure the maximum errors and uncertainty. These 500 cycles were repeated again each time the resistors are estimated using a different method. In each cycle, the discharge time was measured through the resistor to be estimated and through one or both calibration resistors, depending on the method used and the measurement cycle in question. Thus, for example, for the QSPCM, discharge is via Rc2 only in the first measurement cycle, while in the remaining 499 cycles discharge is only through Rc1 and R.
Figure 2a shows the maximum errors obtained for the SPCM, the TPCM, and the QSPCM, while
Figure 2b shows these same errors but expressed as relative to the nominal value of the resistor to be measured. For easier viewing, it should be noted that the results are presented in a linear scale on the y-axis in
Figure 2a, and in a log2 scale for
Figure 2b. As expected, the biggest errors always occur in the SPCM, except in the vicinity of its calibration resistor, 3486.8 Ω. Only in this case, Equation (2) is a very good approximation to obtain
R. The absolute error curve of this method shows a typical “V” shape. For their part, the TPCM and the QSPCM maintain very similar errors to each other throughout the entire range. Absolute errors are practically constant in the low resistance value zone, while absolute errors increase slowly, and relative errors remain practically constant for high resistance values. Especially striking is the low resistance values region, where the SPCM shows relative errors up to 6 times greater than those of the other methods (of which errors are practically identical).
In order to evaluate the maximum errors in the Fast-QSPCM,
Figure 3a compares these errors with those of the TPCM and FCM II.
Tx = 163.84 µs was chosen for the comparison, i.e., half the time that can be measured with the 14-bit counter. This value was chosen as it is suitable for monitoring the value of the most significant bit of the counter, in order to know if time
Tx was reached during the discharge, thus facilitating the hardware to be designed in the FPGA. This choice implies that all resistors with values under approximately 4000 Ω discharge the capacitor by themselves, while larger resistors use the accelerated discharge procedure to do so. However, as shown in
Figure 3a, resistors with values below 4000 Ω do not present the same errors using TPCM and FCM II since, in this second method,
Rc2 is also evaluated using
Rc1. Although this reduces
TE(R), it also increases the error. For its part, the Fast-QSPCM in
Figure 3a presents very similar errors to FCM II, and only shows to some degree greater errors than FCM II for some of the higher resistance values. It is again important to note that the TPCM can be used to measure a maximum resistance value of slightly more than 7500 Ω; however, thanks to the decrease in discharge times for large resistors, the FCM II and the Fast-QSPCM can be used to measure resistors of up to 10 kΩ. For this reason, the graphs in
Figure 3 only show the results obtained with FCM II and Fast-QSPCM for resistors with values greater than 7500 Ω.
Figure 3b shows the relative errors made by these methods, again in a log2 scale, where it is observed that the relative errors remain practically constant for large resistance values, with very close values in all three methods.
Figure 4 compares the results obtained for QSPCM and QSPCM-
j with
. As expected, the shapes of the curves for the absolute (
Figure 4a) and relative (
Figure 4b) errors become gentler as
j increases. However, there does not seem to be any truly significant improvements for
j > 2, meaning
j =
2 appears to be a good compromise in terms of error reduction, smoothness of the curve, and hardware complexity.
The results shown in
Figure 5 are similar to the previous ones for Fast-QSPCM and Fast-QSPCM-
j with
. Again, an increase in
j translates into smoother error curves for absolute (
Figure 5a) and relative (
Figure 5b) errors. However, these graphs show slightly better results than the rest for
j = 4 and would seem to be the best choice. In fact, neither
Figure 4 nor
Figure 5 shows major differences between the results for the different methods. It is the designer who should select the most suitable method for each application.
To round off this section,
Table 2 shows a summary of the performances of the methods analyzed when estimating a range of resistors with
Rmax = 7464.5 Ω and
Rmin = 267.56 Ω. The results are calculated based on data used for
Figure 2,
Figure 3,
Figure 4 and
Figure 5 and equations listed in
Table 1. The
Tx = 163.84 µs was retained for the Fast-QSPCM and Fast-QSPCM
-4 methods.
The second and third columns of
Table 2 show the maximum errors obtained with any resistor within the range used. The penultimate column of the
Table 2 shows the time needed to estimate
Rmax according to the different methods when estimating a single sensor once. For its part, the last column shows the case in which 20 estimations are made (for a single sensor or 20 different sensors). Particularly striking is the fact that the Fast-QSPCM reduces the mean time for 20 estimations by 61% compared to the TPCM, or by 47% compared to the SPCM. However, the maximum relative error only increases by 0.1% compared to that with the TPCM and is 3.65 times lower than that with the SPCM. For their part, the QSPCM and the QSPCM-2 present the lowest relative errors of all the methods, and yet show important reductions in the mean estimation times compared to the SPCM and the TPCM.
5. Conclusions
The TPCM is a calibration method commonly used in DICs for measuring resistive sensors, since it presents fewer errors in estimations than the SPCM. However, the TPCM needs more time to perform the estimation as it has to measure discharge times for three resistors: the resistor to be estimated and two calibration resistors.
Although the FCM has recently been proposed in order to reduce estimation time, this reduction may not be enough when having to make repetitive measurements of the values of a sensor or when having to measure the values of a large number of sensors. For these situations, this paper proposes a series of new methods, QSPCMs, in which two calibration resistors are also used but one of them is only measured in an initial estimation. Some of the proposed methods are based on the same discharge procedures as the TPCM, while others, in order to reduce the mean estimation time, use accelerated discharge procedures, as the FCM.
In order to compare the new proposed methods with traditional methods, a circuit with an FPGA (Xilinx XC3S50AN-4TQG144C) has been used to measure resistances values in the range (267.56 Ω, 7464.5 Ω). When 20 estimates of the range’s maximum resistance value are made, one of the proposed methods, the Fast-QSPCM achieves a reduction of 61% in the mean estimation time compared to the TPCM, while the relative maximum error for any resistance value in the range only increases by 0.1%.