From e4fd1284273b4477ba46ed6f8ae190d395056bac Mon Sep 17 00:00:00 2001
From: thing1 <thing1@seacrossedlovers.xyz>
Date: Fri, 28 Mar 2025 08:58:00 +0000
Subject: added alot of photos

---
 electronics/cw2/writeup.tex | 194 ++++++++++++++++++++++++++++++++++----------
 1 file changed, 149 insertions(+), 45 deletions(-)

(limited to 'electronics/cw2/writeup.tex')

diff --git a/electronics/cw2/writeup.tex b/electronics/cw2/writeup.tex
index 1ca6e17..76ad34e 100644
--- a/electronics/cw2/writeup.tex
+++ b/electronics/cw2/writeup.tex
@@ -102,14 +102,18 @@ 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:
 
-\includegraphics[width=\textwidth]{diagrams/receiver.png}
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/receiver.png}
+\end{center}
 
 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:
 
-\includegraphics[width=\textwidth]{diagrams/initial-amplifier.png}
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/initial-amplifier.png}
+\end{center}
 
 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.
 
@@ -118,27 +122,35 @@ 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:
 
-\includegraphics[width=\textwidth]{diagrams/AM demodulation.png}
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/AM demodulation.png}
+\end{center}
 
 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:
 
-\includegraphics[width=\textwidth]{diagrams/volume boost amplifier.png}
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/volume boost amplifier.png}
+\end{center}
 
 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:
 
-\includegraphics[width=\textwidth]{diagrams/audio peak finder.png}
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/audio peak finder.png}
+\end{center}
 
 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:
 
-\includegraphics[width=\textwidth]{diagrams/audio intensitity meter.png}
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/audio intensitity meter.png}
+\end{center}
 
 The code can be seen here:
 \lstinputlisting[language=C, caption=\textit{using C syntax highlighting to add some colour to the world}]{./final.asm}
@@ -150,22 +162,28 @@ 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:
 
-\includegraphics[width=\textwidth]{diagrams/push pull power amplifier.png}
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/push pull power amplifier.png}
+\end{center}
 
 To test this system, I can measure the current in and the current out, and see how the compare.
 
 \subsection{Full block diagram}
 % put a full block diagram here
+\begin{center}
+	\includegraphics[width=\textwidth]{diagrams/blockdiagram.png}
+\end{center}
 
 \subsection{Full circuit diagram}
-Here is the full set of diagrams all put together, when used like this, my system should function as a radio receiver.
-% put a full design here (glue all the previous designs together)
+Here is the full set of diagrams all put together, when used like this, my system should function as a radio receiver with audio output.
 
-<<<<<<< HEAD
+\begin{center}
+	\includegraphics[angle=270, scale=0.8]{diagrams/fulldiagram.png}
+\end{center}
 
-\subsection{Subsystem testing} % tables, tables and more tables, no need to show the actual testing, the next section is for that
+\section{Subsystem results} % 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} 
+\subsection{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.
@@ -185,7 +203,7 @@ Here is a table of the inputs Vs the outputs I received. I read these values of
 
 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}
+\subsection{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}
@@ -204,18 +222,21 @@ Like the receiver, this system can be tested by putting in an input signal, that
 
 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}
+\subsection{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}
+\begin{center}
+	\includegraphics[width=\textwidth]{diagrams/AM-demod.png}
+	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_140141.jpg}
+\end{center}
+
 
-PUT PHOTO HERE
 
 Mine had slightly larger distorted dips in the signal, however it achieved the same thing.
 
-\subsubsection{The volume boost amplifier}
+\subsection{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}
@@ -236,16 +257,20 @@ This amplifier should have a gain of -2.35, however while testing, I realized I
 
 This shows the expected gain, this subsystem works.
 
-\subsubsection{The audio normalisation filter and dividing amplifier}
+\subsection{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}
+\begin{center}
+	\includegraphics[width=\textwidth]{diagrams/peakfinder.png}
+	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_142936.jpg}
 
-PUT YOUR PHOTO HERE
+	\textit{The scope was rather confused with this one, and was flickering a lot, this is the best photo I was able to get.}
+\end{center}
 
-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}
+As you can see mine is not as 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 could have been made using an op amp.
+
+\subsection{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:
@@ -264,54 +289,133 @@ When tested it acted like so:
 	\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.
+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. 
+
+There were slight fluctuations in this signal, causing the LED's to flash on and of quickly at points, this is most likely caused by the micro controller not being able to poll the inputs quickly enough due to its slow clock speed. It was still consistent enough to get photos and other readings.
 
-\subsubsection{The push pull power amplifier}
+\subsection{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{30^2}{8 \times 12} \]
 	\[ 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 = 9.38W \]
+	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, as the volume is almost never at the maximum possible.
 	\[ 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, 
-
+	This is still far higher than the average voltage as for the most part as the peak is rarely hit, due to lower than maximum volume signals.
 \end{center}
 
-\subsubsection{The speaker} 
-=======
-\section{Subsystem testing} % tables, tables and more tables, no need to show the actual testing, the next section is for that
+\section{Subsystem testing process} % just show the method of testing
 \subsection{The receiver} 
-\subsection{The initial amplifier}
-\subsection{The demodulation system}
-\subsection{The volume boost amplifier}
-\subsection{The audio normalisation filter and dividing amplifier}
-\subsection{The audio intensity meter}
-\subsection{The push pull power amplifier}
-\subsection{The speaker} 
->>>>>>> 51febddd0d6da1ac3e19a27b0761672dda1a1f55
+When testing the receiver, I used two power supply's, one which generated a signal, an another which AM modulated the wave. After tweaking the carrier wave I found that around 5.5Khz was the best point for the receiver I built. I tested my receiver with many input voltages, and I found that it worked well between 50hz - 15Khz.
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/pics/IMG_20250319_141954.jpg}
+\end{center}
+Using a scope, I measured the input coming directly off the signal generator, and the output, coming from the receiver, and I found it to be functional, although lower amplitude frequencies became a little noisier than the input signal, but this is not something to worry about.
+
+\begin{center}
+	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_134733.jpg}
+\end{center}
 
-\section{Subsystem results}
-\subsection{The receiver} % might be able to cut this, or make it very short
 \subsection{The initial amplifier}
+This system could be tested very simply by comparing the input to the output. Note the fact that the yellow trace is at 1V and the blue trace is at 5v.
+
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/pics/IMG_20250312_135346.jpg}
+\end{center}
 \subsection{The demodulation system}
+To test this system, I put in an input signal, and looked at the output signal. The desired output is a signal that fluctuates up an down, with the same amplitude as the input. As one can see, the this is what my system achieved.
+
+\begin{center}
+	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_140141.jpg}
+\end{center}
+
+One should note though, the small fluctuations on the output. The don't effect the signal too much, however on a better demodulation system, this would be a smoother signal.
+
 \subsection{The volume boost amplifier}
-\subsection{The audio normalisation filter and dividing amplifier}
+This subsystem, like the others in my project, can be tested by comparing input and output signals. I would expect it to have an output around 5 times larger than the input and invert them. This sub system did that perfectly..
+
+\begin{center}
+	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_142351.jpg}
+\end{center}
+This subsystem needed to make the input signal larger, and stay at the peaks for more time. It is similar to the audio demodulation system. It also needs to stop the signal from ever being negative. As the micro controller doesn't know how to read negative values in its ADC.
+
+\subsection{The audio normalisation filter}
+This photo compares the modulated signal to the output signal, as I believe it shows better the effect of making all systems positive.
+
+\begin{center}
+	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_142422.jpg}
+\end{center}
+
 \subsection{The audio intensity meter}
+To test this system, I put a variety of voltages into it to test if it turns on when desired. I took a photo for each stage.
+
+
+\begin{center}
+	Low voltage input
+
+	\includegraphics[height=0.25\textheight]{diagrams/pics/mpv-shot0003.jpg}
+\end{center}
+
+
+\begin{center}
+	Mid voltage input
+
+	\includegraphics[height=0.25\textheight]{diagrams/pics/mpv-shot0001.jpg}
+\end{center}
+
+
+\begin{center}
+	High voltage input
+
+	\includegraphics[height=0.25\textheight]{diagrams/pics/mpv-shot0002.jpg}
+\end{center}
+
+
+\begin{center}
+	Very high voltage input
+
+	\includegraphics[height=0.25\textheight]{diagrams/pics/mpv-shot0004.jpg}
+\end{center}
+
 \subsection{The push pull power amplifier}
-\subsection{The speaker} % probably can cut this section
+To test this subsystem, I put a multi meter on the input signal, and then one on the output. I then confirmed that the amplitude was boosted. The input was at ~10V AC.
+
+\begin{center}
+	\includegraphics[width=0.5\textwidth]{diagrams/pics/IMG_20250312_144503.jpg}
+\end{center}
+
+Here is 0.09mA being boosted to 15mA. When I was testing this I was using a 100\si{\ohm} resistor in place of the 12\si{\ohm} speaker, this was to avoid the irritation of my peers. This reduced the current boosted by the amplifier.
+
+When accounting for this the adjusted power output calculations look like this
+\begin{center}
+	\[ P = \frac{V^2}{8R_L} \]
+	\[ P = \frac{10^2}{8 \times 100} \]
+	\[ P = \frac{100}{800} \]
+	\[ P = 0.125W \]
+	\[ P = 125mW \]
+
+	Since we measured a current draw of 15mA, we can times this by 10 to get the power draw.
+
+	\[ P = (15 \times 10 ^ {-3}) \times 10 \]
+	\[ P = 150mW\]
+
+	This value is within the margin of error for the system to work, and is most likely caused by the resistor I used not being exactly 100\si{\ohm}.
+\end{center}
+
 
 \section{System realisation}
 \subsection{Circuit diagram} % repeat of what was shown before
 \subsection{Circuit realisation} % show the actual thing, describe colour coding, etc. etc.
-\subsection{Circuit testing} % show evidence of the results shown in the results section (lots of photos)
 \subsection{Circuit results} % prove the whole thing works from start to finish
+\subsection{Circuit testing} % show evidence of the results shown in the results section (lots of photos)
 
 % did it work, how well, compare to original goal
 \section{Evaluation} 
+\subsection{What went well?}
+\subsection{What didn't go well?}
 } 
 \end{document}
-- 
cgit v1.2.3

