1.
NATIONAL COLLEGE OF SCIENCE & TECHNOLOGY Amafel Bldg. Aguinaldo Highway Dasmariñas City, Cavite EXPERIMENT 2 Digital Communication of Analog Data Using Pulse-Code Modulation (PCM)Cauan, Sarah Krystelle P. September 20, 2011Signal Spectra and Signal Processing/BSECE 41A1 Score: Engr. Grace Ramones Instructor
3.
Objectives: 1. Demonstrate PCM encoding using an analog-to-digital converter (ADC). 2. Demonstrate PCM encoding using an digital-to-analog converter (DAC) 3. Demonstrate how the ADC sampling rate is related to the analog signal frequency. 4. Demonstrate the effect of low-pass filtering on the decoder (DAC) output.
4.
Data Sheet:MaterialsOne ac signal generatorOne pulse generatorOne dual-trace oscilloscopeOne dc power supplyOne ADC0801 A/D converter (ADC)One DAC0808 (1401) D/A converter (DAC)Two SPDT switchesOne 100 nF capacitorResistors: 100 Ω, 10 kΩTheoryElectronic communications is the transmission and reception of information over acommunications channel using electronic circuits. Information is defined as knowledge orintelligence such as audio voice or music, video, or digital data. Often the information idunsuitable for transmission in its original form and must be converted to a form that issuitable for the communications system. When the communications system is digital, analogsignals must be converted into digital form prior to transmission.The most widely used technique for digitizing is the analog information signals fortransmission on a digital communications system is pulse-code modulation (PCM), which wewill be studied in this experiment. Pulse-code modulation (PCM) consists of the conversionof a series of sampled analog voltage levels into a sequence of binary codes, with each binarynumber that is proportional to the magnitude of the voltage level sampled. Translating analogvoltages into binary codes is called A/D conversion, digitizing, or encoding. The device usedto perform this conversion process called an A/D converter, or ADC.An ADC requires a conversion time, in which is the time required to convert each analogvoltage into its binary code. During the ADC conversion time, the analog input voltage mustremain constant. The conversion time for most modern A/D converters is short enough sothat the analog input voltage will not change during the conversion time. For high-frequencyinformation signals, the analog voltage will change during the conversion time, introducingan error called an aperture error. In this case a sample and hold amplifier (S/H amplifier) willbe required at the input of the ADC. The S/H amplifier accepts the input and passes itthrough to the ADC input unchanged during the sample mode. During the hold mode, thesampled analog voltage is stored at the instant of sampling, making the output of the S/Hamplifier a fixed dc voltage level. Therefore, the ADC input will be a fixed dc voltage duringthe ADC conversion time.
5.
The rate at which the analog input voltage is sampled is called the sampling rate. The ADCconversion time puts a limit on the sampling rate because the next sample cannot be readuntil the previous conversion time is complete. The sampling rate is important because itdetermines the highest analog signal frequency that can be sampled. In order to retain thehigh-frequency information in the analog signal acting sampled, a sufficient number ofsamples must be taken so that all of the voltage changes in the waveform are adequatelyrepresented. Because a modern ADC has a very short conversion time, a high sampling rateis possible resulting in better reproduction of high0frequency analog signals. Nyquistfrequency is equal to twice the highest analog signal frequency component. Althoughtheoretically analog signal can be sampled at the Nyquist frequency, in practice the samplingrate is usually higher, depending on the application and other factors such as channelbandwidth and cost limitations.In a PCM system, the binary codes generated by the ADC are converted into serial pulsesand transmitted over the communications medium, or channel, to the PCM receiver one bit ata time. At the receiver, the serial pulses are converted back to the original sequence ofparallel binary codes. This sequence of binary codes is reconverted into a series of analogvoltage levels in a D/A converter (DAC), often called a decoder. In a properly designedsystem, these analog voltage levels should be close to the analog voltage levels sampled atthe transmitter. Because the sequence of binary codes applied to the DAC input represent aseries of dc voltage levels, the output of the DAC has a staircase (step) characteristic.Therefore, the resulting DAC output voltage waveshape is only an approximation to theoriginal analog voltage waveshape at the transmitter. These steps can be smoothed out intoan analog voltage variation by passing the DAC output through a low-pass filter with a cutofffrequency that is higher than the highest-frequency component in the analog informationsignal. The low-pass filter changes the steps into a smooth curve by eliminating many of theharmonic frequency. If the sampling rate at the transmitter is high enough, the low-pass filteroutput should be a good representation of the original analog signal.In this experiment, pulse code modulation (encoding) and demodulation (decoding) will bedemonstrated using an 8-bit ADC feeding an 8-bit DAC, as shown in Figure 2-1. This ADCwill convert each of the sampled analog voltages into 8-bit binary code as that representbinary numbers proportional to the magnitude of the sampled analog voltages. The samplingfrequency generator, connected to the start-of conversion (SOC) terminal on the ADC, willstart conversion at the beginning of each sampling pulse. Therefore, the frequency of thesampling frequency generator will determine the sampling frequency (sampling rate) of theADC. The 5 volts connected to the VREF+ terminal of the ADC sets the voltage range to 0-5V. The 5 volts connected to the output (OE) terminal on the ADC will keep the digital outputconnected to the digital bus. The DAC will convert these digital codes back to the sampledanalog voltage levels. This will result in a staircase output, which will follow the original
6.
analog voltage variations. The staircase output of the DAC feeds of a low-pass filter, whichwill produce a smooth output curve that should be a close approximation to the originalanalog input curve. The 5 volts connected to the + terminal of the DAC sets the voltage range0-5 V. The values of resistor R and capacitor C determine the cutoff frequency (fC) of thelow-pass filter, which is determined from the equationFigure 23–1 Pulse-Code Modulation (PCM) XSC2 G T A B C D S1 VCC Key = A 5V U1 Vin D0 S2 D1 V2 D2 D3 Key = B 2 Vpk D4 10kHz D5 0° Vref+ D6 Vref- D7 SOC VCC OE EOC 5V D0 D1 D2 D3 D4 D5 D6 ADC D7 V1 Vref+ R1 VDAC8 Output 5V -0V Vref- 100Ω 200kHz U2 R2 10kΩ C1 100nFIn an actual PCM system, the ADC output would be transmitted to serial format over atransmission line to the receiver and converted back to parallel format before being applied tothe DAC input. In Figure 23-1, the ADC output is connected to the DAC input by the digitalbus for demonstration purposes only.
7.
PROCEDURE:Step 1 Open circuit file FIG 23-1. Bring down the oscilloscope enlargement. Make sure that the following settings are selected. Time base (Scale = 20 µs/Div, Xpos = 0 Y/T), Ch A(Scale 2 V/Div, Ypos = 0, DC) Ch B (Scale = 2 V/Div, Ypos = 0, DC), Trigger (Pos edge, Level = 0, Auto). Run the simulation to completion. (Wait for the simulation to begin). You have plotted the analog input signal (red) and the DAC output (blue) on the oscilloscope. Measure the time between samples (TS) on the DAC output curve plot. TS = 4 µsStep 2 Calculate the sampling frequency (fS) based on the time between samples (TS) fS = 250 kHzQuestion: How did the measured sampling frequency compare with the frequency of thesampling frequency generator? The measured sampling frequency is almost the same with the frequency of the sampling frequency generator. The difference is 50 kHz.How did the sampling frequency compare with the analog input frequency? Was it more thantwice the analog input frequency? The sampling frequency is more than 20 times of the analog input frequency. Yes it is more than twice the analog input frequency.How did the sampling frequency compare with the Nyquist frequency? The Nyquist is 1570796.32 Hz or 6.28 times more than the sampling frequency.Step 3 Click the arrow in the circuit window and press the A key to change Switch A to the sampling generator output. Change the oscilloscope time base to 10 µs/Div. Run the simulation for one oscilloscope screen display, and then pause the simulation. You are plotting the sampling generator (red) and the DAC output (blue).
8.
Question: What is the relationship between the sampling generator output and the DACstaircase output? The sampling generator output and the DAC staircase output are both digital.Step 4 Change the oscilloscope time base scale to 20 µs/Div. Click the arrow in the circuit window and press the A key to change Switch A to the analog input. Press the B key to change the Switch B to Filter Output. Bring down the oscilloscope enlargement and run the simulation to completion. You are plotting the analog input (red) and the low-pass filter output (blue) on the oscilloscopeQuestions: What happened to the DAC output after filtering? Is the filter output waveshape aclose representation of the analog input waveshape? The DAC output became analog after filtering. Yes, it is a close representation of the analog input. The DAC lags the input waveshape.Step 5 Calculate the cutoff frequency (fC) of the low-pass filter.Question: How does the filter cutoff frequency compare with the analog input frequency? They have difference of 5 915.494 Hz.Step 6 Change the filter capacitor (C) to 20 nF and calculate the new cutoff frequency(fC).Step 7 Bring down the oscilloscope enlargement and run the simulation to completionagain.Question: How did the new filter output compare with the previous filter output? Explain. It is almost the same.Step 8 Change the filter capacitor (C) back to 100 nF. Change the Switch B back to the DAC output. Change the frequency of the sampling frequency generator to 100 kHz. Bring down the oscilloscope enlargement and run the simulation to completion. You are plotting the analog input (red) and the DAC output (blue) on the oscilloscope screen. Measure the time between the samples (TS) on the DAC output curve plot (blue) TS = 9.5µs
9.
Question: How does the time between the samples in Step 8 compare with the time between the samples in Step 1? It doubles.Step 9 Calculate the new sampling frequency (fS) based on the time between the samples (TS) in Step 8?Question: How does the new sampling frequency compare with the analog input frequency? It is 10 times the analog input frequency.Step 10 Click the arrow in the circuit window and change the Switch B to the filter output. Bring down the oscilloscope enlargement and run the simulation again.Question: How does the curve plot in Step 10 compare with the curve plot in Step 4 at the higher sampling frequency? Is the curve as smooth as in Step 4? Explain why. Yes, they are the same. It is as smooth as in Step 4. Nothing changed. It does not affect the filter.Step 11 Change the frequency of the sampling frequency generator to 50 kHz and change Switch B back to the DAC output. Bring down the oscilloscope enlargement and run the simulation to completion. Measure the time between samples (TS) on the DAC output curve plot (blue). TS = 19µsQuestion: How does the time between samples in Step 11 compare with the time between the samples in Step 8? It doubles.Step 12 Calculate the new sampling frequency (fS) based on the time between samples (TS) in Step 11.Question: How does the new sampling frequency compare with the analog input frequency? It is 5 times the analog input.
10.
Step 13 Click the arrow in the circuit window and change the Switch B to the filter output. Bring down the oscilloscope enlargement and run the simulation to completion again.Question: How does the curve plot in Step 13 compare with the curve plot in Step 10 at the higher sampling frequency? Is the curve as smooth as in Step 10? Explain why. Yes, nothing changed. The frequency of the sampling generator does not affect the filter.Step 14 Calculate the frequency of the filter output (f) based on the period for one cycle (T).Question: How does the frequency of the filter output compare with the frequency of the analog input? Was this expected based on the sampling frequency? Explain why. It is the same. Yes, it is expected.Step 15 Change the frequency of the sampling frequency generator to 15 kHz and change Switch B back to the DAC output. Bring down the oscilloscope enlargement and run the simulation to completion. Measure the time between samples (TS) on the DAC output curve plot (blue) TS = 66.5µsQuestion: How does the time between samples in Step 15 compare with the time between samples in Step 11? It is 3.5 times more than the time in Step 11.Step 16 Calculate the new sampling frequency (fS) based on the time between samples (TS) in Step 15.Question: How does the new sampling frequency compare with the analog input frequency? The new sampling frequency is 5 kHz higher than the analog input frequency.
11.
How does the new sampling frequency compare with the Nyquist frequency? The computed Nyquist frequency is 95199.77 Hz. The Nyquist frequency is 6.28 times greater than the sampling frequency.Step 17 Click the arrow in the circuit window and change the Switch B to the filter output. Bring down the oscilloscope enlargement and run the simulation to completion again.Question: How does the curve plot in Step 17 compare with the curve plot in Step 13 at the higher sampling frequency? The curve plot in Step 17 is the same with the curve plot in Step 13 at the higher sampling frequencyStep 18 Calculate the frequency of the filter output (f) based on the time period for one cycle (T).Question: How does the frequency of the filter output compare with the frequency of the analog input? Was this expected based on the sampling frequency? The frequency of the filter output is the same with the frequency of the analog input. Yes, it is expected.
12.
Conclusion: After conducting the experiment, I conclude that an Analog-to-Digital Converter can beuse for Pulse Code Modulation encoding and Digital-to-Analog Converter is used for Pulse CodeModulation decoding. The sampling frequency is generated by the ADC. As the frequency of thesampling frequency generator decreases, the sampling time increases, therefore, the samplingfrequency is inversely proportional to the sampling time of the DAC output. Moreover, the DACoutput waveform is staircase signal. The sampling frequency is always 6.28 times smaller thanthe Nyquist frequency. The sampling frequency and the DAC output are both digital. Meanwhile, the filter cutoff frequency is not affected by the changes in sampling signalfrequency. It is affected by the change in capacitor. As the value of the capacitor increases, thecutoff frequency decreases. The frequency of the filter is the same with the frequency of theanalog input signal. The waveshape is also the same with the frequency of the analog inputsignal.
Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.
Be the first to comment