Oscillator tutorial in HD!

Uploaded by Afrotechmods on 31.03.2010

Welcome to my tutorial covering the basics of oscillators.
So... what is an oscillator?
An oscillator is something that creates oscillations.
Oscillation is just a fancy word for something moving back and forth.
If you have a swing moving back and forth you could say
that the swing is oscillating.
In the context of electrical engineering
the oscillations that we care about are voltages moving back and forth.
For example, here is a sine wave that is oscillating from
+1 volt to -1 volt back and forth.
An oscillator is a circuit that would generate a repetitive back and forth
waveform like this.
And just so you know, it doesn't necessarily have to be a sine wave,
an oscillator can generate a square wave, triangle wave, mexican wave, whatever.
Now what are oscillators good for?
Oscillators are used all the time in electronic designs.
Common uses include generating radio waves, tone generators,
generating counters to keep track of time,
and generating clock signals to control the speed of digital processors
including the computer that you're using right now.
So now that you know that oscillators are awesome, how do you build one?
Well here are some of my favorite beginner circuits.
Here's a classic square wave oscillator based on a 555 timer chip.
This is every student's first way of generating square wave up to 1 MHz.
There are many web sites out there that go into the details of how these work
so just Google "555 oscillator" if you want more information.
After you build it, it's going to look something like this.
If I probe pin 3, I can see the square wave output of the oscillator
with the voltage oscillating back and forth between zero volts and five volts.
Now if I attach an LED and a resistor to the oscillator's output,
I get a blinking light.
If I attach a lot of LEDs and use a transistor to switch the oscillator's output,
I can host my own rave.
So you can already see how oscillators are building blocks that can be used as
part of bigger designs.
Okay that was a square oscillator. Let's take a look at a sine wave oscillator.
This is a quadrature oscillator based on an LM324 operational amplifier.
If I probe the output of the oscillator I can see that I am getting
a sine wave of around 1500 Hz.
If I use a capacitor to remove the DC offset of the sine wave
and connect it to some earphones I can hear the 1500Hz sound.
If I replace this fixed resistor with a variable resistor,
I change the frequency of the oscillations letting me do fun stuff like this.
Generally speaking you can change the frequency of any resistor / capacitor based oscillator
by changing the resistor and capacitor values.
Whenever you find a webpage showing you how to design an oscillator it will usually give you
the equations for determining the frequency.
Finally when you start working with digital processors like microcontrollers
or x86 CPUs you are going to encounter a thing
called a "clock oscillator."
A clock oscillator is a circuit that generates a square wave
that controls how fast the processor runs.
The popular hobby of overclocking is basically making the clock oscillator
run faster to get more processing performance at the cost of increased
power consumption.
Most clock oscillator circuits will be based on a high accuracy quartz crystal
and possibly a phase locked loop frequency multiplier
which allows you to reach very high frequencies like three GHz.
Every digital processor is going to be different so you'll have to check your processor's
datasheet for how to set things up.
Okay that covers the basics of oscillators. Have fun pretending to be R2D2!