Faculty of Engineering Electrical Engineering Department Communication II Lab (EELE 4170) Lab#2 PCM Modulation & demodulation Objectives: 1-To understand the operation theory of pulse coded modulation & demodulation. 2-To understand the theory of PCM modulation & demodulation circuit. Theory: 1. The operation theory of PCM modulation PCM modulation is a kind of source coding. The meaning of source coding is the conversion from analog signal to digital signal. After converted to digital signal, it is easy for us to process the signal such as encoding, filtering the unwanted signal and so on. Besides, the quality of digital signal is better than analog signal. This is because the digital signal can be easily recovered by using comparator. PCM modulation is commonly used in audio and telephone transmission. The main advantage is the PCM modulation only needs 8 kHz sampling frequency to maintain the original quality of audio. Figure (1) is the block diagram of PCM modulation. First of all is the low pass filter, which is used to remove the noise in the audio signal. After that the audio signal will be sampled to obtain a series of sampling values as shown in figure (2). Next, the signal will pass through a quantizer to quantize the sampling values. Then the signal will pass through an encoder to encode the quantization values and then convert to digital signal. In fact, the process of quantization can be achieved at one time by A/D converter. However, we should pay attention on the quantization levels. 1 Figure (1) Block diagram of PCM modulation For example if the bits for PCM modulation is 3, then the quantization levels is 2 3=8, which is 8 steps. If the bits for PCM are 4, then the quantization levels is 2 4=16, which is 16 steps. The increasing of bits of PCM modulation will prevent the signal from distortion, but the bandwidth will also increase due to the increasing of the capacity of data. From figure (1), the encoder utilizes n output terminals; therefore, we need to convert the parallel data to serial data, which is the way that satisfies the data format of PCM modulation. Figure (2) Diagram of PCM modulation 2. The implementation of PCM modulator Figure (3) is the circuit diagram of PCM modulator. Capacitors C1, C2, resistors R1, R2, R3, R4 and μA741 comprise a second order low-pass filter. The structure of this low-pass filter is a voltage controlled voltage source (VCVS) low-pass filter. 2 The gain can be expressed as Av = 1 + R4 R1 The cutoff frequency is: f0 = 1 2π R 2 R 3 C1 C2 Figure (3) Circuit diagram of PCM modulation In this experiment, we use IC CW6694 from Conwise to implement the PCM modulator. This IC includes the circuits of PCM modulation and demodulation; however, we only discuss the modulation in this experiment. The analog signal will pass through R5 and input to pin 10, which is the inverting input terminal. Then the signal will pass through R6 and feedback to pin 9. Therefore, the structure of these two pins is an OPA structure and the expression of the gain is: Av = − R6 R5 Besides the input gain control of the modulation circuit, the sampler, quantizer and encoder are built in the IC, therefore, we just need a few components to implement the PCM modulator. Master clock (MCLK) is the operation frequency of the system, which is 2048 kHz square wave frequency. Figure (4) is the circuit diagram of 2048 kHz square wave generator. From figure (4), we use 2048 kHz crystal oscillator to match with the TTL inverter, which can produce the required signal. Sample clock (SCLK) is the sample frequency, which supplies the required operation frequency of the internal sampler. The sample frequency is 8 kHz, i.e. the sampler will sample the input audio signal in every 0.125 ms. The sampling frequency is obtained by using the counter to divided the 2048 kHz square wave signal by 256. 3 From figure (3), FS0 and FS1 are the data format selection of PCM encoder as shown in table (1). the data format selection of PCM encoder can encode the sample to 8-bit μ-law format, 8-bit A-law format or 16-bit digital data format. Besides, the above-mentioned format, the IC CW6694 also provides with encode and decode of the continuous variable slop delta modulation (CVSD) format. The CVSD format can be selected by pin FS0 and FS1. However, CVSD is not included in this experiment, therefore, the FS1 will be grounded and FS0 will be in "high" level. At this moment, the output encode data format of PCM is 16-bit. When FS0 is in "low" level, the output encode of PCM is 8-bit. Pin is the reset pin of this IC. From figure (3), the data output terminal of pin 26 of PCM modulator will connect to a buffer U1:B, which is used for impedance matching. The reason is the output of PCM modulator is bipolar junction transistor type not field effect transistor type, therefore, in order to prevent the load effect, we need to connect a buffer at the output terminal for impedance matching. Table (1) Output data format of PCM modulation Figure (4) Circuit diagram of 2048 kHz square wave generator 4 3. The operation theory of PCM demodulation Figure (5) is the block diagram of PCM demodulation. During transmission, the PCM signal is hard to avoid the noise interference. Therefore, before the PCM signal sends into the PCM demodulator, we utilize a comparator to recover the signal to the original level. The PCM signal is a series of pulse wave signal, so, before demodulating, the series pulse wave signal will be converted to parallel digital signal by a serial to parallel converter. After that the signal will pass through n-bits decoder (normally should be a D/A converter) to recover the digital signal to original quantization value. However, this quantization value not only includes the original audio signal, but also includes a lot of high frequency harmonics; therefore, we utilize a low-pass filter to remove the unwanted signal at the final part. Figure (5) Block diagram of PCM demodulation The implementation of the PCM demodulator is similar to PCM modulation, which is IC CW6694 from Conwise. Figure (6) Circuit diagram of PCM demodulator 5 Practical parts: Part 1: PCM Modulation 1. Refer to the circuit diagram in figure (3) or figure DCS5-1 on ETEK DCS-6000-03 module. 2. Let J1 short circuit and from the signal input terminal (I/P), input 250 mV amplitude and 500 Hz sin wave frequency. Then by using oscilloscope, observe on output terminal (T6) of modulated signal to CH1 of the oscilloscope, then record the measured results. 3. Let J2 short circuit from the signal input terminal (I/P), input 250 mV amplitude and 500 Hz sin wave frequency. Then by using oscilloscope, observe on output terminal (T6) of modulated signal to CH1 of the oscilloscope, then record the measured results. Part 2: PCM Demodulation 1. Connect the output terminal (PCM O/P) of modulated PCM signal of DCS5-1 to the input terminal (PCM I/P) of demodulation signal of DCS6-1. By using oscilloscope, observe on the signal waveforms of Audio O/P, and record the measured result. 6