Opamp / Comparator Play Game - Page 1
Forum section: electronics / projects

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 29, 2011, 05:05:13 am
content: Just stumbled with this circuit while try to figure out how to build an oscillator using a LM393 comparator. Pop Quiz: How the output should look like?ps: pls post your simple opamp/comparator/amplifier circuit to share, ask and build to see how it performs, beginners and experts are welcomed. Happy weekend, Cheers!

author: oPossum
author_rank: Super Contributor
timestamp: April 29, 2011, 06:02:59 am
content: The output will follow the + input. It is a voltage follower with a class A output stage.A pull up or pull down resistor can sometimes be used to reduce the crossover distortion of an op-amp output stage. This is common with old designs like the LM324. It can help a lot in audio circuits. The usual class B output will be operated in class A. Resistor selection can be critical for optimum performance.

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 29, 2011, 10:30:00 am
content: but its not what i'm getting. and that is a comparator, not an op amp.

author: oPossum
author_rank: Super Contributor
timestamp: April 29, 2011, 10:59:11 am
content: Did you build it or simulate it?comparator == op-amp with anti latch-up and open collector output, maybe some hysteresis

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 29, 2011, 08:08:11 pm
content: i built it first and then i tried to simulate it. your previous post is what i get in sim. i built it 2nd time to make sure, i still get the same. i'll build it the 3rd time and will take picture of it, when the Tek Contest finish, i thinkCheers mate.ps: but maybe it only specific to LM393, i'll not sure about other comparator. so if you find any interesting circuit with such op-amp or comparator, pls post. i hope we can learn.

author: Zero999
author_rank: Super Contributor
timestamp: April 30, 2011, 03:02:56 pm
content: The LM393 is not frequency compensated so will oscillate at an unknown frequency, probably a few MHz if configured as a linear amplifier as shown in the schematic previous posted.It's possible to use the LM393 as a simple low frequency amplifier by adding a frequency compensation capacitor as shown in firuge 9 and 11 on page 6 of the datasheet.http://www.st.com/stonline/books/pdf/docs/2164.pdf

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 30, 2011, 03:32:48 pm
content: ahh busted! the master has spoken, after coming back from holiday. so here it is, by adjusting the trimpot, i can get somewhere 600KHz - 1.6MHz oscillation. most opamp/comparator circuit i've seen need at least one capacitor to work as oscillator, but this one no need. configure as "theorized" voltage follower, and just one trimpot to make it adjustable, the other 10K ohm is a standard issue, every LM393 need one to work.

author: Mechatrommer
author_rank: Super Contributor
timestamp: April 30, 2011, 03:39:32 pm
content: btw, this is my page 6 datasheet from ST. different manufacturer provides different circuit i believe.

author: Zero999
author_rank: Super Contributor
timestamp: April 30, 2011, 08:30:07 pm
content: The circuit oscillates because the gain is >1 at a frequency when the phase shift is 180o, meaning it behaves as a non-inverting amplifier so the feedback created by the feedback resistor is positive, not negative. The capacitances which create the phase shift and cause oscillation are inside the LM393. This is a very poor oscillator circuit because the frequency is unpredictable and the waveshape is horrible.Adding a compensation stops the oscillation by making the gain <1 at the frequency when the phase shift is 180o.