Author Topic: Accurate sine wave in terms of amplitude  (Read 1475 times)

0 Members and 1 Guest are viewing this topic.

Offline sw_guyTopic starter

  • Contributor
  • Posts: 43
  • Country: fi
Accurate sine wave in terms of amplitude
« on: April 28, 2024, 08:05:26 am »
I am iterating options to generate accurate sine wave in terms of amplitude. Absolute frequency is not critical in this application.
There are few options and the first in my mind was AGC controlled wien oscillator. The main factor is temperature. Since the AGC is based on diodes, the "accuracy" of the circuit below is not even on the right map.
2148634-0

Another option is to use AD9833 (or equivalent) waveform generator chip. There might be better options in terms of amplitude accuracy, but the chip in question looks like be able to keep amplitude within 0.3% between 25 and 50C.

In practice, generating square wave accurately (still talking about amplitude) might be the easiest. Then it is matter of filtering to get sine wave. (and this time taken into consideration temperature impact to resistors and capacitors).

The target is to have 0.1% accuracy. To get there I am expecting to have stable enough generator + calibration.

sw guy
« Last Edit: April 28, 2024, 03:30:07 pm by sw_guy »
 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 1774
  • Country: au
Re: Accurate sine wave in terms of amplitude
« Reply #1 on: April 28, 2024, 08:17:36 am »
In the application note: https://www.analog.com/media/en/technical-documentation/application-notes/an43f.pdf
from page 30 onwards a number of precision Wein Bridge cicuits are suggested with temperature compensated amplitude, they use a pair of matched diodes or two diodes in close contact.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1574
  • Country: au
Re: Accurate sine wave in terms of amplitude
« Reply #2 on: April 28, 2024, 09:38:51 am »
 What is the target distortion ?
If you only need a fixed frequency, a filtered square wave will be simplest.
 

Offline sw_guyTopic starter

  • Contributor
  • Posts: 43
  • Country: fi
Re: Accurate sine wave in terms of amplitude
« Reply #3 on: April 28, 2024, 11:19:16 am »
>What is the target distortion ?
I do not know yet.

One option is that: do not care. I can measure what the amplitude is and then do the math one way or another.
 

Offline xvr

  • Regular Contributor
  • *
  • Posts: 209
  • Country: ie
    • LinkedIn
Re: Accurate sine wave in terms of amplitude
« Reply #4 on: April 28, 2024, 02:00:29 pm »
> One option is that: do not care.

Than use square waves. They can be considered as sinus with a lot of distortion.
 

Online Alex Nikitin

  • Super Contributor
  • ***
  • Posts: 1199
  • Country: gb
  • Femtoampnut and Tapehead.
    • A.N.T. Audio
Re: Accurate sine wave in terms of amplitude
« Reply #5 on: April 28, 2024, 02:38:18 pm »
Have a look at how it is done in the Fluke 510A AC Reference circuit, it compares the amplitude to the level of a DC reference (easily set with a good DC voltmeter) and provides a ppm-level of amplitude accuracy and stability on AC.

Cheers

Alex
« Last Edit: April 28, 2024, 02:46:13 pm by Alex Nikitin »
 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 3329
  • Country: us
Re: Accurate sine wave in terms of amplitude
« Reply #6 on: April 28, 2024, 02:40:53 pm »
Generating a precise & stable amplitude (and frequency) square-wave isn't difficult, see below.

https://www.eevblog.com/forum/testgear/ac-rms-dmm-tests/

However extracting a precise & stable sine-wave from this square-wave may be more difficult than expected.

Since a waveform's rms value is the sum of all the individual components that make up the waveform, extracting the fundamental from a squarewave requires removing all the harmonics to a level sufficient to guarantee the "precision" of the leftover sinusoidal like waveform relative to a pure sine-wave.

Removing these harmonics entails utilizing a Low Pass filter, which must attenuate the harmonics to sufficient levels to meet the desired precision and stability of the desired resultant waveform but not attenuate the fundamental to effect the desired result.

This may become a tall task if one seeks a high level of precision, and even more so if one demands temperature and time stability. Sure one can "calibrate" the LPF and squarewave but then the circuitry must maintain an acceptable level of temp and time stability after calibration. As shown in the link above, creating a precise low frequency squarewave that is stable in frequency and amplitude over temp and time isn't difficult, converting to an acceptable precision sinusoidal waveform may be another story!!

Best,   
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline sw_guyTopic starter

  • Contributor
  • Posts: 43
  • Country: fi
Re: Accurate sine wave in terms of amplitude
« Reply #7 on: April 28, 2024, 03:29:54 pm »
Generating a precise & stable amplitude (and frequency) square-wave isn't difficult, see below.
However extracting a precise & stable sine-wave from this square-wave may be more difficult than expected.

Fully agree and I am aware of that. Since the frequency is fixed as well as the amplitude, that might be doable well enough. I have to do some testing and thank you for everyone about ideas and considerations.

What could be a proved single opamp for a wien oscillator?
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19633
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Accurate sine wave in terms of amplitude
« Reply #8 on: April 28, 2024, 03:51:46 pm »
What could be a proved single opamp for a wien oscillator?

Anything with sufficient frequency response, and output voltage swing, and drive capability.

Since you still haven't bothered to tell us those parameters, how do you expect us to help you?

In addition, ponder the second paragraph here.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline sw_guyTopic starter

  • Contributor
  • Posts: 43
  • Country: fi
Re: Accurate sine wave in terms of amplitude
« Reply #9 on: April 28, 2024, 04:25:16 pm »
I have never understood replies like tggzzz. Nothing valuable to say, full of negative load. Waiting for missing parameters. Oh well...

Suggested reply for the next time:
"It depends on the frequency response, output voltage and drive capability. Please give us more detailed specifications in order to give exact opamp examples. However, in general, I can say that typical opamps used for low-frequency applications, which are the common use cases for wien oscillators, are for example LT1632, LT1013, LT1001".

or.... just ignore the question.

br,
sw guy
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19633
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Accurate sine wave in terms of amplitude
« Reply #10 on: April 28, 2024, 05:31:32 pm »
I have never understood replies like tggzzz. Nothing valuable to say, full of negative load. Waiting for missing parameters. Oh well...

Suggested reply for the next time:
"It depends on the frequency response, output voltage and drive capability. Please give us more detailed specifications in order to give exact opamp examples. However, in general, I can say that typical opamps used for low-frequency applications, which are the common use cases for wien oscillators, are for example LT1632, LT1013, LT1001".

or.... just ignore the question.

br,
sw guy

Bizarre response. Why spend time and energy avoiding giving the information necessary before people can help you!

Do you actually want to be helped?
« Last Edit: April 28, 2024, 05:33:06 pm by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 7963
  • Country: us
  • Retired, now restoring antique test equipment
Re: Accurate sine wave in terms of amplitude
« Reply #11 on: April 28, 2024, 06:12:45 pm »
Depending on your (apparently secret) requirements, another approach for stabilizing amplitude is to use a “quadrature oscillator”, with a sample-hold triggered by the zero-crossing of the “cosine” output to sample the peak magnitude of the “sine” output.
This was used by Krohn-Hite in some of their older generators (I believe).
More recent units, including the 4402 ultra-low distortion generator, used a fancy peak-to-peak detector.
 
The following users thanked this post: sw_guy

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11926
  • Country: us
Re: Accurate sine wave in terms of amplitude
« Reply #12 on: April 28, 2024, 06:51:38 pm »
However, in general, I can say that typical opamps used for low-frequency applications, which are the common use cases for wien oscillators, are for example LT1632, LT1013, LT1001"

But you didn't say anything about what frequency you are interested in, at all. It could be 1 Hz, 10 Hz, 100 Hz, 1 kHz, 10 kHz, 100 kHz, 1 MHz, 10 MHz, ...

You see the problem? Apparently that is still a secret.

Also you did not say what amplitude you might be interested in? 1 mV, 10 mV, 100 mV, 1 V, ... ?

And the drive current also matters. An oscillator might perform perfectly until you put a load on it, and then it might stop working.

Do you have any spec for THD?
« Last Edit: April 28, 2024, 07:52:58 pm by IanB »
 

Offline sw_guyTopic starter

  • Contributor
  • Posts: 43
  • Country: fi
Re: Accurate sine wave in terms of amplitude
« Reply #13 on: April 28, 2024, 08:08:28 pm »
>Depending on your (apparently secret) requirements...

Or I simply don't know yet. Pretty much all the requirements (=the rest of the circuit) depend on what kind of signal I can generate. The frequency can be between 1-10kHz. Amplitude can be between 200mV and 5V. I don't know how much THD (or any other parameter) affects to the device. I need to finish the design, build the device and test. And then probably, re-design the circuit, build another device and test again. Maybe at this point I actually know all the key parameters, including if THD matters or not.

But I do know today that I am iterating options how to generate sine wave - as clarified in the initial message including an example circuit.

Quadrature oscillator might be "the fresh idea I was looking for". Just that none of the first examples I tried to simulate on LTspice didn't work. Like this one:
2149954-0

Probably a simulation related issue - I need to analyze it further...

sw guy
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1574
  • Country: au
Re: Accurate sine wave in terms of amplitude
« Reply #14 on: April 28, 2024, 08:25:42 pm »
>What is the target distortion ?
I do not know yet.
It seems there is a lot you do not know. The frequency and amplitude are important info, even ballparks ?

What is the intended purpose of this signal, you must know at least that ?
eg is it to calibrate meters ?

One option is that: do not care. I can measure what the amplitude is and then do the math one way or another.

Then you need a precision rectifier. Also non trivial, but easier at low frequencies.

You can assist the LPF design, by using a shaped stepped sine generated digitally, using simple CMOS counters/gates and resistors.

Or a small MCU with a DAC, can do most of the work, at lower frequencies.  This is why the parameters matter.


 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11926
  • Country: us
Re: Accurate sine wave in terms of amplitude
« Reply #15 on: April 28, 2024, 08:55:54 pm »
Or I simply don't know yet. Pretty much all the requirements (=the rest of the circuit) depend on what kind of signal I can generate. The frequency can be between 1-10kHz. Amplitude can be between 200mV and 5V. I don't know how much THD (or any other parameter) affects to the device. I need to finish the design, build the device and test. And then probably, re-design the circuit, build another device and test again. Maybe at this point I actually know all the key parameters, including if THD matters or not.

Ah. Seems familiar. Do you develop software by any chance?
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1574
  • Country: au
Re: Accurate sine wave in terms of amplitude
« Reply #16 on: April 28, 2024, 09:03:35 pm »
The frequency can be between 1-10kHz.
 Amplitude can be between 200mV and 5V. I don't know how much THD (or any other parameter) affects to the device.

Do you need to adjust this generator across 1-10kHz and 200mV-5V ?

Quote
I don't know how much THD (or any other parameter) affects to the device. I need to finish the design, build the device and test. And then probably, re-design the circuit, build another device and test again. Maybe at this point I actually know all the key parameters, including if THD matters or not.

Then you are probably best to get a simple, low cost MCU based DDS function generator module from AliExpress, that can easily and quickly cover your range while you determine what you really do need.

One example : https://www.aliexpress.us/item/1005005520278651.html
« Last Edit: April 29, 2024, 12:45:08 am by PCB.Wiz »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19633
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Accurate sine wave in terms of amplitude
« Reply #17 on: April 28, 2024, 09:43:21 pm »
>Depending on your (apparently secret) requirements...

Or I simply don't know yet. Pretty much all the requirements (=the rest of the circuit) depend on what kind of signal I can generate. The frequency can be between 1-10kHz. Amplitude can be between 200mV and 5V. I don't know how much THD (or any other parameter) affects to the device. I need to finish the design, build the device and test. And then probably, re-design the circuit, build another device and test again. Maybe at this point I actually know all the key parameters, including if THD matters or not.

But I do know today that I am iterating options how to generate sine wave - as clarified in the initial message including an example circuit.

Quadrature oscillator might be "the fresh idea I was looking for". Just that none of the first examples I tried to simulate on LTspice didn't work. Like this one:
(Attachment Link)

Probably a simulation related issue - I need to analyze it further...

sw guy

Now why couldn't you have simply said that earlier? A lot of time would have been saved.

Your first task is system modelling, to calculate what should work.
Your second task is system design and simulation, to determine allowable tolerances.
Your third task is detailed design, simulation, to verify you can implement the system.
Your fourth task is to build and test.

You are asking us about task 3, without having done tasks 1 and 2. That is bound to fail, slowly and messily.

You are doing the equivalent of jumping straight into coding, without having requirements nor architecture. See the problem?

Once you have a successful system simulation, e.g. using a spice sine wave voltage source, you can build a lab prototype using an off the shelf function generator. Only after the lab prototype is.working does it become worth considering  implementing your own generator.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Majorassburn

  • Regular Contributor
  • *
  • !
  • Posts: 95
  • Country: us
Re: Accurate sine wave in terms of amplitude
« Reply #18 on: April 28, 2024, 11:17:46 pm »
What could be a proved single opamp for a wien oscillator?

Anything with sufficient frequency response, and output voltage swing, and drive capability.

Since you still haven't bothered to tell us those parameters, how do you expect us to help you?

In addition, ponder the second paragraph here.

More thread-choking negativity and useless crap from tggzzz.  :blah: :blah: :blah:
He's a real thread-killer if I ever saw one!

Your question about op amps?  I use T.I. OP07's with excellent results in my low frequency sine wave oscillators.
Data Sheet link: https://www.ti.com/lit/ds/symlink/op07c.pdf?ts=1714331934514&ref_url=https%253A%252F%252Fwww.google.com%252F

Also, check out the numerous TI App Notes for oscillator designs with sample circuitry you might use as starting points. Best Regards.
« Last Edit: April 28, 2024, 11:22:03 pm by Majorassburn »
 
The following users thanked this post: sw_guy

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19633
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Accurate sine wave in terms of amplitude
« Reply #19 on: April 29, 2024, 12:22:12 am »
What could be a proved single opamp for a wien oscillator?

Anything with sufficient frequency response, and output voltage swing, and drive capability.

Since you still haven't bothered to tell us those parameters, how do you expect us to help you?

In addition, ponder the second paragraph here.

More thread-choking negativity and useless crap from tggzzz.  :blah: :blah: :blah:
He's a real thread-killer if I ever saw one!

Your question about op amps?  I use T.I. OP07's with excellent results in my low frequency sine wave oscillators.
Data Sheet link: https://www.ti.com/lit/ds/symlink/op07c.pdf?ts=1714331934514&ref_url=https%253A%252F%252Fwww.google.com%252F

Also, check out the numerous TI App Notes for oscillator designs with sample circuitry you might use as starting points. Best Regards.

The context is these threads from MajorAssBurn:
https://www.eevblog.com/forum/buysellwanted/fs-affordable-dmm-checkers-ac-reference-dc-reference-ohms-reference-etc/msg5463700/#msg5463700
https://www.eevblog.com/forum/metrology/affordable-useful-ac-dc-references/msg5438690/#msg5438690
Anybody with too much time on their hands can read those. They will, no doubt, notice that many people have made negative comments about MajorAssBurn's claims in those threads.

BTW, it isn't good practice to read the first couple of posts in a thread and then jump to conclusions without reading the rest of the thread.
« Last Edit: April 29, 2024, 12:24:15 am by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16655
  • Country: us
  • DavidH
Re: Accurate sine wave in terms of amplitude
« Reply #20 on: April 29, 2024, 12:29:34 am »
In the application note: https://www.analog.com/media/en/technical-documentation/application-notes/an43f.pdf
from page 30 onwards a number of precision Wein Bridge cicuits are suggested with temperature compensated amplitude, they use a pair of matched diodes or two diodes in close contact.

That is how a sine source is leveled.  Detection can be done in many ways including a temperature compensated diode rectifier, RMS detector, or at lower frequencies even a precision rectifier.  I am sure I have seen a design where a sampler was used to synchronously detect the peak of the sine wave.
 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 1774
  • Country: au
Re: Accurate sine wave in terms of amplitude
« Reply #21 on: April 29, 2024, 12:47:10 am »
I am sure I have seen a design where a sampler was used to synchronously detect the peak of the sine wave.
Did that previously when our lab had to add a noise source to the dither signal of laser gyro, did a cycle by cycle comparison, a bit more complex but low ripple and delay.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1574
  • Country: au
Re: Accurate sine wave in terms of amplitude
« Reply #22 on: April 29, 2024, 01:01:49 am »
But I do know today that I am iterating options how to generate sine wave - as clarified in the initial message including an example circuit.

Quadrature oscillator might be "the fresh idea I was looking for". Just that none of the first examples I tried to simulate on LTspice didn't work. Like this one:
Probably a simulation related issue - I need to analyze it further...

Whilst that circuit has two waveform at 90', it also has 3 RC elements, so it is less suited to a knob controlled oscillator.
When simulating such oscillators, you need to adjust the idealized gain, to account for real opamp effects.
You then find a trade off between oscillator startup time and clipping of one node when stable.




 

Offline Majorassburn

  • Regular Contributor
  • *
  • !
  • Posts: 95
  • Country: us
Re: Accurate sine wave in terms of amplitude
« Reply #23 on: April 29, 2024, 02:05:21 pm »
What could be a proved single opamp for a wien oscillator?

Anything with sufficient frequency response, and output voltage swing, and drive capability.

Since you still haven't bothered to tell us those parameters, how do you expect us to help you?

In addition, ponder the second paragraph here.

More thread-choking negativity and useless crap from tggzzz.  :blah: :blah: :blah:
He's a real thread-killer if I ever saw one!

Your question about op amps?  I use T.I. OP07's with excellent results in my low frequency sine wave oscillators.
Data Sheet link: https://www.ti.com/lit/ds/symlink/op07c.pdf?ts=1714331934514&ref_url=https%253A%252F%252Fwww.google.com%252F

Also, check out the numerous TI App Notes for oscillator designs with sample circuitry you might use as starting points. Best Regards.

The context is these threads from MajorAssBurn:
https://www.eevblog.com/forum/buysellwanted/fs-affordable-dmm-checkers-ac-reference-dc-reference-ohms-reference-etc/msg5463700/#msg5463700
https://www.eevblog.com/forum/metrology/affordable-useful-ac-dc-references/msg5438690/#msg5438690
Anybody with too much time on their hands can read those. They will, no doubt, notice that many people have made negative comments about MajorAssBurn's claims in those threads.

BTW, it isn't good practice to read the first couple of posts in a thread and then jump to conclusions without reading the rest of the thread.
I have this mental image of tggzzz sitting in his week-old undies and moth-eaten robe, in the corner of his tiny, gloomy, cold-water flat, in a poverty-stricken slum section of Birmingham, pecking away at his twenty-year-old Pentium computer while desperately searching forums and threads for topics wherein he can spew out his unwelcome drivel and negativity and display his legendary (in his own mind) philosophical and technical superiority as compared to the woefully ignorant and uninformed commoners who participate in these threads looking for useful suggestions from fellow members, as he, the self-ordained master of thread imposition, reflects within himself how utterly failed as a human being he is, as he seeks out these thread-killing opportunities so as to feel somewhat compensated for his lifelong worthlessness and complete failure to achieve anything noteworthy or meaningful.

Now, with those facts in mind, I will ignore all further written diarrhea that tggzzz dumps in various discussions from now on.  :horse:

 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19633
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Accurate sine wave in terms of amplitude
« Reply #24 on: April 29, 2024, 02:36:37 pm »
What could be a proved single opamp for a wien oscillator?

Anything with sufficient frequency response, and output voltage swing, and drive capability.

Since you still haven't bothered to tell us those parameters, how do you expect us to help you?

In addition, ponder the second paragraph here.

More thread-choking negativity and useless crap from tggzzz.  :blah: :blah: :blah:
He's a real thread-killer if I ever saw one!

Your question about op amps?  I use T.I. OP07's with excellent results in my low frequency sine wave oscillators.
Data Sheet link: https://www.ti.com/lit/ds/symlink/op07c.pdf?ts=1714331934514&ref_url=https%253A%252F%252Fwww.google.com%252F

Also, check out the numerous TI App Notes for oscillator designs with sample circuitry you might use as starting points. Best Regards.

The context is these threads from MajorAssBurn:
https://www.eevblog.com/forum/buysellwanted/fs-affordable-dmm-checkers-ac-reference-dc-reference-ohms-reference-etc/msg5463700/#msg5463700
https://www.eevblog.com/forum/metrology/affordable-useful-ac-dc-references/msg5438690/#msg5438690
Anybody with too much time on their hands can read those. They will, no doubt, notice that many people have made negative comments about MajorAssBurn's claims in those threads.

BTW, it isn't good practice to read the first couple of posts in a thread and then jump to conclusions without reading the rest of the thread.
I have this mental image of tggzzz sitting in his week-old undies and moth-eaten robe, in the corner of his tiny, gloomy, cold-water flat, in a poverty-stricken slum section of Birmingham, pecking away at his twenty-year-old Pentium computer while desperately searching forums and threads for topics wherein he can spew out his unwelcome drivel and negativity and display his legendary (in his own mind) philosophical and technical superiority as compared to the woefully ignorant and uninformed commoners who participate in these threads looking for useful suggestions from fellow members, as he, the self-ordained master of thread imposition, reflects within himself how utterly failed as a human being he is, as he seeks out these thread-killing opportunities so as to feel somewhat compensated for his lifelong worthlessness and complete failure to achieve anything noteworthy or meaningful.

Now, with those facts in mind, I will ignore all further written diarrhea that tggzzz dumps in various discussions from now on.  :horse:

That's an excellent response focussed on the technical aspects of the threads. Good to see you've avoided ad-hominem attacks.

Hint: to ignore me, simply add my moniker to your Profile->Modify Profile->Buddies/Ignore list.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: Zucca


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf