Maker Pro
Maker Pro

LM311-oscillator, help needed

B

bos

I'm having an LM311-oscillator (found on google) that I'm going to use
in my own circuit later on. But before doing this I need to learn how
it works. Been looking at the schematic for two days now trying to
figure things out but fail miserabely, so I'm asking for a hand here.

Here's the schematic:

http://bos.hack.org/hacks/electronics/311.png

I'm not skilled at analog electronics, but I really want to learn
what's happening here.

What I know is that R2/R3 is a voltage divider. R4 is some sort of
feedback (no idea what it does) and since it's connected to the
voltage divider it confuses me even more. No clue what R5 does. For R2-
R5, I don't know where to start solving or what I'm looking for.

Furthermore, I know R1/C1 is a lowpass-filter, and I know the cut off-
frequency for this kind of filter is f = 1 / sqrt(RC * 2pi). Solving f
gives 1.53Hz, but this value is of no use to me since I don't know
what it tells me. I'm guessing that any signal below 1.53Hz goes into
the negative input of the opamp. But this is just a weak guess and it
doesn't tell me much.

Other than this, I'm completely lost. My goal for this circuit is to
manually calculate the frequency at the opamp-output (pin 7), I only
manage to identify the LP-filter and the voltage divider (which
probably isn't a voltage divider because of R4).

Can anyone help me out? Where do I start in circuits like these? Is
there any particular order you have to calculate / solve things?
 
R

Rich Webb

I'm having an LM311-oscillator (found on google) that I'm going to use
in my own circuit later on. But before doing this I need to learn how
it works. Been looking at the schematic for two days now trying to
figure things out but fail miserabely, so I'm asking for a hand here.

Here's the schematic:

http://bos.hack.org/hacks/electronics/311.png

I'm not skilled at analog electronics, but I really want to learn
what's happening here.

What I know is that R2/R3 is a voltage divider. R4 is some sort of
feedback (no idea what it does) and since it's connected to the
voltage divider it confuses me even more. No clue what R5 does. For R2-
R5, I don't know where to start solving or what I'm looking for.

Furthermore, I know R1/C1 is a lowpass-filter, and I know the cut off-
frequency for this kind of filter is f = 1 / sqrt(RC * 2pi). Solving f
gives 1.53Hz, but this value is of no use to me since I don't know
what it tells me. I'm guessing that any signal below 1.53Hz goes into
the negative input of the opamp. But this is just a weak guess and it
doesn't tell me much.

Other than this, I'm completely lost. My goal for this circuit is to
manually calculate the frequency at the opamp-output (pin 7), I only
manage to identify the LP-filter and the voltage divider (which
probably isn't a voltage divider because of R4).

Can anyone help me out? Where do I start in circuits like these? Is
there any particular order you have to calculate / solve things?

Well, to take a swag at this ...

R4 is for feedback, as you surmise. Comparitors use positive feedback to
achieve a solid transition. For example (without looking at how it
happens, yet) say that the (-) pin has crept up in voltage until it is
just slightly greater than the (+) pin. This causes the comparitor
output to swing towards ground and the positive feedback through R4
reaches over to the (+) pin and pulls it a down as well. So, even if the
(-) had done nothing else, it now has an extra margin as compared to the
(+) pin.

Assuming the comparitor is fully "on," you've got a voltage divider
consisting of (R3 || R4) over R2 (neglecting the smaller R5), so the (+)
pin will be at about 3 1/3 V. If it's fully "off," then it's now a
divider with R3 over (R2 || R4) or about 1 2/3 V.

C1 charges through R1 + R5 and discharges through R1. If we neglect R5
again, we'll have C1 charging from 1 2/3 V towards 5 V and discharging
from 3 1/3 V towards 0 V, in each case a travel of halfway. With an RC
time constant of about 100 msec, the "half life" is found by multiplying
by ln(2), so we get about 70 msec per half cycle, 140 msec per cycle, or
about 7 Hz.
 
R

Rich Grise

On Wed, 18 Mar 2009 07:20:11 -0700 (PDT), bos

---
Let's look at different parts of the circuit. First, the supply: (View
in Courier) ....
I'll get to the frequency part in a while...

Any questions so far?

What he said. :)

Cheers!
Rich
 
B

bos

[...]
Any questions so far?

This was a very in-depth, but still easy enough for me to understand,
explanation. I was able to follow you every step without having to
look like a big question mark. Thank you.

There's only one thing that stalled me a bit:
Assuming that the comparator input is high, the circuit connected to
U1-2 will look like this:

+5V
|
E1--+-------+
| |
| [1k]R5
|R3 |
[100k] [100k]R4
| |
E2--+-------+---U1-2
|
|R2
[100k]
|
GND

If the comparator input is high (i.e. high output?), shouldn't the
voltage between R5 and R4 - where the output pin is connected - be 5V,
rendering R5 useless? But I guess the output won't be perfectly at 5V
- even if it's rail-to-rail - so perhaps it won't affect the R3//
(R4+R5) voltage divider.

I mean, an ideal comparator would have 5V output, but since I'm going
to use the circuit in the real world later on it will probably never
reach that high.
 
B

Bob Engelhardt

Very nicely done! You should teach this stuff - you'd be really good at it.

Bob
 
N

Nobody

I'm having an LM311-oscillator (found on google) that I'm going to use
in my own circuit later on. But before doing this I need to learn how
it works. Been looking at the schematic for two days now trying to
figure things out but fail miserabely, so I'm asking for a hand here.

Here's the schematic:

http://bos.hack.org/hacks/electronics/311.png

I'm not skilled at analog electronics, but I really want to learn
what's happening here.

I have appended an LTSpice[1] schematic to this message. You can use this
to simulate the circuit and observe the voltage and current waveforms.

[1] http://www.linear.com/designtools/software/#Spice

The schematic uses a different comparator (LTSpice is bundled with
models for Linear's own components), but in a circuit like this, all
comparators are essentially equal.

Version 4
SHEET 1 880 680
WIRE -192 -48 -352 -48
WIRE 128 -48 -192 -48
WIRE 336 -48 128 -48
WIRE -192 -16 -192 -48
WIRE 336 -16 336 -48
WIRE -192 128 -192 64
WIRE -16 128 -192 128
WIRE 336 128 336 64
WIRE 336 128 64 128
WIRE -352 192 -352 -48
WIRE 128 192 128 -48
WIRE 96 208 -48 208
WIRE 336 224 336 128
WIRE 336 224 160 224
WIRE 480 224 336 224
WIRE -192 240 -192 128
WIRE 96 240 -192 240
WIRE -48 352 -48 208
WIRE 0 352 -48 352
WIRE 336 352 336 224
WIRE 336 352 80 352
WIRE -192 400 -192 240
WIRE -48 416 -48 352
WIRE -352 560 -352 272
WIRE -192 560 -192 480
WIRE -192 560 -352 560
WIRE -48 560 -48 480
WIRE -48 560 -192 560
WIRE 128 560 128 256
WIRE 128 560 -48 560
WIRE 128 624 128 560
FLAG 128 624 0
FLAG 480 224 Out
IOPIN 480 224 Out
SYMBOL res -208 -32 R0
SYMATTR InstName R3
SYMATTR Value 100K
SYMBOL res -208 384 R0
SYMATTR InstName R2
SYMATTR Value 100K
SYMBOL res -32 144 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R4
SYMATTR Value 100K
SYMBOL res 320 -32 R0
SYMATTR InstName R5
SYMATTR Value 1K
SYMBOL res -16 368 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R1
SYMATTR Value 47K
SYMBOL cap -64 416 R0
SYMATTR InstName C1
SYMATTR Value 2.2µF
SYMBOL voltage -352 176 R0
WINDOW 3 24 104 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value PULSE(0 5V 10ms)
SYMBOL Comparators\\LTC1841 128 224 R0
SYMATTR InstName U1
TEXT -210 648 Left 0 !.tran 1s
 
P

petrus bitbyter

Nobody said:
I'm having an LM311-oscillator (found on google) that I'm going to use
in my own circuit later on. But before doing this I need to learn how
it works. Been looking at the schematic for two days now trying to
figure things out but fail miserabely, so I'm asking for a hand here.

Here's the schematic:

http://bos.hack.org/hacks/electronics/311.png

I'm not skilled at analog electronics, but I really want to learn
what's happening here.

I have appended an LTSpice[1] schematic to this message. You can use this
to simulate the circuit and observe the voltage and current waveforms.

[1] http://www.linear.com/designtools/software/#Spice

The schematic uses a different comparator (LTSpice is bundled with
models for Linear's own components), but in a circuit like this, all
comparators are essentially equal.

Version 4
SHEET 1 880 680
WIRE -192 -48 -352 -48
WIRE 128 -48 -192 -48
WIRE 336 -48 128 -48
WIRE -192 -16 -192 -48
WIRE 336 -16 336 -48
WIRE -192 128 -192 64
WIRE -16 128 -192 128
WIRE 336 128 336 64
WIRE 336 128 64 128
WIRE -352 192 -352 -48
WIRE 128 192 128 -48
WIRE 96 208 -48 208
WIRE 336 224 336 128
WIRE 336 224 160 224
WIRE 480 224 336 224
WIRE -192 240 -192 128
WIRE 96 240 -192 240
WIRE -48 352 -48 208
WIRE 0 352 -48 352
WIRE 336 352 336 224
WIRE 336 352 80 352
WIRE -192 400 -192 240
WIRE -48 416 -48 352
WIRE -352 560 -352 272
WIRE -192 560 -192 480
WIRE -192 560 -352 560
WIRE -48 560 -48 480
WIRE -48 560 -192 560
WIRE 128 560 128 256
WIRE 128 560 -48 560
WIRE 128 624 128 560
FLAG 128 624 0
FLAG 480 224 Out
IOPIN 480 224 Out
SYMBOL res -208 -32 R0
SYMATTR InstName R3
SYMATTR Value 100K
SYMBOL res -208 384 R0
SYMATTR InstName R2
SYMATTR Value 100K
SYMBOL res -32 144 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R4
SYMATTR Value 100K
SYMBOL res 320 -32 R0
SYMATTR InstName R5
SYMATTR Value 1K
SYMBOL res -16 368 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R1
SYMATTR Value 47K
SYMBOL cap -64 416 R0
SYMATTR InstName C1
SYMATTR Value 2.2µF
SYMBOL voltage -352 176 R0
WINDOW 3 24 104 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value PULSE(0 5V 10ms)
SYMBOL Comparators\\LTC1841 128 224 R0
SYMATTR InstName U1
TEXT -210 648 Left 0 !.tran 1s

Beware. The capacitor has a strange value so the simulation does not work...
At least not with me.

petrus bitbyter
 
N

Nobody

On Wed, 18 Mar 2009 23:26:09 +0100, "petrus bitbyter"
I have appended an LTSpice[1] schematic to this message. You can use
this to simulate the circuit and observe the voltage and current
waveforms.
SYMBOL cap -64 416 R0
SYMATTR InstName C1
SYMATTR Value 2.2µF
Beware. The capacitor has a strange value so the simulation does not
work... At least not with me.

I think he's having encoding problems. My post was in UTF-8, but LTSpice
will probably want ISO-8859-1. If the process of transferring the data
from the message to the .asc file doesn't perform the conversion, the "mu"
will get corrupted.
 
P

petrus bitbyter

Nobody said:
On Wed, 18 Mar 2009 23:26:09 +0100, "petrus bitbyter"
I have appended an LTSpice[1] schematic to this message. You can use
this to simulate the circuit and observe the voltage and current
waveforms.
SYMBOL cap -64 416 R0
SYMATTR InstName C1
SYMATTR Value 2.2µF
Beware. The capacitor has a strange value so the simulation does not
work... At least not with me.

I think he's having encoding problems. My post was in UTF-8, but LTSpice
will probably want ISO-8859-1. If the process of transferring the data
from the message to the .asc file doesn't perform the conversion, the "mu"
will get corrupted.

You're right. That strange value is caused by the conversion of the "mu". So
it's not the value but the unit that made Spice fail. Once corrected the
simulation runs well.

petrus bitbyter
 
Top