AN62582 AM Modulation and Demodulation PDF
AN62582 AM Modulation and Demodulation PDF
AN62582 AM Modulation and Demodulation PDF
Contents
1
2
Introduction ...............................................................1
Mixer Component .....................................................2
2.1
Up Mixer ..........................................................3
2.2
Down Mixer ......................................................4
3
AM Generation .........................................................5
3.1
PSoC 3 and PSoC 5LP Implementation ..........6
3.2
Examples - Modulation ....................................8
4
Demodulation ......................................................... 10
4.1
PSoC 3 and PSoC 5LP Implementation ........ 11
Introduction
Amplitude modulation (AM) is defined as
modifying the amplitude of the carrier wave
according to the message or information signal.
AM generation involves mixing of a carrier and an
information signal.
There are two methods to generate AM:
4.2
Example - Demodulation ............................... 14
5
Summary ................................................................ 15
Document History............................................................ 16
Worldwide Sales and Design Support ............................. 17
Products .......................................................................... 17
PSoC Solutions ............................................................. 17
Cypress Developer Community....................................... 17
Technical Support ........................................................... 17
www.cypress.com
Mixer Component
PSoC Creator provides a Mixer component. It can be used for frequency conversion of an input signal using a local
oscillator (LO) signal as the sampling clock. Figure 1 shows the mixer component in PSoC Creator.
The Mixer component can be configured in two
configurations:
1.
Up Mixer
2.
Down Mixer
www.cypress.com
2.1
Up Mixer
The Up Mixer (or Multiply Mixer) multiplies the input signal with LO. The Mixer component is configured as Up Mixer
or Multiply Mixer by setting the Mixer Type parameter to Multiply (Up) Mixer as shown in Figure 2.
Figure 2. Configuration of Up Mixer
LO frequency setting: The LO source can be set to internal or external. When it is set to internal, the frequency of the
LO is set in the box provided as LO Frequency. When the LO Source is set to external, an oscillator signal is
connected externally to the LO terminal of the Mixer component.
www.cypress.com
2.2
Down Mixer
The Down Mixer (or Sample Mixer) operates as a sample and hold circuit on the input signal. The Mixer component is
configured as Down Mixer by setting the Mixer Type parameter to Sample (Down) Mixer as shown in Figure 3.
Figure 3. Configuration of Down Mixer
LO frequency setting: The LO Source can be set to internal or external. When it is set to internal, the frequency of the
LO is set in the box provided as LO Frequency. When the LO source is set to external, an oscillator signal is
connected externally to the LO terminal of the Mixer component.
www.cypress.com
AM Generation
Figure 4. AM Generation
K(offset) +m(t)
( K+m(t) ) * c(t)
AM
c(t)
Mixer
Equation 1
Equation 2
Equation 3
If the message signal is given with zero offset, you get a suppressed carrier AM,
AM = m(t) c(t) = Am cos (2 fmt) cos (2 fct)
Equation 4
m(t) x c(t)
AM
c(t)
Mixer
www.cypress.com
3.1
The Voltage DAC (VDAC) provides offset to the message signal m(t). The message signal and carrier signal are
multiplied by mixer; therefore, the carrier component strength in the resulting AM wave is determined by this offset
voltage (see Figure 4).
By varying this offset voltage, the carrier level in AM is controlled. The message signal should be biased on top of this
DC offset voltage and fed to mixer.
The reference Vdda/2 provides the AGND for all signals and to the mixer. The offset of the message signal should be
above AGND. Thus, VDAC voltage value should be VDAC = AGND + offset (K).
As an example, a square wave of 100 kHz is used as a carrier signal. The square wave has odd harmonics such as
300 kHz and 500 kHz in it. When it is multiplied with the message signal with frequency, fM, it produces double sided
AM with components fC + fM and fC fM. However, there are also harmonics 3fC + fM, 3fC fM, and so on. To
remove these higher harmonics the band pass filter with bandwidth 10 kHz and center frequency 100 kHz is put at
the mixer output. The mixer component type is set to Up Mixer (or Multiply Mixer). The Up Mixer is used for
modulation because it gives a gain of 1 for the up converted frequency; the Down Mixer gives a lesser gain. The band
pass filter with cutoff frequency 100 kHz and bandwidth of 10 kHz is built as follows. This is a band pass filter with low
Q factor.
Lowest frequency of pass band fL = 90 kHz
www.cypress.com
Frequenc y Range
The Up_Mixer maximum frequency ranges are as below:
Max message signal frequency: 500 kHz
Max carrier signal frequency: 1 MHz
Figure 7. Frequency Spectrum for AM
Amplitude
500 Hz Signal
-500
Hz
500
Hz
-300
kHz
Amplitude
modulated wave
-300
kHz
www.cypress.com
-100
kHz
100
kHz
BPF
BPF
-100
kHz
100
kHz
300
kHz
300
kHz
3.2
Examples - Modulation
The following examples show AM waveforms for different modulation indices. Modulation index can be defined as the
measure of extent of amplitude variation about a unmodulated carrier. The modulation index is an important factor.
When a level of modulation is too low, the modulation does not utilize the carrier efficiently and if a level of modulation
is too high, the carrier can become over modulated causing sidebands to extend out beyond the allowed bandwidth
causing interference to other users. In the following figures, the waveform in cyan color is message signal and
waveform in yellow is the AM.
3.2.1
3.2.2
www.cypress.com
3.2.3
3.2.4
E x a m p l e 4 : S h o w i n g D i f f e r e n t C a r r i e r L e ve l f o r 5 0 % M o d u l a t i o n
Carrier amplitude = K = 0.5 V
Message amplitude = Am = 0.25 V
Vdda = 5 V
AGND = Vdda/2 = 2.5 V
VDAC= AGND + 0.5 V (K) = 3 V
u = (Max Min) / (Max + Min)
u = (1.5 0.5) / (1.5 + 0.5) = 0.5
Carrier amplitude = K = 1 V
Message amplitude = Am = 0.5 V
Vdda = 5 V
AGND = Vdda/2 = 2.5 V
VDAC = AGND + 1 V (K) = 3.5 V
u = (Max Min) / (Max + Min)
u = (3 1) / (3 + 1) = 0.5
www.cypress.com
3.2.5
Demodulation
This section explains the coherent detection of an AM signal. In this method, the incoming AM signal is multiplied with
the LO signal of same frequency as carrier frequency. The LO signal is generated from the AM by passing the AM
signal through the ZCD. The envelope detector method can be implemented for demodulation using opamp, but it
requires external components.
Zero Cross
Detector
Local
Oscillator
Low Pass
Filter
Demodulated
signal
Mixer
www.cypress.com
10
4.1
www.cypress.com
11
The Vdda/2 reference voltage is buffered and used as an analog ground (AGND) for the circuit. The incoming AM
signal should be biased at this DC voltage.
www.cypress.com
12
The AM signal is given to comparator whose reference is AGND. The output of the comparator is square wave with
frequency same as the carrier frequency of AM signal. The output of the comparator is used as a LO signal for the
mixer. The mixer type is set to Down Mixer (or Sample Mixer).The Down Mixer gives a gain close to 1 (when the
signal is sampled at peaks) for the down converted signal. The Down Mixer output has lower harmonic content than
up mixer when the input signal and LO signal have near same frequencies. The Mixer samples the input AM signal at
the rising edges of the LO as shown in following figure. The LPF is used to filter the demodulated output to remove
the sample and hold effect on the output of mixer.
Figure 17. AM Wave Sampled by Mixer Component
The sample and hold gives maximum output when the signal is sampled at peaks. The comparator output delay plays
an important role in the demodulation. The ideal delay that gives maximum output is quarter period (90) of the
carrier. See Figure 18. When the delay is 90, the mixer samples the AM wave at the peaks. A delay lesser than 90
still gives a demodulated output; however, the amplitude level is reduced. The comparator typical delay is 90 ns. This
delay makes the mixer sample the AM wave within 45 to 135 from the zero crossing for the frequency range
1.25 MHz to 4 MHz. If the signal frequency is out of this range then, either external delay circuit should be added on
the signal before giving it to ZCD or the signal should be brought within the range before demodulating it.
Figure 18. Comparator Delay of 90 Making Sampling at Peak
900
You need a LPF to remove the high frequency components of the mixer output. The Sallen-Key LPF with 1 kHz cutoff
is built using opamp as follows.
For Sallen-Key low-pass filter,
Cutoff frequency, fC = 1/2(R1 R2 C1 C2)1/2
fC = 1/ 2(146.5k 78.67k 1nF 2.2 nF)0.5 = 1 kHz.
www.cypress.com
13
4.1.1
Frequenc y Range
The Down Mixer maximum frequency ranges are as below:
Max AM Carrier Signal Frequency: 4 MHz
AM Signal
1.2 MHz
1.2 MHz
Mixer Output
Demodulated
Output
LPF
1.2 MHz
4.2
1.2 MHz
0 Hz
Example - Demodulation
AM wave amplitude = 1 V
Carrier frequency = 1.2 MHz
Message frequency = 500 Hz
Modulation index (u) = 50%
www.cypress.com
14
Summary
Implementing the AM modulation and demodulation using the mixer component in PSoC 3 and PSoC 5LP is
discussed in the application note. Also, the AM modulation with different modulation indices, carrier levels, and
suppressed carrier is discussed. AM demodulation using the coherent detection method is also demonstrated.
Pavankumar Vibhute.
Title:
www.cypress.com
15
Document History
Document Title: AN62582 - AM Modulation and Demodulation
Document Number: 001-62582
Revision
ECN
Orig. of
Change
Submission
Date
Description of Change
**
2968090
PVKV
07/02/10
*A
3302878
PVKV
07/05/11
*B
3444026
PVKV
11/30/11
*C
3670276
PVKV
07/09/2012
*D
3809511
PVKV
11/09/2012
Updated Associated Part Family as All PSoC 3 and PSoC 5LP parts in page 1.
Updated Software Version as PSoC Creator 2.1 SP1 in page 1.
Updated attached associated project.
*E
4853876
PVKV
07/27/2015
www.cypress.com
16
PSoC Solutions
Products
Automotive
cypress.com/go/automotive
psoc.cypress.com/solutions
cypress.com/go/clocks
Interface
cypress.com/go/interface
cypress.com/go/powerpsoc
Memory
cypress.com/go/memory
PSoC
cypress.com/go/psoc
Touch Sensing
cypress.com/go/touch
USB Controllers
cypress.com/go/usb
Wireless/RF
cypress.com/go/wireless
Technical Support
cypress.com/go/support
PSoC is a registered trademark and PSoC Creator is a trademark of Cypress Semiconductor Corp. All other trademarks or registered trademarks
referenced herein are the property of their respective owners.
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
Phone
Fax
Website
: 408-943-2600
: 408-943-4730
: www.cypress.com
Cypress Semiconductor Corporation, 2010-2015. The information contained herein is subject to change without notice. Cypress Semiconductor
Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any
license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control or
safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as
critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The
inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies
Cypress against all charges.
This Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide
patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a
personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative
works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conjunction with a Cypress
integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source
Code except as specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the
right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the application or
use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in life-support systems where a
malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress product in a life-support systems
application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
Use may be limited by and subject to the applicable Cypress software license agreement.
www.cypress.com
17