0% found this document useful (0 votes)
11 views

Function Generator

Uploaded by

Ebnezer Masasi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Function Generator

Uploaded by

Ebnezer Masasi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

FUNCTION GENERATOR

NAME : MASASI EBNEZER


STUDENT NUMBER : N01310485P
SUPERVISOR : MR MUGARISANWA
DEPARTMENT : ELECTRONIC ENGINEERING
FACULTY : INDUSTRIAL TECHNOLOGY
DATE : 4 DECEMBER 2015

i
ABSTRACT
The purpose of the report is to show how a simple function generator can be designed. The
function generator produces three waveform, sinusoidal, square and triangular at a single
frequency of 6.2 kHz. The report contains the background theory that is used to come up with
the design; the design process and the results of the design. The report also shows other
methods that can be used besides the one that the design in the report uses.

ii
Contents
1 CHAPTER ONE ........................................................................................................................... 1
1.0 INTRODUCTION .................................................................................................................. 1
1.1 AIM ......................................................................................................................................... 1
1.2 OBJECTIVES ......................................................................................................................... 1
1.3 JUSTIFICATION ................................................................................................................... 1
1.4 OVERVIEW AND CONCLUSION ....................................................................................... 1
2 CHAPTER TWO .......................................................................................................................... 2
2.0 Introduction ............................................................................................................................. 2
2.1 Signals ..................................................................................................................................... 2
2.1.1 The Sine Wave ................................................................................................................ 2
2.1.2 Pulse Waveforms ............................................................................................................ 3
2.1.3 Triangular waveforms ..................................................................................................... 4
2.2 Generation of Waveforms ....................................................................................................... 4
2.2.1 Oscillators ....................................................................................................................... 4
2.3 Signal Impairments ................................................................................................................. 5
2.3.1 Noise ............................................................................................................................... 5
2.3.2 Distortion ........................................................................................................................ 6
2.3.3 Bandwidth Restrictions ................................................................................................... 6
2.4 Producing the Sine Wave (sine wave oscillators) ................................................................... 6
2.4.1 Oscillators with RC Feedback Circuits ........................................................................... 6
2.4.2 Oscillators with LC Feedback Circuits. .......................................................................... 8
2.5 Triangular wave oscillator ...................................................................................................... 9
2.6 Square Wave Oscillator ........................................................................................................ 10
2.7 The Comparator .................................................................................................................... 11
2.8 Integrators and Differentiators .............................................................................................. 11
2.9 Conclusion ............................................................................................................................ 12
3 CHAPTER THREE .................................................................................................................... 13
3.0 Introduction ........................................................................................................................... 13
3.1 Block Diagram of Design ..................................................................................................... 13
3.2 Wien-bridge Oscillator.......................................................................................................... 13
3.3 Comparator ........................................................................................................................... 15
3.4 Integrator ............................................................................................................................... 16
3.4.1 Finding the value of R and C ........................................................................................ 16
3.5 Function Generator ............................................................................................................... 16
3.6 Practical Design .................................................................................................................... 17
3.7 Conclusion ............................................................................................................................ 17

iii
4 CHAPTER FOUR ....................................................................................................................... 18
4.0 Introduction ........................................................................................................................... 18
4.1 Simulation Results ................................................................................................................ 18
4.2 Practical results ..................................................................................................................... 18
4.3 Analysis of results ................................................................................................................. 21
4.4 Conclusion ............................................................................................................................ 21
5 CHAPTER FIVE ........................................................................................................................ 22
5.0 CONCLUSIONS................................................................................................................... 22
References ............................................................................................................................................ 23

List of symbols

ac- alternating current


dc- direct current

iv
1 CHAPTER ONE

1.0 INTRODUCTION
A function generator is a device that is composed of a circuit/circuits that perform the task of
producing waveforms at required frequencies. The simple function generator in this report
operates at a single frequency producing the sinusoidal, square and triangular waveforms. Such
a device can be made using a circuit that is composed of op-amps and other components such
as resistors, capacitors and inductors.
1.1 AIM
The aim is to show the background information that leads to the design of the circuit, the
designing stages that can be followed, the results and an analysis of the method used together
with others that can be used.
1.2 OBJECTIVES
 To give a brief overview of what signals are
 To give description of the different types of oscillators
 To show how oscillators produce waveforms
 To design a setup that can be used for the required frequency
 To show the various calculations involved in coming up with the circuit
 To show how one waveform produced can be used to produce the other two waveforms
 To implement the design in the laboratory and show the results
 To come up with an analysis of the results
1.3 JUSTIFICATION
In engineering and scientific work, it is often required that a circuit is energized by a signal
whose characteristics are known. This means it is of much importance that a circuit be designed
that gives a signal with required characteristics at the command of the user. This is the reason
why electronic engineers design function generators.
1.4 OVERVIEW AND CONCLUSION
The circuit to be designed produces a single frequency and the user cannot tune the device to
get different frequencies. However in real electronic engineering situations signal generators
are required to produce waveforms which vary according to the user’s commands.

1
2 CHAPTER TWO

2.0 Introduction
For one to be able to understand how a function generator works and how to come up with a
design of a function generator, knowledge is required on the waveforms that need to be
produced and the principles that are employed in signal generation.
2.1 Signals
A signal is an electrical voltage or current which varies with time. A signal source generates
the signal. The signal can be periodic or non-periodic.
2.1.1 The Sine Wave
The sine can be represented mathematically by s (t)
𝑠(𝑡) = 𝐴 sin 2𝜋𝑓𝑡 Where f is the signal frequency, t is the time and A is the signal amplitude.
A sine wave has the following important characteristics
1. Phase- Useful when comparing waveforms
2. Period- time needed for phase to shift by 2𝜋
3. Frequency- number of cycles per second
4. Amplitude- maximum instantaneous value
A sine wave is basic because all other waveforms (periodic and non-periodic) are composed of
a combination of sine waves with different frequencies, amplitudes and phases. If the waveform
is periodic, it is made up of sine wave components whose frequencies are integer multiples
called harmonics of a fundamental frequency [1].
As an example we consider a square wave which is symmetrical and has a period 0.001s. This
wave consists of sine waves at frequencies of 1000Hz (the fundamental frequency), 3000Hz,
and 5000Hz and so on. If the waveform is to be symmetrical the harmonics should be odd
multiples of the fundamental frequency.
Figure 2.1 below is an example of how a symmetrical sine wave is produced by odd harmonics
of the fundamental frequency.

2
Figure 2.1- Combining sine wave harmonics

2.1.2 Pulse Waveforms


These consist of a pattern of maximum levels which are of a certain amplitude. The maximum
levels are either maximum positive or maximum negative levels and these are joined by rising
and falling edges. Figure 2.2 below shows an example of a pulse waveform

Figure 2.2- A pulse waveform


An ideal pulse waveform has zero rise and fall times. However in physical circuitry it is
impossible to have an infinite number of harmonics which are required for zero rise and fall
times.
Symmetry/duty cycle is the ratio of the positive portion of the waveform to the entire period.

3
2.1.3 Triangular waveforms
An ideal triangular waveform has linear slopes connected together. If the triangular wave is
symmetrical it will be composed of the fundamental frequency sine wave and only odd
harmonics. If the waveform is unsymmetrical it is called a saw tooth wave [1].
2.2 Generation of Waveforms
Oscillators and signal processing circuitry are necessary for the generation of waveforms.
2.2.1 Oscillators
An oscillator can be defined in four ways [2]
I. An oscillator converts dc energy into periodic signals
II. An oscillator is a source of ac voltage
III. An oscillator is a circuit which produces output without input
IV. An oscillator is an amplifier with positive feedback
Oscillators can be divided into two categories which are
a. AC amplifier with filtered feedback
b. Threshold decision circuitry

2.2.1.1 Feedback Oscillators


The output of an amplifier is applied to a frequency sensitive filter network. Figure 2.3 below
is a simple outline of the feedback oscillator shown by blocks representing the amplifier and
the filter network. The amplifier is represented by its gain which is 𝐴𝑣 while B represents the
filter network with a gain B The gain of the complete network is 𝐴𝑐𝑙

Figure 2.3- Feedback oscillator


The loop operates at the resonant frequency 𝑓0 and if oscillation is to occur
I. Power gain through the open loop must be unity at 𝑓0
II. Open loop phase shift at this frequency should be zero
Since op-amps are manufactured with their specific gains, these conditions are determined by
the filter characteristics.
In practise, the open loop gain is set somewhat higher than unity to ensure that oscillations will
start. A non-linear mechanism will lower the gain as the amplitude of oscillation reaches the
required level [3].

4
The filter quality factor Q is used in determining the frequency stability of the oscillator. Q is
a measure of the energy stored in the resonant circuit to the energy being dissipated. For the
filter, the rate of change of its phase shift at resonance is directly proportional to Q [1].
2.2.1.2 Threshold Decision Oscillators
These are circuits capable of producing time varying voltage or current. An example is an RC
circuit which begins operating from some initial state. As it charges its instantaneous state is
monitored by a detector which looks for a certain threshold condition such as a voltage level.
When the detector decides that the threshold is reached it resets the circuit to its initial state.
The detector also resets and another cycle starts. [1]
If there are two detectors, the time varying circuit can be made to move back and forth between
two states thereby producing an alternating voltage or current.
An example is illustrated by the circuit shown in figure 2.4 below

Figure 2.4- Example of RC threshold decision oscillator


The values of R and C and the ratio of +V to the threshold voltage determine the frequency of
oscillation.
The frequency of threshold decision oscillators is less stable than that of a good feedback
oscillator. They are usually used where non-sinusoids are required but if used for sinusoids, it
is for very low frequencies (up to a few MHz).
2.3 Signal Impairments
2.3.1 Noise
Noise affects the signal by adding to it or modulating it. Noise can be thermal, active, device
noise and can also be power supply hum. The noise which is difficult to control is that which
5
modulates the signal. It causes broadening of the signal spectrum and can be problematic in
transmitter and receiver applications. [1]
2.3.2 Distortion
Small amounts of curvature in transfer functions of amplifiers and other circuits distort the
wave shape of signals passing through them. [1]
2.3.3 Bandwidth Restrictions
The circuits have finite passbands but usually elementary analysis assumes infinite bandwidth.
Within the passband of the circuit both gain and signal time delay change with frequency.
When complex signals pass through such a circuit, the relative amplitude and relative time
positions of the signal components are changed which causes a change in the shape of the signal
waveform. [1]
2.4 Producing the Sine Wave (sine wave oscillators)
The circuits consist of ac amplifiers with positive feedback path from output to input. The
feedback path consists of a filter network. The transfer gain of the network is very low except
close to the desired frequency of oscillation. The ability of the circuit to operate as an oscillator
is restricted to a narrow band around this frequency.
2.4.1 Oscillators with RC Feedback Circuits
There are three types of RC feedback oscillators
I. Wien-Bridge oscillator
II. Phase shift oscillator
III. Twin-T-oscillator
Oscillators with RC feedback are used for ranges up to 1MHz
2.4.1.1 Wien-Bridge oscillator
This type of oscillator has a lead-lag with lead circuit dominating at lower frequencies whilst
the lag circuit dominates above some frequency. Figure 2.5 below illustrates the Wien-bridge
operation.

a) lead-lag circuit

b) Response curve

6
c) Wien-bridge oscillator

Figure 2.5- Wien bridge operation and circuit


Figure 2.5a shows the lead-lag circuit. In the circuit 𝑅1 and 𝐶1 form the lag portion whilst 𝑅2
1
and 𝐶2 form the lead portion. The reactance of a capacitor is 𝑋𝐶 = 2𝜋𝑓𝐶 where f is the frequency
and C is its capacitance. It can be seen from this relationship that at low frequencies a capacitor
has high reactance whilst at high frequencies the reactance is lower.
At a low frequency 𝐶2 has a high reactance but as the frequency increases this reactance
decreases allowing the output voltage to increase. At the same time the capacitor𝐶1 ’s reactance
decreases hence causing the output voltage value to decrease.
Figure 2.5b shows the response curve. The resonant frequency is 𝑓𝑟 and the output voltage
𝑉 1
peaks at this resonant frequency. The attenuation at this point is 𝑉𝑜𝑢𝑡 = 3. If 𝑅1 = 𝑅2 = 𝑅 and
𝑖𝑛
1
𝐶1 = 𝐶2 = 𝐶 then𝑓𝑟 = 2𝜋𝑅𝐶. At this resonant frequency the phase shift through the circuit is 0.

Figure 2.5c shows how the lead-lag circuit is used in the positive feedback loop whilst a voltage
divider is used in the negative feedback loop. The voltage divider determines the closed loop
𝑅1 +𝑅2
gain of the amplifier𝐴𝑐𝑙 = . In order to satisfy the unity gain condition this gain should
𝑅2
1
be equal to 3 so that the 3 attenuation in the lead lag circuit is offset.

𝑅1 + 𝑅2
=3
𝑅2
𝑅1 = 2𝑅2
2.4.1.2 Phase Shift Oscillator
This oscillator also makes use of RC circuits to create oscillations. Figure 2.6 shows the
circuit for the phase shift oscillator.

7
Figure 2.6- RC phase shift oscillator
Each of the three RC circuits can provide a maximum phase shift approaching900 . Oscillation
occurs at a frequency where the total phase shift through the RC circuits is1800 so that together
the1800 phase shift of the op-amp the total phase shift is00 . If 𝑅1 = 𝑅2 = 𝑅3 = 𝑅 and 𝐶1 =
1
𝐶2 = 𝐶3 = 𝐶 then𝑓𝑟 = 2𝜋√6𝑅𝐶.

2.4.1.3 Twin-T Oscillator


Two T type RC filters are used in the feedback loop. One of the filters has a low-pass response
whilst the other has a high-pass response. Figure 2.7 below shows the circuit of the twin-T
oscillator.

Figure 2.7- Circuit and response of Twin-T oscillator


Figure 2.7 also shows the response of the circuit. The circuit produces a band stop/Notch
response with a centre frequency that equals the desired frequency of oscillation𝑓𝑟 .
2.4.2 Oscillators with LC Feedback Circuits.
These are used for applications which require higher oscillation frequencies than for RC
circuits. There are several types of the LC feedback oscillators which include Colpitts, Clapp,
Hartley, Armstrong and crystal controlled oscillators. In high frequency circuits discrete
transistors are used because op-amps have lower unity gain frequency.
Figure 2.8 and 2.9 are two examples of LC feedback oscillators

8
Figure 2.8- Colpitts Oscillator

Figure 2.9- Hartley Oscillator


1 𝐶 𝐶
For the Colpitts oscillator𝑓𝑟 = 2𝜋√𝐿𝐶 where 𝐶𝑇 = 𝐶 1+𝐶2 whilst for the Hartley oscillator 𝑓𝑟 =
𝑇 1 2
1
where 𝐿𝑇 = 𝐿1 + 𝐿2
2𝜋√𝐿𝑇 𝐶

2.5 Triangular wave oscillator


Circuits can be built that can produce triangular waves. The circuit shown in figure 2.10 is a
triangular wave oscillator.

9
Figure 2.10- Triangular wave oscillator and its output waveform
The op-amp comparator performs a switching function. If the voltage of the comparator is at
its maximum negative level, the integrator will produce a positive going ramp. When the ramp
reaches the upper trigger point UTP, the comparator switches to its maximum positive level.
The integrator will then produce a negative going ramp which continues until the lower trigger
point is reached. At this point the comparator switches back to its maximum positive level and
the cycle repeats.
The circuit can also be used as a square wave output since the comparator produces a square
wave output.
1 𝑅2
The frequency of this setup is 𝑓𝑟 = 4𝑅
1 𝐶 𝑅3

2.6 Square Wave Oscillator


Circuits can also be built which produce square wave forms. Figure 2.11 below shows a square
wave oscillator and the waveform that is produced.

Figure 2.11- Square wave oscillator and resulting waveform

10
The capacitor voltage is the input to the inverting input terminal. The input to the non-inverting
input terminal is the portion of the output fed back through resistors 𝑅2 and 𝑅3 to provide
hysteresis.
When the capacitor voltage charges to a value equal to the feedback voltage of the non-
inverting input, the op-amp output switches to a maximum negative state. The capacitor will
start discharging and when it reaches −𝑉𝑓 the op-amp switches to a maximum positive level
and the capacitor starts charging. The cycle repeats and a square wave is produced.
2.7 The Comparator
The op-amp can be used as a voltage level detector or comparator. To accomplish this, a
reference voltage Vref is applied to one input of an op-amp. The reference voltage could be 0
V, a positive voltage or a negative voltage with respect to ground. To the other input a time-
varying voltage 𝑉𝑖 is applied. When 𝑉𝑖 crosses the reference voltage level, the output of the op-
amp will switch to either positive saturation or negative saturation depending on the type of
comparator circuit the polarity of the differential voltage. A typical comparator with reference
voltage 0V (also called zero level detector) is shown in figure 2.12. [2]

𝑉𝑟𝑒𝑓

Figure 2.12- Zero level detector

Voltage comparators are classified as:


- Non-inverting – the input voltage 𝑉𝑖 is applied to the non-inverting input of the op-amp;
- Inverting – the input voltage 𝑉𝑖 is applied to the inverting input of the op-amp.
Each of the above types can have positive, negative or zero reference voltage.
For a fast response to the changes at the inputs, abrupt change of the output voltage is required.
Therefore the op-amps used as comparators need to have high slew rate. Thus 741 op-amp is
not very suitable for comparator application and 301 op-amp is used in the following examples.
The operation of a comparator is based on the operation of the op-amp, that it response to the
differential voltage Ed.
If 𝑉𝑖 is connected as 𝑉(+) , and Vref is connected as 𝑉(−) (non-inverting comparator), and 𝑉(+) is
more positive than 𝑉(−) , the output goes at positive saturation. If the opposite is true, the output
will switch to negative saturation.
2.8 Integrators and Differentiators
An op-amp integrator simulates mathematical integration, which is basically a summing
process that determines the total area under the curve of a function. An op-amp differentiator

11
simulates mathematical differentiation, which is a process of determining the instantaneous
rate of change of a function.
Integrators and differentiators are important because when either a square wave or a triangular
wave has already been produced one of them can be used to produce the other waveform. [3]
An op-amp integrator circuit is shown in figure 2.13.

Figure 2.13- Op-amp integrator


The capacitor voltage in a simple RC circuit is exponential. This is because the charging current
continuously decreases as the capacitor charges and causes the rate of change of the voltage to
continuously decrease. However by using an op-amp with the RC circuit the capacitor’s
charging current is made constant, thus producing a straight-line (linear) voltage rather than an
exponential voltage. This is the principle behind an integrator.
A constant voltage on the input of the op-amp will produce a ramp on the output. So this can
be used to obtain a triangular waveform when given a square wave.
Figure 2.14 shows a differentiator circuit and the output that is obtained when a triangular wave
is the input.

Figure 2.14- Op-amp differentiator


A differentiator produces an output that is proportional to the rate of change of the input
voltage. Thus if a triangular wave is input to the differentiator the output will be a square wave.
2.9 Conclusion
So now that the several methods that can be used to come up with waveforms an appropriate
method can be chosen that can be used to design the required circuit.

12
3 CHAPTER THREE

3.0 Introduction
The function generator required should produce the sine, square and triangular waves at a
certain frequency. Because there is a relationship between the waveforms a circuit can be built
which produces all the three waveforms using one oscillator. This helps to make the frequencies
of all three waveforms equal and less hardware is used than if for each waveform a different
oscillator is used.
For the given frequency of 6.2 kHz the Wien-bridge is an appropriate choice.
3.1 Block Diagram of Design
The diagram in figure 3.1 below is a block diagram showing the outline of the function
generator design.

Triangular
wave
Sine wave Square
wave
Wien-Bridge Comparator Integrator
oscillator
Vref=0V

Figure 3.1- Block diagram of function generator


The Wien-bridge oscillator will produce the sine wave which is fed into a comparator circuit
with a reference voltage of 0V. This will cause the output of the comparator to be a square
wave with a frequency equal to that of the sine wave. Integration of a square wave will produce
a triangular wave.
3.2 Wien-bridge Oscillator
The process required here is choosing resistor and capacitor values that satisfy the conditions
that are required for oscillation to occur. Figure 3.2 below shows the circuit components that
have values to be determined.

Figure 3.2- Wien-bridge oscillator

13
The frequency of oscillation is given by
1
𝑓𝑟 = 2𝜋𝑅𝐶. ……….3.1

The frequency that is required is 6.2 kHz. Substituting this into equation 3.1 and rearranging
gives
1
𝑅𝐶 = 12.4𝜋×103 ……….3.2

The next procedure is to choose the value of either R the resistor or that of C the capacitor.
Method 1;
Choosing R=10kΩ. From equation 3.2 this gives
1
𝐶=
12.4𝜋 × 103 × 10 × 103
C= 2.57nF
Method 2:
Choosing C=2.2nF. From equation 3.2 we get
1
𝑅=
12.4𝜋 × 103 × 2.2 × 10−9
R=11.67kΩ
𝑉 𝑉 1
From figure 3.2 at resonant frequency we have the ratio𝑉1 = 𝑉2 = 3= 𝛽 which is the gain of the
0 0
lead-lag portion.
But we do know that for oscillations to occur we should have 𝐴𝑐𝑙 𝛽 = 1. This means that the
closed loop gain 𝐴𝑐𝑙 = 3. The gain 𝐴𝑐𝑙 is determined by the values of 𝑅1 𝑎𝑛𝑑 𝑅2. It is given
by
𝑅1 +𝑅2
𝐴𝑐𝑙 = …………3.3
𝑅2

Substituting 𝐴𝑐𝑙 = 3 into equation 3.3 gives


3𝑅2 = 𝑅1 + 𝑅2
𝑅1 = 2𝑅2 ……..…3.4
Choosing 𝑅1 = 20𝑘Ω makes 𝑅2 = 10𝑘Ω
For stability diodes can be used in the closed loop gain circuit. Figure 3.3 below shows how
the diodes can be connected so that they stabilize oscillations.

14
R3
12k
R1 R2 D1
10k 10k DIODE
R4
60k D2
DIODE
U1
Q
Vout

C R
2.2nF 11.67k

C R
2.2nF 11.67k

Figure 3.3- Wien-bridge circuit with component values


It is easier to choose a capacitor value C then calculate the required resistance R than to do vice
versa. This is because it is easier to obtain a non-standard resistor value than to obtain a non-
standard capacitor value.
3.3 Comparator
The comparator is non-inverting with a reference voltage 𝑉𝑟𝑒𝑓 = 0𝑉. It is intended that this
comparator produce a square wave from the input sine wave. Once the output of the sine wave
becomes greater or less than 0V the comparator output should saturate. This means a very fast
op-amp is preferable so that the rise and fall times of the waveform edges should be as close to
zero as possible. In other words the op-amp required should have a large slew rate.
∆𝑉𝑜
The slew rate is given by 𝑆𝑅 = where ∆𝑉𝑜 is the output voltage and ∆𝑇 is the rise or fall
∆𝑇
time.
Of the available op-amps the LM301 has a larger slew rate which is 10V/us. The 741 has a
slew rate of 0.5V/us.
Connecting op-amp at the oscillator output will result in the circuit which is shown in figure
3.4 that will produce both a square wave and the sine wave.
R3
12k
R1 R2 D1
10k 10k DIODE Sine
Square
R4 wave
60k D2 wave
DIODE U1
UA741
Q LM7301/NS
+ Vout

C R
2.2nF 11.67k

C R
2.2nF 11.67k

Figure 3.4- Sine and square wave generation

15
3.4 Integrator
The rate of change of a linearly changing voltage is a constant. This means if the integral of a
constant voltage is to be found the result will be a voltage which changes at a rate that is
equal to the amplitude of the constant voltage. Using this concept voltages that change
linearly at a rate equal to the maximum levels in the square wave can be obtained. They are
obtained by connecting an integrator to the output of the square wave. The integrator circuit
will produce an output voltage that changes negatively with respect to the sign of the input
voltage. The circuit in figure 3.5 below shows the circuit of the integrator.

Figure 3.5- Integrator circuit


3.4.1 Finding the value of R and C
1 𝑡
The voltage 𝑉𝑜𝑢𝑡 in the above circuit is given by 𝑉𝑜𝑢𝑡 = 𝑘 − 𝑅𝐶 ∫0 𝑉𝑖𝑛 𝑑𝑡 where k is the voltage
at 𝑉𝑜𝑢𝑡 at t=0. In this case k=0 since input voltage oscillate from zero to maximum levels.
1
The value of RC=2 𝑇 where T is the period of oscillation. Since frequency = 6.2 kHz,

𝑅𝐶 = 1.21 × 10−3
Choosing C=0.1uF gives R=12.1 kΩ.
Thus with the values of R and C and the 741 op=amp an integrator is obtained.
3.5 Function Generator
The integrator is connected with the square wave as the input and the whole circuit will now
produce all three waveforms at the same frequency. The circuit in figure 3.6 below is the
complete circuit of the function generator.

16
R3
12k
R1 R2 D1
10k 10k DIODE Sine C
Square 0.1uF Triangle
R4 wave
60k D2 wave wave
DIODE
UA741 U2
Q LM7301/NS U1
R5 UA741
+ 12k
Vout
C R +
2.2nF 11.67k

C R
2.2nF 11.67k

Figure 3.6- Function Generator


3.6 Practical Design
In the circuit in figure 3.6, there are 11.67kΩ resistors and a 60kΩ resistor as part of the circuit.
However in the laboratory components which such values cannot be found but using
combinations of resistors, values close to the required ones can be obtained.
In the case of the 11.67kΩ resistor a series combination of a 1.5kΩ and a 10kΩ will give
11.5kΩ which can be used in place of the 11.67kΩ resistors.
For the 60kΩ resistor a series combination of 56kΩ, 3.9kΩ and a 100Ω resistor will produce
the required total resistance.
Of the op-amps available in the laboratory the LM301 has a bigger slew rate which means it
responds faster to input voltage changes than the UA741. It is therefore necessary to use the
LM301 as the comparator so as to rising and falling edges of the square wave as steep as
possible.
3.7 Conclusion
The important part in the design was the Wien-bridge oscillator. The output of the
comparator and the integrator mainly depends on the output of this Wien-bridge oscillator.

17
4 CHAPTER FOUR

DISCUSSION OF RESULTS
4.0 Introduction
To test how good the design is the circuit has to be tested using a simulation and then a practical
implementation in the laboratory. This chapter shows the results that were obtained from the
tests.

4.1 Simulation Results


The simulating software used was Proteus. The circuit produced the sine, square and triangular
waveforms shown in figure 4.1 below.

Figure 4.1- Simulation waveforms


The frequency of oscillation of the waves was 6.2 kHz. The square wave had zero rise and fall
times whilst the triangular waveform was symmetrical.

4.2 Practical results


The simulation of the circuit produced ideal results but that is because the components in a
simulation have ideal characteristics. The practical implementation in the laboratory does not
produce ideal results but it is required that the results be very close to the ideal.
The circuit was set up in the laboratory and the waveforms where displayed on an oscilloscope.
A few important points need to be noted when setting up the circuit otherwise the output will
not be as expected
1. It is important to stretch out connecting wires and to ensure that there are not loosely
connected otherwise the output signals will be distorted by noise
2. It is important to choose an op-amp which has a slew rate large enough for use as the
comparator otherwise the square wave will fail to be produced and the obtained signal
will be something with significant rise and fall times.
Figures 4.2, 4.3 and 4.4 show the sine wave, square wave and the triangular wave respectively
that were produced by the circuit.

18
Figure 4.2- Sine wave produced

Figure 4.3- Square wave produced

19
Figure 4.4- Triangular waveform produced
The results show that the function generator had a frequency of 6.5 kHz. This value is close to
the required 6.2 kHz.
The Wien-Bridge produced a smooth sinusoidal waveform which had a duty cycle of 50.6%.
This means there is no offset voltage. The peak to peak voltage was 52V. This implies that the
amplitude of the waveform was 21V.
The square wave had a rising edge with a duration of 1.8us. This means the percentage of the
period that was in between the peak voltages is 2.34% since the period is 153.8us. Figure 4.5
shows a picture of the rising edge.

20
Figure 4.5- Square wave rising edge
The duty cycle of the square wave is 48.67% which is close to the required 50%.
The triangular waveform on the other hand had a duty cycle of 51% which is also close to the
required 50%.
4.3 Analysis of results
The Wien-bridge oscillator can be used to produce a reliable sinusoidal signal which has a zero
offset voltage. Oscillations occur at the resonant frequency. The result has shown that the
frequency of oscillation of a Wien-Bridge oscillator depends on the values of resistors and
capacitors chosen for the lead-lag circuit.
Another point that can be noted from these results is that a comparator can be used to obtain a
rectangular wave if an input is applied which varies below and above the reference voltage. If
this input is periodic with an offset equal to the reference voltage of the comparator then a
square waveform is obtained.
From mathematics it is known that the derivative of a linear function is a constant. This
relationship can also be interpreted as the integral of a constant is a linear function. Since the
square wave has half cycles of constant amplitudes we can therefore obtain linear half cycles
from integrating this square wave and obtain a triangular waveform.
4.4 Conclusion
The design is a good one since the results that were produced are the results that the circuit was
designed to produce.

21
5 CHAPTER FIVE

5.0 CONCLUSIONS
The Wien-bridge oscillator can thus be used to produce a sinusoidal signal then the signal is
manipulated to produce other required signals. Several other methods could have been used to
come up with the design and a designer has a variety of choices depending on what is required
of the waveform. For example an RC phase shift oscillator could have been used instead of the
Wien-bridge.
For the low frequency oscillations like the one in this design RC feedback oscillators can be
used. This is why RC oscillators find much use in the audio range. However for much larger
frequencies above 1MHz the use of LC oscillators is much appropriate. In these circuits discrete
transistors are used because op-amps have lower unity gain frequency.
LC oscillators find use at radio frequencies in tunable radio transmitters, local oscillators and
radio receivers.
Much more useful function generators can be designed in which the amplitude of the signal
and its frequency can be varied.

22
References

[1] C. K. Smith, "Signal Sources," in Electronic Instruments Handbook.

[2] S. Bebova, Linear Integrated circuits notes, Bulawayo, 2015.

[3] T. Floyd, Electronic devices.

23

You might also like