Reconfiguring an oscillator

Thread Starter

xox

Joined Sep 8, 2017
936
I am working with a simple Schmitt trigger based square wave generator which works off of a dual supply.

dual-supply.png

What I would like to do is convert it to a single supply compatible equivalent. I estimated the current draw of the circuit in the simulator (excluding what is needed to power the opamp itself) to be a something like 600μA and based on that number I set up a low-impedance voltage divider to act as a virtual ground and set up the opamp in single supply configuration.

single-supply.png

Now the frequency is given by 1/(R*C*2*ln((1+β)/(1-β))) so in this case it should be 1/(12000*0.000001*2*ln(3)) = ~37.926Hz. The dual-supply version yields the most faithful simulation but for some reason the second one only approaches that level of accuracy (frequency-wise) if I set the virtual ground divider resistors to fairly low values. Setting them to 560Ω each seems to work well but the current draw rises to about 4.5mA, which is more than 7 times what the first circuit consumes.

My question then (1) is there a better way to do it that such that the current draw doesn't exceed say 1mA and (2) otherwise, might any issues arise from using this kind of single-supply-virtual-ground approach?
 

panic mode

Joined Oct 10, 2011
4,864
so you need to make virtual ground low impedance.
one option is to add capacitor across one or both voltage divider resistors.
the other is to put opamp configured as buffer after voltage divider. this way voltage divider can use high value resistors and low impedance is opamp output. this draws about 640uA but the Vgnd is rock stable. optionally remove V1 and current draw will be about half of that. putting matching cap to C1 across R2 will make virtual ground reach 50% of supply voltage way faster. also to stabilize virtual ground capacitor value should be higher, say 22uF

1770432567988.png

1770433548260.png
 
Last edited:

Thread Starter

xox

Joined Sep 8, 2017
936
so you need to make virtual ground low impedance.
one option is to add capacitor across one or both voltage divider resistors.
the other is to put opamp configured as buffer after voltage divider. this way voltage divider can use high value resistors and low impedance is opamp output. this draws about 640uA but the Vgnd is rock stable. optionally remove V1 and current draw will be about half of that. putting matching cap to C1 across R2 will make virtual ground reach 50% of supply voltage way faster. also to stabilize virtual ground capacitor value should be higher, say 22uF

View attachment 363187

View attachment 363188
Wow, the buffered version resulted in the absolute lowest current draw - I was actually able to bring it down to just 2.5μA! It also performs almost identically to the dual supply setup.

Oddly enough the simpler capacitors-across-the-divider method yielded a frequency that just barely deviates from the expected value (37.879Hz versus 37.926Hz) while at the same time drawing exactly as much current as the dual oscillator.

Great suggestions all around. Thank you so much for the help!
 

panic mode

Joined Oct 10, 2011
4,864
You are welcome. I am glad you tried both to see the difference for yourself. Non- buffered version relies on capacitors for stability and larger values produce better results so of course, this is always a compromise. I rarely see circuits using split capacitors but this helps with initial creepage, specially when using large cap values.
 

MisterBill2

Joined Jan 23, 2018
27,164
You can also try a potentiometer as your "reference ground" source. Not all opamps work the same near supply and common at low voltages. So what works at 9 volts might have a problem at 5 or less.
 

Thread Starter

xox

Joined Sep 8, 2017
936
You can also try a potentiometer as your "reference ground" source. Not all opamps work the same near supply and common at low voltages. So what works at 9 volts might have a problem at 5 or less.
Good point! Each type of opamp does have its own specific operating parameters. I learned that the hard way when swapping them out in different applications and found out pretty quickly that none of them behave exactly alike.
 

Ian0

Joined Aug 7, 2020
13,097
You’re making it far too complicated. All it needs is ONE extra resistor, from the non-inverting input of the op-amp to the positive supply. Make it the same value as the resistor to the negative supply, and the it has the same frequency equations as a 555, namely f=1/(1.4 RC)
 

Thread Starter

xox

Joined Sep 8, 2017
936
You’re making it far too complicated. All it needs is ONE extra resistor, from the non-inverting input of the op-amp to the positive supply. Make it the same value as the resistor to the negative supply, and the it has the same frequency equations as a 555, namely f=1/(1.4 RC)
That is much simpler. So basically the beta value is now derived from R1/(R1+R2+R3) which equals 1/3 when R1=R2=R3. Hence ln((1+β)/(1-β)) = ln(2) and our frequency equation becomes 1/(R*C*2*ln(2)). Interesting to note that your version results in the fastest startup time compared to all of the other circuits as well. Kudos!
 

Ian0

Joined Aug 7, 2020
13,097
That is much simpler. So basically the beta value is now derived from R1/(R1+R2+R3) which equals 1/3 when R1=R2=R3. Hence ln((1+β)/(1-β)) = ln(2) and our frequency equation becomes 1/(R*C*2*ln(2)). Interesting to note that your version results in the fastest startup time compared to all of the other circuits as well. Kudos!
The resulting circuit is a very standard relaxation oscillator circuit - I'm surprised no-one spotted that.
You could probably make it start up even faster if you split the timing capacitor into two, and connected one to each rail.
 

AnalogKid

Joined Aug 1, 2013
12,043
Thevenin equivalence.

For the schematics in post #1, leave the capacitor connected to GND. It can be tied to any zero-impedance point, such as GND, Vcc, or a virtual ground circuit. GND is there and it's already connected, so leave it.

Replace the upper-left (Reference Designators - !!!) 100K resistor with two 200K resistors - one to Vcc and one to GND. This will create a Vcc/2 operating point with the same circuit impedance as before, so the hysteresis equations should not change at all. Add a 0.1 uF capacitor to GND to reduce noise.

https://en.wikipedia.org/wiki/Thévenin's_theorem#Calculating_the_Thévenin_equivalent

Note: This might be what Ian0 was referring to.

ak

Update: Do *not* add a 0.1 uF cap as mentioned above. oops.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,043
I assume by that you mean connecting a capacitor between the resistor-to-ground connection Vcc and ground?
Nope. I meant something different, but it won't work. Replace the 100 K with two 200 K's, but no added cap. Edited #11.

ak
 

crutschow

Joined Mar 14, 2008
38,316
Below is the lTspice sim of Ian0/AK's suggested circuit with the single added resistor (without the cap):
Note that the signal levels are for a RR output type op amp.
A non-RR type would have a lower output voltage, and likely non-symmetrical high and low times.
The output times can be made symmetrical by changing the values of R1 and R4 so the Thevenin voltage is halfway between the high and low voltage output swing of the op amp (while keeping the Thevenin resistance equal to R3, or changing R3 to match the new Thevenin resistance).

1770749278403.png
 
Last edited:

Thread Starter

xox

Joined Sep 8, 2017
936
Below is the lTspice sim of Ian0/AK's suggested circuit with the single added resistor (without the cap):
Note that the signal levels are for a RR output type op amp.
A non-RR type would have a lower output voltage, and likely non-symmetrical high and low times.
The output times can be made symmetrical by changing the values of R1 and R4 so the Thevenin voltage is halfway between the high and low voltage output swing of the op amp (while keeping the Thevenin resistance equal to R3, or changing R3 to match the new Thevenin resistance).

View attachment 363308
On a side note, would it be possible to take the waveform at V(1) and clean it up to make it more triangular? Asking because the current triangular generator I've been using produces a very nice output but [1] it requires an adjustment of two separate resistors and [2] the amplitude is frequency-dependent. If that V(1) signal from the square-wave oscillator could somehow be made a bit neater, both of those problems would be solved.
 

Ian0

Joined Aug 7, 2020
13,097
On a side note, would it be possible to take the waveform at V(1) and clean it up to make it more triangular? Asking because the current triangular generator I've been using produces a very nice output but [1] it requires an adjustment of two separate resistors and [2] the amplitude is frequency-dependent. If that V(1) signal from the square-wave oscillator could somehow be made a bit neater, both of those problems would be solved.
Not from this circuit, but you can make it with an op-amp connected as an integrator and a hysteresis circuit.
https://www.analog.com/en/resources...riangularwave-generator-uses-a-single-ic.html
Using an ordinary op-amp and comparator the pins labelled REFERENCE can be a resistive divider to set half supply.
R4 varies the frequency.
Don't be tempted to use two op-amps. It needs the extremely fast slew-rate of a comparator, otherwise the output is not very triangular.
 
Top