MA Finn Jannek Klar
MA Finn Jannek Klar
MA Finn Jannek Klar
Author
Finn Jannek Klar
December 9, 2021
at
Task Description
For marine and climate research, the measurement of ocean currents is essential. The
density of water, i.e., the salinity and the temperature, strongly influence current veloci-
ties. The high-precision measuring instruments used in oceanography to determine
density are often expensive and difficult to use. The Institute of Mechatronics is working
on a simple, low-cost sensor buoy in the IoT standard, enabling a high quantity of mea-
surements and thus providing measurement data with higher spatial resolution. One
of the major hurdles is the reliable long-term determination of salinity by conductivity
sensors.
At the beginning of the master thesis, the thematic familiarization and the understand-
ing of the existing concepts and sensor models are carried out. Based on an existing
sensor design, an optimized implementation should be developed, which includes
the electrical design of the sensor coils, the measuring circuit’s implementation, and a
housing design for productions in larger quantities. The master thesis should result in a
complete manufacturing concept for a low-cost inductive conductivity sensor, forming
the basis for series production. In addition to excitation, sampling, and conversion, the
integrated measuring circuit should also contain a microcontroller for which suitable
calibration and evaluation software is programmed.
Statutory Declaration
I declare that I have prepared my Master Thesis with the title
1 Introduction 1
4 Implementation 26
4.1 Physical Sensor Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1.1 Voltage Reference for ADC and DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1.2 Dimensioning TICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1.3 Gate Driver and Measurement Circuit for TICS . . . . . . . . . . . . . . . . . . 27
4.1.4 DC-DC Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.1.5 Sensor Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.1.6 PCB Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2 Software Design - Principle of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2.1 Calibration Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2.2 State Machine Sensor Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2.3 UART Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2.4 DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.2.5 ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.3 System Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.3.1 Test of Shielding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
i
Contents
A Appendix 51
A.1 Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A.2 Bill of Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
A.3 Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
A.4 Determination of Desired Sensor Resolution . . . . . . . . . . . . . . . . . . . . . . . . . 57
A.5 Equation for TICS Sensor Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.6 Influence of k on frequency response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
A.7 Effect of Mutual Coupling in Range of MHz . . . . . . . . . . . . . . . . . . . . . . . . . . 63
A.8 Simplifications on k-Factor impact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
ii
List Of Symbols
Symbol Quantity Unit
A Area m2
C Capacity F
k cell Cell constant
k sensor Sensor constant
K 15 Conductivity ratio at 15 °C and 1 ATM
κ Conductivity mS cm−1
Rr Conductivity ratio
I Current A
R Electrical resistance Ω
L Inductance H
M Mutual inductance H
l length m
P Power W
p Pressure dbar
T Temperature °C
N Turn number of coil
f Frequency Hz
Rm Magnetic resistance A V−1 s−1
k Mutual coupling factor
S Practical salinity
ω Angular velocity rad s−1
U Voltage V
iii
1 Introduction
1 Introduction
The consequences of progressive climate change are becoming increasingly apparent.
Heavy rainfall events [33] and cold snaps [12] due to a changing jet stream are the most
recent consequences.
A study [6] from August 2021 shows a gradual weakening of the Atlantic Meridional
Overturning Circulation toward a critical transition. Its influence play an essential role
in the Earth’s climate [7] through ocean meridional heat transport. This meridional
overturning circulation is prone to changes in salinity [13].
So far, only satellites allow high spatial resolution. However, since satellite data are
less accurate compared to in situ data, the demand for acquisition with a high spatial
resolution is given. Therefore, developing low-cost conductivity sensors to determine
salinity in the surface water is of interest.
This thesis begins with a brief introduction to conductivity, salinity, and possible sensor
setups for conductivity measurements in marine waters with Section 2.
The second part covers a concept and solution design. Within this framework, functional
decomposition of conductivity measurement is conducted. Challenges are analyzed,
and solutions are developed based on the sub-functions in Section 3.
The fourth part covers the software. The verification of designed hardware requires
test functions discussed in this section. The operation, calibration, and measurement
description conclude this chapter.
1
2 Fundamentals and State of the Art
κ = neµe . (1)
l
R= (2)
κA
applies.
The term salinity S (also referred to as S P ) used in this document refers to the ’Practical
Salinity 1978’ for seawater by the Joint Panel on Oceanographic Tables and Standards
(JPOTS), which is also known as Practical Salinity.
Salinity S is defined on the electrical conductivity ratio K 15 of sampled seawater to that
of potassium chloride (KCl) solution. This solution contains 32.4356 gKCl in 1 kg of the
solution. K 15 requires sampling of seawater and KCl solution at 15 °C and the pressure
of one standard atmosphere. By definition, a value of K 15 =1 corresponds to S=35. [20]
[32, p. 43]
UNESCO states in the report the International system of units (SI) in oceanography ([32,
p. 44]) Practical Salinity is a ratio of two electrical conductivity. Thus its unit has no
dimension.
The International Thermodynamic Equation Of Seawater - 2010 (TEOS-10) is the latest
approach to the calculation of thermodynamic properties of seawater. This approach
uses newer definitions of salinity. Continuing in using Practical Salinity ensures conti-
nuity in national and international databases. [11, p. 4, 10]
2
2 Fundamentals and State of the Art
Lewis ([20]) and UNESCO ([11, p. 147]) provide the formulae for in-situ measurement.
In contrast to the definition of S based on the ratio K 15
κ(S,15 °C ,0)
K 15 = , (4)
κ(35,15 °C ,0)
4
c i (T )i
X
rr T = (6)
i =0
3
2 Fundamentals and State of the Art
P3 i
i =1 e i p
Rr p = 1 + . (7)
1 + d1 T + d 2 T 2 + R r (d 3 + d 4 T )
With R r T being
Rr
Rr T = , (8)
Rr p r T
5 T − 15 5
a i (R r T )i /2 + b i (R r T )i /2 .
X X
S= (9)
i =0 1 + k(T − 15) i =0
These formulae are valid within the range -2 °C≤ T ≤35 °C, 0 ≤ p ≤ 10000 dbar, and
2 < S < 42. The TEOS-10 website ([28]) holds functions (in MATLAB/C/Others) for
calculations in the context of PSS-78. The documentation lists the reference conductivity
κ(35,15,0) to be
d φ21 d i1
u 2i nd = − = −L 21 . (11)
dt dt
The induced voltage causes a current flow in the second conductor loop. This also
generates a magnetic flux, namely φ22 . The part which flows through the first coil is φ12 .
The described case is formally described in an extended form by
4
2 Fundamentals and State of the Art
(a) (b)
Figure 1: Electromagnetic induction: Coupled circuits by [2, p. 251] (a); Coupled circuits with
opposing flows according to [2, p. 253] (b).
d ¡ d i1 d i2
φ11 − φ12 = R 1 i 1 + L 11
¢
u1 = R1 i 1 + − L 12
dt dt dt (12)
d ¡ d i2 d ii
φ22 − φ21 = R 2 i 1 + L 22
¢
u1 = R2 i 2 + − L 21 .
dt dt dt
A more detailed description of induction can be found in [2, pp. 250-254]. In the marine
application, the water acts as the second circuit, and ferrite cores are used to generate an
increased1 magnetic flux. Since the path of the ionic current i 2 = i w is not known in the
water, Equation (2) is simplified. A cell constant k cell replaces the unknown dimensions
linking resistance R w and conductivity according to
lw k cell
Rw = = . (13)
κA w κ
Applications with three involved conductor loops exist (Figure 2). This is interesting for
applications where the exciting signal is many times larger than the influence of the
mutual inductance.
Striggow et al.. discussed in [14, 15] different setups for conductivity sensors used
in oceanographic work. Among the group of sensors feasible for the task, capacitive
sensors and sensors requiring exposed electrodes are affected by polarization and
1
Compared to a magnetic flux without ferrite cores
5
2 Fundamentals and State of the Art
fouling, reducing long-term stability. Inductive sensors used for in-situ measurements
do not require physical contact with the electrolytic solution. The permeability of the
required transformer core(s) is variable to temperature and pressure. Striggow et al..
performed a theoretical analysis of three different inductive sensor models.
A single transformer consists of a toroid core with one coil made of wire, the surrounding
liquid forming the second coil. Sensor output current I 1 derived in [14] is
à !
1 1
I1 = + U 1, (14)
N 21 R w j ωL 1
where N 1 is the number of turns of the primary coil, R w the water resistance, L 1 the
self-inductance of the primary coil, and U 1 the primary voltage. The real part of sensor
output is free of influence from changes in permeability.
Striggow et al.. [14] suggested six different approaches to achieve a reading of the water
conductivity. These require either multiple measurements simultaneously, the precise
matching of electrical components, or a rectangular input voltage combined with timed
measurements on the sensor signal.
Two transformers linked through a water loop (Figure 3) form a double transformer.
The water acts as a secondary coil at the first transformer and as a primary coil at the
second. If the only coupling of these transformers is by the water loop (Figure 4), the
sensor output signal U 4 is linked to R W by
N4 1
U4 = ³ ´U 1 . (15)
N 1 1 + N 2R 1
+ 1
4 W RR j ωL 4
6
2 Fundamentals and State of the Art
Indices of number four correspond to the secondary coil of the second transformer. By
shunting terminating resistor R R a short-circuit current I 4,S independent of inductance
L 44 is achieved:
1
I 4,S = lim (U 4 /R R ) = U 1. (16)
R R →0 N 1 N 4R W
Figure 4: Circuit of the double transformer for conductivity measurement according to [14]
Striggow et al.. ([14, 15]) analyzed a third setup based on the double transformer with an
additional loop, such that water loop and additional loop work in push-pull operation
(Figure 5).
The sensor output signal based on the circuit (Figure 6) with an additional loop resistor
R C is
N4 1 RC − RW
U4 = ³ ´ U 1. (17)
N1 1+ N2 R W ·R C 1
+ 1 RC + RW
4 R W +R C RR j ωL 4
Depending on the design of the loop resistor, different behaviors of the sensor come to
use. In terms of short-circuit current
7
2 Fundamentals and State of the Art
Figure 6: Circuit of the double transformer with additional loop according by [14]
à !
1 1 1
I 4,S = lim (U 4 /R R ) = − U 1. (18)
R R →0 N 1N 4 RW RC
A change of R W can be interpreted as a shift of the conductivity zero point. Other ap-
proaches use a tuned capacitance to decouple the phase shift of primary and secondary
voltage (open-circuit operation, R R = ∞) or secondary current from the primary voltage
(short-circuit operation, R R = 0) from the inductance.
The presented approaches use simplifications such as neglecting coil resistance and
direct coupling of the two coils. In the course of this thesis, a sensor based on the
double transformer model will be developed. Section 3.3.2 discusses the impact of those
simplifications and the effects of differential shielding and wire resistance.
8
3 Concept and Solution Design
3.1 Requirements
A production-ready inductive conductivity sensor of low costs and low power consump-
tion will be developed for long-term use in surface waters on a low-cost sensor buoy.
Converting conductivity measurements to Practical Salinity using the formulas pre-
sented in Section 2.2 requires temperature readings. An additional temperature sensor
provides these readings. Therefore, it is anticipated that the conversion of temperature
data and conductivity values will be performed externally (on the buoy).
The sea surface temperature of the oceans ranges between -2 °C and 35 °C [24]. The
required conductivity measurement range is determined to be 2 mS/cm to 75 mS/cm
(Table 32 ).
2
’gsw_C_from_SP.m’, [28]
9
3 Concept and Solution Design
3.3 Concepts
The following sections govern the previously identified sub-functions in more detail. A
closer look reveals requirements and possible solutions. The conclusions at the end of
10
3 Concept and Solution Design
Section 2.3 shows different approaches to eliminate the influence of changing core
permeability on the sensor signal on different setups of TICS due to pressure and
temperature effects. The expected spectrum of the noise is not known. Evaluating
the measurement signal in the frequency domain allows an almost noise-free analysis.
This evaluation requires a sensor signal of known frequency. Striggow and Dankert
propose an approach on using a rectangular input voltage to bypass the influence of
core permeability on the output signal [14, p. 31]. The sensor integrates this voltage
into a ramped sensor output current, forming a sawtooth signal that jumps according
to the input voltage. Changes in permeability do not influence the constant section of
the rectangular signal. The peaks of this function correspond to the conductivity of the
solution. Evaluating the peaks in the signal in the time domain is prone to noise.
Another option is to use a sweep. An extended view of the transmission channel TICS in
the frequency domain shows that the phase has an intolerable error due to temperature-
induced permeability changes. For this reason, and because a noise-corrected peak-to-
peak evaluation of the signal is sufficient (see Equation (16)), a sweep is omitted. Bode
plots and figures showing the phase error can be found in the appendix in Section A.6
Figure 47.
The signal required for excitation of TICS other than the single transformer version
requires a sinusoidal wave. Previous publications on TICS ([16, 17, 25]) uses excitation
signals of frequencies ≤30 kHz. A sine wave signal can be generated using various
methods.
Analog Oscillator
An analog circuit can generate an oscillating signal. Therefore a feedback system of loop
gain ≥ 1 and phase rotation of zero or multiple of 2π is required [19, p. 459]. Reducing
the loop gain of the circuit to one at the desired frequency by additional circuitry shown
in [19, p. 460] locks the oscillation amplitude. This approach requires a hardware design
of oscillating circuit and amplitude regulating circuit. Figure 8 displays a setup for a
Wien-bridge oscillator.
Square Wave
Another option to generate a sine wave is filtering a square wave of the desired frequency,
according to the Fourier-Series ([19, p. 285])
a0 X∞ ¡ ¢
f (t ) = + a n cos(nωt ) + b n si n(nωt ) , (19)
2 n=1
11
3 Concept and Solution Design
using
1
Z π 1
Z π 1
Z π
a0 = f (t ) dt , a n = f (t )cos(nωt ) dt , b n = f (t )si n(nωt ) dt (20)
π −π π −π π −π
4h X∞ si n((2n − 1)ωt )
f (t ) = . (21)
π n=1 2n − 1
Thus, a low-pass filter with a cut-off frequency a little above the desired frequency can
be used to attenuate multiples of the base frequency. Such a low-pass filter of higher
order is implemented by lining up RC-low-pass filters. A timer altering an output port
of an MCU generates the desired square wave.
PWM Signal
Tsai ([31]) shows the generation of a sine wave using a low-pass filter on a modulated
12
3 Concept and Solution Design
PWM signal. An MCU continuously generates a time-varying PWM. The pulse width is
determined according to n sample points of a sine wave and a low-pass filter is used to
get a sine wave. According to the application report, the frequency of the desired signal
f O depends on the number of samples n and the PWM frequency F PW M
F PW M
fO= . (22)
n
Conclusion
The methods presented are compared below in three categories. These are the require-
ments for the circuit design and the resource requirements of an MCU. Finally, the
possibility to change the frequency in retrospect to hardware implementation is of
interest.
Among the five signal generation methods presented, the first three require an electrical
circuit tailored to generate the desired signal. The analog oscillator demands the most
on circuit design because of the need to limit amplitude at the desired frequency. In the
13
3 Concept and Solution Design
case of DAC-based signal generation (AWG and DDS), a low pass filter for smoothing is
mandatory. The analog oscillator does not require any resources of the MCU. Among the
remaining solutions, the generation of a square wave signal requires the least resources.
Assuming that the generation of a PWM only requires the input of the pulse width and
the DAC only receives the digital value, PWM, AWG and DDS requires a similar amount
of resources. With assembled hardware, solely AWG, and DDS allow the signal frequency
to be changed. Considering AWG and DDS being the most feasible choices for signal
generation (Table 5), AWG is chosen as the architecture of DDS is more complex to
implement (compare Figure 10 and Figure 11).
The sensor output current of the double transformer is free of the effect of perme-
ability and proportional to water conductivity (Equation (16)). A shift of conductivity
zero-point introduced by an additional loop (Equation (18)) requires matching of loop
resistance and increasing the sensor complexity. Thus the use of a double transformer
similar to those in previous works ([8, 16, 17, 34]) is continued.
Simulation Data
This subchapter contains simulations of ETICS models. The model used for the sim-
ulation is based on the setups in [16, 17]. Table 6 lists the parameters used. The cell
constant depends on the flow of ionic current in the water. Since this expression is
unknown, the simulations in this section use a cell constant of unity.
14
3 Concept and Solution Design
Simplifications on TICS
Theoretical analyses done by Striggow et. al [14] (Section 2.3) used in [17] neglect
the resistance of the coils. A comparison of the systems described by current I 4,S in
Equation (16) and a less simplified equation for I 4,S (see Section A.5) is performed in
MATLAB.
Figure 12 displays the bode plot for the simplified system and non simplified systems
with coil cores of different permeability. The effect of coil resistance is with a maximum
impact of -0.01 dB considerable low. The analysis of a system exposed to temperature
changes similar to those of a field application show that the effect of the coil wire
cannot be neglected (Figure 13). An maximum absolute error of 0.04 % corresponds to a
deviation of 30 µS/cm, which is below the required accuracy in Table 4. A temperature
compensation in software can reduce the offset.
15
3 Concept and Solution Design
Magnitude (dB)
-10
-20
-30
-40
-50
3
simplified
_r=10000
Phase (deg)
2 _r=2200
0
103 104 105 106
Frequency (rad/s)
The amplitude of the sensor signal (Equation (16)) is reciprocally influenced by the
winding numbers of the coils. The equations Equation (23) and Equation (24) given
in [17] can be used to describe the power consumption of the double transformer
sensor (Figure 4). The assumptions R R = 0, R 1 << j L 1 ω, R 4 << j L 4 ω, N 2 = N 3 = 1, and
k 12 = k 34 = 1 are applied and the inductance are transformed according to Equation (52)
and Equation (53) (see Section A.5). The result is Equation (25). Therefore reducing N 1
has the greatest effect on lowering the power consumption of TICS.
A
I1 = U1 (23)
A R 1 + j L 1 ω + M 212 ω2
¡ ¢
M 234 ω2
+ R W + j L2ω + j L3ω
¡ ¢
A= (24)
R R + R 4 + j L4ω
16
3 Concept and Solution Design
80 0.05
=0 °C =0 °C/ =20 °C
70 =20 °C =40 °C/ =20 °C 0.04
=40 °C
0.03
60
0.02
50
Error (%)
I 4,S (mA) 0.01
40
0
30
-0.01
20
-0.02
10 -0.03
0 -0.04
0 10 20 30 40 50 60 70 80
Conductance (mS/cm)
Figure 13: Relative error on the sensor output current due to changes in temperature
Figure 14: TICS with different shieldings: No shielding (a); Plate (b); Outer cup (c); Cup (d).
ω − j R W Rm
I1 = U1 (25)
N 21 R W ω
17
3 Concept and Solution Design
70 70
60
60
50
Error (ppm)
I 4,S (mA) 50
40
40
30
M14=0
M14 (no shield)
30
20
M14 (plate)
diff (no shield)
10 diff (plate)
20
0 10
0 10 20 30 40 50 60 70 80
Conductance (mS/cm)
j M 12 ω
I2 = − I 1, (26)
A
j M 34 ω
I4 = − I 2, (27)
R R + R 4 + j L4ω
and previously used Equation (23) and Equation (24). MATLAB’s symbolic toolbox is
used to simplify the term obtained by merging the listed equations (Section A.8). The
result is
j R m k 12 k 34
I4 = U1 . (28)
N 1 N 4 (k 212 ω + k 234 ω − 2ω + j R W R m )
This relationship shows a quadratic influence of the coupling factor, which increases at
higher frequency. For the k-factors equal to one, the sensor current in Equation (16) is
obtained. Since the effect of the k-factors does not scale with the water conductivity,
a compensation is not required. The effect on drive current (Equation (23) contains
M 12 and M 34 ) and sensor current is relevant for sensor design. Figure 16 indicates
that calculating circuit design parameters related to the current to and from the sensor
requires the consideration of two different k-factors. Additional plots on the influence
of the k-factors are given in Section A.6, where the optimal frequency f for attenuation
is found to be 10 kHz.
18
3 Concept and Solution Design
100
70
95
60
90
50
I 4,S (mA)
S (mVA)
85
40
80
30
75
20
70
10 0.944
65
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
k
Conclusion
Previous approaches do not consider the impact of coil resistance concerning tempera-
ture changes. A simulation on TICS shows these effects to be of nonlinear behavior to
changes of temperature. These nonlinearities require a temperature-dependent offset
compensation implemented in software. The effects of mutual coupling of the coils are
insignificant for the desired application in the kHz frequency range. The transformer
core with dimensions 25.3x14.8 is best suited for this application. When designing the
electrical circuit, varying loads for different k-factors must be considered.
19
3 Concept and Solution Design
80 250
70
200
60
50
150
I 4,S (mA)
S (mVA)
40
100
30
20
50
10
0 0
.8 3 .8 0 .5 5 .2 .8 .8 4
65 10 14 x2 20 9.0 26 40 40 8x
02x 1 40x
5 . 3x 3 0.5 34x .1 x1 1 .8x 8 . 3x 8 . 3x
1 2 38 4 5 5
Figure 17: Effect of core sizes on sensor signal and required power
The purpose of data acquisition is to convert the analog measurement signal (the current
I 4,S ) into a digital measurement value. The described sensor signal (Equation (15))
changes in reciprocal to conductivity. This behavior suffices a measurement of the
sigla value. Transformation of analog signals to digital signals requires ADC. The input
of ADCs is a voltage [29, p. 1032]. The signal acquisition sub-function consists of a
current-voltage conversion and the subsequent conversion into a digital signal using an
ADC.
Current-Voltage Conversion
The most straightforward approach to conversion is to use a resistor. The voltage across
the resistor is measured. Since the sensor current I 4,S is a short circuit current, this
approach is not applicable.
Striggow and Dankert ([14]) mention the voltage conversion using an inverting amplifier.
This is also used by Kang Hui et al. ([17]) and depicted in Figure 18.
The resistance R M in the feedback-loop can be tuned to increase the signal voltage U R M
to use the full range of the ADC.
ADC
ADCs convert an input voltage into a digital signal. The requirements for the DAC result
from the signal to be measured and the required resolution. The time varying signal
20
3 Concept and Solution Design
requires a sample and hold element ([29, p. 1051]). Since the resolution required in the
application is not defined. Therefore an equal size to accuracy is chosen. This requires
according to [5, p. 152] a resolution of the ADC of
F SR 75 mS/cm
µ ¶ µ ¶
n = l og 2 = l og 2 = 11.08 Bi t → 12 Bi t . (29)
LSB 0.0345 mS/cm
Tietze ([29, p. 1032- 1053]) considers different types of AD converters in terms of op-
eration, speed, and accuracy. ADCs using the parallel method ([29, p. 1035]) and the
dual-slope method ([29, p. 1042]) are not considered because their resolution is too
low. The 12-bit pipelined converters presented in [29, p. 1038] have a power dissipa-
tion of min 85 mW at sampling rates from 80 MS/s. 12-bit ADCs using the weighing
method are listed with power dissipations of min 2 mW and sampling rates from 500
kS/s ([29, p. 1040]). Besides the sampling rate and the power dissipation, the aperture
jitter is essential. This leads to a measurement error, since equidistant samples can no
longer be assumed ([29, p. 1051-1052], [5, p. 137-139]). According to [29, p. 1052], for
the permissible aperture jitter ∆t A , the following applies for a sinusoidal voltage with
amplitude Û
ULSB ULSB
∆t A = = 1
. (30)
Û ωmax 2
U max ωmax
The virtual ground concept (Figure 18) allows theoretic infint gain on converation of
current to voltage. Preceding the following chapter on circuit design, the reference value
of 2.5 V is introduced here. This voltage represents the voltage of a reference voltage
source. In terms of the requirements for the measurement circuit at a maximum signal
amplitude of 2.5 V at 10 kHz frequency, a maximum jitter of a 12-bit ADC is
21
3 Concept and Solution Design
Conclusion
The acquisition of the measured value requires a 12-bit ADC converter with a sample-
and-hold element. Considering the accuracy and the frequency of the measurement
signal, a maximum aperture jitter of 7.7 ns is permissible. Pipeline converters, as well as
the weighing method, are available as the underlying method for the ADC. Due to the
comparatively lower power weighing method based, ADC is preferable.
The next step is to determine the information about the conductivity from the collected
data. Sensor current I 4,S and water resistance R w are proportional (Equation (16)). The
intuitive approach of a peak-to-peak measurement is prone to noise. To reduce the
effect of noise, which is not known at this stage, evaluating the sensor current in the
frequency domain is sufficient. This is advantageous since the exciting voltage is of
known frequency. The amplitude of the frequency coinciding with the frequency of
the excitation contains the necessary information for determining the conductivity. A
constant offset of a periodic oscillation transformed into the frequency domain is a
Dirac pulse at the origin. It thus does not influence the amplitude of the frequency
transformed oscillation [9, p. 345].
For the frequency transformation of discrete-time signals, the discrete Fourier transform
(DFT) with its computationally efficient implementation in the Fast Fourier transform
(FFT) is to be applied [9, p. 258].
The DFT is a derived form of the Fourier series of periodic sequences, and thus periodic
signals can be correctly mapped to the frequency domain [9, p. 262]. The transformation
of non-periodic signals (for example, noise) as well as of periodic signals of frequencies
not covered by the window spanned by N data points, resulting in leakage effects [9,
p. 262]. The spectrum of the FFT is composed of n individual data points. Using the
correlation
n nf s
f = = (32)
NT N
given in [9, p. 259], the frequency is to be extracted from the value of n and the time
interval T = 1/ f s between two sample points. For this N data points are processed,
transformed
22
3 Concept and Solution Design
NX
−1 kn
X [n] = x[k]e− j 2π (33)
k=0 N
1 X ∞ µ
n
¶
X [f ] = X [n] · δ f − , (34)
N T n=−∞ T
given in [9, p. 259]3 . From the restriction on the coverage of entire periods, it follows
that the sampling frequency f s must be an integer multiple of the oscillation under
study. The Nyquist theorem requires a minimum sampling rate of f s ≥ 2 f . The number
of generated data points is
fs
N =x . (35)
f
The factor x is the number of periods of the fundamental signal considered. Different
combinations of x and f s result in the same numerical value. Reducing the number of
samples N reduces computational resources to perform FFT. From Equation (16) and
Equation (13) it follows that the conductivity is given by the ratio
I 4,S
κ= N 1 N 4 k cell . (36)
U1
I 4,S
κ= N 1 N 4 k cell = k sensor I 4,S . (37)
U1
However, drift on the input voltage amplitude can not be neglected. An observation of
input voltage according to the current observation is mandatory.
According to the list of requirements, conductivity levels in the range of 75 mS/cm and
2 mS/cm are expected that have a resolution of 0.0345 mS/cm. Twelve bits are sufficient
3
At the end of the book page
23
3 Concept and Solution Design
to represent the range of conductivity values (Equation (29)). The smallest suitable data
type for floating-point numbers is float.
UART implements data communication. It uses one to two stop bits for data transfer
synchronization. The number of transferred data bits is variable and ranges from five
to eight Bits. Sending different data types via UART requires converting subroutines to
split the data into a UART data package size. Common data types are one or multiple
Byte in size. Therefore data transfer uses eight Bits for data. Therefore, a data transfer of
32 Bit floating-point numbers requires four data transfer events. Sending sampled data
of 12 Bit size requires two data transfers. The data transfer rate depends on the baud
rate. Table 8 shows different data transfer rates for a default baud rate of 9600 and the
maximal standard baud rate of 230400 of CoolTerm, a serial port terminal application.
The formula to calculate the required baud rate for the described transmission4 is
Since the minimum sampling frequency for a 10 kHz signal is 20 kHz, UART is not
capable to stream sampled data in real-time.
Table 8: List of possible data transfer rates using one stop Bit and eight data Bits
Baud rate 1 data transfers (1/s) 2 data transfers (1/s) 4 data transfers (1/s)
(16 Bit data items) (32 bit data items)
9600 1066 533 266
230400 25600 12800 6400
The final concept (Figure 19) consists of a module for signal generation, which is imple-
mented based on the AWG. The TICS consists of transformers with ten turns each, the
cores made of the material N87 with the dimensions 25.3x14.8. Excitation is at 10 kHz.
Shielding of the cores against crosstalk is not mandatory due to the minor effect.
An inverted amplifier converts the sensor current into a voltage. The resistance of the
feedback loop amplifies the output signal to the full range of the ADC. The acquisition
4
One stop Bit + eight data Bits
24
3 Concept and Solution Design
Data acquisition and evaluation requires sampling rates that are a multiple of the
excitation frequency. Data is transmitted via a UART interface in a configuration of
eight data bits and one stop bit. Depending on the requirement on data transmission, a
suitable baud rate must be selected.
25
4 Implementation
4 Implementation
This chapter describes the implementation of the conductivity sensor. Section 4.1
describes the selection of the components as well as the design of the circuit and the
board layout. In Section 4.2 the program structure and the functionality of the sensor is
described. Finally, Section 4.3 verifies the functionality.
The ADCs implemented on the chip meet the requirements listed in Equation (29)
and Equation (31) for the ADC to be used. Since the MCU also has integrated DACs,
additional components are not needed here either. The electrical circuit design starts
with the voltage reference and is described in the following subsections.
As mentioned above, it is not possible to specify the cell constant exactly. Therefore,
a cell constant of one is used in this section, as previously in the concept generation
section. From looking at Equation (13), it is clear that a cell constant greater than one is
to be expected.
A constant voltage supply via the drifter buoy is not guaranteed. The robustness of
the voltage reference is important for the DAC and ADC to provide reliable data for
subsequent calculations. Trailokya and Zamora present voltage references for various
use cases in [30]. Recommended for a 12 bit DAC application are the REF31, REF33,
and REF4132 voltage references. Of these, REF4132 was chosen due to good availability
in sufficient quantities at the time of material procurement. The available voltage
references of the component range from 2.5 V to 5 V. The MCU [23, p. 1800] datasheet
lists a reference voltage for the ADC in the range of 1 V to V DD AN A −0.4 V. Since a supply
voltage of V DD AN A =3.3 V is desired, a 2.5 V voltage reference is chosen.
26
4 Implementation
Noise on the TICS wires are not known, so a voltage amplitude of 1 V is provided at the
primary coil for an initial embedded prototype. Kandur [16] and Kang Hui [17] used
300 mV and 600 mV, respectively. The short-circuit current I 4,S flows through resistor
R M (Figure 18) to generate the measurement voltage to be detected by the ADC. The
resistor R M is designed to convert the maximum expectable signal to the reference
voltage U Re f of the ADC
I 4,Smax
RM = . (39)
U Re f
Using Equation (39) and the relationship between voltage and current and the relation-
ship between current and power, it follows
I 34,Smax
P RM = . (40)
U Re f
The required amplitude of the TICS exceeds the technical specifications of the I/O pins
of the MCU (2 mA, 8 mA in ’stronger mode’ [23, p. 825, 1795]). An operational amplifier
as impedance transformer [19, p. 432] contributes the required current. Operating
the DAC in differential mode suppresses digital noise on the outputs of the DAC. The
measurement range, which is twice as large as that of single-ended operation, reduces
the influence of other noise on the output signal by half. The use of the differential DAC
requires that the operational amplifier act as an inverting amplifier in addition to its
function as an impedance transformer. Kester [18, p. 5] lists a suitable circuit for the
presented case. The circuit shown (Figure 23) is adapted for the application.
27
4 Implementation
Figure 20: Dependency of sensor output current I 4,S on core turns N 1 and N 4
Resistance to ground limits current flow when voltage is generated. The maximum
voltage is 1 V as mentioned at the beginning of this section. For a maximum allowed
current of 2 mA, a resistor of R ≥ 500 Ω is required. Parallel connection of two resistors
requires
R1 · R2 R2 R2 1
R 1 ||R 2 = = R1 = R1 ³ ´ = R1 R . (41)
R1 + R2 R1 + R2 R R1 + 1
1
+1
2 R2 R2
The R 2,1 and R 2,2 resistors of the Figure 23 are combined into R 2 for simplicity. If R 2 ← ∞
runs R 1 ||R 2 ← R 1 . From the condition of parallel resistance R 1 ||R 2 ≥ 500 Ω the possible
combinations shown in Table 9 result with Equation (41).
The R 1 resistor of the E24 series is used. The required minimum resistance R 2 = 2.6 kΩ
is implemented by two equally sized resistors R 2,1 = R 2,2 = 2.7 kΩ. The boundary case
28
4 Implementation
10
14
8
13
I 4,S (mA)
S (mVA)
6
12
4
11
2
0.945 10
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
k
consideration
1
500 ≥ R 1 · 95% R 1 ·105%
(42)
+1
(R 2,1 +R 2,2 )·95%
1 1
f 3d B = ⇔C = . (43)
2π · 2R 1 · C 2π · 2R 1 · f 3d B
To allow excitation with higher frequencies, taking into account Nyquist (sampling
theorem), the corner frequency f 3d B =200kHz is chosen. Value 1.3 is closest to the
calculated value of 1.28 in the E24 series. The cutoff frequency of the filter is 197 kHz for
the capacitance of 1.3 nF. Hence, the design supports excitation of up to 98 kHz.
The final element of the sensor amplifier is the OpAmp. Another one is located on the
secondary side of the TICS. Using the same components lowers the individual part cost
due to higher quantities, therefore the same component should be used in both cases.
Adjusting the gain by R M (compare Equation (18)) results in a potentially larger signal
magnitude. The largest temporal change in a sinusoidal signal is at the turning point. A
maximum signal with respect to the reference voltage of the ADC has an amplitude of
2.5 V. For a frequency of f =30 kHz (used by Kandur [16]), this results in a slew rate of
29
4 Implementation
471 kV/s. The op amp MIC920 is the least expensive component available that meets
the requirement.
The last element of the measurement chain not yet considered is the resistor R M at the
inverting amplifier. Ideally, the maximum applied measurement signal of I 4,S ≈10 mA
(Figure 20) scales to the reference voltage VRE F =2.5 V by means of R M . Noise distur-
bances with effect on the output signal are not known before the circuit is built. For
this reason, an exact calcuation is not made. A resistor of the size 200 Ω from the E24
series approximates the requirement. In case of a deviation from the nominal size to
210 Ω due to tolerances, a buffer of U R M =400 mV exists. The short-circuit current I 4,S
has according to
U R M puffer 400mV
I 4,S puffer = = (44)
R M 105% 210Ω
a puffer of I 4,S puffer =1.9 mA. These considerations assume a cell constant of unity. In
order to select the ideal amplifier resistor for this application, the constant must be
determined in advance by experimentation. With a higher cell constant k cell decreases5
the sensor current. This relation requires a resistor R M greater by a factor of the cell
constant.
5
R w increases by a factor of k cell , so I 4,S shrinks; Equation (16)
30
4 Implementation
Figure 23: Differential DC coupled output using a dual supply op amp by [18, p. 5]
5 V supply voltage is provided from the iMEK’s buoy. A DC-DC converter converts this
down to a supply voltage of 3.3 V. The operational amplifiers require bipolar supply
voltages. The data sheet of the MCU [23, p. 1791] lists a maximum current requirement
of 19.68 mA (configuration FDPLL 120 MHz). Together with the demand of the mea-
surement circuit (2 mA at the DAC output, I 4,S =10 mA ), a demand of < 50 mA is thus to
be expected. With a safety factor of 2, the DC-DC converter has an output current of
100 mA. The R1D-053.3-R from RECOM meets this requirement.
The final schematic Figure 24 is color-coded into task areas. The systems involved in
measurement acquisition are highlighted in orange. The differential DAC unit generates
the exciting signal. The differential amplifier also functions as the current amplifier
stage. From here, a first reference measurement path branches off to the ADC_0 unit.
The other branch leads to the primary coil, through the ground the circuit of the first
coil is closed. From the secondary coil the signal line leads to the inverting amplifier.
This amplifies the measuring signal and converts it into a voltage which is converted by
the ADC_1 unit. The voltage supply and its supply lines are marked in blue. The voltage
reference (green) is connected to the VREFA port of the MCU and thus serves as reference
for the ADC and DAC. Reyes is working on the implementation of communication via
CAN [21]. Therefore, the communication is temporarily implemented via UART for test
purposes.
31
4 Implementation
The greatest challenge in circuit board design is the optimal positioning of the com-
ponents on the smallest possible circuit board. Components with increased space
requirements include the DC-DC transformer, the transformer coil, and the 10-pin
headers. Placing these components on the edges of the PCB gains contiguous areas for
the remaining components. Apart from the problem of optimal positioning, electrical
interferences should be restricted where possible. Thus the coils maintain an additional
distance of 10 mm from the circuits. An additional shielding6 in the area of the coils
provide shielding against mutual coupling.
The layout follows the design rules of [4] and [3] and the restrictions of the manufac-
turer AISLER [1]. Ground planes on both sides of the PCB are used to shield circuits.
Multiple vias connect the ground planes distributed across the PCB to reduce potential
differences between layers. The analog and digital ground are connected at the pin of
the DC-DC converter (Figure 25) and otherwise separated according to [35, p. 824]. Vias
shield sensor traces on both sides where possible. The signal traces are designed in
10 mils; the power traces start at 40 mil and branch into 32 mils.
ADC_0 and ADC_1 are connected with the pins 8 and 12 to the measurement traces
and use pins 7 and 11 connected to analog ground as negative reference for differential
mode operation.
Figure 26 shows the final PCB layout with the highlighted sections discussed in previous
chapters. The non-highlighted components were added according to the requirements
specified in the MCU datasheet schematic checklist [23, p. 1897-1908]. Layouts of the
top and bottom layer are located in Section A.3. The dimension of the assembled PCB is
82.5 mm x 40.6 mm x 26 mm. The overall costs of he components is l ower 20 €.
6
connected copper planes on both layers
32
4 Implementation
Figure 25: Connection of digital and analog ground at the ground pin of transformer
The SAME51G18A-MU uses the Arm Cortex-M4 architecture. It can process digital
signals ([26]) and is equipped with a floating-point unit ([23, p. 1]). The flash memory
is 256 KB, has an EEPROM hardware emulation, and an embedded SRAM of 128 KB.
As communication interfaces, the chip has a CAN instance [23, p. 19] and six serial
communication interfaces (SERCOM). Both the CAN0 instance and the SERCOM5
instance connect to pins 31 and 32 of the MCU [23, p. 35]. Using these pins for UART
or CAN creates a multi use PCB layout for test environments using UART and future
applications with CAN.
33
4 Implementation
The MCU also has a 32-channel event system for autonomous peripheral communica-
tion. Event generators and event users are specific to peripherals; multiple instances of
event users and event generators are possible. Communication using the event system
does not require CPU intervention or system resources such as bus or RAM. 32 Direct
Memory Access Controller (DMAC) channels extend this functionality to memory ac-
cesses from peripheral devices. Transfer requests are triggered by transfer triggers[23,
p. 340].
Finally, the MCU has a 32-bit real-time counter (RTC), which allows setting defined time
intervals, e.g., for measurements. In the default setting, the main clock of the MCU runs
at 48 MHz. The generic clock controller allows up to 12 generic clocks [23, p. 142].
The calibration requires three measurement points, two taken with known resistance
values R W,x and one value for the conductivity. The sensor current I 4,S,x is determined
with an FFT analysis (Section 3.3.3). Using the two data points ( R W,1 | I 4,S,1 ) and
( R W,2 | I 4,S,2 ), the characteristic straight line equation
f (x) = mx + b (45)
I 4,S,1 − I 4,S,2
m= (46)
R W,1 − R W,2
Thus, the third measurement in a solution with known conductivity κ3 yields the sensor
current I 4,S,3 , which is mapped to the resistance value R W,3 via the characteristic straight
line equation:
I 4,S,3 − b
R W,3 = (48)
m
Using R W,3 and the known value of conductivity κ3 , Equation (13) is used to determine
the cell constant k cell :
k cell = R W,3 κ3 (49)
34
4 Implementation
The implementation of the sensor module is intended as a state machine. Tthe top level
of the state machine consists of the states UART Input, Calibration, and Measurement.
The RTC triggers the UART Input state on demand in a predefined cycle. From the state
UART Input the RTC can be configured.
State Calibration
The state Calibration, becomes active after receiving the character ’2’. It requests the
input of two resistor values to calibrate the used resistor loops. After each input of R W ,x,
the ADC and DAC turn on. Acquiring one and converting the readings provides the
amplitude I 4,S,1 of the sensor current. After the acquisition, the DAC and ADC turn
off. This process is repeated a second time. The characteristic straight line equation is
determined as previously described from the data. Last, the conductance is sampled
to measure the sensor current in a conducting solution. The cell factor k cell calculated
after this procedure, and the constants of the straight line equation m and b are stored
in the EEPROM.
State Measurement
State Measurement becomes active after receiving the character ’1’. ADC and DAC start
and shut down after acquiring the data points needed for FFT. The acquired value I 4,S,1
is converted to a resistance value R W ,1 using the already known characteristic straight
line equation7 . The cell constant stored in the EEPROM is used to convert the value to a
conductivity value.
UART runs at a baud rate of 9600. Boolean variables track the status of RX and TX of the
asynchronous UART. A corresponding interrupt routine sets the ’RX_Recieved’ boolean
flag for the program code when a message is received. Reading the received data clears
this flag. Similarly, sending data must be implemented to avoid data loss. A ’TX_ready’
flag tracks the status of the UART module. At the data transfer to the UART peripheral,
the flag is set to ’true’ and is not set to ’false’ until the data transfer is complete. Since
this flag must be checked before sending data to the peripheral, the MCU can run into a
time-limited idle-loop.
7
values for m and b are read from the EEPROM
35
4 Implementation
4.2.4 DAC
4.2.5 ADC
The impedance and thus the effect of shielding on the mutual coupling is tested using
the IM 3570 impedance analyzer from HIOKI. For this purpose, a coil was first placed
on each side of an unpopulated PCB and a 3D printed model (Figure 27).
The influence on the magnetic flux must be kept as low as possible. Therefore, the TICS
hangs on the measuring clamps (Figure 28). The clamps on one side of the TICS were
swapped to validate the experimental setup in terms of repeatability. The swapping
resulted in three dimensions realignment of the TICS and clamps. This lead probably to
changes in capacitance on the test setup since no shielded wires are used to connect
clamps ad impedance analyzer.
36
4 Implementation
The results of the impedance analysis with a sweep are shown in Figure 29 and Figure 30.
As expected from before (Section 15 and Section A.7) the mutual coupling is of no
concern, thus a shielding is not needed for excitation in the range of kHz.
37
4 Implementation
(a)
(b)
Figure 28: test setup for impedance measurement on TICS: setup (a); TICS is held in the air by
clamps (b)
.
400
200
300
150
H
°
200
100 100
0
50
-100
0 -200
103 104 105 106
f (Hz)
38
4 Implementation
PCB shielding
600
(°) Ls1 (H)
1
250 (°) Ls2 (H) 500
2
400
200
300
150
H
°
200
100 100
0
50
-100
0 -200
103 104 105 106
f (Hz)
39
5 Results and Analysis
Using Equation (15) and the parameters known from the design, the system responses
are calculated for the resistors used Table 10. The experimentally determined system
responses are the maximum amplitudes in the frequency domain of the measured
signals.
The experimental and calculated system responses are shown in Figure 32. Smaller
conductance values have the highest percentage deviation. Linearization of the mea-
40
5 Results and Analysis
|P(f)| 1
0.5
0
0 2 4 6 8 10 12 14 16
f (Hz) 10 4
-2
-3 -2 -1 0 1 2
t (s) 10 -4
Figure 31: Representation of the acquired signal in the frequency domain and time domain as
well as a reconstruction
surement points results in the straight line equation shown in Figure 33. A consideration
of the system response for the measured case (resistance instead of virtual ground at
the secondary coil) is given by Figure 34. The curve is approximately linear in the lower
range of conductivity. Therefore, the straight-line equation presented earlier is not
generally valid.
41
5 Results and Analysis
Data points
250
experimental data
simulated 28
deviation
200
26
24
deviation (%)
150
U4 (mV)
22
100
20
50 18
16
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4
Conductance (S)
the oscilloscope. To reduce the noise of the sensor, the external conductivity sensor is
disconnected from the power supply for each data recording with the oscilloscope. The
determination of cell constants requires measurement in a conductive medium. Before
use, the sensor must therefore be encapsulated in a casing (Figure 35). The setup of the
measuring circuit is identical to the previously performed measurement. Conductivity
measurements are conducted in a tank with a capacity of about 60 l (Figure 36). The
tank is filled with purified water, into which salt is stirred and between measurements.
The Figure 37 and Figure 38 show the output signal for a selection of conductivity values.
The measurements made are also approximated by a characteristic curve (Figure 39).
According to the relation in Equation (13), or
1 k cell
= ⇔ k cellG W = κ. (50)
GW κ
In the case of conductance, the cell constant k cell is assumed to be linear. However,
a comparison of the slopes of the approximated linear equations from Figure 33 and
Figure 39 shows that this is not given exactly in this case. Nevertheless, the procedure
is carried out as an illustrative example. First, the value of a voltage measurement of
42
5 Results and Analysis
180
Linear: y = 132.3*x - 0.1172
160
140
120
U4 (mV)
100
80
60
40
20
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4
Conductance (S)
the respective other measurement series is to be determined with the help of one of
the linear equations. A conductance determined in this way is directly linked to the
conductance belonging to the voltage value via the cell constant. In Table 11 measured
values are displayed in the first two columns. The given conductance is determined via
the straight-line equation given in Figure 33 for the voltage target value of U 4 . From
the transfer of G and κ, the listed cell constants k cell are obtained The average is cell
constant is 3.77 1/cm, the maximum difference is 1.1713 1/cm, which is 25.7 % of the
maximum value. Possible causes for the difference are aliasing effects during sampling
and Fourier transform. For example, in the FFT performed in MATLAB, the signal has
peaks near 10 kHz, but never exactly at that frequency.
43
5 Results and Analysis
UR attenuated by U 1 =1 V
R
800
700
600
UR [mV]
500
R
400
300
200
100
0
0 1 2 3 4 5 6 7 8 9 10
Conductance (S)
Table 11: voltage and conductivity values from the series of measurements with the sensor potted
in a water bath
U 4 (µV) κ (mS/cm) G (mS) k cell (1/cm)
454.619 19.7 4.322139 4.5579
393.222 16.9 3.858 4.38
266.411 11.3 2.899554 3.897
192.584 7.93 2.341527 3.3866
44
5 Results and Analysis
45
5 Results and Analysis
2
|P(f)|
0
0 2 4 6 8 10 12 14 16
f (Hz) 10 4
-1
-3 -2 -1 0 1 2
t (s) 10 -4
Figure 37: Signal in frequency domain and time domain for 11.3 mS/cm conductivity
46
5 Results and Analysis
0
0 2 4 6 8 10 12 14 16
f (Hz) 10 4
-1
-3 -2 -1 0 1 2
t (s) 10 -4
Figure 38: Signal in frequency domain and time domain for 19.7 mS/cm conductivity
47
5 Results and Analysis
400
350
U4 ( V)
300
250
200
150
100
6 8 10 12 14 16 18 20
Conductivity (mS/cm)
48
6 Conclusion and Outlook
Due to shortcomings, the software of the MCU was not implemented. However, the
software concepts for the measurement process are discussed. ADC and DAC need
to operate in synced mode to reduce interference on the sampled data. The software
design also addresses the process of sensor calibration.
Finally, the concept was tested on a small scale. The data acquired from TICS were
successfully processed using FFT. An average cell constant of 3.77 was determined. A
comparison with modeled data showed a behavior as expected. The performance of
-30 % compared to model data is due to uncertainties in the model like the k-factor.
However, a slight nonlinearity can be observed in the data. Thus a measurement in
virtual ground configuration should be performed. The required sensor accuracy of
0.0345 mS/cm is not met if the 12 Bit ADC runs in differential mode; the accuracy is
0.0366 mS/cm, which is 21 µS/cm less than required. The integrated circuit needs to
be modified according to the cell constant. Further investigations are required, as the
calculated cell constants varied by 25 %.
In the future, software must be programmed for the sensor module. This should have
top priority because only with the software the integrated circuit, especially the signal
generation via DAC, and the sampling can be done. An ADC module with higher resolu-
tion is possibly necessary since component-related inaccuracies were not considered in
detail. Concerning production in quantities > 10, the design and encapsulation process
must be optimized for partial automation. For surface water applications, dip coating
49
6 Conclusion and Outlook
could prove suitable here. Furthermore, the integrated circuit can be further optimized
since no filter is provided on the secondary side. Such a filter can further improve the
signal quality in terms of SNR.
50
A Appendix
A Appendix
A.1 Schematic
51
A Appendix
52
A Appendix
53
A Appendix
54
A Appendix
A.3 Layout
C9
JP1
IC1
PS1
C13 C5
R6
R12
R8 R9 R11
PC_OUT SC_IN
PC_IN SC_OUT
55
A Appendix
1JS
56
A Appendix
A numerical deviation of S of the used function (Figure 44) shows the smallest value
of the rate of change for high S and low T . A drop in S by 0.05 results in a change of
0.0345 mS/cm for κ.
4 resC=zeros(size(S,2)-1,size(T,2));
5
6 for j = 1:size(T,2)
7 resC(:,j)=diff(gsw_C_from_SP(S,ones(size(S))* T(j),10.1325));
8 end
9
10 contourf(T,S(1,2:end),resC)
11 %title('Numerical derivation of the ''gsw\_C\_from\_SP.m'' ...
function to S')
12 %subtitle('Stepsize S = 0.05 on PSS-78')
57
A Appendix
13 xlabel('Temperature [\circC]')
14 ylabel('Salinity [mS/cm]')
15 colorbar
The equation for the sensor current with the terminating resistor R R = 0 is
M 12 M 34 ω2 ·U1
I4 = −Ã µ ¶ ! (51)
2 ω2
M 34
R 1 + j L 1 ω RW + j L 2 ω + j L 3 ω + R4 + j L 4 ω + M 12
2 2
ω R4 + j L 4 ω
¡ ¢ ¡ ¢
The parameters of this equation are calculated as follow for the purpose of numerical
simulation in Section 3.3.2:
The mutual coupling inductance M is calculated with respect to it’s indices according
to [2, p. 260] to be
q
Mxy = k Lx L y . (52)
A coupling factor of k=1 is used except otherwise is stated. The inductance L x is cal-
culated with respect to the magnetic resistance of the coil core R m and the number of
turns N ([2, p. 219]) to be
1
L x = N 2x . (53)
Rm
58
A Appendix
The magnetic resistance of coil is calculated using the core geometry ([2, p. 218]). This
is shown in the MATLAB snippet below.
12 mu = mu0 * muR;
13 Rm = 1/mu * l_Fe/A_Fe;
The coil resistances R 1 and R 4 are calculated based on the coil dimensions. An extra
length is added on both sides of the coil model to take the connecting wire sections into
account.
1 %cores coated
2 innerD_c = 13.5 *1e-3;%Data sheet TDK
3 outerD_c = 26.6 *1e-3;%Data sheet TDK
4 outerR_c = outerD_c./2;
5 innerR_c = innerD_c./2;
6
10 %cables
11 rho_Cu = 1.68 *1e-8; %electrical resistivity [Ohm*m];
12 l_con = 10e-2; %cable length to connect to circuit [m]. ...
Arbitrary value.
13 r_cable = 3e-4; %cable radius [m]. from [16]
14 l_N1=N1 *2*(a_c+b_c+4* r_cable);
15 l_N4=N4 *2*(a_c+b_c+4* r_cable);
16 l_R1 = 2* l_con+l_N1;
17 l_R4 = 2* l_con+l_N4;
18
19 A_R1=pi * r_cable^2;
59
A Appendix
20 A_R4=A_R1;
21 R1 = rho_Cu * l_R1/A_R1;
22 R4 = rho_Cu * l_R4/A_R1;
60
A Appendix
The comparison of the Bode plots Figure 45a and Figure 45b shows that due to the
indeterminacy of the k-factor frequencies in the range of ≤ 100 kHz have to be used.
Evaluation in the frequency domain makes the phase shift information insignificant. A
closer lock onto Figure 46a and Figure 46b suggests 10 kHz being the best frequency with
respect to uncertainty on k-factor and sensor signal strength. An extended examination
with different temperature and conductivity values can be found in Figure 47. Note that
deviations on phase change with conductivity and tmeperature!
Magnitude (dB)
-22.51
-30
-22.52
-22.53 -40
-22.54
-50
3 45
simplified simplified
_r=10000 _r=10000
Phase (deg)
1 -45
0 -90
103 104 105 106 103 104 105 106
Frequency (rad/s) Frequency (rad/s)
(a) (b)
Figure 45: Bode plots N1=N4=10, µr =2200, κ =75 mS/cm: k 12 = k 34 = 1 (a); k 12 = k 34 = .99 (b).
U1 =1 V, =75 mS/cm, =2200, N1=10, N4=10, k12=k34=1 U1 =1 V, =75 mS/cm, =2200, N1=10, N4=10, k12=k34=0.99
r r
74.62 700 74 700
74.61 72
500 500
74.605 71
I 4,S (mA)
400 400
I 4,S (mA)
S (mVA)
S (mVA)
74.6 70
300 300
74.595 69
200 200
74.59 68
74.58 0 66 0
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
f (kHz) f (kHz)
(a) (b)
Figure 46: Frequency dependence of the sensor signal: k 12 = k 34 = 1 (a); k 12 = k 34 = .99 (b).
61
A Appendix
-36.485 -22.52
Magnitude (dB)
Magnitude (dB)
-36.49 -22.54
-36.495 -22.56
-36.5 -22.58
-36.505 -22.6
4 4
T=0°C T=0°C
3 T=20°C 3 T=20°C
Phase (deg)
Phase (deg)
T=40°C T=40°C
2 2
1 1
0 0
103 10 4
10 5
10 6
10 7
10 8
103 104 105 106 107 108
Frequency (rad/s) Frequency (rad/s)
(a) (b)
Temperatur Error Temperatur Error
=15mS/cm, 0 =2200, N1=N4=10, k=1 =75mS/cm, 0 =2200, N1=N4=10, k=1
0.8 0.8
=0 °C/ =20 °C =0 °C/ =20 °C
0.6 =40 °C/ =20 °C 0.6 =40 °C/ =20 °C
0.4 0.4
0.2 0.2
Error (%)
Error (%)
0 0
-0.2 -0.2
-0.4 -0.4
-0.6 -0.6
-0.8 -0.8
-1 -1
103 10 4
10 5
10 6
10 7
10 8
103 104 105 106 107 108
Frequency (rad/s) Frequency (rad/s)
(c) (d)
Bode of Double TICS, =15mS/cm, k=0.99, r
=2200 Bode of Double TICS, =75mS/cm, k=0.99, r
=2200
-30 -20
-40
Magnitude (dB)
Magnitude (dB)
-40
-50
-60
-60
-70
-80 -80
45 45
T=0°C T=0°C
T=20°C T=20°C
Phase (deg)
Phase (deg)
0 T=40°C 0 T=40°C
-45 -45
-90 -90
103 104 105 106 107 108 103 104 105 106 107 108
Frequency (rad/s) Frequency (rad/s)
(e) (f )
Temperatur Error Temperatur Error
=15mS/cm, 0 =2200, N1=N4=10, k=0.99 =75mS/cm, 0 =2200, N1=N4=10, k=0.99
4 4
=0 °C/ =20 °C =0 °C/ =20 °C
3 =40 °C/ =20 °C 3 =40 °C/ =20 °C
2 2
1 1
Error (%)
Error (%)
0 0
-1 -1
-2 -2
-3 -3
-4 -4
103 104 105 106 107 108 103 104 105 106 107 108
Frequency (rad/s) Frequency (rad/s)
(g) (h)
Figure 47: Temperature influence on Bode and percentage phase deviation for k 12 = k 34 = k:
κ =15ms/cm, k = 1 (a); κ =75ms/cm, k = 1 (b); κ =15ms/cm, k = 1 (c); κ =75ms/cm,
k = 1 (d); κ =15ms/cm, k = 0.99(e); κ =75ms/cm, k = 0.99(f ); κ =15ms/cm, k = 0.99(g);
κ =75ms/cm, k = 0.99(h).
62
A Appendix
80 14
70 12
60
10
50
Error (%)
I 4,S (mA)
8
40
6
30
4
20 M14=0
M14 (no shield)
M14 (plate)
10 2
diff (no shield)
diff (plate)
0 0
0 10 20 30 40 50 60 70 80
Conductance (mS/cm)
63
A Appendix
10 % simplifications
11 I_4sub = simplify(subs(I_4,[R_R, R_1 + L_1 * w *1i, R_4 + ...
L_4 * w *1i],[0, L_1 * w *1i, L_4 * w *1i]))
12 % rewrite mutual inductance
13 I_4sub = simplify(subs(I_4sub ,[M_12 , M_34],[k_12 * sqrt(L_1 * L_2), ...
k_34 * sqrt(L_3 * L_4)]))
14 % use physical relations
15 I_4sub = simplify(subs(I_4sub ,[L_1, L_2, L_3, ...
L_4],[N_1^2/R_m,1/R_m,1/R_m, N_4^2/R_m]))
16 %number of coilt runs always positiv
17 I_4sub = simplify(subs(I_4sub ,[abs(N_1),abs(N_4)],[N_1, N_4])).
The assumptions R R = 0, R 1 << j L 1 ω, and R 4 << j L 4 ω as well as the Equation (52) and
Equation (53) (see Section A.5) are applied.
64
References
References
[1] AISLER. PCB Design Rules | AISLER. URL: https://aisler.net/help/design-
rules-and-specifications/design-rules (visited on 12/06/2021) (cit. on
p. 32).
[2] Manfred Albach. Erfahrungssätze, Bauelemente, Gleichstromschaltungen. 3.,
aktualisierte Auflage. Grundlagen der Elektrotechnik. Pearson, 2011. ISBN:
978-3-86894-079-4 (cit. on pp. 2, 5, 58, 59).
[3] Autodesk. Top 10 Component Placement Tips | EAGLE | Blog. URL:
https://www.autodesk.com/products/eagle/blog/top-10-pcb-
component-placement-tips-pcb-beginner/ (visited on 10/14/2021) (cit. on
p. 32).
[4] Autodesk. Top 10 PCB Routing Tips for Beginners | EAGLE | Blog. URL:
https://www.autodesk.com/products/eagle/blog/top-10-pcb-routing-
tips-beginners/ (visited on 10/14/2021) (cit. on p. 32).
[5] Herbert Bernstein. Messelektronik und Sensoren. Springer Vieweg, 2014. ISBN:
978-3-658-00549-8. DOI: 10.1007/978-3-658-00549-8 (cit. on p. 21).
[6] Niklas Boers. “Observation-based early-warning signals for a collapse of the
Atlantic Meridional Overturning Circulation”. In: Nature Climate Change 11.8
(Aug. 2021). Bandiera_abtest: a Cg_type: Nature Research Journals Number: 8
Primary_atype: Research Publisher: Nature Publishing Group Subject_term:
Physical oceanography;Projection and prediction;Statistics Subject_term_id:
physical-oceanography;projection-and-prediction;statistics, pp. 680–688. ISSN:
1758-6798. DOI: 10.1038/s41558-021-01097-4. URL:
https://www.nature.com/articles/s41558-021-01097-4 (visited on
12/07/2021) (cit. on p. 1).
[7] D. L. Volkov et al. “Meridional overturning circulation and heat transport in the
Atlantic Ocean”. In: Bulletin of the American Meteorological Society 102.8 (Aug. 1,
2021), S176–179. ISSN: 0003-0007, 1520-0477. DOI:
10.1175/2021BAMSStateoftheClimate.1. URL: https://journals.ametsoc.
org/view/journals/bams/102/8/2021BAMSStateoftheClimate.1.xml
(visited on 10/18/2021) (cit. on p. 1).
[8] A.J. Fougere. “New non-external field inductive conductivity sensor (NXIC) for
long term deployments in biologically active regions”. In: OCEANS 2000
MTS/IEEE Conference and Exhibition. Conference Proceedings (Cat.
No.00CH37158). OCEANS 2000 MTS/IEEE Conference and Exhibition.
Conference Proceedings (Cat. No.00CH37158). Vol. 1. Sept. 2000, 623–630 vol.1.
DOI : 10.1109/OCEANS.2000.881324 (cit. on p. 14).
65
References
[9] Thomas Frey. Signal- und Systemtheorie. 2., korrigierte Auflage 2008. Studium.
Vieweg Teubner Verlag / GWV Fachverlage GmbH, Wiesbaden, 2009. ISBN:
978-3-8348-9292-8. DOI: 10.1007/978-3-8348-9292-8 (cit. on pp. 22, 23).
[10] Global Drifter Array. URL: https:
//www.aoml.noaa.gov/phod/gdp/interactive/drifter_array.html
(visited on 10/14/2021) (cit. on p. 9).
[11] IOC, SCOR, and IAPSO. The international thermodynamic equation of seawater –
2010: Calculation and use of thermodynamic properties. Intergovernmental
Oceanographic Commission, Manuals and Guides No. 56. UNESCO, 2010. 196 pp.
(cit. on pp. 2, 3).
[12] Ralf Jaiser and Jana Kandarr. “Wie beeinflusst der Klimawandel den Jetstream?”
In: (2019). Publisher: Earth System Knowledge Platform. DOI:
10.2312/eskp.010. URL: https://www.eskp.de/klimawandel/wie-
beeinflusst-der-klimawandel-den-jetstream-9351059/ (visited on
12/07/2021) (cit. on p. 1).
[13] G. C. Johnson et al. “Salinity”. In: Bulletin of the American Meteorological Society
102.8 (Aug. 1, 2021), S159–164. ISSN: 0003-0007, 1520-0477. DOI:
10.1175/2021BAMSStateoftheClimate.1. URL: https://journals.ametsoc.
org/view/journals/bams/102/8/2021BAMSStateoftheClimate.1.xml
(visited on 10/18/2021) (cit. on p. 1).
[14] K. Striggow and R. Dankert. “Induktive Leitfähigkeitssensoren für die
ozeanologische Anwendung - Physikalische Wirkprinzipien, theoretische
Grundlagen und die Möglichkeiten zur Eliminierung des Einflusses einer
variablen Kernpermeabilität”. In: Beiträge zur Meereskunde 50 (1984), pp. 25–41.
ISSN : 0067-5148. URL :
https://www.io-warnemuende.de/tl_files/forschung/beitraege-zur-
meereskunde/1984_50_Beitraege_zur_Meereskunde.pdf (visited on
09/30/2021) (cit. on pp. 5–8, 11, 15, 17, 20, 58).
[15] K. Striggow and R. Dankert. “The exact theory of inductive conductivity sensors
for oceanographic application”. In: IEEE Journal of Oceanic Engineering 10.2 (Apr.
1985), pp. 175–179. ISSN: 0364-9059. DOI: 10.1109/JOE.1985.1145085. URL:
http://ieeexplore.ieee.org/document/1145085/ (visited on 09/30/2021)
(cit. on pp. 5, 7, 58).
[16] Yiğithan Kandur, Julius Harms, and Thorsten A. Kern. “Uncertainty Analysis for
Low-Cost Transformer-Type Inductive Conductivity Sensors”. In: Engineering
Proceedings 6.1 (2021). Number: 1 Publisher: Multidisciplinary Digital Publishing
Institute, p. 52. DOI: 10.3390/I3S2021Dresden-10145. URL:
https://www.mdpi.com/2673-4591/6/1/52 (visited on 10/15/2021) (cit. on
pp. 11, 14, 19, 27, 29, 59).
66
References
[17] Song Kang Hui et al. “A new design of inductive conductivity sensor for
measuring electrolyte concentration in industrial field”. In: Sensors and Actuators
A: Physical 301 (Jan. 1, 2020), p. 111761. ISSN: 0924-4247. DOI:
10.1016/j.sna.2019.111761. URL: https:
//www.sciencedirect.com/science/article/pii/S0924424719315912
(visited on 10/15/2021) (cit. on pp. 11, 14–17, 20, 27, 58).
[18] Walt Kester. DAC Interface Fundamentals. URL: https:
//www.analog.com/media/en/training-seminars/tutorials/MT-019.pdf
(visited on 09/22/2021) (cit. on pp. 27, 31).
[19] Ralf Kories and Heinz Schmidt-Walter. Taschenbuch der Elektrotechnik. 11.,
überarbeitete Aufl. Deutsch, 2017. ISBN: 978-3-8085-5865-2 (cit. on pp. 11, 27).
[20] E. Lewis. “The practical salinity scale 1978 and its antecedents”. In: IEEE Journal
of Oceanic Engineering 5.1 (Jan. 1980). Conference Name: IEEE Journal of
Oceanic Engineering, pp. 3–8. ISSN: 1558-1691. DOI:
10.1109/JOE.1980.1145448 (cit. on pp. 2, 3).
[21] Carlos Reyes. “Communication Concept for Multi Sensor Platform”. Master
thesis. Hamburg: TUHH, Dec. 2021 (cit. on p. 31).
[22] Ring-/Doppellochkerne. TDK Electronics AG. URL: https://www.tdk-
electronics.tdk.com/de/186950/produkte/produktkatalog/ferrite-
und-zubehoer/epcos-ferrite-und-
zubehoer/ringdoubleaperturescores/searchresults?so=%7B%
22product_unified_Headline1_en%22%3A%22%22%2C%22product_unified_
MATERIAL%22%3A%22N87%22%2C%22product_unified_AL_VALUE%22%3A%22%
22%2C%22product_unified_AL_VALUE_TOL%22%3A%22%22%7D (visited on
11/30/2021) (cit. on p. 19).
[23] SAM D5x/E5x Family Data Sheet. 2021. URL: https://ww1.microchip.com/
downloads/aemDocuments/documents/MCU32/ProductDocuments/
DataSheets/SAM_D5x_E5x_Family_Data_Sheet_DS60001507G.pdf (visited
on 09/18/2021) (cit. on pp. 26, 27, 31–34, 36).
[24] Sea Surface Temperature. Publisher: NASA Earth Observatory. July 31, 2021. URL:
https://earthobservatory.nasa.gov/global-maps/MYD28M (visited on
11/25/2021) (cit. on p. 9).
[25] WU Sheng et al. “Investigation of the Performance of an Inductive Seawater
Conductivity Sensor”. In: 186.3 (2015), p. 6 (cit. on p. 11).
67
References
68
References
[35] Hank Zumbahlenas and inc Analog Devices, eds. Linear circuit design handbook.
Amsterdam ; Boston: Elsevier/Newnes Press, 2008. 943 pp. ISBN:
978-0-7506-8703-4 (cit. on p. 32).
69