+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.
+
+
+
+\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_a.jpg}
+\end{center}
+
+\begin{center}
+ \includegraphics[scale=0.50]{figures/pressure_d.jpg}
+ \captionof{figure}{Activated segments (green) for a single digit}
+ \label{pressure_a.jpg}
+\end{center}
+
+\section*{Appendix D - Sources of Error}