Low-distortion Audio-range Oscillator

Member
Joined 2004
Paid Member
Hi Demian,

Dead link there.

The link is live again. It describes how the Agilent 3458 DVM gets exceptionally accurate AC voltage measurement (3 ppm) with undersampling. The max sample rate is 250 /second I think and it measures TRMS to 150 KHz. I think you could apply the same principle with a PIC (not get 3 ppm) but get good enough accuracy pretty easily with its internal adc. Add a mux and a good vref to self cal periodically to improve long term stability.

Another option if you are looking at pure sine waves is to borrow from an incremental voltmeter. You could amplifiy just the voltage range +/- 5% around the peak voltage to match the range of the ADC. If no samples are in range need more gain in the oscillator. If samples hit the positive limit reduce. The max voltage of any sample would be the peak value + noise + ADC errors. Collect and look at samples and you can determine the frequency as well as the max amplitude.

What frequency resolution and accuracy are you seeking? For that matter voltage accuracy and stability etc? SG's question is relevant since these all affect the device design and component performance.
 
I don't need a fast detector for what I'm doing. These methods wouldn't work for a conventional multiplier like a Jfet type. Other detection methods are being discussed for an already stabilized loop that just needs to be brought to a reference level.

A slow loop still needs to meet stability constraints... And if the loop is slow you can much more easily apply lots of low-pass filtering, so why looking for anything more than a simple two-way rectifier? I think the problem you're facing has been solved already by many others, so don't try to re-invent the wheel!

There is an 1968 IEEE paper which shows exactly what you want to do (as far as I understand)--"fast" stabilization by a thermistor/lamp, and slow stabilization by a linear leveling loop:

Skehan, B.J.
Design of an amplitude-stable sine-wave oscillator
Solid-State Circuits, IEEE Journal of
Sept. 1968, Volume 3, Issue 3

Samuel
 
The link is live again. It describes how the Agilent 3458 DVM gets exceptionally accurate AC voltage measurement (3 ppm) with undersampling. The max sample rate is 250 /second I think and it measures TRMS to 150 KHz. I think you could apply the same principle with a PIC (not get 3 ppm) but get good enough accuracy pretty easily with its internal adc. Add a mux and a good vref to self cal periodically to improve long term stability.

Another option if you are looking at pure sine waves is to borrow from an incremental voltmeter. You could amplifiy just the voltage range +/- 5% around the peak voltage to match the range of the ADC. If no samples are in range need more gain in the oscillator. If samples hit the positive limit reduce. The max voltage of any sample would be the peak value + noise + ADC errors. Collect and look at samples and you can determine the frequency as well as the max amplitude.

What frequency resolution and accuracy are you seeking? For that matter voltage accuracy and stability etc? SG's question is relevant since these all affect the device design and component performance.

Hi Demian,

Thanks for the link.
I got a 401 a couple time. Dimitri sent me the pdf. I tried the link again and it worked the third time. My internet been acting weird lately.

The PIC has 13 analog IO two of which are reference inputs. Two comparators. Two event captures on either rising or falling edges. SPI, USB, 4 timers and more IO ports than you know what to do with. This is alll hardware modules separate from the processor. All in a 28 pin dip package. Quite handy little device. But still not suitable for real time work over 1KHz on the SPI side. I do have it setup for frequency counting 1Hz resolution 40MHz.

What your suggesting with the incremental voltmeter is technique that artificially increases
an ADC's resolution. This can also be helped along by narrowing the ADC input range by setting the reference higher and offsetting the (-) input pin. The PIC has pins for this option. If we can cram the 10bits into a 78.125mV span we have an equivalent resolution to 16bit over a 5V span. This can be set up with switches and a voltage diver network.
Sample once 10bit over 5V span then close in to 10 bit over a 78.125mV and a bit of math can make up a 16 bit word. Send that to a 16 bit DAC. If the PIC had two ADC this could be done simultaneously. I suppose the comparators could be used to find the coarse and then the ADC to do the fine.

It's a lot of fuss though and can make a guy's head hurt figuring it all out.

Cheers,
 
Last edited:
LDR sub for the 339A's E1 or E2 Vactrol

I've been following this thread with some interest, especially as it dwelt on the HP 339A for a while. Coincidentally, my 339A's E2 has failed open circuit on the LED side. The design note and data sheet from PE/Vactec was useful but I'm still unsure if the part used by HP maps to one of those listed therein. Stabbing in the dark I've ordered one each of the VTL5C1 and VTL5C2 but wonder if any of you have determined a contemporary replacement. My 339A is stock.
 
I've been following this thread with some interest, especially as it dwelt on the HP 339A for a while. Coincidentally, my 339A's E2 has failed open circuit on the LED side. The design note and data sheet from PE/Vactec was useful but I'm still unsure if the part used by HP maps to one of those listed therein. Stabbing in the dark I've ordered one each of the VTL5C1 and VTL5C2 but wonder if any of you have determined a contemporary replacement. My 339A is stock.

Hi John,

Not sure if those will work.

One thing you can try is to break the epoxy out on the LED side and find an LED to replace the one that's open. No doubt you can find some black epoxy at your local hardware store.

Cheers,
 
Disabled Account
Joined 2012
LDR vs THD

I mentioned 2 things which I still think are important but got glossed over -- dual stage opamp for increased feedback to reduce distortion and the LDR/jFET doesnt seem to be the most important in reducing further thd.

Now I saw an oscillator in TMW that is -145db. It uses a LDR for level control (NSL32SR3)... so that kinda proves it isn't much of a thd limiting factor. And, two LME49710 in series. I would like to see if Victor can make a few pcb with the circuit. And, how hard would it be to do something similar in the 339A?

-RNMarsh
I copied the schematic from here:

www.tmworld.com/photo/297/297122-TMW_oscillator_fig1.jpg
 
Last edited:
Member
Joined 2009
Paid Member
I have followed this thread for some time now. I have also looked at the one you link to RNMarsh. In fact I am working on a PCB for that one + the notch filter. It has been at a slow pace though, so I have not finished it yet. And you guys keep throwing in new ideas on how to do the feedback control :)

It may be worth trying though, so maybe I will also prepare the PCB for a FET based solution. Perhaps with and without the PV device.

There seems to be some errors in the schematic you linked to. Some parts are a bit difficult to read and some values are missing. You should go to

Download

and download the "bonus". This seems to be a corrected version and easier to read.

I plan to modify it to run at 1 kHz, but still with an option to mount the components for 2 kHz operation, just in case. I have the key components like the LME49710, styroflex capacitors and the LDR already, so I just need to finish the layout and mount it.
I will need to get some of the resistor values. I am doing most of it as SMD, but I am in doubt whether I should put in leaded resistors (or the option to use either SMD or leaded). The styroflex capacitors are of course leaded.
 
I have followed this thread for some time now. I have also looked at the one you link to RNMarsh. In fact I am working on a PCB for that one + the notch filter. It has been at a slow pace though, so I have not finished it yet. And you guys keep throwing in new ideas on how to do the feedback control :)

It may be worth trying though, so maybe I will also prepare the PCB for a FET based solution. Perhaps with and without the PV device.

There seems to be some errors in the schematic you linked to. Some parts are a bit difficult to read and some values are missing. You should go to

Download

and download the "bonus". This seems to be a corrected version and easier to read.

I plan to modify it to run at 1 kHz, but still with an option to mount the components for 2 kHz operation, just in case. I have the key components like the LME49710, styroflex capacitors and the LDR already, so I just need to finish the layout and mount it.
I will need to get some of the resistor values. I am doing most of it as SMD, but I am in doubt whether I should put in leaded resistors (or the option to use either SMD or leaded). The styroflex capacitors are of course leaded.

One comment, you have divided the AGC range so low that a 100Hz or lower oscillator may be impractical to adjust.
 
Replacing the LED fixed my 339A's E1 LDR

Hi John,

Not sure if those will work.

One thing you can try is to break the epoxy out on the LED side and find an LED to replace the one that's open. No doubt you can find some black epoxy at your local hardware store.

Cheers,

David, I got antsy and decided what the heck, the LDR I have is toast so why not try David's suggestion since the parts I ordered aren't here and won't be for a few days.

I used a bench grinder to work from the LED end of the LDR towards the VR cell. At about 1/8th inch in I could see, and remove, the clear lens of the original LED from the "tunnel" it resided in. I bought a 20mA, 2.1V, 1900mcd Yellow LED with a clear lens. I had to cut the lens diameter down to fit it into the "tunnel." I then checked and, indeed the device shifted rapidly away from its dark resistance as the LED was fed current. At this point I went ahead and used black RTV to make the assemblage into a single unit and installed it into the 339A.

It works! The shape and level of the residual appears on my scope as it did prior to the 339A failing.

Thanks for the inspiration. I'm delighted.

John
 
David, I got antsy and decided what the heck, the LDR I have is toast so why not try David's suggestion since the parts I ordered aren't here and won't be for a few days.

I used a bench grinder to work from the LED end of the LDR towards the VR cell. At about 1/8th inch in I could see, and remove, the clear lens of the original LED from the "tunnel" it resided in. I bought a 20mA, 2.1V, 1900mcd Yellow LED with a clear lens. I had to cut the lens diameter down to fit it into the "tunnel." I then checked and, indeed the device shifted rapidly away from its dark resistance as the LED was fed current. At this point I went ahead and used black RTV to make the assemblage into a single unit and installed it into the 339A.

It works! The shape and level of the residual appears on my scope as it did prior to the 339A failing.

Thanks for the inspiration. I'm delighted.

John

Hi John,

I'm glad it worked out for you.

I think this approach is probably less frustrating then trying to get a different LDR to work in there. HP was picky with some parts used in the 339a and they are listed as selected.

Maybe you can post the part number for the LED you used.

Cheers,

David.
 
I mentioned 2 things which I still think are important but got glossed over -- dual stage opamp for increased feedback to reduce distortion and the LDR/jFET doesnt seem to be the most important in reducing further thd.

Now I saw an oscillator in TMW that is -145db. It uses a LDR for level control (NSL32SR3)... so that kinda proves it isn't much of a thd limiting factor. And, two LME49710 in series. I would like to see if Victor can make a few pcb with the circuit. And, how hard would it be to do something similar in the 339A?

-RNMarsh
I copied the schematic from here:

www.tmworld.com/photo/297/297122-TMW_oscillator_fig1.jpg

Hi Rick,

The amount of distortion contributed by a LDR/Jfet depends partly on it's involvement. If it's only handling a tiny amount of change in the loop gain then the distortion will be low.
This will work in a fixed frequency oscillator but there would be enough range for variable frequency oscillator like the 339a.

What's the value of R16 in the schematic you linked to?
 
Hi Rick,

The amount of distortion contributed by a LDR/Jfet depends partly on it's involvement. If it's only handling a tiny amount of change in the loop gain then the distortion will be low.
This will work in a fixed frequency oscillator but there would be enough range for variable frequency oscillator like the 339a.

What's the value of R16 in the schematic you linked to?

'but there would be enough range for variable frequency oscillator like the 339a."

This should read 'but there wouldn't be enough range for a variable frequency oscillator like the 339a'.
 
Disabled Account
Joined 2012
Hi Rick,

The amount of distortion contributed by a LDR/Jfet depends partly on it's involvement. If it's only handling a tiny amount of change in the loop gain then the distortion will be low.
This will work in a fixed frequency oscillator but there would be enough range for variable frequency oscillator like the 339a.

What's the value of R16 in the schematic you linked to?

18 Ohms. see the original and twin-T et al at:
www. janascard.cz

Thx-RNMarsh
 
Last edited:
Now I saw an oscillator in TMW that is -145 dB.

I think I've commented on this design before--I would not say that "this oscillator has -145 dB distortion", I'd say that "the authors believe that this oscillator has -145 dB distortion". Their measurement setup is very questionable (they have rheostat-connected trimmers in the direct signal path of the notch filter, which is a substantial invitation for distortion at these levels), and they have not cross-validated their result with a different measurement setup. There is simply no establish method to reliably measure distortion below the -130 dB level, so any claims at and below this level must be looked at with highest scepticism.

It uses a LDR for level control (NSL32SR3)... so that kinda proves it isn't much of a THD limiting factor.

It doesn't prove anything--because the distortion contribution from the multiplier element is not just a function of its inherent distortion performance, but equally as much of its decoupling. If you can stand very low multiplier authority (i.e. a lot of decoupling, and resulting long settling time), its quite easy to make a low distortion oscillator even with a mediocre multiplier (and level detector). The pudding is about making a low distortion oscillator with reasonable settling time (whatever this may be for a particular application--just saying that at 10 Hz, 1000 cycles are awfully long). Also see my rather long post back in this thread about the THAT1281-based multiplier.

Samuel