Circuit Note
Devices Connected/Referenced
AD7124-8
AD8628
Circuits from the Lab® reference designs are engineered and
tested for quick and easy system integration to help solve today’s
analog, mixed-signal, and RF design challenges. For more
information and/or support, visit
www.analog.com/CN0411.
ADG836
AD8220
ADG884
ADG1608
AD5683R
8-Channel, Low Noise, Low Power, 24-Bit,
Sigma-Delta ADC with PGA and Reference
Zero-Drift, Single-Supply, RRIO Op Amp
0.5
Ω
CMOS, 1.65 V to 3.6 V Dual SPDT/2:1
MUX
JFET Input Instrumentation Amplifier with Rail-
to-Rail Output
0.5 Ω CMOS Dual 2:1 MUX/SPDT
4.5 Ω RON, 8-Channel ±5 V, +12 V, +5 V, and
+3.3 V Multiplexer
Tiny 16-Bit SPI
nanoDAC+,
with ±2 (16-Bit) LSB
INL and 2 ppm/°C External Reference
CN-0411
TDS Measurement System for Water Quality Monitoring
EVALUATION AND DESIGN SUPPORT
Circuit Evaluation Boards
CN-0411 Circuit Evaluation Board (EVAL-CN0411-ARDZ)
ADICUP360 Development Board (EVAL-ADICUP360)
Design and Integration Files
Schematics, Layout Files, Bill of Materials, Software
CIRCUIT FUNCTION AND BENEFITS
The total dissolved solids (TDS) present in a water system is
composed of inorganic salts and small amounts of organic
matter that are dissolved in water, and is an important measure
of water quality. TDS can be derived from the electrical
conductivity (or conductivity) of the solution by a factor
dependent on the properties, temperature and, number of ions
present. By measuring the conductivity of the solution,
determining the TDS of the system is faster, economical, and
less complicated in contrast to the more accurate gravimetric
method. The latter method involves evaporating the water and
weighing the residue, which is applicable in laboratory settings
but impractical in the field.
The circuit shown in Figure 1 is a TDS measurement system
based on the conductivity of the solution. This design uses a
combination of components that allow for single-supply
operation, which minimize circuit complexity, making this
suitable for low-power and portable instrument applications.
The simplest method of measuring the conductivity of the solution
uses a 2-wire conductivity cell. Conductivity measurements
require temperature compensation for measurements taken at
temperatures other than 25˚C (or other reference temperature).
This system can reference the conductivity measurement to
room temperature using either a 100 Ω or 1000 Ω, 2-wire
resistance temperature device (RTD) and can accommodate
2-wire conductivity cells of various cell constants and operating
parameters.
The capacitance and polarization effects of the electrodes in the
conductivity cell require that the excitation signal be a bipolar
square wave with a sufficiently high frequency to reduce
polarization effects but also with sufficiently long periods to
reduce capacitance effects. To avoid damaging the conductivity
electrodes, the signal must have a very low to zero dc offset and
magnitude.
The circuit can measure the range of conductivity values from
1 µS to 0.1 S. A multiplexer switches between seven precision
resistors of different values to set the gain when measuring the
conductivity probe signal. The system can automatically
determine the gain setting of the conductivity measurement
through an auto-ranging procedure implemented in software.
The system can also be calibrated in the high conductivity range
to increase its accuracy
Rev. 0
Circuits from the Lab reference designs from Analog Devices have been designed and built by Analog
Devices engineers. Standard engineering practices have been employed in the design and
construction of each circuit, and their function and performance have been tested and verified in a lab
environment at room temperature. However, you are solely responsible for testing the circuit and
determining its suitability and applicability for your use and application. Accordingly, in no event shall
Analog Devices be liable for direct, indirect, special, incidental, consequential or punitive damages due
toanycausewhatsoeverconnectedtotheuseofanyCircuitsfromtheLabcircuits. (Continuedonlastpage)
One Technology Way, P.O. Box 9106, Norwood, MA 02062-9106, U.S.A.
Tel: 781.329.4700
www.analog.com
Fax: 781.461.3113
©2018 Analog Devices, Inc. All rights reserved.
CN-0411
U3
AD7124-8
CS
DOUT/RDY
DIN
SCLK
DGND
AIN0/IOUT
U1
AD5683R
R28
3kΩ
AIN1
SDI
SCLK
VOUT
VDAC
P3
RTD
C15
1nF
AIN6
R29
3kΩ
3.3VD
SYNC
VREF
VREF
C14
1nF
C16
0.01µF
R31
4.02kΩ
ADICUP360 HEADERS
POWER, ANALOG,
DIGI0, DIGI1
GAIN
RESISTORS
U5
ADG1608
EN
3.3VA
VSS/GND
D
A0
VDD
A1
S8
S7
S6
S5
S4
S3
A2
S2
S1
R29
3kΩ
5V
U4
TXB0108PWR
5V
IOREF
IOREF VCCA
P0.4 or P0.5
P0.4 or P0.5
MISO1
MISO1
MOSI1
P3
P2
P1
MOSI1
SCLK1
SCLK1
P0.5 or P1.0
PWM3
PWM2
PWM1
P0.5 OR P1.0
P1.4
P1.4
P1.3
P1.3
3.3VA
–
16186-001
Figure 1. Total Dissolved Solids Measurement System Simplified Schematic
R45
1kΩ
U7
ADG836
IN1
IN1
D1
S1A
S1B
D2
S2A
–
3.3VA
S2B
3.3VA
VDD
GND
GAIN = 10
REF
+
A1
AD8220
R42
150Ω
IN2
IN2
S1A
D1
S1B
S2A
D2
VDD
S2B
GND
R44
150Ω
–
3.3VA
R46
1kΩ
R43
150Ω
C32
47µF
U5
ADG884
5V
+
A2
AD8628
J1
CONDUCTIVITY
CELL
+
C31
47µF
U2
ADP7102ARDZ-3.3
5V
VIN
EN
GND
VOUT
SENSE_ADJ
E1
330
3.3VD
3.3VA
A3
AD8628
Rev. 0 | Page 2 of 12
P1.2
P1.2
C9
1000pF
AIN7
AIN8
IOVDD
3.3VD
3.3VA
VDAC
VREF
AVDD
AIN9
REFIN2(+)
REFIN2(–)
C12
1nF
AVSS
GND
Circuit Note
Circuit Note
CIRCUIT DESCRIPTION
Conductivity and Total Dissolved Solids Theory
The TDS in a solution is largely composed of inorganic salts
that separate into ions in the presence of a polar solvent like
water. When a potential is applied to the solution via two
electrodes, the movement of the ions constitutes a current that,
when there is negligible electrolysis, obeys Ohm’s law. The
resistance, R, of the solution can then be calculated by
Equation 1.
=
R
V
ρ
L
=
I
A
CN-0411
ordinary instruments. By choosing a conductivity cell with an
appropriate cell constant, the range of conductivity measurement
can be extended. Conductivities less than 0.1 µS/cm can be
measured at a lower conductance by using a conductivity cell
with a lower cell constant. Conversely, conductivities greater
than 0.1 S/cm can be measured at a higher conductance by
using a conductivity cell with a higher cell constant. Typical
values of the cell constant used for a corresponding range of
conductivity measurement is shown in Table 1.
Table 1. Conductivity Cell Constants and the Range of
Conductivity
Cell Constant
0.01
0.1
1
10
Range of Measured Conductivity
< 0.1 µS/cm
0.1 µS/cm to 100 µS/cm
100 µS/cm to 10 mS/cm
10 mS/cm to 1 S/cm
(1)
where:
V
is the potential difference applied to the two electrodes.
I
is the measured current across the two electrodes.
ρ is the resistivity of the material in Ω cm.
L
is the distance between the two electrodes.
A
is the area of the electrodes.
The conductance, G, is the reciprocal of resistance and
measured in Siemens (S), and conductivity, Y, is the reciprocal
of resistivity and measured in S/cm, mS/cm, or µS/cm.
Rearranging Equation 1, the conductance can be obtained from
the potential across the two electrodes and the current through
them. Conductivity is the conductance multiplied by a factor
related to the geometry of the electrodes (see Equation 2).
Each conductivity cell has a rated excitation voltage, which
must not be exceeded so as not to damage the electrodes. Do
not apply a dc voltage to any of the electrodes.
Dielectric Properties
Polarization and the dielectric properties of the solution
primarily affect the accuracy of the measured voltage signal
across and the current through the conductivity cell.
Polarization arises from the accumulation of ions and the
chemical reactions that occur near the electrode surface. The
dielectric properties of the solution contribute to a frequency-
dependent impedance and interelectrode capacitance. A
technique used to maximize the accuracy of the conductance
measurement uses a bipolar pulse excitation. An excitation
voltage +V
EXC
is applied for time t
1
then the opposite excitation
voltage −V
EXC
is applied for time t
2
. Also, t
1
and t
2
, and +V
EXC
and −V
EXC
must be equal with no greater than 1% difference in
duration and magnitude, respectively. The frequency of the
signal (t
1
+ t
2
)
−1
must be adjusted to the range of conductance
measurement. Typically, this is 94 Hz in the µS range and
2.4 kHz in the mS range. These frequencies are compromises
that minimize the effect of interelectrode capacitance, while
preventing the accumulation of ions on the electrode surface.
L
I
Y
= ×
G
,
G
=
A
V
(2)
Typically, conductivity is measured using a 2-electrode sensor
called a conductivity probe or conductivity cell. An excitation
voltage is applied to the conductivity cell while it is immersed in
the solution as shown in Figure 2.
V
I
A
L
A
16186-002
Conductivity Measurement
The front-end of the conductivity measurement can be
simplified to a voltage divider network as shown in Figure 3.
V
EXC
A
R
GAIN
B
R
COND
16186-003
Figure 2. Conductivity Cell in Solution Setup
The conductivity cell constant or simply cell constant, K
CELL
, is
the ratio of the gap between its two electrodes and the area of
each electrode, which shortens Equation 2 to Equation 3. The
cell constant has a unit of cm
−1
but the unit may be omitted by
manufacturers of conductivity probes.
Y
=
K
CELL
×
G
(3)
The typical measurement system computes conductance from
the current and voltage readings. Since the conductivity range
of values is very large, measuring conductance at the extremes
(values less than 1 µS and greater than 0.1 S) can be difficult for
C
Figure 3. Simplified Conductivity Schematic as Two Series Resistors
R
GAIN
sets the magnitude of the voltage across and current
through the conductivity cell and solution simplified as R
COND
.
Rev. 0 | Page 3 of 12
CN-0411
Node B and Node C are constantly switched to impose a bipolar
square wave across R
COND
. A multiplexer switches between
different gain resistors in Node A.
The applied excitation voltage at Node A to the voltage divider
is generated using
AD5683R,
a 16-bit SPI voltage digital-to-analog
converter (DAC). This allows the magnitude of the square wave
signal applied to the voltage divider to be user-configurable.
Choose the excitation voltage to maximize the signal while not
exceeding the probe’s ratings. By default, the software applies
0.4 V excitation. The
AD5683R
is also by default the source of
the system’s 2.5 V reference voltage, but can also be configured
to accept an external reference voltage.
V
EXC
Circuit Note
The conductivity cell is switched to impose a bipolar signal
across it using an
ADG884
as shown in Figure 6. The
ADG884
has 0.5 Ω typical on-resistance and is operating at a single 3.3 V
supply. The switching is controlled by a PWM signal from the
microcontroller board. The frequency of this signal is user-
configurable to 94 Hz for low conductivity measurements and
2.4 kHz for high conductivity measurements.
PWM1
U5
ADG884
IN1 IN2
PRB+
D1
S1A
S1B
PRB–
D2
S2A
S2B
GAIN
RESISTORS
U5
ADG1608
EN
S8 S7 S6 S5
S4 S3 S2 S1
A2
A1
D
B
TO CONDUCTIVITY CELL SWITCHER
AND INSTRUMENTATION AMPLIFIER
A0
P3
P2
P1
C
B
TO GAIN MUTIPLEXER
AND
INSTRUMENTATION AMPLIFIER
16186-006
3.3VA
VDD GND
Figure 6. Conductivity Cell Switcher to Simulate Bipolar Pulses Across the
Conductivity Cell Using
ADG884
3.3VA
VDD
VSS/GND
Figure 4. Multiplexing Gain Resistors
Figure 4 shows the gain setting resistors and switch, where R1 =
20 Ω, R2 = 200 Ω, R3 = 2 kΩ, R4 = 20 kΩ, R5 = 200 kΩ, R6 =
2 MΩ, R7 = 20 MΩ and P1, P2, and P3 are GPIO outputs from
the
AD7124-8.
The circuit has a usable conductance range of 1 µS to 1 S. The
voltage divider of the conductivity cell scales through these ranges
by switching between seven gain resistors using
ADG1608
as
shown in Figure 4. The
ADG1608
is an 8-channel multiplexer
with a typical on-resistance of 12.5 Ω when operating at a single
5 V supply. This on-resistance is significant when the conductivity
measurement is in the 20 to 200 Ω range. Pin S2 and Pin S3 of
the
ADG1608,
which connect to the 20 Ω and 200 Ω gain resistors,
respectively, are also connected to two input channels of the
analog-to-digital converter (ADC). The system can also be
configured to perform an initial calibration for measurement
errors in the 20 and 200 Ω range. Shown in Figure 5 is a 3-option
(6-pin) jumper selection header (P5), which connects to 20 Ω
and 200 Ω precision resistors. Shorting Pin 1 and Pin 2 configures
the system to measure the signal across the conductivity cell while
shorting Pin 3 and Pin 4 or Pin 5 and Pin 6 configures the
system to measure the signal across the precision resistors.
PRB+
P5
2
4
6
CONDUCTIVITY PROBE
BNC CONNECTOR
20Ω
200Ω
16186-005
The signal across the conductivity cell is amplified by a gain of 10
using the
AD8220
low input bias current instrumentation
amplifier operating at a single 5 V supply with input signals up
to 0.25 V as shown in Figure 7. There is also a user-configurable
jumper selector P6, which provides for a system zero-scale
calibration.
5V
B
A1
AD8220
GAIN = 10
REF
–
16186-004
+
SAMPLE-AND-HOLD
INPUT SIGNAL
C
Figure 7.
AD8220
Instrumentation Amplifier
The output of the instrumentation amplifier passes through two
parallel sample-and-hold circuits. As shown in Figure 8, the
sampling of the
AD8220
output is controlled by the
ADG836,
a
dual SPDT switch, which has low charge-injection and is operating
at a single 3.3 V supply with input signals of up to 2.5 V.
PWM3
PWM2
–
U7
ADG836
INSTRUMENTATION
AMPLIFIER
OUTPUT
SIGNAL 150Ω
IN1 IN2
D1
D2
3.3VA
S1A
S1B
S2A
S2B
150Ω
–
+
47µF
A3
AD8628
3.3VA
1kΩ
1nF
150Ω
+
47µF
A2
AD8628
V
OUT, A2 OR
POSITIVE
CONDUCTIVITY
SIGNAL
3.3VA
1kΩ
1nF
1
3
5
VDD GND
16186-007
PRB–
Figure 5. Conductivity Cell Connection
Rev. 0 | Page 4 of 12
Figure 8. Sample-and-Hold Design Using
ADG836
and
AD8628
16186-008
V
OUT, A3 OR
NEGATIVE
CONDUCTIVITY
SIGNAL
Circuit Note
The switch connects the two parallel sample-and-hold circuits
using PWM1 and PWM2 at the middle of the positive and
negative cycles of the main PWM1 signal. The switching
diagram for the three PWM signals and the voltage across the
conductivity cell is shown in Figure 9.
This sampling method decreases the electrode capacitance
effects at the beginning of the PWM1 signal state change as well
as the electrode polarization effects occurring at the end of each
state. This causes the output of the sample-and-hold circuit to
be two dc levels corresponding to ten times the positive and
negative voltage values across the conductivity cell, respectively.
The maximum charge injection due to the switching is 40 pC,
which constitutes an error of 40 pC ÷ 47 µF ≈ 851 nV. The worst
case drop voltage is the product of half the period of the low
frequency switching and the droop rate, which is the worst-case
leakage current of the
ADG836
and the worst-case bias currents
of the
AD8628
divided by the hold capacitance. As shown in
Equation 4, this drop voltage is theoretically 23 nV.
CN-0411
V
OUT
,
A
2
or
A
3
=
ADC
CODE
×
V
REF
10
×
2
24
−
1
(
)
(5)
where:
ADC
CODE
is the 24-bit unipolar code of the signal sample.
V
REF
is by default 2.5 V.
Equation 6 shows the calculation of the peak-to-peak voltage
across the conductivity cell from the
AD8628
output voltages.
V
COND,PP
= 0.1 ×
V
OUT,A2
+ 0.1 ×
V
OUT,A3
The current through the conductivity cell can be calculated
from the peak-to-peak cell voltage, gain resistance, and
excitation or DAC voltage using Equation 7.
I
COND
,
PP
=
2
×
V
DAC
−
V
COND
,
PP
R
GAIN
(6)
(7)
The conductivity Y
SOL
of the solution is given by Equation 8.
=
V
DROP
(
0.2 nA
)
×
(
5.32 ms
)
≈
23 nV
47
µ
F
=
K
CELL
×
Y
SOL
I
COND
,
PP
V
COND
,
PP
(8)
(4)
where
K
CELL
is the conductivity cell constant.
Substituting Equation 7 and Equation 8 into Equation 9 yields
the following equation:
The outputs of A2 and A3
AD8628
buffer amplifier are applied
to the single-ended ADC
AD7124-8
input channels, AIN7 and
AIN8, respectively. These input channels are referenced by
default to the AD5683 reference voltage.
AD7124-8
is user-
configurable to perform either single or continuous sampling. It
is also user-configurable to perform a system zero-scale
calibration using the selectable precision resistors in P5 or read
the multiplexer on-resistance using the input channels from the
20 Ω and 200 Ω gain resistors.
The positive and negative output voltages is computed from the
24-bit unipolar ADC code using Equation 5.
PRB+ = V
EXC
CONDUCTIVITY
CELL
VOLTAGE
POSITIVE
CELL VOLTAGE
TIME
Y
SOL
=
K
CELL
×
1
R
GAIN
2
×
V
DAC
×
−
1
0.1
×
(
V
OUT
,
A
2
+
V
OUT
,
A
3
)
(9)
Equation 9 shows that the conductivity measurement depends
on the conductivity cell constant, the excitation voltage, the gain
resistance used and the sum of the two voltage outputs of each
sample-and-hold channel.
PRB– = V
EXC
PWM0 SIGNAL
POSITIVE
VOLTAGE
SAMPLE
TIME
NEGATIVE
CELL VOLTAGE
TIME
POSITIVE VOLTAGE
HOLD TIME
PWM1 SIGNAL
PWM2 SIGNAL
NEGATIVE VOLTAGE
HOLD TIME
16186-009
NEGATIVE
VOLTAGE
SAMPLE
TIME
Figure 9. Conductivity Cell Voltage and PWM Signals Switching Diagram
Rev. 0 | Page 5 of 12