Sine wave oscillator

Discussion in 'General Electronics Chat' started by MeltingPoint, Sep 29, 2015.

  1. MeltingPoint

    Thread Starter New Member

    Sep 29, 2015
    8
    0
    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
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,000
    3,229
    Do you want the frequency to be adjustable over the 10kHz to 20kHz range?
     
  3. Ramussons

    Active Member

    May 3, 2013
    557
    92
  4. MeltingPoint

    Thread Starter New Member

    Sep 29, 2015
    8
    0
    Its nice to have it adjustable during testing but it will be fixed in the end.
     
  5. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    761
  6. Aleph(0)

    Member

    Mar 14, 2015
    343
    323
    You want uber basic AF sine wave oscillator so I say use just twin tee RC Osc like here http://homepage.ntlworld.com/g0xan/twin-t.htm Now no ICs, coils, synthesizers and all that make your prof on your back;)! BTW there is homework section you know! You give yourself away when say coil hard to find:D
     
  7. MeltingPoint

    Thread Starter New Member

    Sep 29, 2015
    8
    0
    These work with a single supply right?
     
  8. Aleph(0)

    Member

    Mar 14, 2015
    343
    323
    I sorry that I sound like Nanny but you omit subject of question:confused: If meant twin tee yes of course but if mean from other references you need look at schematic or ask explicitly about circuit.
     
  9. MeltingPoint

    Thread Starter New Member

    Sep 29, 2015
    8
    0
    I've tried simulating on Multisim but I'm not getting anything at the output of the op amp.

    rc oscillator (1).JPG rc oscillator (2).JPG
     
  10. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,128
    266
    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.
     
  11. MeltingPoint

    Thread Starter New Member

    Sep 29, 2015
    8
    0
    Just did that but I am now getting a constant 3.5v at the output.
     
  12. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,523
    1,247
    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
     
  13. MeltingPoint

    Thread Starter New Member

    Sep 29, 2015
    8
    0
    Looks like it was R3 that was causing the issue. I used the circuit from this site: http://www.electronics-tutorials.ws/oscillator/rc_oscillator.html
    I don't know why the third resistor is not in series with C3 and the inverting input.

    The simulation is now working but there is a big DC offset in the output waveform. What causes this and how do I remove the offset?

    rc oscillator (3).JPG
     
  14. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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...
     
  15. MeltingPoint

    Thread Starter New Member

    Sep 29, 2015
    8
    0
    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.
     
  16. MeltingPoint

    Thread Starter New Member

    Sep 29, 2015
    8
    0
    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.
     
  17. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,523
    1,247
    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
     
    MeltingPoint likes this.
  18. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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.
     
  19. dannyf

    Well-Known Member

    Sep 13, 2015
    1,779
    360
    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.

    DDS would be a good alternative - it is software dependent but not software based.
     
  20. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    761
    Have you really read "Op amps for everyone" ?

    Try this

    Try this.png
     
    Aleph(0) likes this.
Loading...