Automatic commit. Tue Aug 14 20:00:04 WST 2012
[matches/honours.git] / thesis / thesis.tex
index a008234..113718c 100644 (file)
@@ -426,44 +426,44 @@ Total Current Spectroscopy is a group of electron secondary
 
 \section*{Appendix A - Electron Gun Control and Current Measurement Circuit}
 
+Figure \ref{} 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}.
 
-\section*{Appendix B - Data Aquisition Box (DAQ)}
+BLARGH IT IS AN ELECTRON GUN BLARGH
+
+
+\section*{Appendix B - DAC/ADC Box - Hardware}
 
 \subsection*{Overview}
-In order to automate recording of TCS data, a data aquisition box (DAQ) was designed and constructed. The DAQ consists of the following major components:
+
+In order to automate TCS experiments, both Digital to Analogue and Analogue to Digital Convertors were required (DAC and ADC). To satisfy these requirements, 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
-       \item Seperate Power supplies for digital and analogue electronics
 \end{itemize}
 
 \subsection*{Microprocessor}
-The DAQ has been built around an Atmel AVR Butterfly; an inexpensive and simple demonstration board for Atmel's 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.
+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 of Butterfly
 
+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{fig_ADC_normal} shows the typical input circuit which was used for three of the four available ADCs. 
 
-\subsection*{Power Supplies}
-Two seperate power supplies are required for the DAQ, due to the presence of both digital and analogue electronics.
-
-\subsubsection*{Logic Power Supply}
-The AVR Butterfly runs off $3V < V_{cc} < 5V$ DC. Since $V_{cc}$ is also used as the reference voltage for the ADCs and DAC output, it is 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 DAQ 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.
-
-\subsubsection*{Op-amp Power Supply}
-The DAQ 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{fig_opamp_supply} 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.
+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. 
 
-To simplify circuit diagrams, op-amps will be drawn with the power supply connections ommitted from this point onwards.
-
-\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 (relative to ground) of $0 < V_{\text{adc}} < V_{cc}$ with 10 Bit resolution. A voltage divider constructed using a variable resistor allows manual adjustment of $V_{\text{adc}}$ so that voltages greater than $V_{cc}$ may still be measured.  Diodes between the ADC input, and $V_{cc}$ and ground, ensure that the ADC is protected from exposure to voltages outside the acceptable range. Figure \ref{fig_ADC_normal} shows the typical input circuit, used for three of the four available ADCs. 
+The diodes shown in Figure Figure \ref{fig_ADC_normal} 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*}
@@ -471,25 +471,66 @@ The voltage at the ADC input can be related to the input of the voltage divider
 \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 determined from ADC counts by:
+$V_{\text{in}}$ can be therefore be determined from the registered ADC counts by:
 \begin{align*}
-       V_{\text{in}} &= \frac{\text{ADC counts}}{2^{10}} \times 
+       V_{\text{in}} &= \frac{\text{ADC counts}}{2^{10}} \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.
 
-For differential or ``off-ground'' voltage measurements, the fourth ADC input is passed through an instrumentation amplifier. Low pass filters on the input are used to reduce AC noise on the inputs. The buffer amplifiers ensure that negligable current flows through the measurement circuit to ground.
-Figure \ref{fig_ADC5} shows the input circuit for off-ground voltage measurements. It is important to note that the circuit only functions when the input voltages are within the op-amp common-mode voltage range ($\pm15V$).
+Figure \ref{} 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.
+
+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:
 
-The output of the instrumentation amplifier can be shown by using Kirchoff's Laws and the ideal model of op-amps to be:
 \begin{align*}
-       V_{\text{diff.}} = \frac{R_2}{R_1} 
+       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 act as unity gain buffers. Although the output of the unity gain buffer is equal to the input on its positive terminal, the buffer prevents current from flowing from the positive terminal to ground. With the buffer amplifiers absent, a current of: would flow between each of the input terminals and ground.
+
+Instrumentation amplifiers are usually constructed in the schematic shown in Figure \ref{}. In this version, the gain of the amplifier can be changed by altering a single resistor. However, more resistors are required. The version actually constructed was designed based upon the small number of resistors available, within a short time frame. Although the design could have later been changed, this would have been of no real benefit, since there was no requirement to adjust the gain of the amplifier.
+
+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*{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.
+
+\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{fig_opamp_supply} 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.
+
+To simplify circuit diagrams, op-amps will be drawn with the power supply connections ommitted from this point onwards.
+
 \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.
+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 $3.3V$ DAC output to $10V$. 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.
 
-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 Total Current Spectroscopy, 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 $3.3V$ DAC output to $10V$. This output was then used to control a GW-Instek GPS-1850D power supply.
+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
 \bibliographystyle{unsrt}

UCC git Repository :: git.ucc.asn.au