Sine wave oscillator

Thread Starter

MeltingPoint

Joined Sep 29, 2015
8
I want to be able to make a sine wave oscillator without having to use inductors because they are very hard to find in my place. I'm okay with using op amps though. I need the waveform to be somewhere in the 10KHz to 20KHz audio range. I will be feeding this signal into an audio amplifier so it will help a lot if there isn't a lot of distortion.

I cannot use software based oscillators like those for smartphones.

Please suggest some circuits that could work for my criteria. Thanks! :D
 

Sensacell

Joined Jun 19, 2012
3,447
The non-inverting input of the opamp and R3 cannot be at GND- you need to create a "virtual ground" of Vcc/2 to bias the opamp in the middle of the supply voltage.

A cheap and sleazy way to do this is to make a voltage divider from Vcc to gnd, and bypass the midpoint to ground with a cap.
But always beware of the currents flowing into and out of the "Virtual Ground" - you don't want your ground wiggling around too much.

This is a common "gotcha" for making opamp circuits work on a single supply.
 

AnalogKid

Joined Aug 1, 2013
11,043
R3 does not connect to GND. It goes in series between C3 and the opamp inverting input. R1 stays connected to the inverting input.

ak
 

MikeML

Joined Oct 2, 2009
5,444
Offset with respect to what? Ask yourself this question: I have an opamp powered on a single 5V supply. It produces a sinewave. How could it possibly produce a sine wave that swings more negative than 0V (gnd) or more positive than 5V?????

Look at a dc-blocking ac-coupling capacitor...
 

Thread Starter

MeltingPoint

Joined Sep 29, 2015
8
Offset with respect to what? Ask yourself this question: I have an opamp powered on a single 5V supply. It produces a sinewave. How could it possibly produce a sine wave that swings more negative than 0V (gnd) or more positive than 5V?????

Look at a dc-blocking ac-coupling capacitor...
You're right. I didn't realize that I was indeed powering the opamp from a single supply so there is no way for it to swing below ground.
 

Thread Starter

MeltingPoint

Joined Sep 29, 2015
8
Off-topic: Is it okay to use a single op amp chip (i mean single package) such as the LM358 and use the two op amps for two different circuit? One will be for this sine wave oscillator and the other op amp will be driving a transistor in a constant current sink.
 

AnalogKid

Joined Aug 1, 2013
11,043
Yes. There is some crosstalk between the two amps, but very little. Low-level audio folks don't use dual opamps for this reason, unless both amps are working on the same signal, like a balanced output driver or something like that. But for things in the volts range (as opposed to the microvolts range), no problem.

ak
 

MikeML

Joined Oct 2, 2009
5,444
Also, you need to study the LM358 data sheet to learn that when operated on 5V, it can only drive its output pin from near 0V to about 3.4V (not all the way to +5V). If you need that capability, then there are rail-to-rail output opamps that do that.
 

dannyf

Joined Sep 13, 2015
2,197
Wien bridge would be a good alternative.

There are also waveform generators (3308 for example) but they aren't that helpful.

Otherwise, google an application note from TI about sine wave generation.

I cannot use software based oscillators like those for smartphones.
DDS would be a good alternative - it is software dependent but not software based.
 
Top