summaryrefslogtreecommitdiff
path: root/electronics/cw2/writeup.tex
diff options
context:
space:
mode:
authorthing1 <thing1@seacrossedlovers.xyz>2025-03-23 18:47:33 +0000
committerthing1 <thing1@seacrossedlovers.xyz>2025-03-23 18:47:33 +0000
commit2e7c7b0c97500a772c93fab40652d0d99d03a424 (patch)
treedb9a77791c8ca29aab4b2b398e0d48d969aefb3d /electronics/cw2/writeup.tex
parent01aa8af42ec80111aca755828d9bccf98a150b09 (diff)
alot of diagrams
Diffstat (limited to 'electronics/cw2/writeup.tex')
-rw-r--r--electronics/cw2/writeup.tex126
1 files changed, 119 insertions, 7 deletions
diff --git a/electronics/cw2/writeup.tex b/electronics/cw2/writeup.tex
index 834cf4d..eeb6a93 100644
--- a/electronics/cw2/writeup.tex
+++ b/electronics/cw2/writeup.tex
@@ -11,6 +11,7 @@
\usepackage{setspace}
\usepackage{ragged2e}
\usepackage{graphicx}
+\usepackage{siunitx}
\graphicspath{ {./images/} }
\definecolor{codegreen}{rgb}{0,0.6,0}
@@ -101,14 +102,14 @@ To build my project, I will split it into manageable subsections, that can each
\subsubsection{The receiver}
This system will receive data from from the radio waves from an antenna, here is its circuit diagram:
-PUT SYSTEM HERE
+\includegraphics[width=\textwidth]{diagrams/receiver.png}
To test this system, I can use a signal generator to create an AM wave, then put the output into a large wire, and finally I can compare the outputs of the signal generator, and the output from the inductor and capacitor, and check if they are the same.
\subsubsection{The initial amplifier}
This amplifier's job is to increase the voltage of the input, as the revive will only output at ~1V-3V, which is not enough to trigger my other components, it should have a gain of around 5. Here is its circuit diagram:
-PUT SYSTEM HERE
+\includegraphics[width=\textwidth]{diagrams/initial-amplifier.png}
I have used inverting amplifiers throughout this build as they are generally less noisy than non-inverting amplifiers and I can control the input impedance.
@@ -117,27 +118,27 @@ To test this system I will put a voltage of around ~1-3V and test if it multipli
\subsubsection{The demodulation system} % can probably show an alternative to this
This system will convert the AM wave to a unmodulated regular wave, it will also use a decoupling capacitor to remove any DC offset that is caused by the previous components. Here is its circuit diagram:
-PUT SYSTEM HERE
+\includegraphics[width=\textwidth]{diagrams/AM demodulation.png}
To test this I will put in a modulated sine wave into it and confirm that I receive the original wave as an output.
\subsubsection{The volume boost amplifier} % perhaps show an alternative for here
This is just another op amp, but with different resistor values. Here is its circuit diagram:
-PUT SYSTEM HERE
+\includegraphics[width=\textwidth]{diagrams/volume boost amplifier.png}
Like the previous amplifier it can be tested by putting into a wave into it and checking it was multiplied by the correct gain.
\subsubsection{The audio normalisation filter}
This is a filter that will only show the peaks of the output from the previous systems, this will allow the micro controller to properly poll the input for the next subsystem. Here is its circuit diagram:
-PUT SYSTEM HERE
+\includegraphics[width=\textwidth]{diagrams/audio peak finder.png}
To test this, I can put a sine wave in as input, and then I will check if I see a sine-like wave with smaller troths.
\subsubsection{The audio intensity meter}
This system will consist of a micro controller and a bar graph, it will use the output of the volume boost amplifier as an input and will display the amplitude of the output on 4 bits of a bar graph. Here is its circuit diagram:
-PUT SYSTEM HERE
+\includegraphics[width=\textwidth]{diagrams/audio intensitity meter.png}
The code can be seen here:
\lstinputlisting[language=C, caption=\textit{using C syntax highlighting to add some colour to the world}]{./final.asm}
@@ -149,7 +150,7 @@ To test this system, I can check which amplitude of signals makes the graph outp
\subsubsection{The push pull power amplifier} % can definitely show an alternative for this
This system will massively boost the current of the input, which will make it audible on a speaker. To make the audio sound better, I will use an op amp to remove crossover distortion. Here is its circuit diagram:
-PUT SYSTEM HERE
+\includegraphics[width=\textwidth]{diagrams/push pull power amplifier.png}
To test this system, I can measure the current in and the current out, and see how the compare.
@@ -162,13 +163,124 @@ Here is the full set of diagrams all put together, when used like this, my syste
\subsection{Subsystem testing} % tables, tables and more tables, no need to show the actual testing, the next section is for that
+To test my system, I will put values into each subsystem individually, then put it all together, at the end to create my full project.
\subsubsection{The receiver}
+The receiver was tested by putting a signal through a signal generator, that AM modulates the input, and putting that through a large antenna in the room, then using the large inductor as a receiving antenna. I can then use an oscilloscope to compare the inputs, to the outputs.
+
+Here is a table of the inputs Vs the outputs I received. I read these values of an oscilloscope.
+
+\begin{center}
+ \begin{tabular}{ |c|c| }
+ \hline
+ signal in & signal out\\
+ \hline
+ 0v & 0v \\
+ 1.25v & 1.20v \\
+ -1.25v & -1.21v \\
+ 0.5v & -0.48v \\
+ \hline
+ \end{tabular}
+\end{center}
+
+The result show that, there is a little bit of noise, however there is a clear resemblance on the input, so I would say this works. There is also, on average, a drop in voltage, which is most likely signal drop off, this is a very small drop so it is of no significance
+
\subsubsection{The initial amplifier}
+Like the receiver, this system can be tested by putting in an input signal, that is around -1.5v - 1.5v, as this is my desired input signal. The amplifier should have a gain of -4.7.
+
+\begin{center}
+ \begin{tabular}{ |c|c| }
+ \hline
+ signal in & signal out\\
+ \hline
+ 0v & 0v \\
+ 0.5v & -2.4v \\
+ -0.5v & 2.6v \\
+ 1v & -5.2v \\
+ -1.25v & 7.4v \\
+ \hline
+ \end{tabular}
+\end{center}
+
+The table, like before, there is a small amount of noise, however it shouldn't have to much effect. The amplifier is an inverting amplifier, so that is why the values flip. The observed gain is -4.8, which means that is a very close to the desired value.
+
\subsubsection{The demodulation system}
+To test this system, I can input signals in the range -3v - 3v and see if the output is the demodulated output.
+
+This system, should have a response curve that looks something akin to this, note the dips in the signal that match the carrier wave:
+
+\includegraphics[width=\textwidth]{diagrams/AM-demod.png}
+
+PUT PHOTO HERE
+
+Mine had slightly larger distorted dips in the signal, however it achieved the same thing.
+
\subsubsection{The volume boost amplifier}
+This amplifier should have a gain of -2.35, however while testing, I realized I had made a mistake, I had used a 1M\si{\ohm} instead of the indented 2M\si{\ohm}. This caused it to have a gain of -4.7. After fixing this mistake, I took these results.
+
+\begin{center}
+ \begin{tabular}{ |c|c| }
+ \hline
+ signal in & signal out\\
+ \hline
+ 0v & 0v \\
+ 0.5v & -1.2v \\
+ 1v & -2.4 \\
+ 2v & -4.5 \\
+ -0.5v & 1.4v \\
+ -1v & 2.4 \\
+ -2v & 4.6 \\
+ \hline
+ \end{tabular}
+\end{center}
+
+This shows the expected gain, this subsystem works.
+
\subsubsection{The audio normalisation filter and dividing amplifier}
+This system needs to lower the input frequency and only output the high points. This system will behave similarly to my AM demodulation system. The desired output, should be close to the following:
+
+\includegraphics[width=\textwidth]{diagrams/peakfinder.png}
+
+PUT YOUR PHOTO HERE
+
+As you can see mine is not a close to the desired output, however it is still close enough that the micro controller will be able to poll the input. A more accurate design can be made using an op amp.
+
\subsubsection{The audio intensity meter}
+Testing this system can be achieved by imputing voltages into it, and depending on their amplitude, the different modes of the bar graph should trigger.
+
+When tested it acted like so:
+\begin{center}
+ \begin{tabular}{ |c|c| }
+ \hline
+ signal in & bar graph output\\
+ \hline
+ 0v & 0001 \\
+ 1v & 0001 \\
+ 2v & 0011 \\
+ 3v & 0011 \\
+ 4v & 0111 \\
+ 5v & 1111 \\
+ \hline
+ \end{tabular}
+\end{center}
+
+This is my desired output. The input signals will be between 0v-5v. A low voltage input, results in only 1 of the LEDs being on and higher voltages result in more LEDs come on.
+
\subsubsection{The push pull power amplifier}
+This subsystem should be tested for the current it outputs and, unlike the rest, not the voltage. Using the formula
+\begin{center}
+ \[ P = \frac{V^2}{8R_L} \]
+ I can calculate the maximum output power. I can then use the known value of Vin, to solve for current.
+ \[ P = \frac{30^2}{8 \times 8} \]
+ \[ P = \frac{900}{96} \]
+ \[ P = 9.375W \]
+ The maximum input however is not 30v, while in theory the power supply outputs that, the actual value will be closer to 10v at peak
+ \[ P = \frac{10^2}{8 \times 12} \]
+ \[ P = \frac{100}{96} \]
+ \[ P = 1.04W \]
+ This is still far higher than the average voltage as for the most part as the peak is rarely hit,
+
+\end{center}
+
\subsubsection{The speaker}
\subsection{Subsystem results}