This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Selecting a Sine Wave Generator

Other Parts Discussed in Thread: LM331, TLC555

Hi Ti,

I am looking for a small footprint, quick-to-implement sinewave generator that meets the following condtions:

1. I have a 5V and +-12V power supply on my circuit, so the sinewave generator needs to be powered from these supply

2. Amplitude stability down to at least 0.1%

3. Frequency stability down to at least 1%

4. Ideally I would love to have the sine wave to reach 20V pk-pk, but I could have a gain if needed.

5. Low harmonic distortion but I don't really have a requirement for it.

6. Power budget is now really a concern

7.

If the surface mount sine-wave generator/ function generator requires SPI/I2C communications for setup, it would be really helpful to have available programming code/examples.

Thank you and I look forward to hearing from you soon,

Khoi Ly

  • 20Vpp is a lot

    into what load?

    Over what frequency range?
  • The load would be  2 capacitors in series that are in the range of 50pF to a few nF.

    20V could be achieved by an op amp gain, so that might be okay for me.

    I am only interested in frequency less that 10kHz.

    Thanks,

    Khoi Ly

  • single or multichannel? would a dual be useful?
  • I am not sure how that plays in my circuit. I just would like to have a single sine wave through the capacitive network.
  • Khoi,

    Have you consider classic Colpitts or Hartley oscillators designs?
    They can be made with transistors or op amps.
  • How well are they performing? Do you have a reference design?

    Wien Bridge didn't seem to be very stable for me

    Khoi Ly
  • Or you could use the LM331 to get a 2Vpp output then gain it up by 10 with the attached Cload driver circuit

    OPA1641 gain of 10.TSC

  • Khoi,

    I have not played with Colpitts or Hartley oscillators in over 20 years, but I'll try to simulate next week (in a couple days). Do you have a frequency or frequencies in mind?
  • Hi Khoi,

    usually this is done by the help of a Wien bridge oscillator with FET amplitude stabilisation. When doing it right you can achieve very low distortion by this. Low distortion is what usually counts when using a sine oscillator in an audio signal measurement.

    Wien bridge oscillators suffer from considerable settling time which can be huge when changing the frequency at very low audio frequencies. It can take several seconds until the amplitude is stable. And as all the frequency setting is done by a stereo pot it's hard to fullfill your stability requirements.

    Your desired 0.1% amplitude stability reads to an amplitude error of no more than 0.009dB! Are you sure that you need such a low amplituide error? If so, I would think that a DDS solution (direct digital synthesis) is better suited for you than an analog sine oscillator.

    Kai
  • isn't 0.1% amplitude stability is translated into -60dBc of amplitude .
    DDS seems to be a good option. Does any device / reference design you have in mind have good frequency stability? I was not able to find much information about this.

    I would like to have a very clean sinewave at 1kHz with amplitude stable 0.1%

    Thanks,

    Khoi Ly
  • Khoi,

    Let me start over. The most critical spec is amplitude accuracy of 0.1%. For that , I suggest this method. This method also allows changing the amplitude easily.

    The load is another problem point; capacitive loads are troublesome for op amps for stability and output current reasons.

    10nF, 1kHz, 20Vpp has a maximum slew rate (zero crossing) = Vpp * PI * f = 0.0628V/us.  Peak current is C*V/t = 10nF * 0.0628V/us = 628uA. 10kHz would be 10x that. The current isn't hard to meet but it does add to the power budget.

    Is the frequency always 1kHz?   

  • Frequency will be always fixed at 1kHz. The load, however might vary from 70pF to approximately 1nF.

    The diagram you showed me didn't mention which sine wave generator, p2p detector, and error amplifier used.

    Would DDS or traditional op amp be better?

    It was really helpful to have a few suggestions for this application. However, I wonder which one would be an optimal solution?
  • Was there anything wrong with the LM331 plus Cload drive circuit I sent out early on. That seems pretty straightforward. 

  • So it looks like the LM331 drives out a pulse train at a variable frequency, then a bandpass active filter stage at 1kHz would make it look sinusoidal
  • Khoi,

    The more I think about this request, the more I think an analog sine solution is far more trouble than it is worth. I am abandoning my previous ideas and joining Kai's solution using DDS (direct digital synthesis).
  • Thank you for your reply.

    Which DDS is recommended for my application?

    I will try it out to see how well it performs

    Khoi Ly
  • Khoi,

    DDS which I believe can be done well on our DSP (digital signal processing) is outside my expertise.

    Nevertheless I suggest starting here.

    http://www.ti.com/processors/digital-signal-processors/overview.html

    Click on introduction to DSP link and start reading or you could click on products, select an interesting one and start an e2e post on that part number to get sine wave help.

    Get your analog sine from the DSP with a external Vref for the DAC. Select an very accurate Vref (shunt or series reference) and select an op amp with very low offset voltage to increase output voltage. Use very accurate resistors in this gain circuit. Ask an e2e question for that op amp to get a frequency compensation circuit that is stable with a wide range of capacitive load.

  • A much simpler approach is to use a shift register with weighted resistors to create a stepped sine wave.

    See: sound.whsites.net/.../sinewave.htm

    The frequency of the sine wave is easily controlled by the clock frequency, and the amplitude is controlled by the rails powering the flip flops.

    Using an 8 bit shift register and appropriate resistor values followed by a harmonic filter can easily achieve better than 1% THD.
  • Hi Antennahead,

    now that it is clear that only one frequency is to be generated a tons of other ways are possible. The square wave could be created with the TLC555, or by the help of CD4060 in combination with a 4.096MHz quartz. With a flip flop from 2kHz to 1kHz k2 harmonics can be eliminated which will heavily ease the use of the low pass filter to remove all the unwanted harmonics. Nevertheless, the 0.009dB amplitude stability requirement still might be a tough nut to crack.

    Kai
  • The frequency stability of the '555 is determined by the R,C values, and won't be very tight.  Obviously this can be trimmed with a pot if need be, but the capacitor will still cause some variation. 

    Using the shift register approach, the outputs of the shift registers could be used to select a precision voltage reference or ground, which would provide amplitude stability if the power supply rails of the shift register isn't good enough- I would think it would be easier to make a solid rail for the shift register, though.

    If you're going to add digital logic, like a CD4060, you might as well use the shifter register approach.  There are lots of programmable logic oscillators to provide the clock frequency to start with.