Radio, Someone Still Loves You…

I’d sit alone and watch your light
My only friend through teenage nights
And everything I had to know
I heard it on my radio

From “Radio Ga Ga”, Track 1, Side 1 of Queen’s “The Works” (EMI Capitol 1984).
Written by Roger Taylor.


I’ve been delighted by the response to the “Joy Of Radio“, and accompanying “Resonant Frequency” [1], video that Brady uploaded to Sixty Symbols a couple of weeks ago. In addition to the very many kind, supportive, and heart-warming messages left under the video — which have done a lot to almost restore my faith in the humanity of YT’s comment sections — I’ve received a number of affecting e-mails telling me how much the video brought back happy memories.

One of these came from Rocco Cuffaro, a third year Mathematical Physics student here at Nottingham. Rocco saw the video, immediately thought of his crystal-radio-loving granddad (who is eighty years young), and emailed him a link to the video. Rocco’s granddad’s wonderfully engaging response is below. Thank you both for sharing this with me (and for giving me permission to post it here). Over to you, Rocco’s granddad…

Where do I begin?

After you and I built the Meccano type of Rocket steam engine it was my intention for you and I to build a crystal set exactly as the simple circuit in Prof Moriarty’s book. For the coil we would have used the cardboard centre of a toilet roll as a former. For the crystal I would have used a crystal from a ex war time radar if I still had some or more likely buy a silicon diode from Maplins. I have or did have plenty of variable vane capacitors that we could have used. The box of capacitors that Prof Moriarty showed us included some wide vane capacitors that were probably I guess ex transmitter components.

I very much like his approach with the experiment set up live and using a corroded penny with a wire whisker very much as it was with crystals in the early days before my time. Just a hook up of components rather than a workshop prepared demonstration.The early sets used a crystal and a wire whisker and just as he said there were many swear words so it was when people tried to find the right spot on the crystal and were then afraid to jog the thing. 

I attended an exhibition at the IET’s home in Savoy place in London( I am still a member but thinking of cancelling as I am in information overload with so many and varied things to read) which I believe marked the anniversary of the broadcast station 2LO which was the forerunner of the BBC. Many crystal sets from way back were on display and included some with more complex circuits that I was not aware of until then.

Before we became the affluent society in the 1960s I knew the elderly lady that occupied the old observatory tower in Falmouth. There was not much money around in those days so I built her a crystal set in an old cigar box and used an ex service radar diode for the crystal. The aerial was one to envy in that situation. A vertical wire 50 feet down the side of the building. The lady came from London and was thrilled to hear Big Ben for the first time in years. That happened not very long after the war.

When Nan and I lived in Ware we had a reel to reel tape recorder. I do not recall how it came about but I discovered that if I put a wire in the microphone socket the recorder thought it was a radio and picket up a strong radio signal of one programme only from obviously Brookmans Park not a million miles away. This can easily happen if all the real and stray capacitances and inductances etc allow this to happen with some non-linearity in a component giving that rectifier action that Prof Moriarty was demonstrating. I was able to record a complete set of the Gilbert and Sullivan operettas in this way. 

The converse of this phenomena is modulation and also cross modulation. At Lands End Radio the receiving aerials were close to the building housing the receivers. The transmit aerials were not very far away by a couple of fields. A problem arose when unwanted radio stations were splashing across the entire spectrum of the receivers (around and either side of 2182khz) [Editor’s note — see footnote #2 below]. I traced this to a dustbin (!) in the grounds of the station. The lid was placed lightly over the bin. On removing and replacing the lid the problem cleared. This was in my view caused by rust around the edge acting like the penny and whisker in Prof Moriarty’s experiment in reverse. The bin would have been receiving a very strong signal from the transmitting aerials of course plus a multitude of other radio signals from all over the place. The bin was transmitting a cross modulation of the lot and dumping it on the receiver aerial system. 

I will wind up there except to mention that there were a number of interesting cases of interference including a grandfather clock with no electrical connection interfering with television and the static from a lady combing her hair interfering with television through a party wall.(not mine but a colleagues) The frequencies in use then were much more susceptible to interference than now.


[1] I only realised this after reading the comments, but, remarkably, when I hit the desk to “kick start” the crystal radio at the start of the Resonant Frequency video, the song that blasts out is…Queen’s Radio Ga Ga. I was entirely oblivious to this while making the video. (This is a good thing. I’m already as overly enthusiastic as a litter of labrador puppies in that video. (Those five coffees before Brady arrived probably didn’t help.) If I had realised at the time that we’d picked up a broadcast of Radio Ga Ga I may well have melted down with excitement…)

[2] I deliberately set up the simulation of the crystal radio described in this post to mimic this “bleeding” of signals across the frequency spectrum.

The Spirit Of Radio

 

Invisible airwaves crackle with life
Bright antenna bristle with the energy
Emotional feedback on a timeless wavelength
Bearing a gift beyond price, almost free

From The Spirit Of Radio, Rush. (Track 1 of Permanent Waves (1980))
[Lyrics: Neil Peart. © Anthem Entertainment Group. Core Music Publishing.]


This is pretty much where physics started for me…

CrystalRadio.png

With help and advice from my uncle Benny, and with a “recipe” from that wonderful Ladybird making a Transistor Radio book shown in the photo, as a science-and-sci-fi fixated ten year old back in 1978 I built a crystal radio from a diode, a variable capacitor, a coil wound around a ferrite rod, and a long length of wire (which was slung up in the attic of the family house, “threaded” out through a vent on the side of our house, and tied to a tree on the other side of the garden.)

Unfortunately, that’s not the original book — nor the original crystal radio — shown above. But it is a second-hand copy of roughly the same vintage (published 1972) as that we used. Strolling through Cambridge (MA, not the one ‘down south’) a few months ago, I spotted what I thought was that Ladybird book in a bookshop window. It turns out that it was just a postcard of the cover — grrr — but that was still enough to get me eagerly hunting online for a second-hand copy of making a Transistor Radio that I could order.

The wave of nostalgia that hit me when the book arrived a week or so later was, to say the least, palpable. Brady Haran had suggested many moons ago that a Sixty Symbols video where I built a crystal radio from the Ladybird “blueprint” might make for a neat project, and he was (as ever) dead right. We had a lot of fun making this…

I casually state in the video that the diode rectifies the electrical signal, only allowing current to flow one way. That’s of course true, and it accurately describes the role of the diode in the crystal radio. But just why is it that rectification allows us to recover audio information, with frequencies in the sub-20 kHz range, from a radio wave whose frequency is ~ 1 MHz? Like so many problems in physics (and elsewhere), the answer is beautifully simple if we consider the Fourier domain. However, to my mind there’s a great deal of unnecessary complicating detail in textbooks and online resources on the subject of AM radio — and modulation in general — that I feel needlessly obscures the core, and ever-so-elegant, principle.

Sixty Symbols videos — certainly those to which I contribute — are not meant to be tutorials, lectures, or lessons. They’re there to pique interest in a topic. I want viewers to come away from a video thinking that they’d like to find out more. (And if they’re a little — or a lot — perplexed or bamboozled by my explanations at times, good.) Sixty Symbols is the start, not the end, of the learning process.

But sometimes I really want to explain the physics in a more in-depth, tutorial style. And that is very definitely the case for the crystal radio. Not only was that humble receiver such an important factor in my getting hooked on physics but it’s an amazing demonstration of the power and elegance of a Fourier perspective on signal processing. So I spent a few hours over the weekend writing some Mathematica code [1] to simulate the process of amplitude modulation and demodulation that underpins just how the crystal radio works. I hope this will help demystify (de)modulation for those who, like me, struggled to get their head round the concept as a student.

Permanent Waves

Let’s start with the simplest possible wave — a pure sinusoidal tone. We’ll choose a 1 kHz frequency. It looks like this…

SpiritFig1 …and it sounds like this:

Yawn. An irritating, characterless whistle.

But this boring, characterless tone can teach us a lot.

A much more “compact” way of looking at any wave is to plot its frequency (aka Fourier) spectrum. In the case of that 1 kHz sine wave, it’s very straight-forward to interpret…

SpiritFig2

There is no new information in the figures above — they’re simply alternative representations of exactly the same waveform data. Instead of plotting how the wave varies in time, we are representing it in a much more compact, and therefore much more easily interpretable, form. The main figure is what’s known as the power spectrum — it shows the power associated with different frequencies. [2] Don’t worry about the numbers on the y-axis. (Not that you can in any case — I’ve not shown them so you won’t get distracted.) Focus instead on the x-axis. We have a peak at 1000 Hz. And nothing else. A single, solitary peak, the height of which is proportional to the “volume” [3] of the note.

The inset shows what’s known as a spectrogram. This tells us how the frequency spectrum varies in time, with the brightness on the plot now representing the “volume” of the waveform. In this case, the note is a constant 1 kHz frequency, so we have a simple flat line (at 1 kHz on the y-axis) across the 1 second duration of the note.

“Never mind the aggravation. Modulation. Gimme another key.”[4]

To transmit this incredibly boring signal via conventional AM radio, we’d first need to imprint it on a carrier wave having a frequency in the 535 – 1605 kHz range. I didn’t use frequencies quite that high in the Mathematica simulation because that would be overkill (and would dramatically slow down processing speed due to the sheer volume of data; a 1 MHz signal, for example, would require a minimum of a 2 MHz digital sample rate for accurate representation, as Nyquist and Shannon (and others before them) showed us many moons ago.) But we can see exactly the same (mathematical) physics in action and understand AM modulation/ demodulation using much lower frequencies.

So let’s just pluck a carrier frequency out of the air. We’ll opt for 21.12 kHz, for no particular reason. We’re going to imprint our audio information — that single sine wave — onto our carrier wave; more technically, we’re going to modulate the carrier wave with the audio information. In this case, “modulate” just means multiply:

fmod(t)= (1 + m fsignal (t)) fcarrier(t)

where fmod(t) is our modulated wave, fsignal (t) is our signal (i.e. that boring sine whistle), and fcarrier(t) is our carrier wave (which is another sine wave but at a much higher frequency (i.e. 21.12 kHz)). That variable in the equation above is the modulation depth — it controls the extent to which we imprint our signal on the carrier. (I’ve set m to a value of 1.0 for this example but tweaked it a little for the demos further down this post.)

Here’s what a couple of milliseconds of our carrier wave looks like…

2112carrier

(You really only need to see a couple of milliseconds — it just repeats this cycle over and over.)

And here’s what our modulated wave, fmod(t), looks like over the same period of time:

modulated

The much more slowly varying 1 kHz frequency modulates the carrier, causing its amplitude to vary up and down.

Now here’s the especially neat trick that becomes so much easier to understand in Fourier space. What does the frequency spectrum of the modulated waveform look like? You might initially think that it contains two frequencies — the 1 kHz signal and the 21.12 kHz carrier.

Nope.

Here’s what it looks like:

modulated_sine_spectrum

There are three frequency components! And there’s no sign at all of a peak at 1 kHz in the spectrum. Our carrier frequency is certainly still there, standing tall and proud at 21.12 kHz. But it’s accompanied by two neighbours, or sidebands as they’re more commonly known. So where has our audio signal gone?

Rest easy. All the audio information is still there. It’s in those sidebands. The lower frequency sideband is at 20.12 kHz (i.e. 21.12 – 1.00 kHz), while its “sibling” is at 22.12 kHz (i.e. 21.12 + 1.00 kHz). The origin of the sidebands can be understand on the basis of secondary/high school trigonometry: multiply two sine functions, sin(A) and sin(B) and we end up with two cosines, one with a frequency of A-B, the other with a frequency of A+B. [Don’t worry about the sine-cosine transformation. A sine is just a phase-shifted version of a cosine. They both sinusoids. See also Footnote 5]. Or, in slightly more mathematical terms:

sin(A) sin(B)=½ [cos(A-B)-cos(A+B)]

The audio information is embedded in the sidebands. We’ve just moved the 1 kHz audio information to a higher frequency (above the audible threshold of 20 kHz). A real world AM transmitter would transfer the audio it’s broadcasting (be it music, comedy, news, the abomination that is Country & Western, or reports of the latest Trump family gaffe) to sidebands of a carrier frequency over one hundred times higher than the 21.12 kHz used in the simulation. But that’s just a matter of scale. The fundamental maths and physics are exactly the same. [6]

Rectifying the situation.

So the audio information is still there. It’s just been transposed to a different frequency. How do we recover it?

Remarkably, in a real radio we can recover the audio, i.e. demodulate the signal, using a very basic electronic component: a diode. That’s what I used as a ten year old (because it’s what the Ladybird book recommended). But as that Sixty Symbols video up there shows, we can use an even more humble “component” — a ‘rusty’ penny! — to recover our audio. The metal-semiconductor junction — a Schottky barrier — formed by the tip of the wire touching on the oxidised surface of the penny is enough to allow electrons to flow one way but not the other.

And that rectifies the modulated waveform…

rectified

The signal is now only positive. (It’s very easy to simulate the action of a diode in code simply by removing all the negative parts of the waveform. [7])

Now usually at this point in explanations of AM radio and modulation/demodulation, there’s a long discussion about the role of low pass filtering, and RC time constants and the like on the signal.  That is, of course, important in the context of filtering out frequencies we don’t want — and I’ve judiciously filtered out frequencies above 20 kHz in the demodulated examples in this post — but we don’t need all that to understand how the diode demodulates the audio information from the radio signal. We just need the wisdom of Fourier again. Here’s what the power spectrum of that rectified signal looks like:

rectified-power

And if you’d prefer to see the spectrogram, here it is:

rectified-spectrogram

The most important thing to realise here is that simply by rectifying the radio signal we’ve recovered our original audio signal! There it is, back at 1 kHz in both the power spectrum and the spectrogram. (There’s also a spike at 0 Hz and new components at, and around, twice and four times the carrier frequency. [8] But we can filter those out.) What is key is that the rectification process (i.e. the demodulation) has recovered our original signal from the modulated waveform.

Here’s what our demodulated waveform sounds like…

“…and echoes with the sounds”

Radio would be exceptionally boring if all that was broadcast were single sine waves. (Although it’s got to be said that BBC R4 around about 7:00 pm any weekday evening is even less interesting than that monotone whistle.) So let’s take a slightly more exciting audio sample…

This has a rather more complicated frequency spectrum, as one might imagine…

spirit_spec

But if the modulation-demodulation process works for one frequency, it will work for all frequencies. Here’s that audio signal modulating a 42 kHz carrier wave…

spirit_modulated

And this is its spectrum:

spirit-mod-spec

It might not look like it at first glance but exactly the same transposition of the audio spectrum as we observed for that solitary sine wave has occurred. The audio spectrum has been shifted to upper and lower sidebands around the carrier frequency of 42 kHz.

Here’s what that modulated waveform sounds like:

No, there’s no error. If you didn’t hear anything when you clicked the “Play” button, that’s good. All of the frequency spectrum is outside the audible range.

Now we demodulate…

rectified-spectrum-spirit

…and instead of the void in the 0 – 20 kHz frequency range that we had for the modulated spectrum, we’ve recovered the audio spectrum.

This is the demodulated signal:

Turn Up The Radio

So that’s the modulation-demodulation process captured in code. Now let’s add in a few more “radio stations” across our frequency spectrum…

AMradio-spec

You might be able to guess just how many stations there are.

The four sharp lines running horizontally across the spectrum above arise from the four different carrier frequencies I’ve chosen: 42 kHz, 55 kHz, 65 kHz, and 75 kHz. Now, ideally, I’d separate those carrier frequencies from each other by at least 20 kHz, to ensure no overlap when it comes to the ~ 20 kHz audio bandwidth, but I had to draw a compromise between processing time, avoiding artefacts due to aliasing [8], modulation/demodulation quality, and “fidelity” of sound reproduction. It turns out that the ~ 10 kHz separation of the “radio station” carrier frequencies is more than good enough to demonstrate the remaining principle we need to cover in order to understand how an AM radio works [9]: tuning.

tuner

If we don’t have a mechanism for selecting a particular carrier frequency, all of the audio signal from each of the stations will overlap when we demodulate and all we’ll hear will be a chorus — or, more accurately, a cacophony — of sounds. In the crystal radio we use a tuned circuit, formed by a capacitor and inductor, to select different frequencies. As I describe in that Sixty Symbols video above (and the accompanying “extras” clip), the capacitor-inductor circuit has a particular resonance frequency, f, defined by a very simple equation:

f0 = 1/(2𝜋(√LC))

So, by changing the value of the capacitance, we can tune the resonant frequency of the circuit and thus select different parts of the spectrum. For example, let’s say we select a resonant frequency of 42 kHz. Our tuned circuit would select a band of frequencies centred on that 42 kHz resonance. (The width of that band depends, in turn, on something called the quality factor (Q-factor) of the resonance.) Something like this:

filtered

In the land of Mathematica we can use the simple BandpassFilter function to mimic the action of the LC circuit in the crystal radio. This video sketches out what happens when we vary the value of the centre of the bandpass filter:

Now we have a mechanism for selecting one radio station from another! If the stations are a little too close together in frequency (and/or our bandpass filter is not selective enough) then we can sometimes hear two overlapping signals from different stations.

And at this point we have all the elements in place to modulate, demodulate, tune in, and tune out. I’ll leave you with the video below, which shows the Mathematica radio simulation being put through its paces as the frequency is tuned across the various stations. As Autograph — those purveyors of quality 80s hair metal — put it so aptly, things go better with rock

Image of AM/FM tuning dial from http://nicelittlestatic.com/tag/radiotimekeeping/


[1] This was my first foray into Mathematica. I’ve got to say a big thank you to Noah (Hardwicke) for his invaluable advice and expertise in all things Mathematica. I’m also immensely grateful to my colleague Paul Glover for a couple of very helpful conversations on modulation and demodulation (and the loan of Paul’s treasured Introduction To Communication Systems (FG Stremler).)

[2] For those who’d like a little more technical detail, the power spectrum is the modulus squared of the Fourier transform of the signal. (The Fourier transform is complex-valued  — it has real and imaginary parts; the modulus squared is real-valued.) By plotting this, we’re throwing away all phase information. For example, the power spectrum of a 1 kHz sine wave is identical to the power spectrum of a 1 kHz cosine wave. Phase is a whole other can of worms in Fourier space that we can fortunately avoid when it comes to understanding amplitude modulation and demodulation.

I’m also only plotting a single-sided spectrum. No negative frequencies. For now.

[3] Very, very loosely speaking. Settle down, Fourier enthusiasts and sound engineers.

[4] Lyric from NOFX’s “Thank God, It’s Monday” . 

[5] See [2] above. The power spectrum doesn’t distinguish between sines and cosines (or any other phase difference for that matter).

[6] An even more elegant way of thinking about the modulation process, for those of you with some background in Fourier analysis, is as follows. A multiplication in the time domain is the same as a convolution in Fourier space (and vice versa). I’ve not included negative frequencies in the graphs above but they’re there (because we can represent sines and cosines in terms of sums and differences of complex exponential functions). Here’s what we have for the spectra of our signal and carrier wave (excuse the scribble)…

conv-scribble-1.png

 

That * symbol in the scribble above represents a convolution. When we convolve the frequency spectra for our carrier and signal waveforms (and include the carrier wave), this is the result:

conv-scribble-2

Lo and behold, we have sidebands. Multiplication in time domain = convolution in frequency domain.

[7] In Mathematica, I used the Clip function to do this.

[8] If you’ve studied Fourier analysis, ask yourself why this is. (Note that the sample frequency I was using is 192 kHz and that means the highest frequency I can reliably observe in the spectra is 96 kHz.)

[9] As we’ll hear a little further down the post, it also leads to some authentic “bleeding” of the sound from one station into another — an effect that many crystal radio enthusiasts had to endure in days gone by.