\documentclass[10pt]{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{amsmath} % needed for math align
\usepackage{bm} % needed for maths bold face
 \usepackage{graphicx}    % needed for including graphics e.g. EPS, PS
\usepackage{fancyhdr}	% needed for header
%\usepackage{epstopdf} % Needed for eps graphics
\usepackage{hyperref}
\usepackage{lscape}  % Needed for landscaping stuff 
 \topmargin -1.5cm        % read Lamport p.163
 \oddsidemargin -0.04cm   % read Lamport p.163
 \evensidemargin -0.04cm  % same as oddsidemargin but for left-hand pages
 \textwidth 16.59cm
 \textheight 21.94cm 
 %\pagestyle{empty}       % Uncomment if don't want page numbers
 \parskip 7.2pt           % sets spacing between paragraphs
 %\renewcommand{\baselinestretch}{1.5} 	% Uncomment for 1.5 spacing between lines
 \parindent 0pt		  % sets leading space for paragraphs


\newcommand{\vect}[1]{\boldsymbol{#1}} % Draw a vector
\newcommand{\divg}[1]{\nabla \cdot #1} % divergence
\newcommand{\curl}[1]{\nabla \times #1} % curl
\newcommand{\grad}[1]{\nabla #1} %gradient
\newcommand{\pd}[3][ ]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} %partial derivative
\newcommand{\der}[3][ ]{\frac{d^{#1} #2}{d #3^{#1}}} %full derivative
\newcommand{\phasor}[1]{\tilde{#1}} % make a phasor
\newcommand{\laplacian}[1]{\nabla^2 {#1}} % The laplacian operator

\usepackage{color}
\usepackage{listings}

\definecolor{darkgray}{rgb}{0.95,0.95,0.95}
\definecolor{darkred}{rgb}{0.75,0,0}
\definecolor{darkblue}{rgb}{0,0,0.75}
\definecolor{pink}{rgb}{1,0.5,0.5}
\lstset{language=Java}
\lstset{backgroundcolor=\color{darkgray}}
\lstset{numbers=left, numberstyle=\tiny, stepnumber=1, numbersep=5pt}
\lstset{keywordstyle=\color{darkred}\bfseries}
\lstset{commentstyle=\color{darkblue}}
%\lstset{stringsyle=\color{red}}
\lstset{showstringspaces=false}
\lstset{basicstyle=\small}


\begin{document}

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}

\fancyhead[LO, L]{}
\fancyfoot[CO, C]{\thepage}

%\title{\bf Characterisation of nanostructured thin films}
%\author{Sam Moore\\ School of Physics, University of Western Australia}
%\date{April 2012}
%\maketitle

\begin{center}
	B.Sc. (Hons) Physics Project \par
	{\bf \Large Thesis} \par
	Samuel Moore \\
	School of Physics, University of Western Australia \\
	April 2012
\end{center}
\section*{Characterisation of Nanostructured Thin Films}
{\bf \emph{Keywords:}} surface plasmons, nanostructures, spectroscopy, metallic-blacks \\
{\bf \emph{Supervisers:}} W/Prof. James Williams (UWA), Prof. Sergey Samarin (UWA) \\

\pagebreak
\tableofcontents

\pagebreak

\section*{Acknowledgements}

I am extremely grateful for the support offered to me by many individuals during this project. There aren't many synonyms for ``Thanks'', so I'm afraid this section may be a little repetitive.

Thanks to my supervisors Prof Sergey Samarin and W/Prof Jim Williams for envisioning the project, and their invaluable support throughout the year. I would also like to thank staff members at CAMSP for assisting with the supervision of this project. In particular I am extremely grateful for the help and advice given by Dr Paul Gualiardo during the construction and testing of the Total Current Spectroscopy experiment.

Thanks to Alexie ??? from CMCA for producing the SEM images which proved a invaluable aid for discussing the structure of the metallic-black films. Thanks to Nikita Kostylev for helping me learn the art of operating the ellipsometer. Thanks to both Prof Mikhail Kostylev and Jeremy Hughes for lending me some samples for ellipsometric analysis. I would also like to endorse the team at J.A Woolam, who provided replacement pins for the ellipsometer alignment detector at no charge after one of the original pins became mysteriously damaged. 

Congratulations to Jeremy Hughes who successfully predicted that the emission current of the electron gun was varying periodically less than a quarter of the way through the first period. Condolences to Alexander Mazur, whose theory that the vacuum chamber contained a pulsar proved unfounded. 

Thanks to all my family and friends for their support and for continuing to put up with my slow descent into madness during the last 12 months. 

Finally, perhaps as a result of the aforementioned madness,  I would also like to thank the various pieces of equipment and inanimate objects which have been crucial to the success of this project. This includes the ellipsometer, the ADC/DAC box, my laptop computer ``Cerberus'', and the two ammeters upon which I relied upon so heavily. Rest in peace Keithly 610B. Your death was not in vain.

\pagebreak

\section{Introduction}

The report will be organised as follows; first we will discuss literature relating to surface science and nanostructured thin films in particular. We will then give an overview of the primary experimental techniques employed during this project, before presenting experimental results. Finally, we will discuss stuff.

\emph{NOTE: Introduction needs work}

\pagebreak

\section{Overview}

In this section we provide an overview of theoretical and experimental literature related to the properties of nanostructured thin films. We also include a summary of the past research which focuses on metallic-black films.







\subsection{Electron Surface Interaction}


% Research of Komolov

\subsection{Electron Surface Interaction}


\subsection{Plasmons}

\emph{NOTE: To be completely honest, I don't think I can say much about plasmons. The TCS experiment does not detect plasmonic behaviour. The Ellipsometer can be used to determine frequencies at which plasmons might occur. However, I have not seen any dips in $\epsilon$ which would indicate plasmon thresholds.}

% What are they?
A plasmon is a quasi-particle arising due to charge density oscillations in a solid. 



% Early research

\subsection{Metallic-Black Films}

% What are they?
So called metallic-black films are the result of deposition of metal elements at a relatively high pressure (of the order of $10^{-2}$ mbar). The films are named due to their high absorbance at visible wavelengths; they appear black to the naked eye. There is a remarkable contrast between such films and films deposited under low pressure (less than $10^{-6}$mbar), which are typically highly reflective and brightly coloured.

% First mentions and early research; Pfund
This phenomenom has been known since the early 20th century, with the first papers on the subject published by Pfund in the 1930s \cite{pfund1930}, \cite{pfund1933}. Pfund established the conditions for formation of metallic-blacks \cite{pfund1930}, and showed that the transmission spectrum of metallic black films is almost zero in visible wavelengths, but increases to a plateau in the far infrared \cite{pfund1933}. More extensive research on the structural and optical properties of these films by Louis Harris and others during the 1940s and 1950s \cite{harris1948}, \cite{harris1952}, \cite{harris1953}. It has been established that metallic blacks may be prepared in either air or inert gases


% Pretty pictures for purpose of this discussion
% Not really "results", since I didn't make the images
Secondary Electron Microscope (SEM) images of Au deposited on Si at high and low pressures (in air) were produced at the Centre for Microscopy Characterisation and Analysis (CMCA), UWA. The film imaged on the left (high pressure) appears black at visible wavelengths, whilst the film on the right (low pressure) appears golden yellow.

\begin{center}


\begin{tabular}{cc}
	\includegraphics[scale=0.2]{figures/Au_BLACK_200nm.png} & %\captionof{figure}{Au-Black SEM Image} \label{Au_BLACK_200nm.png} &
	\includegraphics[scale=0.2]{figures/Au_semi-shiny_1_SEM.png} %\captionof{figure}{Au SEM Image} \label{Au_semi-shiny_1_SEM.png}		
	
	\label{SEM_images}
\end{tabular}

	\captionof{figure}{{\bf SEM images of Au deposited on Si at $2\times10^{-2}$mbar (left) and $1\times10^{-6}$mbar.} Note that the scales are very similar for both images.}		

\end{center}

% Explanation of structure?
The structural difference between the two films is striking, and yet the exact mechanism behind the formation of the metallic-black film is not well understood. The most widely accepted explanation is that the evaporated metal particles reaching the target surface have insufficient energy to form a regular crystal lattice due to cooling through collisions with the atmosphere \cite{}. As of yet, there is no detailed theoretical description of this behaviour. 

% Research by Harris concluding ``condensor'' like structure
Harris et al. have produced experimental results of the transmission of metallic-black films from visible wavelengths to the far-infrared \cite{}. By modelling the film as a layer of metallic strands, acting as ``condensors'', Harris et al. arrived at an expression for the electron relaxation time of [element]-black \cite{}, leading to a a transmission spectrum in good agreement with experimental results.

% Mckenzie
Mckenzie has established that the presence of oxygen effects the optical and electrical properties of metallic-blacks \cite{mckenzie2006}.

% Model of structure
Nanostructured metal films prepared at low pressure are often approximated by an isotropic layer of spherical blobs upon the substrate, or even as a uniform layer with an ``effective'' thickness \cite{}. As the right image in Figure \ref{SEM_images} shows, this is a good representation of the structure of such a film. In contrast, the metallic-black film is highly non-uniform; as a result, detailed characterisation of the properties of such a film is difficult.




% More recent research
More recently, it was shown that Au-black coatings increased the efficiency of thin film solar cells \cite{}. In this study, a simulation approximating an Au-black film as a layer of semi-spherical structures showed plasmonic behaviour which lead to an increase in electric field behind the film. 


% Artificially ``blackened'' thin films
Metallic-black films have proven useful in applications requiring efficient absorption of light, including the. Recently there has been interest in artificial ``blackening'' of metal surfaces in ways which simplify the characterisation of the surfaces for practical applications. 

Sondergaard et al. have produced metallic-black surfaces capable of suporting surface plasmon modes \cite{sondergaard2012}. These films exhibit similar optical properties to the previously considered ``evaporated'' metallic-black surfaces. 

% What I will be doing with metallic-black films
This project will employ Total Current Specroscopy, Ellipsometry and Optical Spectroscopy methods to investigate the difference between metallic films deposited at low pressure, and high pressure (metallic-blacks). The production and study of artificially blackened films is beyond the scope of this research.


\begin{center}
	\includegraphics[scale=0.2]{figures/300V-01.jpg}
	\captionof{figure}{{\bf Au-black film viewed at magnifications of x20000, x50000, x100000 and x200000} (top left, top right, bottom left, bottom right). The film appears non-isotropic, and possibly fractal like upon magnification. This structure has lead some reasearchers to  refer to the deposited films as ``smokes'' \cite{}.}
	\label{300V-01.jpg}
\end{center}

\pagebreak

\section{Experimental Techniques}

\subsection{Secondary Electron Spectroscopy}

In this section, we will give a general overview of the basic concepts of Secondary Electron Spectroscopy. The next section will focus on low energy Total Current Spectroscopy, the particular technique which has been employed for this study.


Secondary Electron Spectroscopy encompasses a large group of techniques used for studying the electron spectra of surfaces and solids, and processes of secondary electron emission. In these methods a beam of primary electrons is directed at a surface. The interactions between primary electrons and the surface give rise to an energy distribution of secondary electrons ejected from the surface.


\begin{center}
	\includegraphics[scale=0.40]{figures/se_dist.pdf}
	\captionof{figure}{{\bf Model of Secondary Electron Distribution}}
	\label{se_dist.pdf}
\end{center}

\emph{NOTE: I need to draw some fine structure on this curve somehow. Or find an actual spectrum to reproduce.}

Figure \ref{se_dist.pdf} shows a simplified model of an energy distribution of secondary electrons. 

The spectrum shown in Figure \ref{se_dist.pdf} may be divided into several regions based upon the originating processes of the secondary electrons in each region. However, it is important to note that these processes are determined by the primary electron energy $E_p$; each process has a threshold energy, below which it cannot occur. For example, Auger electrons are only produced if the primary electrons have sufficient energy to excite an inner level electron to above the Fermi level.

The narrow peak centred at $E = E_p$ is largely due to elastically scattered primary electrons\footnote{A typical width is $0.5-1.0$eV; as a result, small energy losses due to phonon excitations ($10-50$meV) can not resolved from truly elastic reflections \cite{komolov}}; the width of this peak is determined by the distribution of primary electron energies, as well as the resolution of the detector. 

Fine structure due to low energy losses can be observed just below the primary peak. These energy losses are due to transitions between the valence and conduction bands, and plasma vibration excitation. This part of the spectrum is the focus of Energy Electron Loss Spectroscopy (EELS).

The central region of the distribution is mostly due to inelastically scattered (or ``rediffused'') primary electrons. If the energy of primary electrons is sufficient, this region may also contain fine structure due to Auger excitations.

The broad, asymetrical curve at low energy is due to inelastically scattered primary electrons which have undergone multiple scattering events. So called ``true'' secondary electrons, the direct result of secondary electron emission, also appear in this region for sufficiently large primary electron energies. 

For a more detailed discussion, refer to \cite{komolov}.


Techniques of Secondary Electron Spectroscopy can be divided into two classes. Energy-resolved methods are based upon observation of the secondary electron distribution at a fixed primary electron energy. The angular distribution of emitted electrons is often also recorded. These methods aim to examine the properties of secondary electrons emitted in a particular energy interval.


In contrast to Energy-resolved methods, Total Current (or Yield) methods measure the total current of secondary electrons whilst varying the primary electron energy. As the primary electron energy reaches the threshold for a particular mechanism of secondary electron scattering, the  analysis of the total secondary electron current as a function of energy can give information about the threshold energies for processes of interest.

Total Current methods are generally simpler to realise experimentally compared with Energy-resolved methods, as they do not require energy analysers, and current measurement may be performed external to the vacuum chamber, using a conventional low current ammeter. It is also simple to combine a Total Current methods with existing Energy-resolved methods.


\subsection{Low Energy Total Current Spectroscopy}

As the name suggests, low energy Total Current Specroscopy is based upon measurement of the total secondary electron current at low primary electron energies, typically in the range of $0-15$eV. At low primary energies, the secondary electron current is predominantly composed of inelastically reflected primary electrons which have lost energy in causing interband transitions.

Figure \ref{tcs_simple.pdf} shows a simplified schematic for the Total Current Spectroscopy experiments conducted during this study. Electrons are produced via thermionic emission by heating a cathode. A series of electrodes are used to accelerate and focus a current $I_1$ onto the target. The energy of primary electrons is controlled by adjusting the power supply $U$, which determines the potential between the cathode and target. The transmitted current $I$ to flow through an ammeter external to the chamber. For a more detailed description of the experimental setup, Refer to Appendix B for a discussion of hardware to automate the measurement of $I$ and control of $U$. Refer to Appendix D for a discussion of the electron gun and its control circuit.

\begin{center}
	\includegraphics[scale=0.50]{figures/tcs_simple}
	\captionof{figure}{Simplified Diagram of TCS Experiments}
	\label{tcs_simple.pdf}
\end{center}

The goal of Total Current Spectroscopy is to measure variations in the secondary electron current, $I_2$. It can easily be demonstrated that this can be accomplished by measurement of $I$.

In the following discussion, we will summarise the approach adopted by Komolov to relate measurement of $I(E_1)$ to characteristics of the sample under study \cite{komolov}.

From the above, it is obvious that $I = I_1 - I_2$. Assuming that $I$ is a constant, independent of primary electron energy $E_1$, we define the Total Current Spectrum (TCS) as:
\begin{align*}
	S(E_1) &= \der{I}{E_1} = - \der{I_2}{E_1}
\end{align*}
This result also assumes that $I$ does not vary during the time taken to perform a measurement of $S(E_1)$ for a range of $E_1$ values. This is generally valid in the period after the cathode reaches thermal equilibrium.

The energy of a single primary electron arriving at the sample is given by $E = e U + c$, where $e$ is the electron charge, $U$ is the potential difference between cathode and sample, and $c$ a constant including the contact potential between the cathode and sample.
In reality, the cathode emits electrons with a distribution of energies, which is further altered by the focusing properties of the electrodes; as a result, the energy of the incident primary electrons is described by a distribution $f(E - E_1)$ about the mean value $E_1$, with the maximum of the distribution at $E = E_1$.

The primary electron current $I_1$ for a mean energy $E_1 = e U$ can be written as:
\begin{align*}
	I_1(E_1) &= e A \int_{0}^{\infty} f(E - E_1) dE
\end{align*}
Where $A$ is the surface area irradiated by the beam.

Introducing the secondary emission coefficient $\sigma(E)$, which gives the probability for a primary electron of energy $E$ to give rise to a secondary electron, we can write the secondary electron current as:
\begin{align*}
	I_2(E_1) &= e A \int_{-E_1}^{\infty} \sigma(E_1)f( E - E_1) dE 
\end{align*}

The total current $I$ may then be written as:
\begin{align*}
	I(E_1) &= e A \left[ \int_{0}^{\infty} f(E - E_1) dE - \int_{-E_1}^{\infty} \sigma(E_1)f( E - E_1) dE \right] 
\end{align*}

Differentiating, using the fundamental theorem of calculus, we can determine the total current spectrum:
\begin{align*}
	 S(E_1) = \der{I}{E_1} &= e A \left\{ [ 1 - \sigma(0)] f(-E_1) - \int_{0}^{\infty} f(E - E_1) \der{\sigma(E_1)}{E_1} dE \right\}
\end{align*}

The first term in the above expression is determined solely by the distribution of primary electrons $f$. This term will be maximised when $E_1 = 0$; meaning that $U$ is equal to the contact potential $c$ between the cathode and sample. 

The second term contains all dependence of $S(E_1)$ on characteristics of the sample. At the threshold for a particular process, the secondary emission efficiency $\sigma(E_1)$ is expected to undergo a sharp change. This results in a well defined maxima or minima in the derivative $\der{\sigma(E_1)}{E_1}$, which can be seen as a corresponding maxima or minima in the total current spectrum $S(E_1)$. From the convolving function $f(E - E_1)$, it can be seen that the distribution of primary electron energy determines the degree to which $\der{\sigma(E_1)}{E_1}$ may be resolved from measurement of $S(E_1)$.

The total current spectrum $S(E_1) = \der{I}{E_1}$ can be obtained from measurement of $I(E_1)$ using a finite difference approximation. Often, the conventional ammeter and DC power supply in Figure \ref{tcs_simple.pdf} are replaced with a lock-in amplifier and AC power supply, as in Komolov's description \cite{komolov}. Lock-in amplifier techniques have the advantage of measuring $S(E)$ directly. The lock-in amplifier also eliminates unwanted sources of noise. For this study, the lock-in amplifier approach was inpractical due to the limitations on available equipment. For future studies, it is suggested that the lock-in amplifier approach be adopted.


\subsubsection{The Secondary Emission Coefficient}

$\sigma(E)$ can be written as the sum of two components, representing the probability for secondary electrons arrising due to elastic reflections or any mechanism involving primary electron energy loss.










\subsection{Ellipsometry}

Ellipsometry is an optical technique most commonly used to determine the thickness of multilayered thin films. Ellipsometry can also be used to determine the optical constants and properties of unknown materials. 

Essentially, ellipsometry measures the change in polarisation of light reflected from a surface. This change in polarisation can be related to properties of the surface if knowledge of the surface is correctly applied. For a bulk sample, the change in polarisation can be directly related to the optical constants of the material.


\subsection{Vacuum Techniques and Sample Preparation}

Both the TCS experiments and the deposition of films must be performed in a vacuum. For convenience and simplicity, a single vacuum chamber at CAMSP has been repurposed to perform both of these tasks. The chamber can be pumped by a molecular turbo pump, backed by a rotaray pump, to a base pressure of $2\times10^{-8}$ mbar, or by the rotary pump alone to a base pressure of $1\times10^{-3}$ mbar. The pressure is monitored using either a pirani or ion gauge (for pressures greater than and less than $10^{-3}$ mbar respectively).

%TODO: Insert graphs of pressure in chamber

Figure \ref{} shows a diagram of the vacuum chamber used both for the creation of nanostructured thin films and their study using TCS. A rotatable sample holder is positioned in the centre of the chamber. One flange of the chamber houses the electron gun used for TCS measurements, whilst the opposite flange contains feedthroughs on which tungsten filament evaporators are mounted. This setup allows for almost immediate study of evaporated films by simple rotation of the sample holder to face the gun.


The evaporators consist of a tungsten wire filament attached between two feedthroughs. A piece of a desired metal is folded over the apex of the tungsten wire. The metal can be heated by passing a current through the filament; near the metal's melting point it begins to evaporate. To clean the metal surface and ensure uniform evaporation, this procedure is first performed at low pressure (below $10^{-6}$ mbar) with no sample in the chamber, with the current increased until the metal piece begins to melt and forms a ball on the wire. Figure \ref{} shows an image of an evaporator that has been prepared for use.

This study focused primarily on depositing Au films on an Si substrate, at both high and low pressures. The substrates and sample holders were cleaned in an acetone bath immediately prior to insertion in the vacuum chamber.

\pagebreak

\section{Experimental Results and Discussion}
\subsection{TCS Measurements}

This study has focused on the evolution of the TCS of Au deposited on Si with increasing thickness of Au film. A general dependence of TCS curves on time has also been observed; it is likely that this time dependence is due to oxidation of the surface of the sample.



\subsubsection{TCS of Si Substrate}

Figure \ref{} shows the TCS 

Figure \ref{} shows the TCS of Si in the (111) and (100) orientations as presented by Komolov \cite{komolov}


\subsection{Ellipsometric Measurements}

\subsection{Transmission Spectra of Metal Films}

Using the VASE and a commercial spectrometer (OceanOptics) in independent experiments, we obtained transmission spectra for metallic-black and some other metallic films.

\pagebreak

\section{Conclusions}

\pagebreak

\bibliographystyle{unsrt}
\bibliography{thesis}


\pagebreak

\section*{List of Student Achievements}

\pagebreak

\section*{Appendix A - Electron Optics for Total Current Spectroscopy}


Figure \ref{electron_gun.pdf} shows the complete electron gun control circuit. The circuit was designed and constructed as part of this project. The design is based upon examples found in \cite{komolov} and \cite{Moore}.

The electron gun has been recycled from a Cathode Ray Oscilloscope. The gun contains a total of 9 electrodes; several electrodes are held at the same potential, as shown in the figure. As shown in figure \ref{electron_gun.pdf}, the electrode potentials are referenced to the cathode, not signal ground; this ensures that the focusing properties of the gun are not affected with changing potential between the cathode and ground.

Here we give a general discussion of aspects of the electron gun:
\begin{enumerate}
	\item Cathode

A high yield $\text{Ba}\text{O}^2$ filament was used as the cathode. This type of filament consists of a straight piece of tungsten wire bent at the centre into a sharp kink. A $\text{Ba}\text{O}^2$ disc is attached to the apex of the kink. A heating current (between 1.1 and 1.2A) is applied across the filament. Electrons near the surface of the disc recieve thermal energy as the filament is heated; once an electron has recieved enough energy, it is able to leave the surface of the disc through thermionic emission.

By applying Kirchoff's Laws to the circuit shown in Figure \ref{electron_gun.pdf}, it can be seen that the ammeter labelled ``Emission Current'' measures the total current in all loops passing through an electrode or the sample, and the cathode. This measured current does not include electrons which pass directly through the the vacuum chamber to ground; however, due to the large distance between the gun and the chamber walls, this current can be neglected.


	Figure \ref{} shows the measured cathode emission current as a function of time, starting several seconds prior to heating the cathode. From this graph, it can be estimated that at least $10$ minutes should be allowed for the filament to come to thermal equilibrium before commencing measurements.
	

	\item Primary Energy - The potential difference between the sample and the cathode $U$. Primary electrons arriving at the sample have energy $E = eU + \text{constant}$.

	For obvious reasons, it is impractical to directly attach a wire to the emitting surface of the cathode. Instead, two equal resistors are placed in series with the cathode, with the primary energy set point connected to the middle of the resistors. By applying Kirchoff's Voltage Law, making the (reasonable) assumption that both halves of the filament have equal resistance, the potential of the filament tip will be equal to that of the primary energy set point.
	

	\item Wenhault 

	The Wenhault is a small cylindrical electrode which surrounds and houses the filament.

	\item Einzel Lens

	\item Deflection Plates

	\item Final Electrode
\end{enumerate}

As discussed in Section \ref{}, the resolution of total current spectroscopy (and energy resolved secondary electron spectroscopy) is intrinsically linked to the distribution in energies of electrons arriving at the sample. Although the dist

A two dimensional electron gun simulator has also been written in order to help produce figures for qualitative purposes; results of some simulations are shown in Figure \ref{}.




\subsection*{Primary Energy Control and Current Measurement}

In order to collect data on the large number of planned samples for the study, some form of automation was required. The automated system needed to be able to set the primary energy by adjusting the potential of the cathode relative to the sample, and simultaneously record the total current through the sample.

The available power supplies at CAMSP featured analogue inputs for external control. This meant that a Digital to Analogue Convertor (DAC) card was needed to interface between the control computer and the power supply. In addition, the available instruments for current measurement produced analogue outputs. As a result, Analogue to Digital Convertors (ADCs) were required to automate the recording of total current.

Although an external DAC/ADC box was already available for these purposes, initial tests showed that the ADCs on the box did not function. The decision was made to design and construct a custom DAC/ADC box, rather than wait up to two months for a commercial box to arrive. The design of the custom DAC/ADC box is discussed in detail in Appendix B, and the software written for the on-board microprocessor and the controlling computer are included in Appendix D.

Figure \ref{block_diagram.pdf} shows a block diagram including all aspects of the Total Current Spectroscopy experiments. The emission current measurement point was included to allow for monitoring the behaviour of the filament, and confirm the assumptions of constant emission current. After the malfunctioning of one of the two available ammeters, it was only possible to measure sample current. However, earlier tests suggested that for short time periods (several minutes at most) the emission current's dependence upon time was negligable.

\begin{center}
	\includegraphics[scale=0.80]{figures/block_diagram}
	\captionof{figure}{Block Diagram for TCS Experiments}
	\label{block_diagram.pdf}
\end{center}


\begin{landscape}


	\includegraphics[scale=0.85]{figures/electron_gun.pdf}
	\captionof{figure}{Electron Gun and Control Circuit}
	\label{electron_gun.pdf}


\end{landscape}

\section*{Appendix B - DAC/ADC Box - Hardware}

\subsection*{Overview}

In order to automate TCS experiments, both Digital to Analogue and Analogue to Digital Convertors were required (DAC and ADC). To provide these, a custom DAC/ADC Box was designed and constructed. The box can be controlled by any conventional computer with available RS-232 serial communication (COM) ports. Most modern computers no longer feature COM ports; a commercially available convertor can be used to interface between the box's RS-232 output and a standard Universal Serial Bus (USB) port.


The key components of the DAC/ADC box hardware include:

\begin{itemize}
	\item Microprocessor (AVR Butterfly ATMega169)
	\item Four Analogue to Digital Converter (ADC) inputs
	\item Single Digital to Analogue Converter (DAC) output (Microchip MCP4922)
	\item Analogue electronics for amplification at ADC inputs and DAC outputs
	\item Seperate power supply circuitry for Digital and Analogue electronics
	\item RS-232 communications for control by a conventional PC or laptop
\end{itemize}

\subsection*{Microprocessor}
The DAC/ADC box has been based upon Atmel's AVR Butterfly; an inexpensive and simple demonstration board for the ATMega169 16 Bit microprocessor. The features of the AVR Butterfly include easily accessible ports for Analogue to Digital Convertor (ADC) inputs and digital input/output, an onboard Universal Asynchronous Reciever/Transmitter (USART) for RS-232 serial communications, and a 6 character Liquid Crystal Display (LCD). The AVR Butterfly can be programmed using a conventional computer over the USART using a RS-232 COM port. For modern computers (which do not usually posess COM ports), a RS-232 to USB converter may be used.

Figure \ref{avr_butterfly.pdf} is a labelled photograph of the AVR Butterfly showing the use of the available ports for this project.


%Figure of Butterfly
\begin{center}
  \includegraphics[scale=0.70]{figures/avr_butterfly.pdf}
	\captionof{figure}{AVR Butterfly} \label{avr_butterfly.pdf}
\end{center}

Unless otherwise stated, all voltage differences are specified relative to the power supply ground of the AVR Butterfly.

\subsection*{ADC Inputs}

The AVR Butterfly offers easy access to four of the ATMega169's ADCs through PORTF. Each ADC is capable of measuring voltages of $0 < V_{\text{adc}} < V_{cc}$ with 10 Bit resolution. For measuring voltages outside this range, some circuitry is required between the input voltage and the ADC input. In addition, it is desirable to provide the ADC with some form of input protection against accidental overloading.  Figure \ref{adc_normal.pdf} shows the input circuit which was used for three of the four available ADCs. 

\begin{center}
	\includegraphics[scale=0.50]{figures/adc_normal.pdf}
	\captionof{figure}{ADC4,6,7 Input} \label{adc_normal.pdf}
\end{center}


For making voltage measurements above $V_{cc}$, a voltage divider allows reduction of the voltage at the ADC. By constructing the voltage divider using a variable resistor, the range of measurable inputs could be manually adjusted. 

The diodes shown in Figure \ref{adc_normal.pdf} ensure that the ADC is protected from accidental exposure to voltages outside the acceptable range. In normal operation both diodes are off. If $V_{\text{adc}}$ were to become greater than the reference point $V_{cc}$, current would flow between the ADC input and the reference point, acting to reduce $V_{\text{adc}}$ until it reached $V_{cc}$. Similarly, if $V_{\text{adc}}$ fell below ground, current would flow from ground to the ADC input, acting to increase $V_{\text{adc}}$ until it reached ground.

The voltage at the ADC input can be related to the input of the voltage divider using Kirchoff's Voltage Law and Ohm's Law:
\begin{align*}
 V_{\text{adc}} &= \frac{R_1}{R_1 + R_2} V_{\text{in}}
\end{align*}
Where $V_{\text{in}}$ is the voltage at the input of the circuit, $R_1$ is a fixed resistor, and $R_2$ is variable resistor.

$V_{\text{in}}$ can be therefore be determined from the registered ADC counts by:
\begin{align*}
	V_{\text{in}} &= \left(\frac{\text{ADC counts}}{2^{10}}\right) \times \frac{R_1 + R_2}{R_1} V_{cc}
\end{align*}

\subsubsection*{Differential ADC Input}

During the testing of the TCS experimental apparatus, it became desirable to measure the emission current of the electron gun. The electrometer used for this current measurement was capable of producing an analogue output in the range of $0-1V$. However, the negative terminal of this output was not at ground potential, but rather at the same terminal as the negative input terminal. Directly connecting the electrometer output to one of the ADC inputs discussed above would create a short circuit between the initial energy power supply, and ground (refer to Figures \ref{} and \ref{}). Therefore, it was decided to add a differential stage before the input of one of the ADCs.

Figure \ref{adc5.pdf} shows the modification made to the input for ADC5 on the AVR Butterfly. The original voltage divider and input protection discussed above are still present. The modifications include the addition of an instrumentation amplifier, and low pass filters.

\begin{center}
	\includegraphics[scale=0.70]{figures/adc5}
	\captionof{figure}{Differential Input stage for ADC5}
	\label{adc5.pdf}
\end{center}

asdfa
The instrumentation amplifier consists of two stages of operational amplifiers (op-amps); input buffers, and a difference amplifier.
The difference amplifier can be shown using the ideal op-amp model to produce an output voltage proportional to the difference between its inputs:

\begin{align*}
	V_{out} &= \frac{R_2}{R_1} \left(V_{2} - V_{1}\right)
\end{align*}

The two op-amps at the inputs to the differential amplifier are unity gain buffers. Although the outputs of the op amps are equal to their inputs, current is prevented from flowing from the circuit under measurement, and is instead drawn from the op amp power supply. 

In principle, two ADC channels could be used to record the positive and negative outputs of the electrometer seperately, with differencing done in software. However this would require modification to the output cable of the electrometer, which may prove inconvenient for future uses.It was decided that the modification of the cable and added complexity of the software required would be more time consuming than differencing the two inputs using the hardware methods described above.

The low pass filters were added to the inputs of ADC5 after it was found that an unacceptable level of AC noise was being output by the electrometer. The level of noise was too high to be filtered in software, for reasons that will be discussed in Appendix D.

\subsection*{Temperature Measurement}

The AVR Butterfly features an onboard thermistor connected to ADC0. Reading ADC0 and applying the formula given in the AVR Butterfly User's Guide \cite{} results in a temperature measurement. This was useful in establishing a link between the changing chamber pressure and the temperature of the laboratory (see Appendix C).

\subsection*{Power Supplies}
Due to the presence of both analogue and digital electronics in the DAC/ADC box, three seperate supply voltages were required:
\begin{enumerate}
	\item Digital logic in the range $3 \to 4.5$V
	\item Positive op-amp supply in the range $10 \to 15$V
	\item Negative op-amp supply in the range $-10 \to -15$V
\end{enumerate}

Circuitry was designed which allowed two seperate single pole power supplies to be used for Digital logic and the op-amps. A dual 0-30V DC power supply has been used for both digital and analogue circuitry.

\subsubsection*{Logic Power Supply}
The AVR Butterfly runs off $3V < V_{cc} < 4.5V$ DC. Since $V_{cc}$ was also used as the reference voltage for the ADCs and DAC output, it was desirable that $V_{cc}$ be kept constant, despite the absolute level of the power supply. A $3.3V$ voltage regulator has been used for this purpose. The capacitor further smooths the output by shorting high frequency fluctuations to ground.

When the DAC/ADC box was first constructed $V_{cc}$ was supplied by three $1.5V$ batteries. However, due to higher than expected power usage, and the unreliability of the voltage regulator as the input voltage fell below $4V$, inputs for an external power supply were later added.

\begin{center}
	\includegraphics[scale=0.70]{figures/logic_ps}
	\captionof{figure}{Logic Power Supply}
	\label{logic_ps.pdf}
\end{center}

\subsubsection*{Op-amp Power Supply}
The DAC/ADC box circuitry involves several operational amplifiers (LF356), which require dual $\pm 10-15V$ supplies. As there were no dual $\pm$ power supplies available, a single $30V$ power supply was used, with the circuit shown in figure \ref{} used to produce $\pm 15V$ relative to ground.

The buffer amplifier ensures that negligable current can flow from the power supply into the logic and ADC circuits, whilst the capacitor removes high frequency fluctuations of the power supply relative to ground.

\subsection*{DAC Output}
A commercial DAC board was used to produce the DAC output. The Microchip MCP4922 ET-Mini DAC is controlled by the AVR Butterfly using Motorola's Serial Peripheral Interface (SPI) Bus. The software used to implement SPI between the MCP4922 and the AVR Butterfly is discussed in Appendix D.

The ET-Mini DAC can only be powered off $3V$ to $5V$. Using $V_{cc} = 3.3V$ means that the DAC output cannot exceed $V_{cc} = 3.3V$. For TCS, energies of up to $15eV$ are required, so amplification of the DAC output was clearly necessary. A simple non-inverting amplifier with a manually adjustable gain was used to amplify the DAC output by a factor of three. This output was then used to control a laboratory power supply to produce the full range of initial energies.

\subsection*{RS-232 Communications}

The AVR Butterfly features an onboard USART, which can be used both for programming and communication with the ATMega169 processor. The RS-232 communications requires only three wires; Recieve (RX), Transmit (TX) and a common ground. 

The requirement that the AVR Butterfly share a common ground with the controlling computer lead to increased noise through ground loops. This is discussed in more detail in Appendix D.

Although the RS-232 is relatively simple to implement, which makes it ideal for non-proprietry microprocessor applications, most modern computers no longer feature RS-232 COM ports. Although a computer with COM ports was available at CAMSP, due to the extreme unreliability of this computer, it was quickly replaced with a laptop that did not possess COM ports, and a commercial RS-232 to USB converter was used to interface with the laptop.

\pagebreak

\section*{Appendix C - Pressure Monitoring}

The pressure in the chamber was monitored by a ion gauge at low pressure (below $10^{-3}$ mbar), and a pirani gauge at high pressure. The gauge included a flurescent Liquid Crystal Display (LCD). In order to automate monitoring of pressure, a USB webcam was placed in front of the gauge LCD. Software was written using the Python Imaging Library (PIL) to convert the image produced by the webcam into a pressure reading. In this way, the pressure could be recorded as a function of time, independent from other measurements performed using the ADC/DAC control box.

Figures \ref{pressure_a.jpg} to \ref{pressure_c.jpg} show the process by which an image taken with the webcam was converted into a pressure reading. The software first identifies bounding rectangles for each individual digit. These are then further subdivided into 7 segments. If enough pixels in a given segment match the colour LCD segments, then the segment can be identified as activated. The software then creates a string corresponding to the activated segments, and looks up the digit in a dictionary.

\begin{center}
	\includegraphics[scale=0.50]{figures/pressure_a.jpg}
	\captionof{figure}{An unprocessed image}
	\label{pressure_a.jpg}
\end{center}

\begin{center}
	\includegraphics[scale=0.50]{figures/pressure_c.jpg}
	\captionof{figure}{Individual digits identified}
	\label{pressure_b.jpg}
\end{center}

\begin{center}
	\includegraphics[scale=0.50]{figures/pressure_d.jpg}
	\captionof{figure}{Activated segments (green) for a single digit}
	\label{pressure_c.jpg}
\end{center}

\section*{Appendix D - Sources of Error}

GROUND LOOOOOOPS!

\section*{Appendix E - Software}

No really, you don't want to know



\end{document}

