% Created 2023-03-22 Wed 18:57
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{ dsfont } \usepackage{amsmath} \usepackage[a4paper,margin=1in,portrait]{geometry}
\author{Lizzy Hunt}
\date{\today}
\title{Building an RC Circuit}
\hypersetup{
 pdfauthor={Lizzy Hunt},
 pdftitle={Building an RC Circuit},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.2 (Org mode 9.6.1)}, 
 pdflang={English}}
\begin{document}

\maketitle

\section{The Experiment}
\label{sec:orgd0521b4}
The purpose of this experiment was to gain a better understanding of the effects on the voltage over a capacitor
as a time-valued function when put in a circuit in series with a resistor. To achieve
this goal - and to experimentally verify laws governing the total resistance and capacitance of
configurations of resistors and capacitors using a multimeter - we built an "RC circuit" by combining
resistors and capacitors from respective smaller-valued components.

Additionally, this lab fulfilled the requirement allowing us to play with dangerously high temperature metal equipment \(\ddot\smile\).

\subsection{Theory}
\label{sec:orgcbdcb4a}
Here we list some ideas the reader should be familiar with for reference later in the report.

\subsubsection{Resistors}
\label{sec:orga13127c}
Consider \(n\) resistors, \(r_i \ni i \in [1, n]\) representing the total resistance of the i\textsuperscript{th} resistor,
or sub-configuration of resistors, all in parallel. Then, the total resistance, R, of the group is:

\begin{equation}
R^{-1} = \sum_{i=1}^{n}(r_i)^{-1}
\end{equation}

Consider \(n\) resistors, \(r_i \ni i \in [0, n]\) representing the total resistance of the i\textsuperscript{th} resistor,
or sub-configuration of resistors, all in series. Then, the total resistance, R, of the group is:

\begin{equation}
R = \sum_{i=1}^{n}(r_i)
\end{equation}

\subsubsection{Capacitors}
\label{sec:org20ad8ce}
Total capacitance of configurations of capacitors are similar to the inversion of the laws for
resistors.

Consider \(n\) capacitors, \(c_i \ni i \in [1, n]\) representing the total capacitor of the i\textsuperscript{th} capacitor,
or sub-configuration of capacitors, all in series. Then, the total capacitance, C, of the group is:

\begin{equation}
C^{-1} = \sum_{i=1}^{n }(c_i)^{-1}
\end{equation}

Consider \(n\) capacitors, \(c_i \ni i \in [1, n]\) representing the total capacitor of the i\textsuperscript{th} capacitor,
or sub-configuration of capacitors, all in parallel. Then, the total capacitance, C, of the group is:

\begin{equation}
C = \sum_{i=1}^{n }(c_i)
\end{equation}

\subsubsection{The RC Circuit}
\label{sec:orgcf7b1ec}
For a circuit with a resistor of resistance \(R\) and capacitor with capacitance \(C\) in series,
we can model the voltage over the capacitor, \(V_C\), given an initial voltage \(V_0\) and final
voltage \(V_f\), as a function of time:

\begin{equation}
V_C(t) = (V_0 - V_f)e^{-\frac{t}{RC}} + V_f
\end{equation}

\subsection{Procedure}
\label{sec:org107e08f}

The given procedure to exercise our knowledge of equations (1) - (4) if to build both a relatively higher-valued
resistor, and capacitor, out of smaller-valued components - by soldering them in series / parallel configurations.

Each pair of students is to produce a resistor and capacitor at a target value (and with a 10\% margin for error),
determined by seating arrangement. By happenstance, our group was chosen to build:

\begin{enumerate}
\item A 22 kilo-ohm resistor (22 \(k \Omega\))
\item A 1.67 micro-farad capacitor (\(\mu F\))
\end{enumerate}

out of only 10 \(k \Omega\) resistors, and 1 \(\mu F\) capacitors.

I did not record the configuration we used for either. So, assume the following configurations throughout the rest of the lab (pretty sure
these were pretty close to our monstrosities):

\subsubsection{Building a Resistor}
\label{sec:orga374597}
Assume all resistors as \(10 k \Omega\)
\begin{center}
\includegraphics[width=240px]{./resistors.png}
\end{center}

In theory, the total resistance measured from the leftmost point to the rightmost is 22 \(k \Omega\):

\begin{align*}
R  &= 10^4 \text{ (leftmost resistor in series (2))} \\
   &+ 10^4 \text{ (second leftmost resistor in series (2))} \\
   &+ (\frac{5}{10^4})^{-1} \text{ (5 resistors in parallel (1))} \\
   &= 2.20 * 10^4 \Omega
\end{align*}

\subsubsection{Building a Capacitor}
\label{sec:orgc015c61}
\begin{center}
\includegraphics[width=200px]{./capacitors.png}
\end{center}

In theory, the total capacitance measured from the leftmost point to the rightmost is 1.67 \(\mu F\):

\begin{align*}
C  &= 2(\frac{3}{10^-6})^{-1} \text{ (two groups of 3 1-}\mu F \text{ capacitors in series (3) in parallel with) } \\
   &+ 10^{-6} \text{ (another 1-} \mu F \text{ capacitor (4)) } \\
   &\approx 1.67 * 10^{-6} F
\end{align*}

\subsubsection{Determining the \(RC\) constant}
\label{sec:org1d0608b}

To measure our \(RC\) constant, we connected two voltage probes over \(V_c\) (as shown in the diagram below) to a computer-generated
positive square wave oscillating at 0.50 Hz with an amplitude of 5V. We then record for 1.5 seconds, polling at 1 kHz, from
the time \(V_C\) is at 4.95 V (the capacitor has charged) - allowing us to record at least half a second of discharge
from the capacitor.

\begin{center}
\includegraphics[width=200px]{./total_circuit.png}
\end{center}

We expect to see that as it discharges, the measured voltage over the capacitor would follow an exponentially decreasing fit,
according to the \(-\frac{t}{RC}\) term in (5). To find the value of \(RC\) we measure the voltage at each discrete time step (\(\frac{1}{1000}\) of a second)
from near the beginning of the exponential drop to where it reaches stability, and copy those values into a Magic Excel Sheet\textsuperscript{TM}. This
region is somewhat shown in the figure below (some values are actually truncated):

\begin{center}
\includegraphics[width=200px]{./rc-discharge.png}
\end{center}

The Magic Excel Sheet\textsuperscript{TM} produces a good exponential fit to this data. But, it takes some manual fiddling with the \(RC\) value itself
to determine the minimum sum of residuals (gradient descent inspired guess and check). The value of \(RC\)
producing the lowest error by this measure, is our result.

\section{Results}
\label{sec:orgf43daaa}
\subsection{Building a Resistor}
\label{sec:org99028c5}

The measured resistance (via multimeter) we obtained from our resistor was \(21.68 k \Omega\).

\subsection{Building a Capacitor}
\label{sec:org21807f6}

The measured capacitance (via multimeter) we obtained from our resistor was \(1.78 \mu F\).

\subsection{The Value Of \(RC\)}
\label{sec:orgbc9c601}

For our computer determined RC constant, we found it to be \(3.72 * 10^{-2}\) s.

\section{Discussion}
\label{sec:org8408366}
\subsection{Building a Resistor}
\label{sec:org9b4e64e}
Our target value was \(22.00 k \Omega\), and we came out with \(21.68 k \Omega\) - an error of 1.45\%.

\subsection{Building a Capacitor}
\label{sec:orgf2e0c7e}
Our target value was \(1.67 \mu F\), and we came out with \(1.78 \mu F\) - an error of 6.59\%.

\subsection{The Value of \(RC\)}
\label{sec:org7e41eff}
If our resistor and capacitor were exactly on the target value, our \(RC\) constant would be \((2.20 * 10^4 \Omega)(1.67 * 10^{-6} F) = 3.67 * 10^{-2}\) s.

The \(RC\) constant from the measured resistance and capacitance would be \((2.17 * 10^4 \Omega)(1.78 * 10^{-6} F) = 3.86 * 10^-2\) s.

But, our human-gradient-descent-plus-excel-magic-thanks-computer told us it was \(3.72 * 10^{-2}\) s - a 3.62\% error from the
theoretical measured value, and 1.36\% from the overall "target" value.
\end{document}