YOUR
NAME:
YOUR
SID:
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
YOUR
PARTNER’S
NAME:
YOUR
PARTNER’S
SID:
Pre-‐Lab
Score:
___/40
In-‐Lab
Score:
___/60
Total:
____/100
RC
Oscillators
LAB
4:
RC
Oscillators
ELECTRICAL
ENGINEERING
43/100
INTRODUCTION
TO
DIGITAL
ELECTRONICS
University
Of
California,
Berkeley
Department
of
Electrical
Engineering
and
Computer
Sciences
Professor
Ali
Niknejad,
Professor
Michel
Maharbiz,
Vincent
Lee,
Tony
Dear,
Toshitake
Takahashi
Lab
Contents
I. Lab
Objectives
II. Background
III. Pre-‐Lab
Component
a. The
Relaxation
Oscillator
b. The
Triangle
Wave
Generator
IV. Lab
Section
a. Your
Oscillator
b. Building
the
Oscillator
V. Lab
Report
Submissions
a. Image
Citations
1
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
Lab
Objectives
In
this
lab
we
will
learn
to
analyze
and
build
RC
oscillators
that
may
be
used
as
one
of
the
modules
in
the
final
project.
This
oscillator
primarily
functions
as
a
signal
generator
for
a
test
signal.
In
short,
you
are
basically
building
a
very
simple
function
generator.
Background
Many
circuit
applications
that
require
precision
timing
or
PWM
(pulse
width
modulation)
control
need
an
input
waveform
that
oscillates
between
two
voltages.
To
accomplish
this,
we
exploit
the
properties
of
capacitors
to
create
these
oscillating
circuits.
Often
times
we
will
have
to
settle
for
triangle
or
square
waveforms,
since
sinusoidal
waveforms
are
notoriously
difficult
to
produce
from
simple
RC
oscillators.
These
waveforms
are
used
in
mechanical
applications,
such
as
motors
that
require
PWM
control
or
timing
circuits
for
synchronous
digital
applications.
One
of
the
advantages
of
PWM
is
that
it
draws
less
power
than
a
DC
input.
However,
in
our
application,
we
will
simply
exploit
the
fact
that
it
can
function
as
a
signal
generator.
2
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
Pre-‐Lab
Component
The
Relaxation
Oscillator
Reproduced
below
is
a
schematic
of
the
relaxation
oscillator.
We’ll
use
this
as
a
square
wave
generator.
Notice
that
it
is
configured
in
a
positive
feedback
configuration.
R1
R1
Fig
1.
Relaxation
Oscillatori
Initially
the
relaxation
oscillator
will
start
off
with
zero
output.
But
the
world
isn’t
perfect,
and
random
fluctuations
will
eventually
cause
one
input
terminal
to
be
higher
than
the
other.
Due
to
the
positive
feedback,
the
output
will
then
saturate
to
the
corresponding
rail.
Once
this
happens,
the
capacitor
that
is
connected
to
the
inverting
terminal
will
begin
to
charge
or
discharge
through
the
feedback
loop
depending
on
the
state.
Remember,
negligible
current
flows
into
the
operational
amplifier
input
terminals.
Also
the
supplies
to
the
operational
amplifier
are
𝑉!!
and
𝑉!! = −𝑉!! ,
so
the
output
of
the
operational
amplifier
is
always
either
+𝑉!!
or
– 𝑉!! ,
giving
us
really
only
two
states
to
analyze.
Intuitively,
the
square
wave
comes
primarily
from
the
abrupt
saturation
from
the
positive
rail
to
the
negative
rail
or
vice
versa.
But
what
about
frequency
and
duty
cycle?
Good
question…
3
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
In
the
space
provided
below,
prove
that
the
frequency
𝑓
of
the
output
signal
of
the
relaxation
oscillator
is
given
by
1
𝑓=
2 ln 3 𝑅𝐶
Show
all
relevant
mathematical
derivations
and
work.
S core:__/ 20
4
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
More
workspace…
The
Triangle
Wave
Generator
The
triangle
wave
generator
is
actually
just
a
simple
integrator
shown
below.
Fig
2.
Inverting
Integratorii
In
the
space
provided
below,
prove
that
the
output
of
the
above
circuit
actually
integrates
and
inverts
the
input
signal
by
showing
the
output
signal
is
given
by
the
following.
Assume
all
initial
conditions
are
zero.
!
𝑉!!
𝑉!"# = − 𝑑𝑡
! 𝑅𝐶
5
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
Then
prove
how
this
generates
a
triangle
wave
from
the
square
waveform.
What
conditions
for
the
square
input
waveform
must
be
satisfied
for
this
to
actually
produce
a
triangle
wave?
If
Vin
is
a
10-‐Hz
square
wave
with
5-‐V
amplitude,
how
would
you
pick
the
value
of
R
and
C
to
generate
a
triangle
waveform
with
4-‐V
amplitude?
Score:
__/20
Again
simulate
this
circuit
in
Multisim
and
attach
it
to
the
lab
report.
Simulation
is
worth
extra
10
points.
6
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
Lab
Section
So
why
exactly
do
we
care
about
an
RC
oscillator
that
produces
a
square
and
triangle
wave?
Glad
you
asked.
Square
waves
and
triangles
waves
make
excellent
test
signals,
because
they
are
periodic
and
predictable,
unlike
real
world
analog
signals
that
you
may
be
measuring.
In
this
lab
component,
you
will
be
building
the
appropriate
oscillator
for
your
final
project
to
act
as
you
test
signal
source.
A
list
of
specifications
as
to
what
exactly
your
generator
will
need
is
explained
in
detail
in
the
next
section.
Your
Oscillator
Obviously
we
can’t
just
use
any
arbitrary
oscillator
with
arbitrary
specifications.
Some
test
signals
are
better
than
others.
Let’s
start
by
taking
a
look
at
the
application.
Suppose
we
need
to
pick
up
signals
on
a
microvolt
level
through
a
pair
of
electrodes.
In
addition,
the
frequency
that
we
are
primarily
interested
in
lies
around
10𝐻𝑧,
so
we
want
to
be
able
to
produce
at
least
that.
However,
we
will
be
using
the
oscillator
as
a
test
source,
so
we
might
as
well
be
able
to
sweep
multiple
frequencies.
This
will
enable
us
to
both
simulate
the
frequency
we
are
looking
for
as
well
as
test
if
our
circuit
appropriately
rejects
undesired
frequencies.
Thankfully,
you’ve
done
all
of
the
derivations
already
for
both
of
the
oscillators,
so
adjusting
the
design
to
fit
the
following
parameters
should
be
fairly
simple.
In
the
space
provided
below,
pick
appropriate
component
values
for
the
relaxation
oscillator
so
that
its
minimum
frequency
is
10𝐻𝑧.
You
may
use
one
potentiometer
in
your
design.
Score:__/10
7
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
More
workspace…
Building
the
Oscillator
Now
that
you
have
calculated
the
component
values,
it’s
time
to
build
this
on
your
breadboard.
Before
we
implement
that
microvolt-‐level
signal
generation,
you
will
first
want
to
test
if
your
oscillator
is
working
properly.
As
always,
some
useful
tips
before
you
start
breadboarding
it
up:
• Set
current
limits.
Anything
greater
than
a
reasonable
amount
of
current
will
destroy
your
circuit,
and
you
and
your
chips
will
be
very
sad.
• If
components
are
getting
hot,
make
sure
your
wires
are
not
shorting
and
things
are
connected
correctly.
Check
supplies
to
make
sure
the
high
and
low
supplies
are
not
swapped.
• The
multimeter
and
oscilloscope
are
your
friends.
Use
them
to
test
if
you
are
getting
expected
value
on
your
circuit.
8
Lab 4: RC Oscillators EE43/100 Spring 2012 V. Lee, T. Dear, T. Takahashi
i)
Build
the
relaxation
oscillator
(Fig
1).
Pick
R
and
C
based
on
your
previous
calculation.
You
can
use
a
100-‐kΩ
potentiometer
for
R.
Use
a
20-‐kΩ
resistor
for
R1.
What
is
the
oscillation
frequency?
Tune
the
potentiometer
until
the
frequency
of
the
square
wave
is
10
Hz
and
show
it
to
your
GSI.
Your
GSI
Signs
Here
(15
Points)
ii)
Build
the
triangle
wave
generator
(Fig
2).
The
input
comes
from
the
square
wave
generated
by
the
relaxation
oscillator.
Pick
R,
C
based
on
your
previous
calculation.
You
can
use
a
100-‐kΩ
potentiometer
for
R.
What
is
the
amplitude
of
the
triangle
waveform?
Tune
the
potentiometer
until
the
amplitude
is
4
V
and
show
it
to
your
GSI.
Your
GSI
Signs
Here
(15
Points)
Note:
you
may
want
to
put
a
100
kΩ
resistor
across
C
to
discharge
excess
charge.
iii)
Once
you
have
finished
building
the
oscillator,
it
would
be
nice
to
see
some
indication
that
it
works.
To
accomplish
this,
we
can
attach
an
LED
to
the
outputs.
Add
an
LED
to
the
output
of
your
relaxation
oscillator
in
series
with
an
appropriate
resistor.
Usually
resistor
between
200
Ω
and
1
kΩ
should
do
the
trick.
You
should
now
have
a
blinking
LED
at
10
Hz.
Turn
the
potentiometer
and
show
the
LED
blink
at
different
frequencies.
Now
connect
a
second
LED
and
resistor
to
the
output
of
your
triangular
wave
generator.
Does
the
intensity
of
the
LED
change
with
time?
Show
your
se
up
to
you
GSI
for
check
off
Your
GSI
Signs
Here
(10
Points)
Lab
Report
Submissions
This
lab
is
due
at
the
beginning
of
the
lab
section.
Make
sure
you
have
completed
all
questions
and
drawn
all
the
diagrams
for
this
lab.
In
addition,
attach
any
loose
papers
specified
by
the
lab
and
submit
them
with
this
document.
These
labs
are
designed
to
be
completed
in
groups
of
two.
Only
one
person
in
your
team
is
required
to
submit
the
lab
report.
Make
sure
the
names
and
student
IDs
of
BOTH
team
members
are
on
this
document
(preferably
on
the
front).Image
Citations
i
http://en.wikipedia.org/wiki/File:OpAmpHystereticOscillator.svg
ii
http://en.wikipedia.org/wiki/File:Op-‐Amp_Differentiating_Amplifier.svg
9