\documentclass[a4paper,12pt]{article} \usepackage{geometry} \usepackage{titling} \usepackage{titlesec} \usepackage[english]{babel} \usepackage[hidelinks]{hyperref} \usepackage{listings} \usepackage{xcolor} \usepackage{graphicx} \usepackage{setspace} \usepackage{ragged2e} \usepackage{graphicx} \graphicspath{ {./images/} } \definecolor{codegreen}{rgb}{0,0.6,0} \definecolor{codegray}{rgb}{0.5,0.5,0.5} \definecolor{codepurple}{rgb}{0.58,0,0.82} \definecolor{backcolour}{rgb}{0.95,0.95,0.92} \lstdefinestyle{mystyle}{ backgroundcolor=\color{backcolour}, commentstyle=\color{codegreen}, keywordstyle=\color{magenta}, numberstyle=\tiny\color{codegray}, stringstyle=\color{codepurple}, basicstyle=\ttfamily\footnotesize, breakatwhitespace=false, breaklines=true, captionpos=b, keepspaces=true, numbers=left, numbersep=5pt, showspaces=false, showstringspaces=false, showtabs=false, tabsize=8 } \lstset{style=mystyle} \titleformat{\section} {\Huge} {} {0em} {}[\titlerule] \geometry{a4paper,total={170mm,257mm},left=25mm,right=25mm,} \author{Lucas Standen} \title{Creating a simple radio receiver, with a volume intensity meter} \begin{document} \maketitle \newpage \tableofcontents \newpage \setlength{\parskip}{1em} {\setlength{\parindent}{0cm} \section{System planning} \subsection{Analysing the problem} 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. 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. \subsection{Design specification} 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. 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. \section{System design} \subsection{Subsystem designs} 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: \begin {description} \item[The receiver:] \hfill \\ 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. \item[The initial amplifier:] \hfill \\ 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. \item[The demodulation system:] \hfill \\ 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. \item[The volume boost amplifier:] \hfill \\ 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. \item[The audio normalisation filter:] \hfill \\ 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. \item[The audio intensity meter:] \hfill \\ 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. \item[The push pull power amplifier:] \hfill \\ 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). \item[The speaker:] \hfill \\ This is the audio output of my system, it could also be replaced with a headphone jack. \end{description} % put diagrams and detailed explanations here % 3 of these need to show alternatives \subsubsection{The receiver} This system will receive data from from the radio waves from an antenna, here is its circuit diagram: PUT SYSTEM HERE 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 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. \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 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 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 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 The code can be seen here: \lstinputlisting[language=C, caption=\textit{using C syntax highlighting to add some colour to the world}]{./final.asm} 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. To test this system, I can check which amplitude of signals makes the graph output a higher output on the graph. \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 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 \subsection{Full circuit diagram} % put a full design here (glue all the previous designs together) \subsection{Subsystem testing} % tables, tables and more tables, no need to show the actual testing, the next section is for that \subsubsection{The receiver} \subsubsection{The initial amplifier} \subsubsection{The demodulation system} \subsubsection{The volume boost amplifier} \subsubsection{The audio normalisation filter and dividing amplifier} \subsubsection{The audio intensity meter} \subsubsection{The push pull power amplifier} \subsubsection{The speaker} \subsection{Subsystem results} \subsubsection{The receiver} % might be able to cut this, or make it very short \subsubsection{The initial amplifier} \subsubsection{The demodulation system} \subsubsection{The volume boost amplifier} \subsubsection{The audio normalisation filter and dividing amplifier} \subsubsection{The audio intensity meter} \subsubsection{The push pull power amplifier} \subsubsection{The speaker} % probably can cut this section \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 % did it work, how well, compare to original goal \section{Evaluation} } \end{document}