ultra-low distortion audio oscillator

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
hi all,

recently i've gotten the itch to map out a design for a circuit/system which would measure the THD+N and frequency response of a homebrew amplifier. the main design goals are low cost, practical assembly, and relatively good performance. essentially, a tuneable harmonic oscillator sends a signal through the amp under test and another signal without modification to audio ADCs, which relay the measured data, via microcontroller, to a PC for FFT analysis.

however, i'm more experienced in digital circuits, so i'm not sure where to start on the oscillator circuit. a PTC- or FET-stabilized Wien bridge seems fairly straightforward, but using 8-bit digital pots on its tuning resistors would yield a frequency output floor of 176Hz. on the other hand, a 16-bit voltage reference (fMIN<1Hz) for a VCO is feasible with digital pots, but most VCOs i've run into function in the MHz-GHz range only.

essentially my question is: how can i build a digitally tuneable harmonic oscillator with low distortion (-75dB or less) and high frequency output resolution (~1Hz)?

thanks alot!
~ brad.
 

Attachments

  • out2.png
    out2.png
    79.4 KB · Views: 1,963
Ex-Moderator
Joined 2003
Low distortion and digipots do not go together. -75dB isn't really low distortion, -100dB would be a better figure to aim for. Why do you need digital control? Linear Technology has an Application Note for a stunningly low distortion oscillator (fixed frequency). I find that it's rare to need to measure distortion as function of frequency when you're designing audio, but spot frequencies like 10Hz, 60Hz, 100Hz, 1kHz and 10kHz are very useful. If you really want to keep it simple, find an old valve Wien bridge audio oscillator and gut it for the variable capacitor and tuning scale, then wrap a modern op-amp circuit around it.

I have to warn you that making your own test equipment is far more expensive than it appears on the surface. You need a wide range of output voltages, so that means making stepped attenuators. Similarly, your ADCs will need the signal to arrive at the right level so as to maintain their dynamic range, and that means you need a variable gain amplifier with a wide range. More stepped attenuators. And the variable gain amplifier must have unmeasurable (on your kit) distortion and low noise. Achievable, but not easy.

You may find it easier to resort to a good soundcard and some simple attenuators...
 
Administrator
Joined 2004
Paid Member
Hi geekysuavo,
I agree completely with EC8010. However, it's a good exercise to look into. Look around for super low distortion and noise signal amplifiers. They will determine your noise floor and frequency range. That's for starters.

Your project is possible to do. These are made commercially, but cost a great deal of money. The easy way to approach the problem would be to use a PIC processor and interface that to some of the DDS products from Analog Devices. Then you have to work on attenuators and distortion. Of course, you could also calculate your sine and use a D/A converter to generate your signal. More processing, but the bigger PIC processors could probably handle this. Run your data into the D/A at a higher rate to extend the frequency range and relax your reconstruction filter slopes.

Why not continue investigating? I'm sure there are some members here who could really help. I'll mention that I would be interested to see where you go with this.

Would you like to have me move your thread into the digital section? Your analog part of the design might be better here. You can divide your project into the analog and digital sections.

-Chris
 
Administrator
Joined 2004
Paid Member
Hi Brad,
Continue your analog stuff here and start one in the digital section to deal with the different ways to create your signal in the digital realm.

A wien bridge oscillator may give good performance, but the other methods will be more stable and settle faster. Changing frequency may shift your amplitude around some. It will certainly "bounce".

A phase shift oscillator may provide lower distortion, there are certainly other methods out there also.

The only way to truly decide what is better (lower THD in practice) would be to build single frequency circuits and measure them. Once you know what effects slight mis-match in components will do, you can judge if the method will work for you. All my wien oscillators are single frequency after trying the variable thing. Mind you, new parts so who knows?

-Chris
 
thanks for all the info. i'd rather not use something like rightmark, as i use linux and would prefer the learning experience of building such a device, even if it performs less well.

i'm looking at the novel sinewave generation method described here:
http://www.maxim-ic.com/appnotes.cfm/an_pk/2081
but instead of the MAX7400, using a MAX297 would allow for a frequency range of 0.1Hz-50kHz with reasonable distortion. thoughts?

again, thanks for the info!
~ brad.
 
Administrator
Joined 2004
Paid Member
Hi Brad,
This idea is well over 15 years old, or older now. National Semiconductor may have the original app. note on it.

The problem? Distortion and residuals.

Good digging though, keep it up. Right now my feeling is that sending audio data to something like a Burr-Brown (TI now) PCM1704 would be your best answer. Just my opinion. Most of the heavy lifting can be done in software and you simply use the D/A to output your signal. Of course, now you have the interesting proposition of using the same system as an arbitrary waveform generator. Now, that's cool! All your basic waveforms can be generated. Sine, sawtooth, square (why not?), ramps both ways (very linear ones) and specialized things like a simulated diode rectification waveform to be able to simulate noise from a power supply.

That would be incredibly useful to most members, myself included. This is a little exciting. Hardware that is totally flexible for any output waveform. What a project!

BTW, look at the specs for the PCB 1704. They are far better than what you will achieve with anything you have seen so far.

-Chris
 
anatech said:
That would be incredibly useful to most members, myself included. This is a little exciting. Hardware that is totally flexible for any output waveform. What a project!

i would have to agree with that. DDS from the PCM1704 could be paired with analog-to-digital conversion from a PCM1804 to provide a flexible analysis tool, instead of just generating pure tones... though it's basically a novelty soundcard now, lol! ;) i'll look into it, most definitely.

~ brad.
 
Administrator
Joined 2004
Paid Member
Hi Brad,
DDS from the PCM1704 could be paired with analog-to-digital conversion from a PCM1804 to provide a flexible analysis tool, instead of just generating pure tones... though it's basically a novelty soundcard now
Hardly!
Now you are beginning to chase an Audio Precision type system. The generator and A/D sections are two completely different projects that could be included in the same case. Note I didn't mention "card", as in "installed in a computer".

To get the low noise and THD you want, plus input and output signal conditioning, you would need a larger box free from switching power supply noise. It would help to ventilate some of the components that would run warm. That's a side effect of chasing the low noise figures. It's no mistake that AP used an external box for all the analog signal processing. It's all done for a very good reason.

My X-fi Extreme music is a sound card. This is an instrument.

-Chris
 
Ex-Moderator
Joined 2003
Square waves are best generated in the analogue domain. Since (for audio) we're concerned mostly with the rise time or the flatness across the top, there's a very good way of generating suitable waves. Use a mercury-wetted relay switched at mains frequency to direct a floating DC supply to the output terminals. You can now use a 10 turn wirewound pot (with dial) to adjust the DC voltage of the (regulated supply), giving you a very accurately calibrated square wave with a rise time in ps (picoseconds). Definitely good enough for audio. The fact that it can only repeat at mains frequency isn't a problem because we look at the edge for HF and the top for LF.
 
Scott Wurcer chimed in on this thread:

http://www.diyaudio.com/forums/showthread.php?s=&threadid=141271&highlight=

there's a link to an EDN article to be found.

I built the "Eager Oscillator" (paen to Dale Eagar who wrote the Linear Tech Application Note) -- aka "Uber Oscillator" and describe it here:

http://www.tech-diy.com/TestEquipment/SuperOscillator/super_oscillator.htm


An externally hosted image should be here but it was not working when we last tested it.


For ease of application, I wouldn't recommend the uberoscillator -- instead look for Bob Cordell's version of the SG-505 on his website.
 
Administrator
Joined 2004
Paid Member
Hi EC8010,
I have to agree with both your points on square waves. I must admit that I'm lazy and either use my generator output, or an HP pulse generator I bought for that purpose. Your relays may in fact do a better job of creating a square wave.

The buzz let's you know it's on! :cool:

Hi Jack,
Completely forgot about the SG-505 clone, I'll have t read up on the "Eager Oscillator".

Thank you for the links!

-Chris
 
i would have to agree with that. DDS from the PCM1704 could be paired with analog-to-digital conversion from a PCM1804 to provide a flexible analysis tool, instead of just generating pure tones... though it's basically a novelty soundcard now, lol! ;) i'll look into it, most definitely.

~ brad.

Hi Brad,
I want you to look at this circuit.
Perhaps it is useful to you?.

An externally hosted image should be here but it was not working when we last tested it.


Low-distortion Audio-range Oscillator using NE5532
 
Disabled Account
Joined 2012
You might enjoy not reinventing the wheel as this has been started already over in another section.... been going on awhile and in various stages... oscillators and analyzers. I am modifying existing oscillators at this time and am down to reading my osc at -140db 2H and 3H so far. ... modified KH4402B.

Thx-RNMarsh
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.