Anda di halaman 1dari 9

Sensors and Actuators A 173 (2012) 284292

Contents lists available at SciVerse ScienceDirect

Sensors and Actuators A: Physical

journal homepage:

A microcontroller system for measurement of three independent components

in impedance sensors using a single square pulse
Zbigniew Czaja
Gdansk University of Technology, Faculty of Electronics, Telecommunications and Informatics, Department of Metrology and Optoelectronics, ul. G. Narutowicza 11/12, 80-233 Gdansk,

a r t i c l e i n f o a b s t r a c t

Article history: A novel time domain method and its implementation in a simple smart impedance sensor controlled by
Received 11 May 2011 an 8-bit microcontroller is presented in the paper. The method is based on stimulation of a voltage divider
Received in revised form 17 October 2011 consisting of a resistor working as a current-to-voltage converter and the impedance sensor by a single
Accepted 17 October 2011
square-voltage pulse with a duration time T directly generated by the output of the microcontroller and on
Available online 20 October 2011
sampling the resulting voltage on the sensor at three different selected moments T/8, T/2 and 7T/8 by the
internal ADC of the microcontroller. The sensor is modeled by a three-components circuit. The duration
time T is determined by the rst timer and the ADC is triggered by the second timer of the microcontroller.
Time-domain measurement
Microcontroller interfacing
The measurement procedure takes less than 1 ms and the determination of model component values is
Impedance sensors based on basic calculus. Thanks to this, smart sensors basing on this solution are energy-saving, they
can work on the same batteries by a few years, and low cost on the level tens euros. Hence, they can be
used in wireless sensor networks, especially basing on the ZigBee protocol. The results of the simulation
investigation and the experimental verication of the method are included in this paper.
2011 Elsevier B.V. All rights reserved.

1. Introduction measure the resulting current or a voltage. This approach needs to

apply a frequency impedance analyzer which consists of a genera-
Electrical impedance-based sensors are usually modeled by tor with direct digital synthesis (DDS) and a vector voltmeter [12].
two-terminal circuits consisting of several circuit components. Hence, the measurement circuit is complex and it is not suitable for
Their models include a series or parallel combination of resis- simple smart sensors, especially battery-powered and controlled
tors R and capacitors C. Typically they consist of three e.g. for by a microcontroller, and also working in wireless sensor networks,
electrodeelectrolyte systems with equal electrodes [1,2], capac- e.g., basing on the ZigBee protocol.
itive RH sensors [3], for water conductivity measurements based Also the time domain methods [10,11] are not appropriate for
on two electrodes [4,5], for pure titanium working electrodes compact sensors systems. They are based on FFT calculations which
immersed in phosphate buffered saline [6], ve e.g. for elec- exact a big memory for data points and a powerful data proces-
trode/bacteria/electrolyte interfaces for bacterial adhesion [7] and sor, what increases a system cost. Additionally, the calculations
for single-crystalline silicon solar cells [8], six e.g. for fuel cells [9] lengthen the processor working time, what causes an increase of
or more components. power consumption.
Component values of the impedance model of the sensors can The methods reported in [1,2] are free from these disadvan-
be determined by using measurements in the frequency domain tages. In these methods three independent components of the
or in the time domain. In the rst case we base on impedance impedance of a sensor are analytically determined by applying a
spectroscopy, in the second case the currenttime response of the single square-wave current [1] or a voltage [2] and measuring the
sensor converted into the timevoltage response is sampled using resulting voltage [1] or the resulting current intensity [2] at only
a fast A/D and the FFT is performed [10,11] or this response is sam- three different selected times.
pled three times and component values of the three-component Basing on an idea of these methods [1,2] and also on solutions
model of the sensor are analytically calculated [1,2,46]. from fault diagnosis methods of analog circuits elaborated by the
In impedance spectroscopy we stimulate the sensor using sev- author [1315] the new method of measurement and analytical
eral sine waves with a wide spectrum of frequency values and we determination of three independent components of the impedance
of a sensor was elaborated.
Thus, the paper describes this novel method and its implemen-
Tel.: +48 58 347 1487; fax: +48 58 347 1357. tation in a simple smart sensor controlled by a microcontroller. The
E-mail address: method is based on stimulation of a voltage divider consisting of a

0924-4247/$ see front matter 2011 Elsevier B.V. All rights reserved.
Z. Czaja / Sensors and Actuators A 173 (2012) 284292 285

microcontrollers, or it is necessary to extend the method with an

analysis in the frequency domain to determine the CPE frequency
dispersion factor [6].

2.1. The measurement circuit

The measurement circuit shown in Fig. 1 is composed from the

CTVC resistor Rr connected in series with the impedance sensor Zs
(Rsp + Rp ||Cp ). They create a voltage divider. The circuit is stimulated
by a single square pulse vin with an amplitude set a priori to VCC
(a supply voltage of the digital circuit (e.g., VCC = 5 V)the High
level for digital signals). We measure the output voltage vout on the
sensor Zs .
Fig. 1. Scheme of the measurement circuit. Hence, we can say that the CTVC resistor Rr works as a current-
to-voltage converter, what is presented by the following formula:

resistor working as a current-to-voltage converter (CTVC resistor) vout = vin i(Rsp , Rp , Cp )Rr (1)
and the sensor (Fig. 1) by a single square voltage pulse and on
Thanks to this solution, we can treat the measurement circuit as
sampling the resulting voltage on the sensor at three different
a four-terminal circuit and therefore we can adapt ideas from fault
selected moments. Because the impedance model is known, the
diagnosis methods of analog circuits [1315] for determination of
values of three model components are calculated from three
components values of the impedance sensor model.
measurement results. The electronic circuit is simple. It consists of
only the microcontroller (exactly: its internal devices: two timers
and an ADC) and the CTVC resistor. The rst timer determines the 2.2. Circuit analysis
duration time of the single square pulse directly generated by the
output of the microcontroller, and the voltage response is sampled The measurement circuit is stimulated by a single square pulse
by the ADC triggered by the second timer. If we need measurement vin (t) with the duration time T (Fig. 2). In the time domain this
results with a better voltage resolution, we have to add an external excitation can be described by the formula:
ADC to the system. Determination of model component values is vin (t) = VCC (1(t) 1(t T )) (2)
based on basic calculus, which can be made with success by 8-bit
microcontrollers. Converting it to Laplaces domain, we obtain the form:
Obviously, there are methods [46] which need about ten times 1 1 sT

less calculation to determine component values from measurement Vin (s) = VCC e (3)
s s
results and they are also characterized by smaller inuence of mea-
surement uncertainty in estimation of component values than the It is assumed that the output signal vout (t) is sampled by an ADC
proposed method. But, their implementation in such simple sys- at three moments as shown in Fig. 2: tk = k, tl = l, tm = m, where
tems is considerably more difcult. Their measurement procedure k, l, m, n N, k < l < m n, t = T/n, and n is the number of the period
is complex, it takes more time and it requires complex calculations T division. Hence, we obtain the following voltage samples: Vk , Vl ,
and storage of the set of acquired measurement data. Additionally, Vm . After normalization (after division of these values by VCC ) we
there are high requirements on measurement conditions minimiz- obtain: vk = Vk /VCC , vl = Vl /VCC , vm = Vm /VCC .If we assume that
ing the measurement errors, which cannot be fullled by the ADC vm vk v vm
of the microcontroller. p= and q = l (4)
vk vl vk vl
we can simplify (A.13) (see Appendix A) to the following form:
2. Description of the method
m + pl + qk = 0 (5)
The method consists of two parts: the measurement part, where
the sensor is stimulated by a single square pulse, its voltage time From (5) it is seen that it is important to set values k, l, m for
response is sampled three times, and the calculation part in which which the equation is analytically resolvable. It is possible for exam-
the measurement result is used to analytical computations of com- ple, when n = 8 and k = 1, l = 4, m = 7. For these values (5) can be
ponents values of the sensor model. written as:
It is assumed that the sensor is modeled by a three-component 7 + p4 + q = 0 (6)
circuit consisting of a resistance Rsp connected in series with par-
allel connection of a resistance Rp and a capacitance Cp (Fig. 1) what gives:
according to rules described in [2,46]. Nominal values of model
6 + p3 + q = 0 (7)
components are the following: Rsp = 100 , Rp = 1000 , Cp = 1 F.
These values were used for a simulation analysis and an exper- If we assume that x = 3 we obtain from (7) the square equation:
imental verication of the method. They are the same as in the
template model in [2] what allows a better estimation of the pro- x2 + px + q = 0 (8)
posed method. Its solution giving good results is
At the current stage of investigations of the method, whose 
results are presented in the paper, the above sensor model p p2 4q
is assumed, because a constant-phase element (CPE) involves x= (9)
too complex calculations to be implemented in an 8-bit micro-
controller. It follows from the fact that it needs considerably Hence  = 3 x. Because  = e = eT/n the is calculated from:
more calculations to determine component values as presented n
= ln  (10)
in [1], what is inconvenient for systems controlled by 8-bit T
286 Z. Czaja / Sensors and Actuators A 173 (2012) 284292

Fig. 2. Timings of the stimulation signal of the measurement circuits and the voltage time response of the impedance sensor.

Assuming that k = k and l = l we can transform (A.7) to the form: microcontroller, e.g., the ZDM-A1281-A2 module [17] and also the
 ATmega128RFA1 microcontroller family used in the 2.4 GHz RF
vk = + k transceiver.
vl = + l Thanks to this, the approach presented in the paper can be
implemented directly in wireless sensor networks. It is sufcient to
After derivations of (11) we have:
connect the impedance sensor to the ZigBee module (to appropriate
vk l vl k pins of the microcontroller), obviously if it is required, via the con-
= (12a)
l k ditioning circuit to assure good levels of stimulation and response
vk (l 1) vl (k 1) signals, and to add functions serving the impedance sensors (real-
= (12b) izing measurement and calculation procedures) to the ZigBee stack
l k
application layer. In other words, the proposed method allows to
Therefore, we calculate the values of model components of the extend the functionality of the existing wireless module without
impedance sensor Rsp , Rp , Cp basing on these indirect parameters its extension with electronic circuits. In this way, we obtain a small
, , : and compact wireless smart sensor.
As was mentioned above, to test the method and its possibili-
Rsp = Rr (13a) ties, the laboratory microcontroller system based on the ATmega16
  microcontroller (Fig. 3) was realized.
The measurement circuit is directly connected to the micro-
Rp = Rr (13b)
1 1 controller pins. The stimulating square pulse is generated on the
OC0 pin. Its duration time T is determined by the 8-bit Timer 0
1/1 working in the Compare Match Output Mode. The voltage response
Cp = (13c)
Rr ((/1 ) (/1 ))1/1 of the impedance sensor applied to the ADC0 pin is sampled
We have got vk, vl, vm values of voltage samples after the mea- three times by the 10-bit ADC, which is triggered by the 16-bit
surement part. Thus, to determine the Rsp , Rp , Cp component values Timer 1 operating in the Clear Timer in Compare Match (CTC)
we rst have to calculate p and q values from (4), next we solve (9) Mode.
and determine the  value and we compute indirect parameters The measurement procedure is realized by the measurement()
from (10), from (12a) and from (12b), which are put into nal function. It consists of four code sections. The code placed in the
formulas (13a) for Rsp , (13b) for Rp and (13c) for Cp . Hence, these main body of the function is responsible for initializing timers and
calculations are no more complex, thanks to this they can be real- the ADC, setting 1 on the OC0 output, starts the Timer 0 with the
ized by 8-bit microcontrollers. For example, the ATmega16 running value corresponding to the duration time T and the Timer 1 with
with a 4 MHz quartz crystal oscillator needs about 8 ms to execute the value equivalent to T/8. The interrupt service of the Timer 0
these calculations. hardware sets 0 on the OC0 output and stops the Timer 0. The
interrupt of the Timer 1 hardware triggers the ADC conversion and
2.3. The microcontroller system writes in the next value to the Timer 1 representing 4T/8 (the rst
interrupt activation) or 7T/8 (the second one), or stops (the third
The laboratory microcontroller system for measurement of one) the Timer 1. The rst interrupt service of the ADC saves the
three independent components in impedance sensors is built with 10-bit conversion result in the variable v k, the second one in the
only the ATmega16 microcontroller of Atmel [16]. We decided variable v l, and the third one in the variable v m and set the ag
to use the microcontroller with the AVR core, because Atmel end measurement used by the main function to nish the measure-
offers compact 802.15.4/ZigBee modules with the ATmega1281 ment procedure.
Z. Czaja / Sensors and Actuators A 173 (2012) 284292 287

the impedance sensor model. Hence, we have to assume ranges

of changes of their values. They depend on the impedance sensor
type and on the working environment. In the paper, for illustration
of this analysis we assume that all component values change from
0.1 to 10 times their nominal value.
It is seen from (4) that we have to analyze differences between
voltage samples:
vl vk , vm vl and vm vk in a function of T and Rr . From timing
of the voltage time response of the impedance sensor (Fig. 2) we can
observe that vm vl < vl vk < vm vk . Hence, it is enough to analyze
only the smallest difference vml = vm vl .
The  i coefcient of the i-th component (where i = 1 (Rsp ), 2
(Rp ), 3 (Cp )) in a function of changes of T values and Rr values is

i (T, Rr ) = max {vml (pi , T, Rr )} min {vml (pi , T, Rr )}

pi pi min ,pi max  pi pi min ,pi max 

where pi the value of the i-th component in a range from pi

min = 0.1pi nom to pi max = 10pi nom (pi nom the nominal value of
Fig. 3. The microcontroller system for testing of an impedance sensor.
the i-th component), vml (pi , T, Rr )the vml value in a function of
changes of pi component values, T values and Rr values.
If there is any DC voltage VDC existing on the impedance sen- Therefore, the  i coefcient is dened as the difference between
sor, due for example to an electrode polarization, we can measure the maximum value and the minimum value from the set of the
it before beginning the measurement procedure. After execution values of vml computed for an assumed range of changes of pi com-
of this procedure we should correct the measurement results by ponent values for particular values of T and Rr . Other words, the  i
addition or subtraction of VDC to/from them. The measurement coefcient value informs us about the range of changes of vml val-
of VDC is simple. We set the OC0 pin of the microcontroller as a ues for the given range of changes of pi values by established values
high impedance input and next we measure the voltage VDC on the of T and Rr . Then, we can say that if the  i value is the greatest, the
ADC0 pin by the ADC. But, we should remember that in this case, large-change sensitivity of the voltage transmittance of the mea-
a limitation of the method is fact that Vm + VDC VCC , and also that surement circuit to deviations of values of the i-th component is
VDC should not change when injecting a current pulse between the also the biggest. That is, we obtain possibly the best measurement
electrodes. conditions allowing to observe possibly the smallest changes of pi
component values. Thanks to this, we can optimally increase the
2.4. Selection of the duration time T and the value of the CTVC resolution threshold of the value component determination.
resistor Rr Graphs of  i coefcients for respective components in a function
of T and Rr are shown in Fig. 4. Hence, we have to determine the
To obtain the best measurement resolution it is important to maximum value  i max from the  i values set (drawn in Fig. 4) calcu-
determine optimum values of the duration time T and the CTVC lating for value changes of T and Rr .  i max points to optimum values
resistor Rr . We know the nominal values of three components of of Ti opt and Rr i opt to obtain the best measurement conditions:
i max = max max {i (T, Rr )} Rr i opt , Ti opt
Rr Rr min ,Rr max  T Tmin ,Tmax 

where we assumed that Rr min = Rsp , Rr max = Rp , Tmin = 0.1Rsp Cp ,

Tmax = 3Rsp Cp .
Obviously, the Eq. (15) allows to determine the best measure-
ment conditions for one i-th component. For example, if we want
to optimize the measurement condition for chosen two compo-
nents or for all components, it is proposed to use an average value
denoted as  of  i coefcients of considered components:


(T, Rr ) = i (T, Rr ) (16)


where I = 2 if we chose two components, or I = 3 if we chose all

The  coefcient for I = 3 is illustrated in Fig. 5. In this case, we
also nd its maximum value which points to optimum values of Ti
opt and Rr i opt .
All determined results of optimum values of Ti opt and Rr i
opt obtained for nominal values of the sensor model components
(Fig. 1) and the assumed range of changes of their values are
included in Table 1. To analyze we use values of Rr i opt taken from
the E12 series of typical values of the IEC-63 Standard. Thanks
Fig. 4. The  i coefcients in the function of T and Rr for Rsp , Rp , Cp , respectively. to this, the CTVC resistor Rr consists of one generally available
288 Z. Czaja / Sensors and Actuators A 173 (2012) 284292

the second one with a P-channel [20]. Additionally, small values

of static drain-to-source on-resistances (0.1  and 0.25  for N-
channel and P-channel transistors respectively) and big values of
continuous drain currents (3.5 A and 2.3 A adequately) allow to
extend the measurement range of the system.
For the considered laboratory system the average consumption
of the supply current during the measurement procedure was mea-
sured. Its value is equal to 21.5 mA. We should remember that to
estimate the energy consumption it is necessary to consider the
ADC conversion time lengthening the measurement procedure. For
the assumed 10-bit resolution and the 2 LSB absolute accuracy
Fig. 5. The average value of  i coefcients in the function of T and Rr for all compo-
[16] of the ADC (the input clock frequency is set to 125 kHz) this
nents: Rsp , Rp , Cp .
time is equal to about 104 s.
Also, estimation of the energy consumption of the ZDM-A1281-
element, what simplies the measurement circuit and reduces A2 module [17] with the implemented method working as ZigBee
implementation costs. endpoint was made. In the active mode of the module (it contains
To analyze we chose Ti opt = 0.56 ms and Rr i opt = 390  assuring the measurement procedure, the procedure of component value
possibly the best measurement conditions for all components of determination and the data transmission) the average supply cur-
the impedance sensor model. rent consumption is at the level of 17.6 mA in the time interval
equal to about 28 ms. The module is in the power save mode in
3. Experimental results the remaining time when the average supply current consump-
tion is equal to about 6 A. Hence, if we for e.g. use power supply
The main aim of experimental investigations was examination of 1000 mAh batteries and measurements are repeated by 10 s or
of metrological possibilities of the microcontroller system built 100 s, the system can work over 2 or 10 years.
with only the microcontroller (in our case the ATmega16) and its Measurements were carried out for 33 values of each model
internal devices (timers and the ADC). Hence, the new method was component by making the assumption that remaining component
experimentally veried and estimated on the example of a physi- values are constant. The values were logarithmically located in the
cal model built according to the scheme shown in Fig. 1. The model following ranges of component value changes: from 10  to 1 k
with known values of its components allowed to compare these for the Rsp resistor, from 100  to 10 k for the Rp resistor and
values with those determined by the method with theoretical ones from 100 nF to 10 F for the Cp capacitor. Three voltage samples vk ,
(physically set in the circuit). Thanks to this, it was possible to esti- vl and vm were measured by the 10-bit ADC of the microcontroller.
mate the measurement resolution of the microcontroller system Measurement results of voltages and determined values of model
and relate it with the precision of determination of model compo- components were stored with 16-bit resolution (using integer type
nent values. variables) and sent to a personal computer via the RS232 interface.
The measurement part of the microcontroller system consists Considering (4) it is seen that in fact values of differences
of the CTVC resistor Rr = 389.9 , and the physical model of the between respective voltage samples have an essential impact on
impedance sensor assembled with two resistors with nominal the determination of values of sensor model components. Hence,
values Rsp = 100.18 , Rp = 1000.2  and one capacitor with the these values are taken into account. Their graphs in a function of
nominal value Cp = 1.016 F. The digital part is represented by the changes of values of respective components are drawn in Fig. 7. The
Atmega16 16PI 0509J, which runs with a 4 MHz quartz crystal oscil- measurement results are marked by circles for vkl = vk vl , squares
lator. The Timer 1 is clocked directly by the system clock. It is used for vlm = vl vm and triangles for vmk = vm vk . Continuous lines rep-
to determine the voltage sample moments tk = 70 s, tl = 280 s resent simulation results. Values of voltages are expressed in the
and tm = 490 s. The Timer 0 works in the Compare Match Out- form of values directly read from the 10-bit ADC (the number of
put Mode with the toggle mode of the OC0 output and it is clocked LSBs).
by the system clock with the prescaler divisor 64. It generates at Comparing the experimental results with theoretical ones it
the output OC0 a stimulating square pulse with the duration time is seen that measurements are convergent with the simulation
T = 560 s and with an amplitude equal to VCC = 5.2106 V. Resistance results, what testies correct operation of the measurement pro-
and voltage values were veried with the HP34401A multimeter cedure and the microcontroller hardware.
and capacitance values by the 4263B LCR meter at 1 kHz frequency.
After preliminary investigations it was proved that electrical
parameters (especially the output pin impedance depending on
the pin sink current [16]) of the OC0 output pin of the micro-
controller, as also afrmed in [3,18,19], considerably inuence the
divergence between measurement results and simulation results.
To eliminate this inuence an inverter built from one IRF7105 com-
ponent was added on the OC0 output (Fig. 6). The IRF7105 consists
of two HEXFET power MOSFETs, the rst one with a N-channel and

Table 1
Optimum values of Ti opt and Rr i opt assuring the best measurement conditions.

Investigated component Ti opt [ms] Rr i opt []

Rsp 0.32 220

Rp 2.08 1000
Cp 3.00 330
Rsp , Rp , Cp 0.56 390 Fig. 6. The inverter basing on the IRF7105 introduced between the OC0 output of
the microcontroller and the sensor.
Z. Czaja / Sensors and Actuators A 173 (2012) 284292 289

Table 2 Table 3
Maximum ranges of changes of absolute measurement errors for complete ranges Relative uncertainties of components determination as a function of a measurement
of component value changes. uncertainty.

Absolute error vkl [*5 mV] vlm [*5 mV] vmk [*5 mV] Measurement absolute Relative uncertainty of values components
component (relative) uncertainty determination

Rsp 16 30 51 Rsp [%] Rp [%] Cp [%]

Rp 65 31 36
Cp 146 32 714 2 LSB for 16-bit ADC 0.032 0.12 0.04
(meas = 0.0031%)
2 LSB for 14-bit ADC 0.13 0.48 0.16
(meas = 0.012%)
2 LSB for 12-bit ADC 0.51 1.91 0.64
Maximum ranges of value deviations between experimental (meas = 0.05%)
and simulation results (measurement absolute errors) for complete 2 LSB for 10-bit ADC 2 7.6 2.55
ranges of component value changes are presented in Table 2. (meas = 0.2%)
4 LSB for 10-bit ADC 4.01 15.16 5.06
Except absolute errors appointed to the Cp component value (meas = 0.4%)
changes all remaining absolute errors are comprised in the range
of the absolute uncertainty of the 10-bit ADC triggered by the 16-
bit Timer. The value of this uncertainty depends on the absolute 4. Determination of component values
accuracy of the ADC [16], the uncertainty in microcontroller-based
time measurements [21,22] and the uncertainty resulting from the Relative errors of the component values determined from mea-
method of start the ADC conversion [16,23] (impossibility of syn- surement results for changes of values of respective components
chronization of a prescaler clock signal of the ADC by the timers). are plotted in Fig. 8, where Rsp nom , Rp nom and Cp nom represent
From [23] it follows that the uncertainty of a single voltage mea- nominal values of Rsp , Rp and Cp components, respectively.
surement is about the level equal to 3 LSB. Hence, we can assume Obviously, these errors directly follow from measurement
that the uncertainty of determination of difference between two errors. However, apart from values of the measurement errors, the
voltage samples is on the level of 5 LSB. The big values of abso- bad (even very bad) numerical conditions of component determi-
lute errors determined for the Cp follow from the fact that for small nation formulas have an essential inuence on their big values.
values of capacitances optimum measurement conditions are not Particularly, it is seen that for (2) the measurement errors signi-
fullled (the Cp capacitor is too quickly charged, what causes that cantly accumulate themselves in the case of small values of vkl (we
e.g., vl = vm , therefore the established value of the duration time T is should remember the 10-bit measurement resolution), and next,
too long for this case). formula (8) amplies them. This effect is shown in Table 3. It

Fig. 7. Graphs of measurement results represented by values of differences between respective voltage samples: vkl = vk vl , vlm = vl vm , vmk = vm vk .
290 Z. Czaja / Sensors and Actuators A 173 (2012) 284292

Fig. 8. Graphs of relative errors of component value determination from measurement results.

presents simulation results basing on the Monte Carlo method [24] set one optimum value of the duration time T and one optimum
of relative uncertainties of component determination as a function value of the CTVC resistor Rr for this range.
of a measurement uncertainty. A rectangular probability distribu- Summarizing we can afrm that the proposed microcontroller
tion function (pdf) of the measurement uncertainty was assumed system for measurements of three independent components in
and a 99.73% coverage interval of the uncertainties of the compo- impedance sensors using a single square pulse works properly
nents determination. according to the presented theory. The measurements character-
From Table 3 it is seen that the values of relative uncertainties ize an unusually big repeatability for this hardware, what was
of component determination for Rsp (Rsp ), Rp (Rp ) and Cp (Cp ) are exactly tested. The experimental results conrm that an advan-
about 10 times, 38 times and 13 times higher than the measurement tage of the presented time-domain method (very short time of
uncertainty (meas ), respectively. Unfortunately, this disadvantage measurements) is simultaneously its disadvantage (a small accu-
follows from the fact that the proposed method belongs to a class racy of determination of component values of the sensor model).
of time-domain methods. Obviously, it is possible to improve this accuracy. Usually, in real
The described feature of the method is particularly visible applications changes of values of a given physical quantity have a
for the relative errors Rsp (Fig. 8) of the Rsp value compo- predominant inuence typically on values of one component of the
nent determination. For relatively constant values of absolute sensor model. Thus, it allows to match the best measurement con-
measurement errors (Fig. 7) and more and more smaller val- ditions for this component and to change these conditions (e.g., the
ues of the Rsp component (more and more smaller impact of duration time T) according to expected values of this component.
the Rsp component on the sensor impedance) set during the Moreover, changes of values of a given component can be presented
measurements, the relative error Rsp grows and for Rsp = 10  in the form of identication curves [1315] scaled directly in values
achieves even 120% (the graph Rsp as a function of Rsp /Rsp of a given physical quantity (it allows to use a look-up technique),
nom ). what eliminates rstly the calculations biased by the bad numerical
Around nominal values of sensor model components the rela- conditions needed for component value determination and sec-
tive errors of the values of component determination are similar ondly the calculations converting these values to values of a given
to uncertainties corresponding to them presented in Table 3, what physical quantity.
conrms that measurements were made in the best possible mea-
surement conditions. These conditions are not optimal for extreme 5. Conclusion
values of the components, what leads to effective growth of the
relative errors. Moreover, the numerical conditions cause that, e.g., In the paper a microcontroller system for measurement of three
for two the smallest values of the Cp component, for which vl = vm , independent components in impedance sensors using a single
the formula (8) is incomputable. square pulse and the new time domain method elaborated for this
The described problems follow from the fact that we have taken system are presented. The system is simple, because it consists only
restrictive assumptions for investigations of the microcontroller of the 8-bit microcontroller (exactly: its internal devices, i.e. two
measurement system. That is, we assumed a very wide range of timers and the ADC), the inverter built from two MOSFETs and
value changes for all components of the sensor model and we have the CTVC resistor. The measurement procedure is short (it takes
Z. Czaja / Sensors and Actuators A 173 (2012) 284292 291

less than 1 ms) and determination of model components values is If we place = and  = e into (A.6), we obtain the following
based on basic calculus. These advantages follow from the fact that equations:
the system was designed for simple small smart sensors, especially
vk = + k
battery-powered and also working in wireless sensor networks,
vl = + l (A.7)
e.g., basing on the ZigBee protocol.
vm = + m
Thanks to this, smart sensors basing on this solution are energy-
saving, they can work on the same batteries for a few years, and low Subtracting the rst equation from the second one of (A.7) we
cost on the level of tens of euros, what allows to implement them obtain:
in large wireless sensor networks.
vl vk = (l k ) (A.8)
As an analysis of uncertainties of component determination and
experimental investigations proved, the proposed time-domain From (A.8) we determine:
method characterizes the small accuracy of the component value vl vk
determination. Hence, with regard to its small accuracy and the = (A.9)
l k
advantages quoted above, smart sensors basing on this method are
ideally suitable for monitoring of physical objects, and testing that We put this result to the third equation of (A.7) what gives:
their parameters do not exceed the assumed threshold values. For vl vk
vm = + m (A.10)
example if threshold values are exceeded, the smart sensor working l k
as an endpoint of the wireless network can send this information to
From (A.10) we assign :
a network coordinator, who can turn on an another more advanced
sensor basing on the more energy-consuming but more accurate vl vk
= vm m (A.11)
frequency-domain method. l k
Next, the is put to the rst equation of (A.7), what gives:
Appendix A. vl vk vl vk
vk = vm m + k (A.12)
l k l k
The measurement circuit can be treated as a four-terminal cir-
cuit (Fig. 1). Hence, its voltage transmittance can be written as: what after transformations gives the equation with only one
unknown quantity :
Vout (s) s + 
Ku (s) = = (A.1) vm vk v vm
Vin (s) s+ m + l + k l =0 (A.13)
vk vl vk vl
where Vin (s) described by (3) and Vout (s) are Laplace transforms of
Formula (A.13) is used as a basis to next transformations made
the input voltage vin (t) given by (2) and the output voltage vout (t)
in the text.
of the measurement circuit adequately, and
Rr + Rsp + Rp References
= (A.2.a)
Cp Rr Rp + Cp Rsp Rp
[1] J. Lario-Garcia, R. Palls-Areny, Constant-phase element identication in con-
Cp Rsp Rp ductivity sensors using a single square wave, Sensors and Actuators A 132
= (A.2.b) (2006) 122128.
Cp Rr Rp + Cp Rsp Rp
[2] J. Lario-Garcia, R. Palls-Areny, Measurement of three independent compo-
nents in impedance sensors using a single square wave, Sensors and Actuators
Rsp + Rp
= (A.2.c) A 110 (2004) 164170.
Cp Rr Rp + Cp Rsp Rp [3] F. Reverter, O. Casas, Direct interface circuit for capacitive humidity sensors,
Sensors and Actuators A 143 (2008) 315322.
That is, the response signal Vout (s) of the impedance sensor is the [4] A. Meja-Aguilar, R. Palls-Areny, Electrical impedance measurement using
output signal of the four-terminal circuit (Fig. 1) what is expressed pulse excitation, in: Proceedings of 16th IMEKO TC4 Symposium, September
2224, Florence, Italy, 2008, pp. 567572.
by: [5] A. Meja-Aguilar, R. Palls-Areny, Electrical impedance measurement using
  voltage/current pulse excitation, in: Proceedings of XIX IMEKO World Congress,
 September 711, Lisbon, Portugal, 2009, pp. 662667.
Vout (s) = Ku (s)Vin (s) = VCC + . (A.3)
s+ s (s + ) [6] M.T. Ehrensberger, J.L. Gilbert, A time-based potential step analysis of elec-
trochemical impedance incorporating a constant phase element: a study of
commercially pure titanium in phosphate buffered saline, Journal of Biomedical
After transformations in the time domain the output signal vout (t)
Materials Research Part A 93 (2010) 576584.
has the form: [7] S. Bayoudha, A. Othmane, L. Ponsonnet, H.B. Ouada, Electrical detection
  and characterization of bacterial adhesion using electrochemical impedance
VCC et +  (1 et ) for 0 t < T spectroscopy-based ow chamber, Colloids and Surfaces A: Physicochemical
vout (t) =   (A.4) and Engineering Aspects 318 (2008) 291300.
VCC  (et e(tT ) ) for t T [8] S. Kumar, P.K. Singh, G.S. Chilana, Study of silicon solar cell at different inten-
sities of illumination and wavelengths using impedance spectroscopy, Solar
Energy Materials & Solar Cells 93 (2009) 18811884.
if we assume = / that: [9] M.A. Danzer, E.P. Hofer, Electrochemical parameter identicationAn efcient
 method for fuel cell impedance characterisation, Journal of Power Sources 183
VCC ( + ( )et ) for 0 t < T (2008) 5561.
vout (t) = . (A.5) [10] C.E.B. Neves, M.N. Souza, A method for bio-electrical impedance analysis based
VCC ( )(et e(tT ) ) for t T on a step-voltage response, Physiological Measurement 21 (2000) 395408.
[11] A.R. Waterworth, P. Milnes, R.H. Smallwood, B.H. Brown, Cole equation mod-
It is assumed that the output signal vout (t) is sampled by an ADC elling to measurements made using an impulse driven transfer impedance
at three moments: tk , tl , tm as it is shown in Fig. 2 and described in system, Physiological Measurement 21 (2000) 137144.
[12] J. Hoja, G. Lentka, Interface circuit for impedance sensors using two spe-
the main text (before formula (4)). Thus, basing on (A.5) we derived cialized single-chip microsystems, Sensors and Actuators A 163 (2010)
formulas for vk , vl , vm : 191197.
[13] Z. Czaja, A diagnosis method of analog parts of mixed-signal systems controlled
vk = + ( )ek by microcontrollers, Measurement 40 (2007) 158170.
vl = + ( )el (A.6) [14] Z. Czaja, Using a square-wave signal for fault diagnosis of analog parts of mixed-
signal electronic embedded systems, IEEE Transactions on Instrumentation and
vm = + ( )em Measurement 57 (2008) 15891595.
292 Z. Czaja / Sensors and Actuators A 173 (2012) 284292

[15] Z. Czaja, A method of fault diagnosis of analog parts of electronic embedded [23] Z. Czaja, Wykorzystanie przetwornikw A/C wbudowanych w mikrokon-
systems with tolerances, Measurement 42 (2009) 903915. trolery do pomiarw parametrw sygnaw zmiennych (Using inter-
[16] Atmel Corporation, 8-bit AVR microcontroller with 16k Bytes In-System Pro- nal ADCs of microcontrollers for measurements of alternating signal
grammable Flash, ATmega16, ATmega16L, PDF le, 2003. parameters), Przeglad Elektrotechniczny (Electrical Review) 86 (2010)
[17] MeshNetics (Atmel Corporation), ZigBit OEM Modules ZDM-A1281 58.
Ultra-Compact 2.4 GHz 802.15.4/ZigBee Modules for Wireless Networking [24] JCGM 101:2008, Evaluation of measurement data Supplement 1 to the Guide
Applications, PDF le, 2007. to the expression of uncertainty in measurement Propagation of distributions
[18] F. Reverter, J. Jordana, M. Gasulla, R. Palls-Areny, Accuracy and resolution of using a Monte Carlo method, JCGM 2008.
direct resistive sensor-to-microcontroller interfaces, Sensors and Actuators A
121 (2005) 7887.
[19] F. Reverter, O. Casas, Interfacing differential capacitive sensors to micro- Biography
controllers: a direct approach, IEEE Transactions on Instrumentation and
Measurement 59 (10) (2010) 27632769.
[20] International Rectier, IRF7105 HEXFET Power MOSFET, PDF le, 2003. Zbigniew Czaja was born in Czluchow, Poland, in 1970. He graduated from Gdansk
[21] F. Reverter, J. Jordana, R. Palls-Areny, Internal trigger errors in microcontroller- University of Technology, Faculty of Electronics, Telecommunications and Informat-
based measurements, in: Proceedings of XVII IMEKO World Congress, June ics in 1995. The PhD degree in electronics was received in 2001 from the same
2227, Dubrovnik, Croatia, 2003, pp. 655658. university. He works as assistant professor at this University. His research interests
[22] F. Reverter, R. Palls-Areny, Uncertainty reduction techniques in are in technical diagnosis, especially for fault diagnosis of electronic analog circuits,
microcontroller-based time measurements, Sensors and Actuators A 127 and electronic mixed-signal embedded systems controlled by microcontrollers. He
(2006) 7479. is also interested in applications of small 8-bit microcontrollers.