Reference Manual ADuCM356
USE CASE CONFIGURATIONS
analog.com Rev. A | 159 of 312
Step 5: Calculate the Impedance of
Electrochemical Sensor Sensing Electrode
Node
Calculate the magnitude and phase of Step 2, Step 3, and Step 4.
The following code example and equations show how to calculate
the magnitude and phase of each step:
// Get RMS result of each step based on DFT
REAL and IMAG outputs
DFT_Mag[i] = DFTREAL* DFTREAL+ DFTIâ–º
MAG* DFTIMAG;
DFT_Mag[i] = sqrt(DFT_Mag[i]);
// Use atan2 function to get phase result
of each step based on DFT REAL and IMAG outputs
Phase[i] = atan2(DFTIMAG,
DFTREAL); // returns value between -pi to +pi
(radians) of ATAN2(IMAG/Real)
In Step 4,
V(s)
Z
CAL(magnitude)
= I(s)
CAL
(12)
where:
V(s) is the signal voltage.
I(s)
CAL
is the calibration current.
Z
CAL
(magnitude) is the magnitude of the impedance of the calibra-
tion.
Therefore,
V(s) = I(s) × Z
CAL
(13)
In Step 2,
V(s)
Z
RE + RLOAD02
= I(s)
RE + RLOAD02
(14)
where:
Z
RE + RLOAD02
is the impedance of the sensor and Load Resistor 2.
I(s)
RE + RLOAD02
is the current flowing through the sensor and Load
Resistor 2.
Therefore,
Z
RE + RLOAD02
=
V(s)
I(s)
RE + RLOAD02
(15)
In Step 3,
V(s)
Z
RLOAD02
= I(s)
RLOAD02
(16)
where:
Z
RLOAD02
is the impedance of Load Resistor 2.
I(s)
RLOAD02
is the current flowing through Load Resistor 2.
Therefore,
Z
RLOAD02
=
V(s)
I(s)
RLOAD02
(17)
Therefore, based on Step 2 through Step 4,
Z
RE
=Z
RE + RLOAD02
− Z
RLOAD02
=
V s
I s
RE + RLOAD02
−
V s
I s
RLOAD02
=I s
CAL
× Z
CAL
×
1
I s
RE + RLOAD02
−
1
I s
RLOAD02
=I s
CAL
× Z
CAL
×
I s
RLOAD02
− I s
RE + RLOAD02
I s
RE + RLOAD02
× I
s
RLOAD02
(18)
If Z
CAL
(magnitude) = 200 Ω and Z
CAL
(phase) = 0, it is possible to
obtain the following equations:
Z
RE
(magnitude) = Z
RE + RLOAD02
− Z
RLOAD02
= 200 × I(s)
CAL
×
I(s)
RLOAD02
− I(s)
RE + RLOAD02
I(s)
RE + RLOAD02
× I(s)
RLOAD02
(19)
where:
Z
RE
(magnitude) is the magnitude of the impedance of the sensor.
I(s) values can be replaced by DFT results.
Z
RE
pℎase =Ang
Z
RE + RLOAD02
− Z
RLOAD02
=0 + Ang
I s
CAL
+ Ang
I s
RLOAD02
− I s
RE + RLOAD02
− Ang
I s
RE + RLOAD02
− Ang
I s
RLOAD02
(20)
where:
Z
RE
(phase) is the phase part of the impedance measurement of the
sensor.
Ang() is the function to calculate phase.