EE3300: ELECTRONICS 2
Assignment 1 Colpitts Oscillator
Jesse Lee
12980200
Due: 3/05/2016
Group members: Michael Saunders, Nathan Johnston
Contents
Aim........................................................................................................................ 2
Theory................................................................................................................... 2
Oscillators........................................................................................................... 2
Oscillator Applications........................................................................................ 2
Oscillator Design................................................................................................ 2
Hartley Oscillator................................................................................................ 3
Figure 1: Hartley Oscillator Design..................................................................3
Colpitts Oscillator............................................................................................... 4
Figure 1: Colpitts Oscillator.............................................................................. 4
Method................................................................................................................... 5
Schematics............................................................................................................ 5
Colpitts Oscillator Schematic.............................................................................. 5
Figure 1: Colpitts Oscillator.............................................................................. 5
Figure 2: Power Supply.................................................................................... 6
Figure 3: Full Circuit with Power Supply...........................................................6
Simulation.............................................................................................................. 7
Figure 1: Colpitts Oscillator Frequency Response............................................7
Figure 2: Oscillator designed with small inductor and large capacitors...........8
Figure 3: Tank circuit and Feedback Resistor...................................................8
Figure 4: Voltage vs. Time Circuit Output........................................................9
Figure 5: Colpitts Frequency Response with 275
Feedback Resistor........9
Figure 6: Voltage vs. Time Circuit Output with 60
Feedback Resistor.....10
Results and Discussion........................................................................................ 10
Figure 1: PCB with components.....................................................................10
Figure 2: Oscilloscope Output........................................................................11
Figure 3: Square Wave Output.......................................................................12
Figure 4: Square Wave Output Diode Clipping............................................12
Recommendation................................................................................................. 13
Figure 1: Theoretical Square Wave Output Schematic...................................13
Conclusion........................................................................................................... 14
References........................................................................................................... 15
1
Jesse Lee
12980200
Aim
In this assignment the aim is to create a working oscillator that will generate a
sine wave output signal that can also be converted into a square wave signal.
Given an input 12V AC signal, it is to be converted to a DC signal by way of a
power supply, design of personal choice, this is then to be converted into a
sinusoidal wave that oscillates at 4MHz. A comparator can then be used to turn
this into a square wave.
Through designing, simulating and building of the device, an in depth knowledge
of oscillators will be primarily acquired. Secondary learning component outcomes
will include: power supplies, comparators, 3D design and group work.
Theory
Oscillators
An electronic oscillator is a device that produces a periodic oscillating output
signal. This output signal is often a square or sinusoidal wave. Oscillators take in
a DC signal and convert them to an AC output signal at a certain frequency.
There are two primary types of oscillators: positive feedback and negative
resistance.
A positive feedback oscillator consists of two parts: an amplifier and a frequency
discriminative circuit. The frequency output is applied to the amplifiers input,
the output is then fed back into the frequency selective network. If the two
components are in phase and magnitude then steady state oscillation can occur.
The amplifier gain can determine whether the oscillations will grow or decrease.
Negative resistance oscillators will not be looked at in this course. Simply put,
these oscillators look at S11 of the amplifying circuit. For some frequencies this
value will be >1 causing the amplifier to become unstable thus allowing
oscillations to occur. These devices are primarily used in microwave oscillation.
Oscillator Applications
Oscillators are used in a wide variety of applications. Some examples of where
they are used to generate signals include: television transmitters, clocks, radio
transmitters, computers and music synthesizers.
One of the most commonly used oscillators is the quartz crystal oscillator. By
applying a voltage across a precisely measured quartz crystal, a stable
mechanical resonant frequency will be generated. The frequency is dependent
upon the thickness of the crystal and how it was cut from the original host rock.
While it is possible to create oscillators using resistors, capacitors and inductors;
the best stability is usually achieved using quartz crystals (or other piezoelectric
materials, though usually quartz is used).
Oscillator Design
Within feedback oscillators there is various categories to achieve the ultimate
goal of oscillation. These categories are based on the frequency filter circuits
used in the feedback loop. These are: RC oscillators, LC oscillators and crystal
oscillators. RC oscillators use a network of resistors and capacitors to create low
frequency oscillations (audio range). LC oscillators use capacitors and inductors
2
Jesse Lee
12980200
to feed charge back and forth between the capacitors. These are often called
tank circuits. The filter circuit is fine tuned to resonate at a certain frequency
based on the size and value of the inductors and capacitors. LC oscillators are
used at radio frequency oscillation (104 to 1011 or 1012 Hz). The tank circuit
creates losses which is made up for by the amplifier (gain >1). Examples of LC
oscillators are: Hartley and Colpitts. Lastly there is crystal oscillators which use a
piezoelectric crystal as a frequency filter as mentioned previously.
Hartley Oscillator
A Hartley oscillator is defined by its design consisting of two inductors in series
with a capacitor in parallel across both. The feedback signal for oscillation is
taken from the connection between the two inductors. The advantage of Hartley
oscillators is that the resonant frequency can be easily adjusted by using a
variable capacitor (see diagram below). The output at the emitter of the
transistor will be in phase with the output at the collector making the feedback
signal positive.
Figure 1: Hartley Oscillator Design
(Hartley Oscillator, 2016)
To calculate the resonant frequency of a Hartley oscillator the following equation
is used:
f r=
1
2 LT C
where LT =L1 + L2
3
Jesse Lee
12980200
Colpitts Oscillator
A Colpitts oscillator is distinguished by its design in that the feedback from the
amplifier is taken from a voltage divider made from two capacitors in series
across an inductor. While the Colpitts resonator is similar to the design of Hartley
the tapped junction is made of two capacitors versus Hartleys two inductors.
This causes an inverting phase shift which is then inverted again to produce the
required positive feedback. Perhaps the most notable feature of the Colpitts
resonator is its good output wave clarity. This is able to happen due to the two
capacitors low impedance paths for harmonics (P.E., 1997).
Figure 1: Colpitts Oscillator
(Kikkert, 2013)
To calculate the resonant frequency of a Colpitts oscillator the following equation
is used:
f r=
1
2 LC T
where
1
1 1
= +
C T C1 C 2
4
Jesse Lee
12980200
Method
1.
2.
3.
4.
5.
6.
7.
Design a power supply.
Design an amplifier and feedback circuit.
Simulate the designed circuits.
Modify circuit to allow for a variable output signal.
Modify circuit to allow for sine to square wave output signal.
Design and build a housing to be 3D printed for the circuit.
Demonstrate the working device (4/04/2016).
Schematics
Colpitts Oscillator Schematic
In this task a Colpitts oscillator design was chosen due to the ease at which the
frequency can be tuned by changing the capacitor values. It is also difficult to
create a precise inductor so having one instead of two would allow for a simpler
and more robust build.
Figure 1: Colpitts Oscillator
The circuit has been designed to be a common base. Here the voltage across C4
is applied to the emitter base junction of the transistor to create oscillations. The
resonant frequency is calculated to be:
CT =
f r=
C 3 C4
=1250 pF
C3 +C 4
1
1
=
=3948148.2 Hz 4 MHz
9
2 LC T 2 1300 10 1250 1012
For simulation purposes this value is close enough to 4MHz as it is known that
the simulation will not truly reflect the real life design. The circuit constructed will
be tuned as necessary until 4MHz oscillation is achieved.
5
Jesse Lee
12980200
Figure 2: Power Supply
Figure 2 shows the Altium schematic of the power supply to be used to feed
into the oscillator circuit. The power supply design chosen is a full wave rectifier
consisting of: a H-bridge, smoothing capacitors, two transistors in common
emitter configurations to boost current, a Zener diode to cap the voltage at 12V
and a potentiometer that will allow for a variable output voltage.
Figure 3: Full Circuit with Power Supply
Figure 3 shows the full Altium schematic design to be manufactured. The top
right contains the oscillator circuit, the bottom two are the power supplies and
the top left shows the input and outputs of the IC (integrated circuit) that will
convert the sine to a square wave.
In this design it can be seen that there are two power supplies that are slightly
different. The lower power supply has a resistive divider network across the
output and a virtual ground tap in the middle of the divider. This is so that a +6V
and -6V can be obtained to feed into and turn on the IC.
6
Jesse Lee
12980200
Simulation
Using AWR Design Environment, Figure 1: Colpitts Oscillator (from
Schematics) was simulated to find the resonant frequency and what the output
sinusoidal form looked like.
Figure 1: Colpitts Oscillator Frequency Response
As can be seen this output waveform is exactly what was required and expected.
The peak frequency response occurs at 4.03MHz (close enough to 4MHz for the
simulation). The gain of the circuit can be seen on the left axis as 1.245 which is
again required meaning that oscillations can occur (as gain is >1). The imaginary
response at 4MHz has a gain of 0 which is correct as we expect a 180 0 shift form
the tank circuit and another 1800 from the base emitter junction.
It should also be noted that the spike/peak at which the oscillator resonates
could be made smaller or wider by changing the values on the inductor and
capacitor. To get a very sharp spike a smaller inductance value would be used,
the capacitors would be adjusted accordingly to make sure that oscillations
occurred at 4MHz. However 1300nH was chosen as a minimum value as making
an inductor any smaller would not be stable or possible. To make the inductor
wire was wrapped around a ferrite core. 1300nH would have been approximately
1.5 coils around the core, which is not nearly enough to ensure the core wont
slip or change.
7
Jesse Lee
12980200
Figure 2: Oscillator designed with small inductor and large capacitors
Through the use of the tuning feature in AWR using a smaller inductor (250nH)
and much larger capacitors ( C3 =C 4=12700 pF ), a smaller and nicer spike at
4MHz can be obtained. Gain aside, as this can be changed through the feedback
resistor, this is a not a practical model due to the inductor being too small. As
mentioned above if 1300nF would be 1.5 turns, then 250nF would simply not be
achievable.
In the simulations, the tuning feature of AWR was used extensively to determine
the component values in the circuit. It was found that by changing the values of
the R4 feedback resistor the gain of the circuit could be controlled and through
changing the values of the tank circuit components the resonant frequency can
be moved (which is expected due to the resonant frequency equation).
Figure 3: Tank circuit and Feedback Resistor
When R4 was made a short the gain of the circuit would go very high and while
R4 was open the gain would never be able to get above 1. By setting R4 to a 60
resistor a gain of 1.245 is obtained which is a good starting point from the
simulation.
8
Jesse Lee
12980200
Figure 4: Voltage vs. Time Circuit Output
This is the output waveform of the circuit obtained by replacing the OSCTEST
with OSCAPROBE in AWR. As can be seen this is a sinusoidal wave with a peak
value of 1.179V. The frequency can be calculated like:
f=
1
=3938093 Hz 4 MHz
(353.499.47 ) 109
Meaning that the circuit is behaving the way that it is wanted to. However this
pure sine wave can only be obtained by increasing the feedback resistor to 275
. This is not allowed as the previous circuit showing the resonant frequency
means that the gain would fall to only barely above 1.
Figure 5: Colpitts Frequency Response with 275
Feedback Resistor
This is not acceptable as the real life gain will be less than this value meaning
that oscillations will not occur.
9
Jesse Lee
12980200
However by decreasing the feedback resistor the sine wave output looks less and
less sine and more distortion is added.
Figure 6: Voltage vs. Time Circuit Output with 60
Feedback Resistor
Frequency is still 4MHz however the sine wave output is no longer a perfect
looking wave. The other factor to note is that by increasing the feedback
resistance (nicer wave) the voltage gain is also severely dropped. For these
reasons 60
was chosen as a middle ground where the gain and sine output
response were both acceptable.
Results and Discussion
After the simulations were run and the circuit was deemed acceptable the next
step was the build the circuit on an ugly board (copper sheet). As expected the
results measured on a digital oscilloscope were nothing like the simulation had
predicted. To find the correct values, header pins were soldered to the
connections on the ugly board so that capacitors could be hot swapped. It was
found that by widening and compressing the coils on the inductor, the frequency
could be fine-tuned to resonate at exactly 4MHz.
Next the components on the ugly board were transferred to the PCB:
10
Jesse Lee
12980200
Figure 1: PCB with components
As the power supply worked and there was no need for fine tuning, those
components were soldered directly into the board. For the oscillator and IC
however, header pins were soldered in so that the components could be easily
switched out (headers were used for the IC in case it got fried and would be
easily replaceable).
The final values were:
C3 =221 pF
C 4=68 pF
L=3.6 H
Theoretically giving a frequency of:
f r=
221 1012 68 1012
2 3.6 10
221 1012 +68 1012
=11632343 11.6 MHz
As predicted the oscillators actual frequency is a lower than the theoretical
value calculated.
11
Jesse Lee
12980200
Figure 2: Oscilloscope Output
Note: there should not be two lines on the bottom of the wave, the
oscilloscope was simply behaving strangely on this day.
The scope shows that the peak to peak voltage is 6.36V (this was the maximum
achievable voltage with the potentiometer) and an oscillating frequency of
4.0648MHz. And this can be clearly seen as being a sinusoidal wave.
The square wave output yielded less ideal results.
Figure 3: Square Wave Output
In the making of the square wave, the second power supply which was to turn on
the IC did not work due to issues in the virtual ground. All of the current was
being drawn through one of the resistors meaning that a middle 6V reference
point was unobtainable. To get the square wave, a proper DC supply box in the
workshop was used to create a
6 V that was fed into the IC. This resulted in
the above Figure 3. As can be seen it is no longer sine and could be considered
square but all of the noise overlayed makes it far from ideal.
Firstly the sine wave being fed into the IC is almost perfect. The purity of the sine
should also have very little effect on how the IC operates as it simply outputs
12
Jesse Lee
12980200
high or low as the sine oscillates over a reference voltage. Therefore there must
still be issues in the set-up of the
6V
DC supply.
To satisfy the task an alternative was explored to obtain a square wave. The
simplest method was to use diode clipping. By using two normal diodes facing
the opposite way connected in parallel. A resistor was added so that current is
not infinite, and a capacitor was added to smooth out the output.
Figure 4: Square Wave Output Diode Clipping
Now we have a wave that is no longer sine that oscillates at 4.0077MHz. In using
diodes a fundamental flaw has been overlooked: that diodes are not
instantaneous devices and that a perfectly clipped wave will never be obtained
using this method which is why it is quite rounded.
Recommendation
While in the given time frame a square wave was unable to be produced a
theoretically possible method has been concocted which given more time may
have produced a proper square wave.
Figure 1: Theoretical Square Wave Output Schematic
In this schematic an AC source is used to represent the output from the oscillator
circuit. A 1nF will decouple the DC from the AC coming out of the oscillator. Next
13
Jesse Lee
12980200
two 1M resistors in series will form a voltage divider giving a reference 6V in the
middle which the AC will be overlayed on and fed into the IC (op amp). Following
that another two 1M resistors will form a voltage divider to fed 6V into the
remaining terminal of the IC. This should theoretically give a square wave at the
output of the IC.
Side note: I was unable to get the transient analysis of this model to
run in microcap due to a singular matrix error.
The advantage of this system is that it will only require 1 power supply cutting
down the size and components of the PCB down to almost half. Given more time
this could be made and added on by attaching the necessary components on a
breadboard then into the PCB.
14
Jesse Lee
12980200
Conclusion
The primary aim of this task was to create a sinusoidal wave from first principles
that has a resonant frequency of 4MHz. This was achieved and the wave could be
varied from 0V to 6V (peak to peak voltage).
A Colpitts tank circuit connected to a common base configuration amplifier circuit
was designed. The values for the capacitors and inductors were chosen using the
resonant frequency equation of a Colpitts tank then applied and simulated in
AWR Design Environment. It was expected that real life components would not
behave the same way the simulation does so the circuit was tested on an ugly
board before being manufactured.
As expected the values for the capacitors and inductors that allowed for 4MHz
oscillation were way over spec. The values used would have theoretically given
an 11.6MHz oscillation. By soldering in headers it was easy to hot swap
components until the correct oscillation was found.
The second power supply to output
6V did not work due to an incorrect
assumption about the virtual ground set-up (that it would work). While hooking
up a proper DC supply was the obvious solution this still did not work and a very
noisy wave was obtained that may or may not be defined as square. Further
thinking arrived at using diodes to clip the sine wave however due to the high
frequency and the non-instantaneous nature of the diodes, the output wave was
quite smooth and not clear cut.
A final solution was considered: using a capacitor to decouple the DC from the AC
at the sinusoidal output, then using two voltage divider networks to run the IC.
Given more time to make and test this setup should theoretically give a perfect
square wave output while running off the same power supply as the oscillator
circuit.
15
Jesse Lee
12980200
References
Coates, E. (2007-2016). Oscillator Basics. Retrieved from Lean about Electronics:
[Link]
Colpitts Oscillator. (n.d.). Retrieved from Electronics Tutorials:
[Link]
Hartley Oscillator. (2016). Retrieved from Electronics Tutorials:
[Link]
Kikkert, C. J. (2013). RF Electronics Design and Simulation. Townsville: James
Cook University. Retrieved from
[Link]
%20and%[Link]
Lesurf, J. (n.d.). Negative Resistance Oscillators. Retrieved from University of St.
Andrews: [Link]
P.E., I. M. (1997). Practical Oscillator Handbook. Oxford: Newnes.
Rouse, M. (2005, September). Oscillator. Retrieved from [Link]:
[Link]
16
Jesse Lee
12980200