\documentclass[journal]{IEEEtran}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{../mcode}
\setlength{\parskip}{0.1ex plus 0.5ex minus 0.1ex}
\usepackage{booktabs}
\usepackage{float}
\usepackage{algorithm2e}

\usepackage[utf8x]{inputenc}
%\usepackage[T1]{fontenc}

\setlength{\heavyrulewidth}{1.2pt}

\usepackage{hyperref}
\hypersetup{
    colorlinks,%
    citecolor=black,%
    filecolor=black,%
    linkcolor=black,%
    urlcolor=black,%
    bookmarksnumbered=true
}

\usepackage{array}

\floatstyle{ruled}
\newfloat{listing}{bp}{lref}
\floatname{listing}{Listing}

\newcommand{\unit}[1]{\ensuremath{\, \mathrm{#1}}}
\newcommand{\degree}{^\circ}

\begin{document}
\title{MIT-4031 Lab Exercise 2 final report:\\Pressure sensors}

\author{Group 1: \\
    Petteri Aimonen, petteri.aimonen@tut.fi \\
    Michael Braun, Michael.Braun86@gmx.de \\
    Timo Pöhö, timo.poho@tut.fi
    }

\maketitle

\begin{abstract}
\end{abstract}

\section{Introduction}

In this laboratory exercise, we will assemble and calibrate a measuring system based around the \textbf{MS5407-AM} pressure sensor. The sensor is a piezoresistive Wheatstone bridge, which gives a differential voltage output proportional to absolute pressure. \cite{ms5407}

The measurement circuit contains a differential amplifier, which will amplify this voltage signal and allow it to be measured using an AD converter connected to a computer.
The assembled device will be placed into a pressure chamber and the voltage level will be measured at known pressures in order to calibrate the sensor.

Finally, the performance of the sensor will be evaluated based on such criteria as the sensitivity and linearity of the response.

\section{Theoretical background}

\subsection{Electrical design}
Piezoresistivity is a phenomenon where the resistance of a resistor changes as response to mechanical strain. A part of the effect is due to the geometric changes, i.e. resistance increases as the resistor is pulled longer. However, in semiconductors the effect is much larger as also the bandgap voltages change when the distance between atoms changes.
The sign of the resistivity change depends on the semiconductor material, but in any case the resistivity increases in one direction and decreases in the perpendicular direction. \cite{piezoresistivity}

\begin{figure}[H]
\centering
\includegraphics[scale=0.7]{resistors.pdf}
\caption{Piezoresistors connected as a Wheatstone bridge.}
\label{fig_bridge}
\end{figure}

On the pressure sensor chip, there is a thinned area of silicon that acts as a flexible membrane.
Piezoresistors have been made on the edges of this membrane, so that two of them are along the edge (\emph{tangential}) and two are perpendicular to the edge (\emph{radial}).
When the membrane bends due to air pressure, the tangential resistors become wider and the radial resistors are pulled longer.
Electrically, the resistors are connected in reverse order in the two branches of the Wheatstone bridge, as shown in figure \ref{fig_bridge}.
Their resistances change in opposite directions, which unbalances the bridge and causes the voltage in one branch to rise and the voltage in another branch to decrease.

The sensitivity of the sensor is highest when the resistors are oriented perpendicular to each other, i.e. the way described above. Also they are commonly positioned at the middle of the membrane edge, because the strain at this point is the highest.

\subsection{Mechanical design}
In this experiment we are using a pre-assembled sensor component, but the same chip is also available separately as a silicon die. The measurement principle is the same, but the packaging in the pre-assembled sensor makes it possible to solder using common tools instead of expensive wire bonding equipment. Additionally, the metal casing is filled with silicone, which helps protect the sensor from humidity. On the other hand, the separate die can be had both with and without sealed reference pressure chamber, the latter configuration allowing measurement of a pressure difference.

The sensor die is affected by temperature, light and moisture.
Temperature affects the offset voltage of the sensor up to 80~µV/°C and the sensitivity up to 0.23~\%/°C. Over the specified temperature range of -40 to 125°C, this gives a total of about 0.6 \% of the full-scale span. For precise measurements, this effect will need to be compensated using signal processing or by regulating the temperature.

Light affects the reading through the photo-electric effect in silicon. It can be avoided by mechanically stopping light from reaching the sensor die.
Moisture affects the reading by conducting electricity. Again, it is avoided by mechanically protecting the sensor using silicone gel.

\subsection{Measurement circuit}
The measurement circuit consists mainly of \textbf{INA155UA} instrumentation amplifier (U1) and \textbf{REF02AUE4} voltage reference used for supplying the pressure sensor and the amplifier. In addition there are some passive components: C1 EMI/RFI filter to reduce interference and C2-C5 bypass capacitors for reducing voltage fluctuations. The EMI filter is connected to the output line of the amplifier, and its purpose is to prevent any high-frequency noise from propagating to or from the circuit. R2 and R3 are used as a voltage divider from reference source U2 to set the offset voltage for the U1 amplifier. Rg can be used to set the amplifier gain; in this case, a gain of 10 is wanted so Rg is left unconnected.

The circuit is assembled by hand. When soldering surface-mount components, the heat is applied to the board and the component leg so that heat spreads to both contact surfaces. Solder is then applied to the spot where board and leg touch each other, in order to attach the component to the board. Heating time depends on the soldering iron temperature and components; usually time is only 1-5 seconds. A good solder joint has a round appearance, smooth and shiny. It must also be proper size, wetting the contact surfaces but not causing any short-circuits.

\begin{figure}
\centering
\includegraphics[width=\columnwidth]{solderjoints.jpg}
\caption{Illustration of solder joint quality.
The pins on the left have been soldered properly.
The solder joint in the upper right corner, on the other hand, is not very good.
(Photo: Petteri Aimonen)}
\label{fig_soldering}
\end{figure}

\subsection{Sensor terminology}
\subsubsection{Characteristic curve}
The characteristic curve of a sensor describes the behavior of the sensor respectively the sensors output due to a certain input. In other contexts, characteristic curves can be drawn also for electrical and environmental factors that affect the sensor behaviour, such as temperature.

\subsubsection{Calibration}
Calibration is a measurement process to ensure and determine the accuracy of a measurement device e.g. a sensor. Therefore the measured data delivered by the sensor, which is to be calibrated, is compared to the measured data of a sensor with known accuracy and correctness called the standard. The results of this comparison can be used to adjust the sensor and thus improve its performance. 

\subsubsection{Linearity}
The linearity of a transducers output describes the extent to which the measured characteristic curve of a sensor differs from the ideal curve. Linearity can therefore be defined as percentage of nonlinearity: 
\begin{equation*}
\mathrm{Nonlinearity [\%]} = \frac{D_\mathrm{out[max]}}{\mathrm{out}_\mathrm{f.s.}}
\end{equation*}
where $D_\mathrm{out[max]}$ is the maximum output deviation and $\mathrm{out}_\mathrm{f.s.}$ is the full range of the output. \cite{carr}

\subsubsection{Hysteresis}
Hysteresis describes the phenomenon that the behavior of a system depends not only on the value of its input signal but also on the earlier state of its output signal. Systems with hysteresis behavior can therefore show different output values for one defined input parameter. The response of the system is conditioned by whether the desired input value is approached from a higher or lower initial value.  A well known example for hysteresis behavior is the magnetization of ferrite.

A sensor which shows hysteresis behavior can produces different output signals for a single input value. This naturally corrupts the accuracy of the measurement system. Adequate arrangements have to be applied in order to cope with hysteresis behavior and to improve the overall performance of measurement system.

\begin{figure}[h]
\centering
\includegraphics[height=3cm]{hysteresis.pdf}
\caption{Hysteresis in a measurement system. In this example, the output value is too small when the input has previously been small, and too large when the input has been larger.}
\label{fig_hysteresis}
\end{figure}

Hysteresis is characterized by measuring two characteristic curves, one when the measured value is increasing and another when the value is decreasing. An example of this is shown in \ref{fig_hysteresis}. In actual measurement situations, the value may vary back-and-forth in a small range. Then the output value can be anything between the two curves, which limits the accuracy of the measurement.

\subsubsection{Analog Digital conversion}
Analogue-Digital conversion is the process of transforming an analogue input signal into a set of digital data which can then be further processed or saved. Analogue-Digital converters are widely used, low-cost integrated circuits (ICs).
Typically the input quantity of an AD converter is either voltage or current, for example produced by a sensor or measurement device, and therefore the input units are Volts or Ampere. The AD converter generates an integer value which is proportional to the input signal.

\subsubsection{Aliasing}
Aliasing is an effect which occurs during the digitalization of analogue signals. To display the analogue signal correctly it is necessary to scan this signal with a sampling rate which is at least twice as high as the highest frequency of the signal (Theorem of Nyquist). If the sampling rate is insufficient, frequencies higher than the Nyquist-frequency will be interpreted as low frequencies, and thus the digital signal is distorted.

Established methods to avoid this undesired effect are the usage of lowpass filter and higher sampling rates. Even though e.g. a pressure signal is often slowly varying, there may be high-frequency interference that requires filtering to prevent aliasing. Note that the filtering must be done before the digitalization.

\subsection{Practical issues}
To calibrate the pressure sensor in the laboratory, the characteristic curve of the sensor is being measured and compared to a reference measurement which is provided by a Beamex pressure calibrator. The measurement of the characteristic curve is being performed in a pressure chamber. The pressure inside the chamber can be varied and thus the changes respectively the absolute output of the sensor can be recorded. For this, a 16-bit Analogue-Digital converter is used, which will store the produced data in the form of a Matlab-file for further computing.

To avoid the negative effect of the hysteresis behavior of the pressure sensor, the output of the signal should be recorded at least two times. Once while the pressure is rising and once while the pressure is falling. Thus a average output signal can be calculated and the accuracy of the measurement device can be improved.  

\section{Research methods}
In laboratory, we were given the printed circuit board, the U1, U2 integrated circuits, C1 filter and the pressure sensor module. Rest of the passive components were selected from a component box as the closest available values. In particular, R1 was $3\unit{k\Omega}$ instead of $3.01\unit{k\Omega}$ and R2 was $330\unit{\Omega}$ instead of $332\unit{k\Omega}$. These only affect the offset voltage, so the difference is not significant in these measurements.

The measurement circuit was soldered together by hand. There were some problematic points: the alignment of the IC's, centering the 0805 sized passive components on the pads and applying proper amount of heat to the pressure sensor pads to get the solder spread out evenly. The passive components were difficult to place because the PCB had been designed for 1206 sized components, but at the time only smaller 0805 sized ones were available. Therefore the component had to be at exactly the middle of the pads in order to make contact with both of them.

After the circuit was assembled, the assistant visually checked it for correctness. Then it was connected to laptop PC using an AD-converter. Before placing the sensor in the pressure chamber, it was already possible to see some variations when the sensor was moved, which confirmed that it was atleast somewhat functional.

\begin{figure}[h]
\centering
\includegraphics[width=\columnwidth]{pressuresystem.pdf}
\caption{Schematic of the pneumatic system used in the measurement. The pressure regulator was adjusted at 0.5~bar steps.}
\label{fig_pressuresystem}
\end{figure}

For measuring the characteristic curve, the sensor was placed in a pressure chamber as shown in figure \ref{fig_pressuresystem}. The pressure regulator was then adjusted until the pressure had risen about 0.5~bars, after which it was let to stabilize for a few seconds.

To characterize the hysteresis, the response of the sensor was measured both when the pressure was increasing and when it was decreasing. It was important that the pressure regulator was adjusted only in one direction at a time, and less important whether the steps were exactly 0.5~bar.

We performed a total of 4 measurement sequences: increasing, decreasing, increasing and again decreasing the pressure. There was a total of 41 measurements, and for each we recorded 300 samples of ADC data (sampled at 100~Hz) and the reference pressure meter reading.

\section{Results}

\includegraphics{characteristic_curve.pdf}
\includegraphics{deltas.pdf}

\section{Conclusions}

\vspace{2cm}

\begin{thebibliography}{9}

\bibitem{ms5407}
    Measurement Specialties, \emph{MS54XX Miniature SMD Pressure Sensor}, 2011,
    \url{http://www.meas-spec.com/product/t_product.aspx?id=5021}

\bibitem{piezoresistivity}
    MIT-4031 course material, \emph{Piezoresistivity}, 2011.

\bibitem{carr}
    Joseph J. Carr, M. Brown, \emph{Introduction to Biomedical Equipment Technology}, Third Edition, 2010,
    \url{http://zone.ni.com/devzone/cda/ph/p/id/227}

\end{thebibliography}

\end{document}


