# Why do we need a diode in an AM demodulation circuit?

The incoming signal is a modulated carrier wave, right? If we only apply a low-pass filter to it, we will get an AC signal that can be passed to a speaker directly, right?

Using a diode, we end up with DC that must then be turned to AC again for the speaker to work, so why bother with the diode? What does adding it actually do?

• If you are going to google, then look for "square law" detection and detectors. This makes the output proportional to the signal power. 100% modulation on a double sideband full carrier will have a peak envelope power that is 4 times the carrier. Also look up "envelope" detection and detectors. (Obviously, include AM in these searches.) Also, rectification provides a kind of local AGC of sorts and powers the local oscillator that's required to "heterodyne." (Another search.) As I see it, anyway. Commented May 12 at 17:48

If we only apply a low-pass filter to it, we will get an AC signal that can be passed to a speaker directly, right?

No, not at all. The low-pass filter would just block the RF signal (your modulated carrier) completely. So, you'd get nothing.

Using a diode, we end up with DC

Not really!

A diode alone doesn't smooth anything. Even assuming an ideal diode (which seems to be the diode model you have in your head, which is pretty far from correct for RF signals), you'd get a signal that is 0 when the input signal is negative (i.e., half of the time), and the original signal when it's positive.

So, your signal after the diode is kind of "twice as high" in frequency than your original RF signal; I really can't call that "DC"; I'd call it "high-frequency AC with a positive voltage offset".

The trick here is while the average of an RF modulated carrier is 0, no matter its amplitude, the average of the RF modulated carrier with the negative halves "cut off" suddenly becomes positive, and proportional to the amplitude of the carrier.

That's why we call it amplitude modulation!

that must then be turned to AC again for the speaker to work

Not really, a speaker would still work with a DC offset, but it's a non-issue anyways:

You're not putting the signal coming out of the diode directly to the speaker – you still need the low-pass filtering step, which is actually doing the "average" mentioned above.

"Adding the negative halves back to make things look like AC" is inherent to the way you then amplify the demodulated signal; you can just add a series capacitor.

What does adding it actually do?

Without it you don't get a receiver, so I'd argue the diode in a diode detector is the central part.

The diode fulfills the purpose of applying a non-linear function to input signal, if you need to think about it in more mathematical terms:

Say we start with a sine carrier of frequency $$\f_c\$$ with amplitude $$\A_m\$$. This $$\A_m\$$ is always positive, $$\A_m>0\$$. (so, it's the audio plus a constant offset such that it's never "dipping" into negative values.)

Because that amplitude contains our message, I'm giving it the subscript $$\{}_m\$$.

For example, $$\f_c=100\,\text{kHz}\$$ or $$\f_c=144\,\text{MHz}\$$, so much much "faster" than our message changes. That's why I'm not giving $$\A_m\$$ an "of time" $$\(t)\$$; for all we care on short times, $$\A_m\$$ is unknown, but stays the same.

Let's call our receive signal $$\r(t)\$$ (so, it's a function of time $$\t\$$: at different times $$\t\$$, it has a different values. So, here's our reception of our modulated carrier:

$$r(t)= A_m \cdot \sin(2\pi f_c t)$$

So, we want to get the $$\A_m\$$ from that formula, and get rid of the $$\\sin(\ldots)\$$! A filter can't do that, because all a filter ever does is multiply each frequency with its own gain, so you might get a "dampened" $$\A_m \cdot \sin(2\pi f_c t)\$$, but not anything without the high-frequency sine. A filter can't shift in frequency!

Any non-linearity can. To illustrate that, you need to understand that a diode does not actually do the "off when negative, fully on when positive" thing you've learned. A diode has a diode curve, which is an exponential function that is very close to zero in the negative inputs, and very quickly grows for positive inputs.

Because radio signals are by and large pretty weak, we can concentrate on values a few microvolts to millivolts below and above 0 V (depends on your antenna and your receive amplifier, different story). In a pretty good approximation, for such small inputs, we ignore the complicated exponential function of that diode and go just with "yeah, it's quadratic. It takes the input and squares it!" (and everything that it doesn't square stays at $$\f_c\$$, so our low-pass filter throws it out anyways. We ignore it.)

So, yeah, our diode squares our input. We get:

\begin{align} (r(t))^2 &=(A_m \cdot \sin(2\pi f_c t))^2\\ &= A_m^2 \cdot (\sin(2\pi f_c t))^2 \end{align}

Here, we need to ask our friend Wikipedia for help (unless we had a fresh calculus course, and know how to prove such things ourselves). There's things we can say about squares of sines, and they say that $(\sin (x))^2 = \frac{1-\cos(2x)}{2}$. So, in our formula:

\begin{align} &= A_m^2 \cdot (\sin(2\pi f_c t))^2\\ &= A_m^2 \cdot \frac{1- \cos(2\cdot2\pi f_c t)}{2}\\ &= A_m^2 \cdot \left(\frac{1}{2}-\frac{\cos(2\pi (2\cdot f_c) t)}{2}\right)\\ &= \frac{A_m^2}{2}-A_m^2\frac{\cos(2\pi (2\cdot f_c) t)}{2} \end{align}

Waaaait, that last line is strange: now we have two added components (from our multiplicative $$\A_m\cdot\sin\ldots\$$), and while the first one is just a constant value $$\A_m/2\$$, the second is at twice the carrier frequency!

OK, we throw our low-pass filter at that, which we designed to cut off anything above what is audible. That especially cuts away anything at twice the carrier frequency! We get

$$m(t) = \frac{A_m^2}{2}.$$

Neat. There's our $$\A_m\$$, without the modulation onto the carrier (note: the carrier frequency didn't even matter! Just that it's much higher than our message signal's frequency, so that our low-pass filter can cut it off.)

Yeah, and as you said, that's not a great signal to put through a speaker, so we feed it to our audio amplifier through a DC-blocking capacitor, which removes the DC offset that the original $$\A_m\$$ had.

(In real AM radio a bit more is going on, to make the $$\A_m^2\$$ not be a mess compared to the original $$\A_m\$$, but that's honestly just "improvements of audio quality"; not really necessary.)

The diode keeps the low pass filter from outputting 0 as the average of every two successive half waves.

• What average are you talking about? The filter I'm thinking about is a capacitor that allows high frequencies to go to the ground and low frequencies to go to the speaker. Commented May 12 at 16:53
• I am writing about the average of one received half wave and the next, opposite polarity one: it will be zero, or very close. (You'd need a series element in addition to that "parallel" capacitor.) Commented May 12 at 16:58

If you have a carrier wave, you don't have any low frequencies, and thus a low pass filter will filter out the carrier and there will be nothing coming out from the low pass filter.

Same thing when you are making a power supply from mains. If you have a 50/60 Hz AC, and lowpass filter it, you have nothing. If you apply even one diode and a capacitor, you can then have a DC voltage that tracks the peaks of the AC.

• Sorry, this is even more confusing to me :) Well, I'm not sure if the frequencies lower than the carrier are present in the signal. Before asking the question, I thought they were. But if not, how does the diode make lower frequencies appear then? Tracking AC peaks would allow us to maybe have the output frequency as low as half the modulated signal frequency. But that is still too high for a carrier of 1MHz and audio of 1kHz, isn't it? Commented May 12 at 17:07
• As per the math, if you use a 1 kHz sine wave to modulate amplitude of a 1000 kHz carrier (i.e. multiply them together), you get a signal with 999 kHz and 1001 kHz, in addition to 1000 kHz as the carrier is not suppressed. You have no 1 kHz signal left, but the frequencies around 1 MHz can be easily transmitted over radio. Which is why you must track the peaks of the 1 MHz carrier as the peaks are the amplitude of the original 1 kHz audio signal. Commented May 12 at 17:14

The incoming signal is a modulated carrier wave, right? If we only apply a low-pass filter to it, we will get an AC signal that can be passed to a speaker directly, right?

radio frequency AC does get converted by the diode detector into audio AC eventually, but a step is missing.

The diode produces a DC component from the AM signal, with audio riding on top (added). Added to that is some remnant radio frequency, which can be low-pass filtered out. There's not a simple way to extract audio without the DC component.
A following RF low-pass filter after the diode detector (R1C2) gets rid of radio frequency stuff, while passing audio frequency stuff and DC as well.

simulate this circuit – Schematic created using CircuitLab

The DC component might be used as a signal-strength indicator. It might also be used as radio gain control fed back to previous RF stages. The goal here is to make all stations sound equally loud, so you don't have to ride the audio level control. If used, it is called AGC (automatic gain control).

A high-pass filter (C3R2) picks off the audio from a diode detector and passes it on to the audio amplifier, leaving the DC component behind.