The generation and analysis of square waves
A square waveshape of voltage, usually called a square wave, is a special case of the rectangular waveshape. A square wave is a recurrent rectangular waveform and is a special case because the pulse duration and the time between recurrent pulses are equal.
The first nonsinusoidal waveform to be analyzed is the square wave because square-wave generators are more generally in use than are pulse generators.
The explanations and diagrams that follow describe the rectangular or pulse waveform.
1.1 DEFINITION OF TERMS
Figure 1-3 Theoretical Pulse (Rectangular Waveshape)

The circuit shown in Fig. 1-3 (a) may be used to produce the rectangular pulse waveform shown in Fig. 1-3 (b).
In this circuit, there are only two possible voltage levels: 10 V when switch S is in position 1, and 0 V when switch S is in position 2.
The amplitude of the pulse is referred to as the peak value. As time increases from zero, the first edge of the pulse encountered is referred to as the leading edge, and the edge formed when the pulse drops is termed the trailing edge.
The duration of the pulse is called the pulse width, symbolized tp. The interval from the start of one pulse to the start of the next pulse is called the pulse repetition time, symbolized prt.
Usually the term pulse repetition time is used only when the pulses occur at regular intervals, as shown in Fig. 1-3 (b).
A series of successive pulses is called a pulse train.
In a pulse train, the number of pulses per second is called the pulse repetition rate, abbreviated prr, or pulse repetition frequency, abbreviated prf.
A square wave, which is a special case of the rectangular pulse waveform, is produced when the pulse duration tp and the pulse interval t2 are equal.
The pulse repetition rate (prr) is equal to the reciprpcal of the time required for one pulse repetition time (prt).
Hence:

The average value of any waveform is its dc component (either voltage or current). To determine the average voltage of the theoretical waveform shown in Fig. l-3(b), divide the area (Ap) of the pulse by the pulse repetition time (prt).
The average value of voltage is the value indicated by a dc voltmeter.

Should the pulse start from some value other than zero, the numerical value of AP in Eq. 2 would be the algebraic sum of the positive area of the pulse (A+) and the negative area of the pulse (A-).
Figure 1-4(a) shows the waveform of Fig. 1-3(b) as it would be seen on the face of an ac oscilloscope. Figure 1-4(b) shows the same waveform as it would be viewed on the face of a dc oscilloscope.
Figure 1-4 (a) ac Oscilloscope Face; (b) dc Oscilloscope Face

The assumption made here is that the trace line of both scopes, with no signal applied, would be in the center of the screen.
Independently of waveshape, voltage and/or current pulses may be generated from any given dc reference level. Pulse and switching circuits employ and generate positive and negative voltage and/or current pulses.
In general, the term positive pulse signifies a positive voltage excursion from a zero-volt reference level.
Conversely, the term negative pulse signifies a negative voltage excursion from a zero-volt reference level. See Fig. 1-5(a) and (b). Figure 1-5(c) through (f) illustrates a sampling of possible voltage pulses and their respective dc reference levels.
Figure 1-5 Pulse Amplitude in All Cases E Volts

The special type of circuit designed to establish or change the dc reference level of voltage pulses is called a clamper circuit. This is discussed in section Clamper circuits.
Another term used in pulse work is duty cycle.
This is the ratio of the average value to the peak value of the voltage waveform. It is generally used in connection with transmitter power output and is normally expressed as a percentage.
Compute the duty cycle of the voltage waveform shown in Fig. 1-3(b).
Note that the voltage waveform shown in Fig. 1-3 (b) is labeled theoretical.
In practice, the rectangular pulse is not absolutely rectangular but it may have the general appearance of the waveform shown in Fig. 1-6.
Figure 1-6 Practical Rectangular Pulse Waveform

When the waveform is not rectangular, one is confronted with the problem of having to define a pulse.
Left to himself, each individual might define a pulse width of different value. Hence, a standard has been established, thereby enabling each of us to use the same measurement for solving for a given voltage waveform (in this case, pulse width).
Note that from the vertical axis a 90 percent and a 10 percent line have been drawn. These two values are the standard for determining the characteristic of the waveform.
The pulse duration (tp) is defined as the time that the pulse waveform is in excess of 90 percent of the maximum value of the waveform (sec).
The rise time (tr) is the time required for the pulse to rise from 10 percent of the maximum value of the waveform to 90 percent of the maximum value of the waveform (sec).
The fall time (tf) (sometimes referred to as the decay time) is the time required for the trailing edge of the waveform to decay from 90 percent of the maximum value of the waveform to 10 percent of the maximum value of the waveform (sec).
Note that some textbooks use the symbol (td) for pulse width. In this text the symbol (tp) is arbitrarily used to symbolize pulse width because (tp) is subsequently used to represent delay time.
For some pulse waveforms, the rise time and the fall time are so small that it is practically impossible to measure them accurately, even with a high-frequency oscilloscope.
When the pulse duration is very small, the rise time and fall time are an appreciable portion of the entire time of the pulse.
1.2 METHODS OF SQUARE-WAVE GENERATION
Rectangular pulses may be generated in a number of ways. Some of these methods are as follows:
1. A rectangular or square wave of voltage may be generated by overdriving a sine wave, class A amplifier, thereby driving the transistor into saturation on one half cycle and driving the transistor into cutoff on the other half cycle.
The resultant output-voltage waveform is a close approximation of a rectangular or square wave, depending on the dc operating point of the amplifier.
2. A square wave of voltage may be generated by using one of the many forms of the multivibrator circuit.
This is a two-stage RC-coupled amplifier in which the output of the first stage is fed to the input of the second stage and the output of the second stage is then fed back as the input to the first stage.
Since both stages are overdriven, the resultant output voltage is a square wave or a rectangular waveform. The study of this type of circuit is taken up in detail in later sections.
3. A square wave of voltage may also be generated when a sine wave voltage source of the fundamental (first harmonic) frequency is connected in parallel to the voltage sources of the other odd harmonic frequencies of the fundamental of proper amplitude and phase.
The resultant square-wave output-voltage waveform has a pulse repetition rate (prr) equal to the frequency of the fundamental of the sine wave.
1.3 GENERATION OF A RECTANGULAR WAVEFORM OF VOLTAGE BY THE OVERDRIVEN AMPLIFIER METHOD
A square wave of voltage may be generated from a sine wave of voltage.
This is accomplished by overdriving a class A transistor amplifier with a sine wave. The amplitude of the sine wave input voltage must be large enough to ensure that the transistor is driven into saturation and into cutoff on the alternate half cycles of the input voltage.
The basic class A amplifier selected for use in this section is the unstabilized grounded-emitter amplifier shown in Fig. l-7(a).
Figure 1-7 Class A Overdriven Grounded Emitter Amplifier

Figure 1-7 (b) shows how the amplifier produces a square wave by alternately driving the transistor into saturation and cutoff, thereby clipping the peaks of the sine wave.
This clipping of the peaks of the sine wave produces a practical approximation of a square wave at the output of the amplifier.
Because an unstabilized amplifier is used, in all probability the Q point will not be in the center of the load line ; therefore, the resultant output voltage will not be a square wave but, rather, a rectangular waveform.
If the Q point of the unstabilized amplifier is adjusted to the center of the load line, the output voltage of the ideal transistor is the square wave described above.
This method of square-wave generation is one used in practical circuits. These circuits use a series of two or three bias-stabilized amplifiers. Therefore, the resultant output voltage is relatively immune to temperature variations.
1.4 SAMPLE OVERDRIVEN
AMPLIFIER DESIGN PROBLEM
Refer to Fig. 1-7(a).
Object:
To produce a square wave of voltage with a prr of 1000 Hz and a pulse amplitude of 20V peak from a 1000 Hz sine wave of voltage with an amplitude of 2 V peak-to-peak.
Given: An NPN silicon transistor with the following parameters:
hte = 50
hie = 1000
Ico = negligible
A variable dc power supply (0 to 30 V) output current, 0 to 250 mA.
Solution:
From the characteristic curves shown in Fig. 1-7(b), it can be seen that the choice of Vcc is determined by the necessary amplitude of the output-voltage pulse and hence must be +20V.
The choice of collector current is arbitrary because no external load is to be driven.
A relatively low value of collector current should be selected because the input impedance of the amplifier is more linear at low collector-current values. This nonlinearity of the input impedance at higher collector-current values may produce a rectangular output-voltage waveform.
Select a 10 mA collector current for the quiescent Q operating point. With these points established, determine RL.

The relationship among the collector current, the base current, and the hie of the transistor is used to determine the proper value of base current necessary to produce a collector current of 10 mA.

Assume the voltage drop across the emitter-base junction to be negligible. Determine the proper value of Rb.

The circuit components necessary to fulfill the ac circuit requirements may now be determined because the dc requirements, necessary to establish proper quiescent operating conditions, have been fulfilled. Following this, establish the proper value for the coupling capacitor (Cc) in the circuit.
The coupling capacitor is effectively in series with the total input impedance of the amplifier. The input impedance of the amplifier must be known in order to determine the proper value for the capacitor.
For practical purposes, the input impedance of the amplifier, excluding Rb, is approximately equal to hie or 1000 Ω.
The total input impedance of the amplifier, including RB) is the parallel equivalent impedance of Rb and hie. Due to the order of magnitude of the values involved, the total input impedance of the amplifier remains about 1000 Ω.
If the reactance of the capacitor is one-tenth or less of the value of the input impedance of the amplifier, the ac voltage drop across the coupling capacitor may be neglected.
Hence:

Referring to Fig. 1-7 (b), the largest input base-current signal swing that a class A amplifier can accommodate is 0.4 mA peak-to-peak or 0.1414 mA rms.
The transistor is driven alternately into saturation and into cutoff by arbitrarily doubling the input base current.
Thus, the approximated square-wave output-voltage waveform, shown in Fig. 1-7 (b), is produced. This means that the ac input base-current swing should be 0.8 mA peak-to-peak or 0.2828 mA rms.
The value of Rs necessary to satisfy these circuit requirements may now be determined. The circuit reduces to the signal source in series with the input impedance of the amplifier Zia (approximately 1 kΩ).
Hence:

Recall that the output-voltage waveform may be rectangular because of the unstabilized circuit used and because of the nonlinear spacing of the constant base currents (the nonlinear input impedance).
1.5 GENERATION OF SQUARE WAVES OF VOLTAGE BY THE ADDITION OF SINE WAVES
Recall that a square wave of voltage is produced when a sine wave voltage source of the fundamental (first harmonic) frequency is connected in parallel to the voltage sources of the other odd harmonic frequencies of the fundamental, of proper amplitude and phase.
The resultant square-wave output-voltage waveform has a pulse repetition rate (prr) equal to the frequency of the fundamental of the sine wave.
This generation may be proved graphically by the vector addition of the instantaneous values of the voltage of the fundamental (first harmonic) frequency and the instantaneous values of the voltage of all the odd harmonic frequencies, of the fundamental, of proper amplitude and phase.
Refer to Fig. 1-8.
Figure 1-8 First Approximation of Square-Wave Voltage Generation from Sine Waves

This is a graphical analysis of the vector sums of the instantaneous values of voltage of a sine wave (fundamental frequency) and the third harmonic (sine wave with frequency three times the fundamental) voltage sine wave.
The instantaneous voltage vectors are indicated for one instant in time with the vector sum indicated by the asterisk.
If the fifth harmonic frequency sine wave voltage waveform, in phase and with an amplitude of approximately one-fifth of that of the fundamental, is added to this resultant waveform, the new resultant voltage waveshape will begin to approach that of a square wave.
Theoretically, if an infinite number of odd harmonic frequency sine waves of voltage, of proper amplitude and phase, are added, the resultant voltage waveshape will be that of a perfect square wave.
The vector addition of the fifth and seventh harmonic frequencies of sine waves of voltage will be assigned as problems to be proved graphically.
If a sine wave of voltage and all the harmonics of proper amplitude and phase are added, another basic pulse voltage waveshape will result.
Therefore, many of the basic voltage and/or current waveshapes may be generated by the use of the vector sums of sine waves of voltage and their harmonics.
Hence, it should be emphasized that a square wave of voltage is made up of a sine wave of voltage, the frequency of which is that of the square wave, and an infinite number of odd harmonics of sine waves of voltage.
This indicates that a pulse amplifier should theoretically have a frequency response from dc to infinity in order to amplify square waves of any frequency.
For example, to amplify a square wave of voltage with a pulse repetition rate of 1000 Hz, the ideal pulse amplifier should have an infinite frequency response.
LABORATORY EXPERIMENT
THE GENERATION AND ANALYSIS OF SQUARE WAVES
OBJECT:
1. To define, determine, and measure the various parts of a square wave of voltage
2. To generate a rectangular waveform of voltage by use of an overdriven amplifier
3. To generate a square wave of voltage by use of a sine wave of voltage and its odd harmonics
MATERIALS:
1 Sine square-wave audio generator (20 Hz to 200 kHz)
1 Oscilloscope, dc time-base type; frequency response dc to 450 kHz; vertical sensitivity, 100 mV/cm
1 dc power supply (0 to 30 V; 0 to 250 mA)
1 Transistor, silicon (either NPN or PNP) with manufacturer's specification data sheet (example: 2N3903)
3 Resistor substitution boxes, 15Ω to 10 MΩ,
1 capacitor 10 uF (50 V)
PROCEDURE:
1. To define, determine, and measure the various parts of a square wave of voltage:
(a) Connect the output of a square-wave generator to the vertical input of the oscilloscope.
(b) Adjust the frequency of the generator to obtain a resultant pulse width of 5 µsec, and adjust the peak amplitude to 5V.
(c) Refer to Fig. 1-5. Measure the values of tp, tr, tf, and prt with the oscilloscope. Record.
(d) On graph paper, draw the resultant scope waveform to a convenient scale. Label the measured values of tp, tr, tf, and prt. Calculate the prr and the duty cycle. Record.
(e) Repeat Steps (a) to (d) to obtain a pulse width of 0.1 msec and an amplitude of 5V.
2. To generate a rectangular waveform of voltage by the use of an overdriven transistor amplifier:
(a) For a given transistor, design the grounded-emitter, unstabilized, class A amplifier shown in Fig. 1-1X.
Figure 1-1X

Design this circuit to generate a rectangular-waveshape output voltage, with a 15V peak-to-peak amplitude and with a prr of 2000 Hz. The sine wave input voltage should have a frequency of 2000 Hz with an amplitude of 10V peak-to-peak.
(b) Connect your designed circuit. Establish its quiescent operating point. How does the position of the Q point on the load line determine the shape of the resultant output voltage when the signal is applied? Explain.
(c) Apply sine wave signal.
(d) Observe the resultant output-voltage waveshape. Measure, graph, and label your observations.
(e) Repeat Step (c) of Part 1 of this experiment.
(f) Draw and completely label the schematic of the circuit which you evolved. Describe in detail the operation of the amplifier.
3. To generate a square wave of voltage by the addition of sine waves of voltage:
NOTE: The theory concept in this part of the experiment is covered by a written exercise because an actual check by performance requires special triggered sine wave generators not usually available.
Such generators must permit control of the relative phase relationship between the fundamental and its harmonics.
(a) Refer to Fig. 1-2X.
Figure 1-2X

Vectorially add the given fundamental to the given third harmonic. Use a minimum of 30 points. Draw a resultant voltage waveshape.
(b) To the resultant voltage waveshape drawn in Step (a), vectorially add the voltage of the fifth harmonic, and draw the new resultant voltage waveshape.
(c) To the resultant voltage waveshape obtained in Step (b), vectorially add the voltage of the seventh harmonic, and draw the final resultant voltage waveshape.
QUESTIONS AND EXERCISES
1. How may the leading edge of a pulse be defined?
2. How may the trailing edge of a pulse be defined?
3. How is the amplitude of a pulse expressed?
4. A rectangular pulse is made up of what basic waveshape and/or shapes?
5. Define me rise time and indicate its lettered symbol.
6. Define pulse width and indicate its lettered symbol.
7. Define fall time and indicate its lettered symbol.
8. Define Eav and state its practical use.
9. Which harmonics of a fundamental sine wave of voltage determine the sharpness of the corners of a resultant voltage waveshape?
10. Using the voltage waveshapes of Fig. 1-3X, determine the shape of the resultant voltage waveform by vector addition.
Figure 1-3X

11. A rectangular pulse has a pulse repetition rate (prr) of 5000 pulses per second and a pulse width of 40 µsec.
(a) What is the pulse interval?
(b) What is the pulse repetition time?
(c) What is the duty cycle?
(d) Draw and label the waveform.
12. If the rectangular pulse of Prob. 11 is a positive pulse with an amplitude of 10 V, what would a dc voltmeter indicate when placed across this source?
13. Draw and label the voltage waveform of Prob. 12 as it would appear on the face of an ac oscilloscope. Assume that the trace line of the scope is in the center of the screen when no voltage is applied.
14. A 15V positive rectangular pulse, from a —3V reference, has a pulse repetition rate (prr) of 12,500 pulses per second and a pulse width of 10 µsec. What would a dc voltmeter indicate when placed across this source?
15. Draw and label the voltage waveform of Prob. 14 as it would appear on the face of a
(a) dc oscilloscope
(b) ac oscilloscope
Assume that the trace line of the scope is in the center of the screen when no voltage is applied.