Signal Conditioning and Sensor Read-out

A sensor can be described as a selector element and a modulated electronic device. This means that, from the perspective of the recording electronics, the sensor looks either as an electronic component, or a current/voltage source. For example, many sensors are modulated resistors: the Light dependent Resistor (LDR), the Pt100 temperature sensor, a magnetoresisor (MR sensor) and the strain gauge. When we want to connect such a sensor to electronics, we have to convert the value of the resistor to a voltage. Only then we can sample with an Analog to Digital Converter (ADC) or send the value as a signal over a wire. The conversion of the sensor value to a voltage is the first step of signal conditioning, also referred to as “biasing”. After biasing, we normally need extra steps to prepare the signal for sampling or transmission. This can be amplification or filtering. These steps are called analog signal processing. This chapter gives some examples of biasing and signal conditioning as needed with the most common sensors.

Sensor Interfaces

An interesting view on sensor interfaces is given in the book of Fraden 1). In figure 1, sensors are classified based on their location.

Fig. 1: Depending on the location and fucntion, a sensor has a specific interface [From the book by J. Fraden]

A non-contact sensor, for example a magnetic sensor or a capacitive probe, has an inherent problem with the reference voltage since there is no DC path

A contact sensor that can be mounted to the subject under test, is more invasive but has less issues with defining a reference. A problem can be the physical coupling network of the sensor by which the measured quantity is affected

A contact sensor that is relative can in some cases eliminate a problem, because we are only interested in variations of a parameter, and not the absolute value

An active sensor is a sensor that needs an excitation signal. So this is part of a stimulus response measurement. It can be a measurement system where a frequency sweep is applied to find cut-off frequencies

An internal sensor can be a temperature sensor that monitors the temperature of the interface chip.

The push button

A push-button, and many mechanical contacts, can only define a short-cut. Such push buttons are used as an input for a microcontroller. The mechanical action consists of an one/close contact. Something is needed to turn the on/close states into two well defined voltage levels. Therefore, a resistor is needed to pull the input pin to a second well defined level besides the closed state. The configuration using a pull-up or pull-down resistor is indicated in figure 2. The pull-up configuration is preferred because in that case one side of the switch is connected to ground which is better when placing multiple controls in a front panel.

Fig. 2: Read-out of a push button using a pull-up resistor (left), or a pull-down resistor (middle). Such mechanical switches may have the phenomenon of contact bounce (right)

Because the use of a pull-up resistor is such a common configuration, most microcontrollers have internal pull-ups that can be initialized in software.

Switches are mechanical components where two metal contacts are used to close an electrical connection. Because of the metal to metal contact, there may be some noise for a few milliseconds when closing the switch. This is called contact bounce and is indicated in the right-hand picture in figure 2. When using the switch or another mechanical contact as an input (for example for a counter or a time critical time interval analyzer), this contact bounce may result into mis-counts.

Elimination of contact bounce

Contact bounce can be removed in hardware or software/firmware:

With firmware we can confirm the closure of a switch some milliseconds after a first closure is detected. The firmware can track a state variable and count a noisy transition as a single state change from off to on

It can be removed by adding an RC-circuit that removed the high frequent bouncing

When implementing the debouncing in hardware, the circuit should be a low-pass filter, for example a simple RC network. The low pass filter cut-off can be calculated as $f_{cut-off} = (2 \pi RC)^{-1}$. Frequencies above will pass. To decide on the frequency, it is easier to think in terms of the time constant which must be in the order of $30 ms$:
\begin{equation}
\tau = R \cdot C\approx 30 ms
\label{eq:RC_Time}
\end{equation}

If the button is connected to the input of a microcontroller, we may find in the datasheet of that controller that a logical “low” is defined as $V_{lo} < 0.3V_{cc}$ and a logical “high” as $V_{hi} > 0.6V_{cc}$. When pushing the button, the action is detected as a low to high transition when $U(t)$ equals $0.6V_{cc}$. With the exponential response of an RC circuit, we can now calculate $\tau$

The contact bounce on a time scale with the RC response is indicated in the right-hand picture.

Resistive sensors

Typical resistive sensors we know are Light Dependent Resistors (LDR), strain gauges, the Pt100 resistive temperature sensor and Magnetoresistive sensors. To convert information that is captured in the resistor value into a voltage, the basic method is to place it in a voltage divider.

A voltage divider is a basic electronic structure as shown in the left-hand picture in figure 4. The idea is that the output voltage relates to the input voltage in the same ratio as $R_{1}$ relates to $R_{1}+R_{2}$. So:

When resistor $R_{2}$ (the upper one) is a resistive sensor as shown in the middle part of figure 4, then the output voltage will be a function of the resistance value. The same will happen when the lower resistance (R1) is the sensor.

Fig. 4: The voltage divider

The question is what the sensitivity of the output voltage is for changes in the resistive sensor value. We take the situation where the sensor is in the top part, so $R_{2}$ is the sensor like the middle situation of figure 4. For simplicity, we write $R_{1} = R_{0}$ and $R_{2} = R_{sens} = R_{0}+\Delta R$ indicating that $R_{1}$ is chosen equal to the nominal value of the sensor. The sensor has a certain nominal value $R_{0}$ at zero input (or a resting state) and an extra value $\Delta R$ due to an input valiable being sensed. $\Delta R$ can be both positive and negative and is zero at rest. For completeness, this alternative convention is drawn in figure 5.

Fig. 5: Alternative writing of a resistive sensor in a voltage divider

This way of writing in terms of $\Delta R$ results into an alternative form of the voltage divider equation:

The sensitivity is equal for the situation where the resistor is in the lower part of the voltage divider, only the sign will change.

The advantage of a voltage divider for sensor read-out is that it is simple and passive. However, there is a disadvantage. The nominal output voltage is half the power supply because the sensor value is roughly equal to $R_{0}$. On the other hand, the variation $\Delta R$ of the sensor due to the sensed quantity, is much smaller for most sensors. For example for a strain gauge $\Delta R$ is a hundred times smaller than $R_{0}$. This means that we have a huge offset and only some $mV$'s of signal. With such a large offset, we can not amplify the signal after the voltage divider, because the output voltage would clip to the power supply. This issue can be solved by using a resistive bridge setup.

The Wheatstone bridge

When the output of the voltage divider is not measured with respect to ground, but with respect to a second voltage divider, we have created a resistive bridge. Such a bridge is known as a Wheatsone bridge and a single sensor version is represented in figure 6. The single sensor version is referred to as quarter bridge.

Fig. 6: Single-sensor Wheatsone bridge

One of the advantages is that we can sense the inbalance in the bridge by a differential amplifier which has to deal with a signal around $0 V$ (for $\Delta R = 0 \Omega$, the output is $0 V$). The only condition is that the measuring amplifier should have a sufficiently high Common Mode Rejection Ratio, because the offset can be in the range of Volts, while the signal is milliVolts.

In many cases, we have the opportunity to implement a second sensor, where the second sensor has an opposite response. So if sensor one has the response $R = R_{0} + \Delta R$, the second one has the response $R = R_{0} - \Delta R$. In this way, we can create a differential measurement (see the section on Sensor/actuator network concepts). In this differential measurement, the intended response on the quantity of interest is $\Delta R$ and has opposite sign for the two sensors. Some interfering effects will be in the $R_{0}$ offset value, and have the same sign. This means that if we measure the difference between the two sensor readings, the common effects cancel out, while the differential intended effect results into a strong response. In Wheatstone bridge this can be easily implemented with two or even four sensors (see figure 7).

Fig. 7: Half bridge (left) and full bridge (right) set-up

Sensors that are especially suitable for half-bridges and full-bridges are strain gauges because we can freely position the resistive structures in mechanical structures. An example is given in where four strain gauges are positioned such that two have a positive sign, while the other two have a negative sign.

Fig. 8: Four strain gauges placed on a mechanical structure in such a way that they form a full resistive bridge

Capacitive sensors

The parallel plate capacitor structure of figure 9 has a capacitance of
\begin{equation}
C = \epsilon_{0}\epsilon_{r} \frac{A}{d}
\label{eq:Capacitor}
\end{equation}
when ignoring fringing fields on the edges. Here, $A$ is the surface area of a plate, $d$ the gap distance, $\epsilon _{0}$ the permittivity of vacuum and $\epsilon _{r}$ the specific permittivity of the material in the gap ($\epsilon _{r} = 1$ for air).

Fig. 9: Parallel plate capacitor

In principle, any variation in $A$, $d$ or $\epsilon _{r}$ can be detected as a change in capacitance.

A variation of the overlapping plate area $A$ can be used to make a translation sensor

Variation of the air gap distance $d$ is used in a microphone and pressure sensor

Variation of the relative permittivity $\epsilon _{r}$ can be the basis of a sensor that can detect a dielectric material that is placed in the fieldlines of the parallel plate configuration. A humidity sensor is based on measuring variation in $\epsilon _{r}$.

So based on translation, pressure or material variation the capacitor value will be modulated. There are several read-out methods.

Constant voltage read-out

The relation between electrical capacitance [$F$], charge [$C$] and voltage [$V$] is defined as
\begin{equation}
Q = C \cdot V.
\label{eq:Capacitance}
\end{equation}
The variation in capacitance is equal to
\begin{equation}
\frac{\partial Q}{\partial t} = C\frac{\partial V}{\partial t} + V\frac{\partial C}{\partial t}\label{eq:DeltaCapacitance}
\end{equation}
where it can be noted that $dQ/dt$ is equal to the electric current $I$. When biasing the capacitor with a fixed voltage $V_{bias}$, for example by connecting through a high resistor, the output signal becomes
\begin{equation}
\frac{\partial Q}{\partial t} = I = V_{bias}\frac{\partial C}{\partial t}
\end{equation}
which means that the measured current is defined by the variation in capacitance. This is more or less the method with which condenser microphones are biased. Electret microphones are also capacitive microphones, but there the biasing voltage is generated by a permament charge element: an electret.

Using an oscillator

For many other capacitive sensing principles (like used in accelerometers and some pressure sensors), circuits based on oscillators and timers are used. They have a frequency modulated output.

The easiest way for readout is to place them in a resonating circuit where the capacitor is one of the frequency determining elements. Two examples are in figure 10. The resulting frequency is equal to:
\begin{equation}
f_{res} = \frac{1}{2\pi RC}.
\label{eq:CapacitorResonator}
\end{equation}

The 1/C relation is not always a problem. Equation \eqref{eq:Capacitor} indicated that the capacitance has a $1/d$ relation with the gap size $d$. This means that if the modulated value is $d$ (like in pressure sensors), the frequency becomes proportional to $d$.

Fig. 10: Oscillator methods to read out a capacitive sensor

Other methods

There are many other methods that convert a capacitor value to a change in a periodic signal2). The result can be amplitude modulation, frequency modulation, or phase shift. In these cases, the response time is limited by the period of the carrier signal.

Photo diode

A simple circuit for determining the current generated by a photo diode can be found in figure 12. A photo diode has a reverse current that is modulated by the amount of light. The circuit places the diode in a reverse voltage and converts the current to a voltage.

Fig. 12: Circuit for determining the reverse current of a photo diode

Signal conversion

The last step in conditioning the sensor signal is converting the signal to a form that is suitable for the AD convertor. This means:

amplification of the voltage to the window of the AD converter

cutting down to the relevant bandwidth to prevent aliasing

additional filtering to remove noise and removing DC if needed

Amplifier

To amplifiy a signal, we need amplifiers with high quality, because they should not influence the linearity, noise, and offset of the sensor signal. An OpAmp can be configured as a differential amplifier (but take care of the Common Mode Rejection Ratio), but there are also dedicated instrumentation amplifiers like the INA114.

Input buffer

Based on a single OpAmp like the $\mu$A741 we can make a unity gain amplifier. Such an amplifier is a good impedance converter: it can track a high impedance sensor signal and convert it into a low impedance voltage suitable for transmission over linger wires. The function is:
\begin{equation}
V_{out} = V_{in}
\label{eq:UnityGain}
\end{equation}
Fig. 13: Unity gain amplifier with a single OpAmp

Comparator and Schmitt Trigger

To make a digital signal out of an analog input (sensor) in a case where we are only interested in the crossing of a certain threshold, we can use a comparator circuit.

For a signal with some noise, the plain comparator circuit may result into some transition noise in the output signal which is similar to contact bounce. In figure 15 we can see the comparator output for a clean signal. What happens with a noisy signal can be seen in figure 16.

Fig. 15: Output of a comparator when the input is clean
Fig. 16: Output of a comparator when the input is noisy

This response is quite logical because on a mV scale the signal does cross the decision level multiple times before it becomes “high” in the end. Just like contact bounce, a solution is to use a low-pass filter or software way of transition detection. However, a more appropriate solution for this problem is to use a higher decision level for a low-to-high transition and a lower decision level for a high-to-low transition. The comparator that does this is called a Schmitt Trigger. A Schmitt trigger is a comparator circuit that incorporates positive feedback.

Filters

The simplest low pass filter is based on the RC network of figure 17. The response is a first order low-pass behaviour, so

Fig. 17: First order RC low-pass filter
Fig. 18: Response of a first order low-pass filter

The first order low-pass filter can be integrated with an amplifier as the inverting low-pass first order active filter of figure 19. The response is
\begin{equation}
gain = -\frac{R_{2}}{R_{1}} \\
f_{cut-off}=\frac{1}{2 \pi R_{2}C_{1}}
\label{eq:LowPassActive}
\end{equation}
while the DC content is removed (additional high pass filter) by the R1Cin product, which must be higher than R2C1.

Fig. 19: Active inverting first order low-pass filter

For more OpAmp circuits, see several internet sites from chip manufacturers, for example Texas Instruments3).

Similar to the low-pass filter, we can implement an RC high pass filter as shown in figure 20. The response is

Fig. 20: First order RC high-pass filter
Fig. 21: Response of a first order high-pass filter

Bandwidth

The bandwidth of the total sensor system determines the fastest signal that can be measured. The bandwidth is determined by the slowest stage in the chain and depends on

Coupling network

Transducer properties

Amplifier quality

Wiring (sometimes long)

Based on the properties of the sensor and the read-out signal, the output has a DC content or not.

Long wires

Sensors are normally placed at remote locations. As a result, the long wires can pick up noise due to emf and signals become affected due to cable resistances and capacitances. High-ohmic sensors (especially capacitive) are the most susceptible to pick up noise.

To minimise noise we can

Transform to digital (CAN, SPI) as close to the sensor as possible

Do an impedance conversion

Use a 3- or 4-wire technique

Use twisted pair, bi-phase cables

Fig. 22: Sensors are normally placed at remote locations: in a car thare are many lines from the central controllers to sensors to noisy locations

Impedance conversion and bootstrapping

The output resistance of a unity gain amplifier is low, while the input resistance is high. So this is an excellent method to conect a sensor with a high impedance to a low impedance input or to connect to long wires. The circuit was already given in figure 13. Bootstrapping is the technique to do active shielding: cable capacitance becomes ineffective (figure 23). The cable capacitance is still there, but because the shield has the same potential as the signal carrying core, it has no influence. The capacitive coupling is removed by a strong amplifier delivering the current

Fig. 23: A unity gain amplifier can be used to do active shielding. By this method called Bootstrapping, the effect of the cable capacitance removed

3 or 4-Wire connection

Measuring a resistor value can be done by applying a current, while measuring voltage. The ratio gives the resistor value. However, if the measured voltage is not the voltage over the resistor (or resistive sensor element), there will be an error in the percieved resistance. A possible cause of such an error is the voltage drop over the connecting wires.

In figure 24 this situation is indicated. The current source I drives a current through the resistor. Although the real current through the resistor is equal to the imposed current, the sensed voltage is probably not equal to the real voltage over the sensor. The reason is that the drive current results into a voltage drop over the wires. If the wires have a lead resistance $R_{L}$ we find:

Fig. 24: A method to determine the resistance of a resistive sensor. An electric current is applied and the voltage is measured

The result that the measured resistance is equal to the resistance of interest plus the cable resistance is obvious, but highly undesired because it reduces the sensitivity of the overall system. The solution, however, is relatively simple: we should avoid that the imposed current affects the voltage drop over the cables. This can be done with the four wire solution of figure 25. The current is driven through the outer wires, but the voltage sensing is done with the inner wires. When using a high impedance voltage measuremnt device (which they normally are), there will be only a few $\mu A$ of current in the voltage sensing wires, and therefore hardly any voltage drop. This means that the sensed voltage is almost equal to the voltage over the sensor. There is a voltage drop over the current carrying wires, but that is irrelevant for the measurement.

Fig. 25: An improved method to determine the resistance of a resistive sensor. The wires for driving a current are separated from the wires for sensing the voltage over the sensor

The method of using 4-wires, is fundamentally equal to bootstrapping. With bootstrapping, the cable capacitance is physically still there, but the impact on the measurement is eliminated because there is no voltage drop over the capacitor. With the 4-wire measurement, the cable resistances are physically still in place, but they do not affect the measurement because there is no current through them.

Twisted pair/balanced out

When we realize what is in fact the noise picked up by a long wire, then it must be electro motoric forces (emf) due to induction from fluctuating magnetic fields. Thes are common for all wires. A solution to remove common noise that is generated in the cables is to put the signal on the cables as a differential signal as shown in figure 26. A sensor where the output is driven as a bipolar signal is said to have a balanced out.

Fig. 26: A balanced out driving method of wires, reduces common noise in the cables

Another method is to create alternating loops that will pick up emf with alternating sign. This can be done by twisting the wire. With a constant wire thickness, this will result into equally distributed current loops. The method of using twisted pairs of wires is illustrated in figure 27