# Pushing the Envelope Detector: Exploring Demodulation, AM, and FM signals.

I recently compiled and posted a project on hackster.com describing how a Theremin (an electronic musical instrument) can be built using the Analog Discovery 2, the Digilent Analog Parts Kit, and a beverage can. It was a super fun project, I learned a lot, and it can be found here: https://www.hackster.io/ian-etheridge/beverage-can-theremin-03ba2e

One of the last stages I referred to as an “Envelope Detector.” This stage is a very simple circuit consisting of one diode, one capacitor, and one resistor. These 3 amigos convert a “multi-frequency” input signal, called a modulated signal, into a single-frequency output signal. Here is an example schematic for an envelope detector:

The input signal is a sum of two periodic signals. This is part of how the Theremin and its player can create a signal with varying frequency (visit my project page for more information on this). The “envelope” of a signal can be thought of as the outline if you created a new wave by connecting all the amplitude peaks. When these two summed signals differ in frequency, the resulting signal has a periodic envelope.

Taking this one step at a time, the diode in this circuit is also called a rectifier. When an alternating signal is presented to a diode, the diode only conducts a signal when the voltage at its anode is positive and provides a potential difference to the cathode, greater than its threshold voltage. This “removes” all negative voltages like its going out of style. If we consider this circuit without the capacitor and keep some arbitrary resistor to complete the circuit, we get rectified! Below is an example of half-wave rectification using our circuit without the capacitor. The yellow signal is the modulated signal from the Analog Discovery 2 Wavegen using the Modulation option. The blue(ish) signal is the rectified output from the diode. Notice how all those pesky negative voltages are gone!

Now let us bring our capacitor buddy back into the picture. The increasing voltage from the rectified signal charges the capacitor. When the voltage begins to drop, the capacitor will start to discharge through the resistor. However, the rate at which the capacitor discharges is (ideally) very much slower than the frequency of the modulated signal. Therefore, the capacitor does not fully discharge on the falling edge of the rectified signal, but will be charged relative to the rectified signal peak amplitudes. The capacitor and resistor together are also a Low Pass Filter, a match made in heaven. The Low Pass Filter smooths out the resulting signal and filters out high frequency noise that is inherently carried by the modulated input signal. Below is an example of our Envelope Detector in action! The yellow signal is the same modulated signal from the previous figure and the blue(ish) signal is now the envelope of the modulated signal (well, at least the shape, in theory the envelope should be “riding” along the peaks of the modulated signal).

This process is also called “demodulation” and was first widely used in AM radio frequency transmission.  A baseband signal is modulated (or “added”) to a carrier frequency for transmission. The rectification and filtering takes place at the user end inside the radio, providing the listener with the original broadcast signal. Kick out the jams mother…boards! Changing the resistor and capacitor values would change the time constant and cutoff frequency of the filter, which may be helpful in improving the envelope detection or noise reduction.

AM stands for Amplitude Modulation, demonstrated in our scope shots as the yellow wave. The carrier signal is added to the baseband signal, resulting in a transmittable signal with a frequency of the carrier and varying amplitude that conforms to the baseband signal. Unfortunately, high frequency noise is an inherent problem with AM signals. Now, Frequency Modulation (FM) is more commonly used for higher quality audio transmission as the effects of noise are much less prominent. I found a website dedicated to transistor radio repair that has some great information about AM and FM circuits in application and a great diagram that compares AM and FM signals, respectively. A link to the website is provided below the image.

View all posts by Ian Etheridge →

1. Ahmed says:

Hi ,