From fef6d2cc76518eee75fc0d95e765bd2be8a660ee Mon Sep 17 00:00:00 2001
From: thing1 <thing1@seacrossedlovers.xyz>
Date: Wed, 2 Apr 2025 10:26:21 +0000
Subject: did comp sci and some electronics

---
 electronics/cw2/writeup.tex | 98 +++++++++++++++++++++++++++++++++++----------
 1 file changed, 76 insertions(+), 22 deletions(-)

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

diff --git a/electronics/cw2/writeup.tex b/electronics/cw2/writeup.tex
index 0d3852b..aeaae5f 100644
--- a/electronics/cw2/writeup.tex
+++ b/electronics/cw2/writeup.tex
@@ -67,6 +67,23 @@ The product I would like to build for this project is a simple radio receiver, i
 
 The design should focus on simplicity, as less points of failure should result in something reliable. I have in the past, owned a radio for hikes, however it had multiple dials which all clogged with mud, and now it doesn't work; I would much rather have something that is pre tuned to my desired values and left as is.
 
+\subsection{Design objectives}
+To evaluate my system at the end, I will comapre it against the following goals
+
+\begin{center}
+	\begin{tabular}{ |c|c| } 
+		\hline
+		objective & how \\ 
+		\hline
+                Outputs sound based on the input, that is equivalent to the input & The full system\\
+                Displays the intensity of the volume output by the signal & Use a micro controller \\
+                in & out \\
+                in & out \\
+		\hline
+	\end{tabular}
+\end{center}
+
+
 \section{System design}
 
 \subsection{Subsystem designs}
@@ -106,7 +123,22 @@ This system will receive data from from the radio waves from an antenna, here is
 	\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.
+To test this system, I can use a signal generator to create an AM wave, then put the output into a large coil 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. I will hook the input and output to an oslioscope.
+
+Here is the the table I will use to test the output:
+
+\begin{center}
+	\begin{tabular}{ |c|c| } 
+		\hline
+		signal in & signal out\\ 
+		\hline
+                in & out \\
+                in & out \\
+                in & out \\
+                in & out \\
+		\hline
+	\end{tabular}
+\end{center}
 
 \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:
@@ -117,7 +149,21 @@ This amplifier's job is to increase the voltage of the input, as the revive will
 
 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.
 
-To test this system I will put a voltage of around ~1-3V and test if it multiplies the voltage by the desired gain.
+To test this system I will put a voltage of around ~1-3V and test if it multiplies the voltage by the desired gain. I will put the output of the sub system through an osiloscope, and compare the inputs.
+Here is the table of results that I will use to test my system.  
+
+\begin{center}
+	\begin{tabular}{ |c|c| } 
+		\hline
+		signal in & signal out\\ 
+		\hline
+                in & out \\
+                in & out \\
+                in & out \\
+                in & out \\
+		\hline
+	\end{tabular}
+\end{center}
 
 \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:
@@ -126,16 +172,35 @@ This system will convert the AM wave to a unmodulated regular wave, it will also
 	\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.
+To test this I will put in a modulated sine wave into it and confirm that I receive the original wave as an output. Yet again I will use and oslioscope to test the two traces against each other.
+
+Because I would expect this to produce a very different output wave from the input, I will not make a diagram for this, however I would expect the output to look like this.
+
+\begin{center}
+	\includegraphics[width=\textwidth]{diagrams/AM-demod.png}
+\end{center}
 
 \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:
+This is just another op amp, but with different resistor values. Here is its circuit diagram: 
 
 \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.
+Like the previous amplifier it can be tested by putting into a wave into it and checking it was multiplied by the correct gain. 
+
+\begin{center}
+	\begin{tabular}{ |c|c| } 
+		\hline
+		signal in & signal out\\ 
+		\hline
+                in & out \\
+                in & out \\
+                in & out \\
+                in & out \\
+		\hline
+	\end{tabular}
+\end{center}
 
 \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:
@@ -144,7 +209,8 @@ This is a filter that will only show the peaks of the output from the previous s
 	\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.
+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. I will use a scope to read the values, and then plot them on this table:
+
 \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:
 
@@ -187,20 +253,6 @@ To test my system, I will put values into each subsystem individually, then put
 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 
 
 \subsection{The initial amplifier}
@@ -232,8 +284,6 @@ This system, should have a response curve that looks something akin to this, not
 	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_140141.jpg}
 \end{center}
 
-
-
 Mine had slightly larger distorted dips in the signal, however it achieved the same thing.
 
 \subsection{The volume boost amplifier}
@@ -461,9 +511,13 @@ Here is the scope trace of the input at 3.3Khz.
 \includegraphics[width=\textwidth]{diagrams/pics/finaloutput.jpg}
 As the trace shows, it is negative, a DC offset has been applied. I originally believed, that my amplifiers were causing the signal to be negative as they are inverting, however I have an even amount of them so it wasn't them. I then realised that it had to be a DC offset. I fixed it but putting a capacitor before the input, however I removed this as it was distorting the input signal. It doesn't have any effect on the output as the speaker still moves in the same way.
 
+\subsection{User Manual}
 % did it work, how well, compare to original goal
 \section{Evaluation} 
 \subsection{What went well?}
+My system worked as intended, it did play the input signal, through the speakers, atfer passing through all the subsystems and the speaker.
+I will compare, line by line, to my design objectives here:
+
 \subsection{What didn't go well?}
 } 
 \end{document}
-- 
cgit v1.2.3

