school

thing1's amazing school repo
Log | Files | Refs | Submodules | README

writeup.tex (32053B)


      1 \documentclass[a4paper,12pt]{article}
      2 
      3 \usepackage{geometry} 
      4 \usepackage{titling} 
      5 \usepackage{titlesec}
      6 \usepackage[english]{babel} 
      7 \usepackage[hidelinks]{hyperref} 
      8 \usepackage{listings} 
      9 \usepackage{xcolor}
     10 \usepackage{graphicx} 
     11 \usepackage{setspace} 
     12 \usepackage{ragged2e}
     13 \usepackage{graphicx}
     14 \usepackage{siunitx}
     15 \graphicspath{ {./images/} }
     16 
     17 \definecolor{codegreen}{rgb}{0,0.6,0} 
     18 \definecolor{codegray}{rgb}{0.5,0.5,0.5}
     19 \definecolor{codepurple}{rgb}{0.58,0,0.82} 
     20 \definecolor{backcolour}{rgb}{0.95,0.95,0.92}
     21 
     22 \lstdefinestyle{mystyle}{
     23 	backgroundcolor=\color{backcolour}, 
     24 	commentstyle=\color{codegreen}, 
     25 	keywordstyle=\color{magenta},
     26 	numberstyle=\tiny\color{codegray}, 
     27 	stringstyle=\color{codepurple}, 
     28 	basicstyle=\ttfamily\footnotesize,
     29 	breakatwhitespace=false, 
     30 	breaklines=true, 
     31 	captionpos=b, 
     32 	keepspaces=true, 
     33 	numbers=left, 
     34 	numbersep=5pt,
     35 	showspaces=false, 
     36 	showstringspaces=false, 
     37 	showtabs=false, 
     38 	tabsize=8,
     39 }
     40 \lstset{style=mystyle}
     41 
     42 \titleformat{\section} {\Huge} {} {0em} {}[\titlerule] 
     43 \geometry{a4paper,total={170mm,257mm},left=25mm,right=25mm,}
     44 
     45 \author{Lucas Standen} 
     46 \title{Creating a simple radio receiver, with a volume intensity meter}
     47 
     48 \begin{document} 
     49 \maketitle
     50 
     51 \newpage
     52 \tableofcontents 
     53 \newpage
     54 
     55 \setlength{\parskip}{1em}
     56 
     57 {\setlength{\parindent}{0cm}
     58 \section{System planning}
     59 
     60 \subsection{Analysing the problem}
     61 In modern times the need for a radio has obviously fallen, with the rise of TV sets and the internet, generally being a faster method of receiving information, however in some situations, a radio is still preferable. For example if you are hiking, you may be out of range of cellular data, and a TV would require, power and signal which you wont have; in a situation like this a radio is perfect, being a low power device, that can receive important safety information. Similar situations can be drawn for all outdoor use of electronics, weather its a hike, sailing trip, off grid living or something else, a radio can be a valuable tool for keeping up to date on important information.
     62 
     63 I believe creating a simple radio receiver will be helpful to those looking for the capabilities of listening while on the go, it can be small and practical as someone who hikes a lot myself, I would enjoy this project, so I can listen to the news, music or a podcast while hiking, without needing to worry about draining my phones battery, which is better saved for emergency situations.
     64 
     65 \subsection{Design specification}
     66 The product I would like to build for this project is a simple radio receiver, it should receive signals, demodulate them, amplify them and play them out of a speaker. To add something more interesting to my project, I will add a bar graph display that displays the intensity of the currently playing sound. 
     67 
     68 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.
     69 
     70 \subsection{Design objectives}
     71 To evaluate my system at the end, I will comapre it against the following goals
     72 
     73 \begin{center}
     74 	\begin{tabular}{ |c| } 
     75 		\hline
     76 		objective \\ 
     77 		\hline
     78 		\hline
     79                 Can recive radio waves \\
     80 		\hline
     81                 Displays the intensity of the volume output by the signal \\
     82 		\hline
     83                 Can output the sound of the demodulated waves \\
     84 		\hline
     85 		\hline
     86                 Can recevie radio waves beween 50hz and 8Khz \\
     87 		\hline
     88                 The audio intesity bar will be at set 0v 2v 4v and 5v \\
     89 		\hline
     90 	\end{tabular}
     91 \end{center}
     92 
     93 
     94 \section{System design}
     95 
     96 \subsection{Subsystem designs}
     97 To build my project, I will split it into manageable subsections, that can each be tested and evaluated. The subsystems I intend to build are:
     98 \begin {description}
     99 	\item[The receiver:] \hfill \\
    100 		This will be the part of my system that detects the weak incoming radio signals from the outside world weak incoming radio signals from the outside world. It can be made with a large inductor (coil of wire) and a capacitor for smoothing the output signal. 
    101 
    102 	\item[The initial amplifier:] \hfill \\
    103 		This will boost the small incoming signal to a more reasonable size, to make it easier to process, working with small values may result in signal degradation. This can be made with a op amp and 2 resistors, to create a greater than 1 gain.
    104 
    105 	\item[The demodulation system:] \hfill \\
    106 		This will take the incoming wave, that will be encoded as an AM signal (not FM), and convert it to the audio wave I wish to detect. This can be made with a low pass filter with a diode, the low pass filter can act as a peek finder (envelope filter) when paired with the diode.
    107 
    108 	\item[The volume boost amplifier:] \hfill \\
    109 		This will be another amplifier that controls the volume of the signal, before it reaches the audio system. This can be made with an op amp and two resistors. It will have a gain of around 3, to put the volume to a comfortable listening audio. 
    110 
    111 	\item[The audio normalisation filter:] \hfill \\
    112 		This subsystem will consist of a low pass filter, and a amplifier, this will do two things for the next subsystem. It will divide the amplitude of the audio by 3, making the peak value 5V, this is because the micro controller can't process values above 5V. The low pass filter will find the peaks of the incoming signal, this is because the audio input is at too high a frequency for the micro controller to properly poll, this will lower the input to something it can process.
    113 
    114 	\item[The audio intensity meter:] \hfill \\
    115 		This will consist of a micro controller (Picaxe 18M2 using the WJEC assembler), and a bar graph, and will show me the current volume of my system. The Picaxe 18M2 (and the Pic 16F88 that it emulates) contain three analogue to digital converters, using one of these, I will program the chip to act as a bar graph display controller, with outputs dependant on the analogue input signal; the code will need to convert from the binary used internally, to an output where the highest bit and bellow are enabled.
    116 
    117 	\item[The push pull power amplifier:] \hfill \\
    118 		This will boost the power output of my system, allowing it to drive a small speaker (or perhaps headphones), and output the desired audio. This is made using 2 transistors (a PNP and a NPN), paired with an op amp (to remove the cross over distortion).
    119 
    120 	\item[The speaker:] \hfill \\
    121 	This is the audio output of my system, it could also be replaced with a headphone jack.
    122 \end{description}
    123 
    124 % put diagrams and detailed explanations here
    125 % 3 of these need to show alternatives
    126 \subsubsection{The receiver} 
    127 This system will receive data from from the radio waves from an antenna, here is its circuit diagram:
    128 
    129 \begin{center}
    130 	\includegraphics[width=0.5\textwidth]{diagrams/receiver.png}
    131 \end{center}
    132 
    133 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.
    134 
    135 Here is the the table I will use to test the output:
    136 
    137 \begin{center}
    138 	\begin{tabular}{ |c|c| } 
    139 		\hline
    140 		signal in & signal out\\ 
    141 		\hline
    142                 in & out \\
    143                 in & out \\
    144                 in & out \\
    145                 in & out \\
    146 		\hline
    147 	\end{tabular}
    148 \end{center}
    149 
    150 \subsubsection{The initial amplifier}
    151 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:
    152 
    153 \begin{center}
    154 	\includegraphics[width=0.5\textwidth]{diagrams/initial-amplifier.png}
    155 \end{center}
    156 
    157 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.
    158 
    159 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.
    160 Here is the table of results that I will use to test my system.  
    161 
    162 \begin{center}
    163 	\begin{tabular}{ |c|c| } 
    164 		\hline
    165 		signal in & signal out\\ 
    166 		\hline
    167                 in & out \\
    168                 in & out \\
    169                 in & out \\
    170                 in & out \\
    171 		\hline
    172 	\end{tabular}
    173 \end{center}
    174 
    175 \subsubsection{The demodulation system} % can probably show an alternative to this
    176 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:
    177 
    178 \begin{center}
    179 	\includegraphics[width=0.5\textwidth]{diagrams/AM demodulation.png}
    180 \end{center}
    181 
    182 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.
    183 
    184 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.
    185 \begin{center}
    186 	\includegraphics[width=\textwidth]{diagrams/AM-demod.png}
    187 \end{center}
    188 
    189 
    190 This could have been replaced with an active system to achieve the same output, The active system may have had less bouncing on the output wave. The alternative would have looked like this. 
    191 
    192 \begin{center}
    193 	\includegraphics[width=0.5\textwidth]{diagrams/amde.png}
    194 \end{center}
    195 
    196 I choose not to use this as my system already had many op amps, and I didn't want to use them exclusivly.
    197 
    198 
    199 
    200 \subsubsection{The volume boost amplifier} 
    201 This is just another op amp, but with different resistor values. Here is its circuit diagram: 
    202 
    203 \begin{center}
    204 	\includegraphics[width=0.5\textwidth]{diagrams/volume boost amplifier.png}
    205 \end{center}
    206 
    207 Like the previous amplifier it can be tested by putting into a wave into it and checking it was multiplied by the correct gain; I will use the following table to check if it is operating correctly.
    208 \begin{center}
    209 	\begin{tabular}{ |c|c| } 
    210 		\hline
    211 		signal in & signal out\\ 
    212 		\hline
    213                 in & out \\
    214                 in & out \\
    215                 in & out \\
    216                 in & out \\
    217 		\hline
    218 	\end{tabular}
    219 \end{center}
    220 
    221 This could have been replaced with the following alternative:
    222 
    223 \begin{center}
    224 	\includegraphics[width=0.5\textwidth]{diagrams/volboost2.png}
    225 \end{center}
    226 
    227 This would have performed some smoothing on the audio and thus produced a less noisy output, it would also have added volume control capabilitys to the system. I however choose against using this, as i did not have access to the kind of op amp requred to build it.
    228 
    229 \subsubsection{The audio normalisation filter} 
    230 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:
    231 
    232 \begin{center}
    233 	\includegraphics[width=0.5\textwidth]{diagrams/audio peak finder.png}
    234 \end{center}
    235 
    236 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:
    237 
    238 \subsubsection{The audio intensity meter}
    239 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:
    240 
    241 \begin{center}
    242 	\includegraphics[width=0.5\textwidth]{diagrams/audio intensitity meter.png}
    243 \end{center}
    244 
    245 The code can be seen here:
    246 \lstinputlisting[language=C, caption=\textit{using C syntax highlighting to add some colour to the world}]{./final.asm}
    247 
    248 The way this code works is in the main loop, the ADC is used to read in an analogue input, then it is processed using the convert label. The convert label will move the execution to the \textit{volow, vomid, vohigh, vovhigh} labels, that each move a corresponding value into PORTB to act as an output. The convert label works by anding the input with specific bits, and then subtracting, to see if the input is high enough to trigger a raise in the volume.
    249 
    250 To test this system, I can check which amplitude of signals makes the graph output a higher output on the graph.
    251 
    252 \subsubsection{The push pull power amplifier} % can definitely show an alternative for this
    253 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:
    254 
    255 \begin{center}
    256 	\includegraphics[width=0.5\textwidth]{diagrams/push pull power amplifier.png}
    257 \end{center}
    258 
    259 To test this system, I can measure the current in and the current out, and see how the compare.
    260 
    261 As an alternative to this section, I could have used it without the feedback op amp, however I choose to use the version I did to avoid the signal crossover that you get when using without the op amp. The output signal would be flat when the input signal is crossing into the negative zone, this would make my audio sound choppy as it will have sections cut out of it.
    262 
    263 \subsection{Full block diagram}
    264 % put a full block diagram here
    265 \begin{center}
    266 	\includegraphics[width=\textwidth]{diagrams/blockdiagram.png}
    267 \end{center}
    268 
    269 \subsection{Full circuit diagram}
    270 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.
    271 
    272 \begin{center}
    273 	\includegraphics[angle=270, scale=0.8]{diagrams/fulldiagram.png}
    274 \end{center}
    275 
    276 \section{Subsystem results} % tables, tables and more tables, no need to show the actual testing, the next section is for that
    277 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. 
    278 \subsection{The receiver} 
    279 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.
    280 
    281 Here is a table of the inputs Vs the outputs I received. I read these values of an oscilloscope.
    282 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 
    283 
    284 \subsection{The initial amplifier}
    285 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.
    286 
    287 \begin{center}
    288 	\begin{tabular}{ |c|c| } 
    289 		\hline
    290 		signal in & signal out\\ 
    291 		\hline
    292 		0v & 0v \\ 
    293 		0.5v & -2.4v \\ 
    294 		-0.5v & 2.6v \\ 
    295 		1v & -5.2v \\ 
    296 		-1.25v & 7.4v \\ 
    297 		\hline
    298 	\end{tabular}
    299 \end{center}
    300 
    301 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.
    302 
    303 \subsection{The demodulation system}
    304 To test this system, I can input signals in the range -3v - 3v and see if the output is the demodulated output.
    305 
    306 This system, should have a response curve that looks something akin to this, note the dips in the signal that match the carrier wave:
    307 
    308 \begin{center}
    309 	\includegraphics[width=\textwidth]{diagrams/AM-demod.png}
    310 	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_140141.jpg}
    311 \end{center}
    312 
    313 Mine had slightly larger distorted dips in the signal, however it achieved the same thing.
    314 
    315 \subsection{The volume boost amplifier}
    316 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.
    317 
    318 \begin{center}
    319 	\begin{tabular}{ |c|c| } 
    320 		\hline
    321 		signal in & signal out\\ 
    322 		\hline
    323 		0v & 0v \\ 
    324 		0.5v & -1.2v \\ 
    325 		1v & -2.4 \\ 
    326 		2v & -4.5 \\
    327 		-0.5v & 1.4v \\ 
    328 		-1v & 2.4 \\ 
    329 		-2v & 4.6 \\
    330 		\hline
    331 	\end{tabular}
    332 \end{center}
    333 
    334 This shows the expected gain, this subsystem works.
    335 
    336 \subsection{The audio normalisation filter and dividing amplifier}
    337 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:
    338 
    339 \begin{center}
    340 	\includegraphics[width=\textwidth]{diagrams/peakfinder.png}
    341 	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_142936.jpg}
    342 
    343 	\textit{The scope was rather confused with this one, and was flickering a lot, this is the best photo I was able to get.}
    344 \end{center}
    345 
    346 
    347 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.
    348 
    349 \subsection{The audio intensity meter}
    350 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.
    351 
    352 When tested it acted like so:
    353 \begin{center}
    354 	\begin{tabular}{ |c|c| } 
    355 		\hline
    356 		signal in & bar graph output\\ 
    357 		\hline
    358 		0v & 0001 \\ 
    359 		1v & 0001 \\ 
    360 		2v & 0011 \\ 
    361 		3v & 0011 \\
    362 		4v & 0111 \\ 
    363 		5v & 1111 \\ 
    364 		\hline
    365 	\end{tabular}
    366 \end{center}
    367 
    368 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. 
    369 
    370 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.
    371 
    372 \subsection{The push pull power amplifier}
    373 This subsystem should be tested for the current it outputs and, unlike the rest, not the voltage. Using the formula
    374 \begin{center}
    375 	\[ P = \frac{V^2}{8R_L} \]
    376 	I can calculate the maximum output power. I can then use the known value of Vin, to solve for current.
    377 	\[ P = \frac{30^2}{8 \times 12} \]
    378 	\[ P = \frac{900}{96} \]
    379 	\[ P = 9.38W \]
    380 	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.
    381 	\[ P = \frac{10^2}{8 \times 12} \]
    382 	\[ P = \frac{100}{96} \]
    383 	\[ P = 1.04W \]
    384 	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.
    385 \end{center}
    386 
    387 \section{Subsystem testing process} % just show the method of testing
    388 \subsection{The receiver} 
    389 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.
    390 \begin{center}
    391 	\includegraphics[width=0.5\textwidth]{diagrams/pics/IMG_20250319_141954.jpg}
    392 \end{center}
    393 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.
    394 
    395 \begin{center}
    396 	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_134733.jpg}
    397 \end{center}
    398 
    399 \subsection{The initial amplifier}
    400 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.
    401 
    402 \begin{center}
    403 	\includegraphics[width=0.5\textwidth]{diagrams/pics/IMG_20250312_135346.jpg}
    404 \end{center}
    405 \subsection{The demodulation system}
    406 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.
    407 
    408 \begin{center}
    409 	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_140141.jpg}
    410 \end{center}
    411 
    412 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.
    413 
    414 \subsection{The volume boost amplifier}
    415 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..
    416 
    417 \begin{center}
    418 	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_142351.jpg}
    419 \end{center}
    420 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.
    421 
    422 \subsection{The audio normalisation filter}
    423 This photo compares the modulated signal to the output signal, as I believe it shows better the effect of making all systems positive.
    424 
    425 \begin{center}
    426 	\includegraphics[angle=270, width=0.5\textwidth]{diagrams/pics/IMG_20250312_142422.jpg}
    427 \end{center}
    428 
    429 \subsection{The audio intensity meter}
    430 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.
    431 
    432 
    433 \begin{center}
    434 	Low voltage input
    435 
    436 	\includegraphics[height=0.25\textheight]{diagrams/pics/mpv-shot0003.jpg}
    437 \end{center}
    438 
    439 
    440 \begin{center}
    441 	Mid voltage input
    442 
    443 	\includegraphics[height=0.25\textheight]{diagrams/pics/mpv-shot0001.jpg}
    444 \end{center}
    445 
    446 
    447 \begin{center}
    448 	High voltage input
    449 
    450 	\includegraphics[height=0.25\textheight]{diagrams/pics/mpv-shot0002.jpg}
    451 \end{center}
    452 
    453 
    454 \begin{center}
    455 	Very high voltage input
    456 
    457 	\includegraphics[height=0.25\textheight]{diagrams/pics/mpv-shot0004.jpg}
    458 \end{center}
    459 
    460 \subsection{The push pull power amplifier}
    461 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.
    462 
    463 \begin{center}
    464 	\includegraphics[width=0.5\textwidth]{diagrams/pics/IMG_20250312_144503.jpg}
    465 \end{center}
    466 
    467 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.
    468 
    469 When accounting for this the adjusted power output calculations look like this
    470 \begin{center}
    471 	\[ P = \frac{V^2}{8R_L} \]
    472 	\[ P = \frac{10^2}{8 \times 100} \]
    473 	\[ P = \frac{100}{800} \]
    474 	\[ P = 0.125W \]
    475 	\[ P = 125mW \]
    476 
    477 	Since we measured a current draw of 15mA, we can times this by 10 to get the power draw.
    478 
    479 	\[ P = (15 \times 10 ^ {-3}) \times 10 \]
    480 	\[ P = 150mW\]
    481 
    482 	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}.
    483 \end{center}
    484 
    485 
    486 \section{System realisation}
    487 \subsection{Circuit diagram} % repeat of what was shown before
    488 Below is a repeat of my circuit diagram, to compare against later.
    489 
    490 \begin{center}
    491 	\includegraphics[angle=270, scale=0.8]{diagrams/fulldiagram.png}
    492 \end{center}
    493 
    494 \subsection{Circuit realisation} % show the actual thing, describe colour coding, etc. etc.
    495 Here is my final finished project built on my board.
    496 
    497 \begin{center}
    498 	\includegraphics[width=\textwidth]{diagrams/pics/final.jpg}
    499 \end{center}
    500 
    501 I attached the large inductor to the yellow wire on the bread board. 
    502 
    503 I had live (+15v) to the red wire.
    504 
    505 I had ground (0v) to the green wire.
    506 
    507 I had negative (-15v) to the black wire.
    508 
    509 In this photo, I am using a resisotr to represent the speaker for testing purposes.
    510 
    511 I decided to use a ribon cable to attach my bar graph to avoid the need to route them inbetween the micro controller and casing.
    512 
    513 My colour coding had anything that went to a power rail in red, and anything that connected components in white. (I relised this makes my circuit hard to follow at too late a stage to fix it).
    514 
    515 \subsection{Connecting the sub systems}
    516 While testing my project I found I had multiple loading effects. I had one cause by the large inductor and capacitor, and another caused bt the demodulation system. To fix these I used large resistor values on the following systems to avoid the need to use a volatge follower.
    517 
    518 There however was alot more work that was needed to connect the micro controller, as this required 5v to power it. I first tried using just a potential divider to power it, however this caused a loading effect to the power input. To fix this I placed the output of the potential divider into a voltage follower, and then into the power rail of the micro controller, and this made the system work as intended.
    519 
    520 \subsection{Circuit results} % prove the whole thing works from start to finish
    521 To test my system I put a number of different frequencies through the system, and I confirmed that the output frequency matched the input. The frequencies are passed into an antenna inside the room I was testing, and then is picked up by the receiver, and passes through the entire system. The outputs are measured from the output of the push pull power amp. 
    522 
    523 I am using a 7Khz carrier wave , as I found this to be the best frequency for the receiver to pick up. This will have been caused by the capacitor and inductor values having a specific frequency that they let through.
    524 
    525 \begin{center}
    526 	One can calculate the break frequency of the receiver like so.
    527 	\[ f _ b = \frac{1}{2 \pi \sqrt{CL}} \]	
    528 	\[ f _ b = \frac{1}{2 \pi \sqrt{(470 \times 10 ^{-9})(1.1 \times 10 ^{-3})}} \]	
    529 	\[ f _ b = \frac{1}{2 \pi \sqrt{5.17 \times 10 ^ {-3}}} \]	
    530 	\[ f _ b = \frac{1}{2 \pi \times (2.2737 \times 10 ^ {-3})} \]	
    531 	\[ f _ b = \frac{1}{1.14286 \times 10 ^{-4}} \]	
    532 	\\
    533 	\[f _ b = 6999.62hz\]
    534 
    535 	\[f _ b = 7Khz\]
    536 \end{center}
    537 
    538 Here are my results; these results were tested with the 7Khz carrier wave.
    539 
    540 \begin{center}
    541 	\begin{tabular}{ |c|c| } 
    542 		\hline
    543 		freq in & freq out \\ 
    544 		\hline
    545 		50hz & 40hz \\
    546 		500hz & 480hz \\
    547 		1Khz & 1.01Khz \\
    548 		3.2Khz & 3.3Khz \\ 
    549 		5Khz & 4.9Khz \\
    550 		6.5Khz & 6.3Khz \\
    551 		\hline
    552 	\end{tabular}
    553 
    554 	\textit{All of these values are approximate, as the signals flickered on the oscilloscope, and the signal generator creating these signals were read of the possibly inaccurate dial of the generator.}
    555 \end{center}
    556 
    557 These results are around what is expected for the inputs. On the lower frequencies, things were slightly off, due to the filter being used for the AM demodulation. And on the higher end, things were being cut off as we were getting too close to the carrier frequency, which caused parts of the signal to be lost.
    558 
    559 \subsection{Circuit testing} % show evidence of the results shown in the results section (lots of photos)
    560 Here is the scope trace of the input at 3.3Khz.
    561 
    562 \includegraphics[width=\textwidth]{diagrams/pics/finaloutput.jpg}
    563 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.
    564 % did it work, how well, compare to original goal
    565 \section{Evaluation} 
    566 \subsection{User Manual}
    567 \begin{center}
    568   To use my project one needs to do the following.
    569 
    570   Power the device using a 15v power supply or battery.
    571 
    572   Ensure the antena is in a reasonable location, preferably somewhere high up.
    573 
    574   Listen to the output.
    575 
    576   Look at the bar graph to see an intensity of the sound.
    577 \end{center}
    578 As my project does not receive user input in any way, it is quite simple to use. 
    579 \subsection{Safety Guide}
    580 \begin{center}
    581   To use this product safely they must avoid touching the battery/power supply, as the push pull power amp can cause large current draws, which if touched could cause a nasty electric shock. This should not be an issue however as the device would be placed in an enclosure when used.
    582 
    583   One should also be careful with the large inductor that is used as an antena, this is heavy, and thus it should be treated with caution.
    584 \end{center}
    585 
    586 \begin{center}
    587 Here is a repeat of my design objectives to compare against:
    588 
    589 \begin{tabular}{ |c| } 
    590     \hline
    591     objective \\ 
    592     \hline
    593     \hline
    594             Can recive radio waves \\
    595     \hline
    596             Displays the intensity of the volume output by the signal \\
    597     \hline
    598             Can output the sound of the demodulated waves \\ 
    599     \hline
    600     \hline
    601             Can recevie radio waves beween 50hz and 8Khz \\
    602     \hline
    603             The audio intesity bar will be at set 0v 2v 4v and 5v \\
    604     \hline
    605 \end{tabular}
    606 
    607 Here is how I achieved each of them:
    608 
    609 \begin{tabular}{ |c| } 
    610     \hline
    611     how did I achieve it\\ 
    612     \hline
    613     \hline
    614             I used a simple radio receiver made with a capacitor and an inductor \\
    615     \hline
    616             Using a micro controller and a bar graph \\
    617     \hline
    618             Using a push pull power amp and speaker\\
    619     \hline
    620     \hline
    621             By using the correct part values on my recevier to ensure it has the correct break freqency\\
    622     \hline
    623             By programing my micro controller to have the set values \\
    624     \hline
    625 \end{tabular}
    626 \end{center}
    627 
    628 This shows that I have achieved all of my design goals.
    629 
    630 \subsection{What went well?}
    631 My system worked as intended, it did play the input signal, through the speakers, atfer passing through all the subsystems and the speaker.
    632 For this I believe I made a good project.
    633 \subsection{What didn't go well, what would I improve next time?}
    634 My colour coding for my system was not ideal, I believe it was too generic and would have benififted from using multiple colours for each sub system. 
    635 
    636 I would have prefered to use a less noisy alternative to the push pull power amp, as my system outputed a large amount of static.
    637 
    638 I would have prefered to use FM rather than AM, as this would reduce the noise; making the device better.
    639 
    640 The micro controller + bar graph often resulted in a flickering output, which was still perfectly usable, however ideally would be moreconstant, this could have been fixed by using a faster micro controller with a faster ADC.
    641 
    642 \subsection{Safety while building and designing the system}
    643 Because my system was made with the high current push pull power amp, I needed to be careful from the heat they gave off. They gave of heat when a constant input wave was used for too long, mostlikely because the transistors used were disipating too much current. To keep my self save while building i decided to change how the system was layed out on my board. I made it so the top and bottem halfs of the board had 1 transistor each, which gave me enough room to put things between them, without touching them. This is apposed to the style of design, where you have both on the same half of the board, which makes them very close. Also to avoid damaging compontets in this situation, I added heat sinks to each of them to make it take longer for heat to become a damaging factor, allowing for small constant pulses of constant waves.
    644 } 
    645 \end{document}
    646