Data Communications and Networking
ETE 442
Course Description:
Signal conversion methods, sampling, quantization, pulse modulation techniques, error analysis methods, digital modulation techniques, encoding schemes, data transmission methods, open system-interconnection model, local area networks, transmission control protocol, internet protocol (TCP/IP), ethernet, IEEE 802 networking technology.
Sampling and Pulse Amplitude Modulation 2
Building and Testing the Circuit 3
Part 2 With 10µF Capacitor @ 5
Building and Testing the Circuit 8
ScreenShots and descriptions 9
You can see the modulated signal on the top and the raw data on the bottom. 9
Building and Testing the Circuits 13
Screenshots and descriptions 14
Pulse Amplitude Modulation (PAM) is a method of converting an analog signal into a pulse train, where each pulse has a different amplitude. This is part of the process that an ADC must perform before quantizing the data. Sampling involves turning a switch or pass-transistor on briefly at regular intervals, allowing the signal to pass through for just a moment. Therefore, the signal value is only known a small fraction of the time. Most often after sampling the signal is then “held” by means of a capacitor. If a capacitor is used to hold the value, then the signal will not drop to zero every cycle of the sampling clock. By making the sampling frequency large enough, we can create a negligible error between the original waveform and our sampled waveform, regardless of the frequency of it.
Figure 1: Sampling circuit
40Hz - 10Hz - 4Hz - 2Hz - 1Hz
In part one of the lab for our initial sampling frequency of 40Hz it was very easy to recognize the sin wave. Because the frequency was set to 40Hz and being amplified by the LM324AN (Op-amp) and the clock pulse set to 10Hz being switched on and off at consistent intervals by the 2N700G Mosfet transistor, the sampling time was showing short interval between the switching on/off process. This gave us a very clear picture of what was happening. As we lower the clock pulse we are getting less images/ samples of what is happening and as a result it becomes more and more difficult to recognize the sin wave. We are also not able to see the change in amplitude as often. At 2Hz and 1Hz it was not possible to see the sign wave and the pulses looked more like simple high and low digital signal.
In the second part of the lab we introduced a 10µF capacitor into the circuit. The capacitor allowed us to keep the samples without the drop to zero between the switching on/off of the transistor. This is due to the capacitor's ability to hold the voltage between the switching on/off of the transistor. As the frequency was lowered the sign wave became more and more of a high-low or 1-0 type of signal.
ASK is a type of amplitude modulation, very similar to traditional AM you have studied before. The main difference between AM and ASK is that in ASK the “information” is digital in nature. On-off Keying (OOK) is one form of ASK, that uses the presence or absence of the carrier wave as the modulation scheme. However, other types of ASK can use multiple voltage levels to represent more than one bit an once. For example, you could encode ‘00’ as 0 V, ‘01’ as 1.66 V, ‘10’ as 3.33 V, and ’11’ as 5 V. This would mean that for every time an amplitude reading is taken, there are two bits of information.
In ASK, the bandwidth required for the system is a function of the data rate. Like AM, modulation of the sine wave causes a shift in frequency of the original information signal. After the frequency content of the square wave is shifted to higher frequency, we introduce essentially create a “mirror” of the frequency content around the carrier frequency. So, if the information signal has frequency content up to , then the modulated signal will have frequency content up to
and down to
. This creates the familiar sum and difference frequency terms. In our case however, the frequency content of the message actually extends into infinity, so technically speaking it requires infinite bandwidth. In practice, we can live without most of the frequency content, so the signal can just be band-limited to prevent this problem. The signal won’t be a “sharp” square wave, but can be received and demodulated all the same. If we only concern ourselves with the frequency content up to the baud rate of the information, then after the signal is mirrored about the carrier, the BW requirement has effectively doubled. So, for ASK the BW is double what it is at base band frequency. Therefore, for data that is clocked at 1 kHz, the BW requirement for ASK would be a minimum of 2 kHz.
See the effect of bandlimiting a square wave in the middle trace of the following image:
For this lab, a PRNG implemented by a LFSR is used to generate random data. Please see the FSK lab handout for more information about the random data circuit. The random data is then used to modulate the sine wave carrier’s amplitude.
Figure 1: Linear Feedback Shift Register
Figure 2: ASK Modulation
The sine wave is modified by the data stream where the sine wave becomes the carrier signal for the data stream. The data stream is now modulated, which changing the properties of the data stream frequency within the envelope of the data stream allows us to send the data stream farther with less error.
BW = (1+k) fs (2)14.7Hz = 29.4 Hz
fs = 1/t 1/ -1.63ms - (-69.63ms) = 14.7Hz
t = tf - t i -1.63ms - (-69.63ms) = 68 ms
Encoding also known as Line Codes is a used to encode data. There are many ways to accomplish encoding data. Each encoding method has its own pros and cons. Some examples of encoding methods are unipolar, polar (NRZ, RZ, NRZ-L, NRZ-I), bipolar, phase (Manchester), and multilevel. For this lab, we will focus on: Non-Return to Zero (NRZ) and Return to Zero (RZ) both in the “UNIPOLAR_RZ” and “BIPOLAR_RZ” as well as Manchester Encoding. The different types of encoding can be seen on the last page of the Lab
To create the Line code needed we must first create a Pseudo Random number generator (PRNG) circuit. Because the PRNG was used in the previous lab Linear Feedback Shift Register LFSR, this process will be easy. We will use a function generator as a clock signal for the circuit. By using a oscilloscope to view the random modulated data in terms of 1’s and 0’s or Highs and lows. We will then add the Manchester circuit to our PRNG circuit and observe the output on an oscilloscope. Once we can see the the Manchester encoding data we will remove the Manchester circuit and add the RZ circuit to the PRNG circuit and measure the outputs on an oscilloscope.
Circuit used from previous lab.
74LS164N shift register/ three XOR gates/ SPDT switch/ function generator is set to be a clock signal from 0 to 5V at 25 Hz while the power supply is set to 5V DC
Figure 4: Linear Feedback Shift Register
Figure 5: Manchester Encoding Circuit
Figure 6: RZ Encoding Circuit (Unipolar and Bipolar)
This lab was very helpful in seeing how RZ, NRZ, and Manchester line coding effect the data. It also helps get a visual of what is happening through the oscilloscope. The overall process for this lab was successful. The graph results of the oscilloscope reflect exactly what the RZ circuit and Manchester circuit were expected to display. The results can be seen in the screen captures above. We have a better understanding of the pros and cons of each circuit as well.
The figure below shows the different types of encoding methods:
Pulse Width Modulation (PWM) is a way to send analog information using only digital voltage levels. PWM is used in a variety of ways in industry. It can be used to send information, or used in much the same way as a Digital to Analog (DAC) is used. By varying the pulse width or duty cycle, the average value of the square wave is changed. If PWM is filtered by a LPF, then it is possible to get performance similar to a DAC.
This lab utilizes the classic 555 timer IC. The 555 timer is usually operated as either a monostable vibrator or an astable vibrator. The monostable vibrator produces a “one-shot” pulse, each time the device is triggered. The pulse width or length is a function of the resistor or capacitor values. The astable vibrator allows the device to continually trigger itself where it will free run. For our PWM circuit, the first stage (left) of the circuit uses a 555 timer in astable mode to create the clock signal. The stage on the right is in monostable mode and uses the first stage to produce the triggering. We use a sine wave as the modulating signal which will in turn vary the pulse width of the second stage. The goal is to able to see the pulse width of the output change as a function of the voltage of the modulating wave.
Design Information for 555 timer in Astable mode from an Application Note:
10% 30%
50% 70% 90%