precsion oscillators? - Page 1
Forum section: electronics / projects

author: ftransform
author_rank: Frequent Contributor
timestamp: May 17, 2013, 07:37:29 am
content: So, I need two sine wave oscillators, 50khz and 100khzWhat is the modern way of doing this? I would like things to be precise. Should I just go with two DAC's, or is making some kind of op-amp circuit (like a wein bridge oscillator) a better idea?I figure that using a DAC with a high speed micro-controller is probably the better solution, but are there any benefits to using op-amps or crystals in this kind of audio frequency range?Could I maybe generate a 100khz sine wave with a DAC and then use some kind of circuit to divide the sine wave frequency? Is this even possible? Is this more practical then two dacs? is such circuit the type of circuit that will have me cursing alot?a forum posthttp://forum.allaboutcircuits.com/showthread.php?t=2250&page=2says I could use an analog multiplier"If it has to be a sine wave, an analog multiplier might do the job with the input signal tied to both multiplier inputs. The square of a sine wave contains frequencies at the second harmonic only. There are chips which work at RF frequencies that are designed to do this also. They are generally used to create signals beyond the range of traditional oscilllators, in the hundreds of megahertz to hundreds of gigahertz range."Does this mean that I could use the output of a analog multiplier chip configured in such a fashion + a low pass filter to filter out the harmonics that it makes? And then if I want the two waves to be in phase I could use a phase shift circuit to match them up?Or will a dac generating 50KHz produce a useable 100KHz harmonic that I can filter and amplify?

author: trevwhite
author_rank: Frequent Contributor
timestamp: May 17, 2013, 07:57:45 am
content: You could use an AD9850. There are loads of them on ebayhttp://www.ebay.co.uk/sch/i.html?_trksid=p5197.m570.l1313.TR10.TRC0&_nkw=ad9850&_sacat=0&_from=R40

author: Paul Price
author_rank: Super Contributor
timestamp: May 17, 2013, 08:07:28 am
content: ANALOG DEVICES - AD9835BRUZ - IC, DAC, DDS 50 MHZ SERIAL 5V

author: Skimask
author_rank: Super Contributor
timestamp: May 17, 2013, 09:23:36 am
content: Quote from: trevwhite on May 17, 2013, 07:57:45 amI can vouch for that.I was thinking I might get burned by a too good of a deal. But, I picked up 4 of them about a month ago for $4.91USD each. Work like a champ from sub-Hz up to around 7Mhz. Above that, the sine wave output starts to distort, but doesn't get really ugly until about ~40Mhz.

author: Dave
author_rank: Super Contributor
timestamp: May 17, 2013, 01:09:01 pm
content: I think a DDS chip is the best solution for you. If you want a spectrally clean output, use a low-pass filter to clean out all the higher harmonics you get from the DDS chip. I suggest using TI'sFilterProto design the filter.Use a precise 10MHz reference oscillator (like an OCXO) to feed the clock input on the DDS chip.

author: Unknown
author_rank: Unknown
timestamp: May 17, 2013, 01:49:26 pm
content: You can do this with a Wien design, one Op-amp see URL:http://www.zen22142.zen.co.uk/Circuits/Testgear/sinegen.htmUnless you need some special output load requirement, this design would probably do the job.

author: Dave
author_rank: Super Contributor
timestamp: May 17, 2013, 02:48:45 pm
content: Quote from: ftransform on May 17, 2013, 07:37:29 amI think we are lacking a vital piece of information:How precise?

author: ftransform
author_rank: Frequent Contributor
timestamp: May 17, 2013, 05:17:45 pm
content: Quote from: Dave on May 17, 2013, 02:48:45 pmI am not sure yet, I just want to know my options.Those DDS chips look nice though.Would I need two though, or could I generate the 50KHz and then filter out and amplify a 100KHz from that?

author: ejeffrey
author_rank: Super Contributor
timestamp: May 17, 2013, 06:14:06 pm
content: Quote from: vlf3 on May 17, 2013, 01:49:26 pmA free-running Wein bridge oscillator is good in terms of spectral purity and simplicity, but terrible in terms of accuracy and drift. You can discipline it to a crystal if you wanted, but that defeats the simplicity point. Also, getting good spectral purity does require some attention to detail in the amplitude stabilization loop. Like all feedback oscillators, it requires non-linearity to work, managing that non-linearity is key to getting good performance.The right way to do this is a DDS, exactly like everyone else is suggesting. Cheap and effective. Frequency accuracy and stability will be determined by the quality of the clock you drive it with. A cheap crystal oscillator will be superior to anything that isn't a crystal, while a TCXO, OCXO, or atomic source will be progressively better. The problems with DDS generators are spurs and clock feedthrough. However, at relatively low frequencies like 100 kHz, the spurs are negligible and the clock is easily filtered.

author: ftransform
author_rank: Frequent Contributor
timestamp: May 17, 2013, 07:01:24 pm
content: So I figure I will use the AD9835.I looked at the AD9850 but they are 20$ each on digikey!, the AD9835 is only 11$ on digikey. plus I think its just a higher frequency chip, which I don't need, unless there are benefits to using a 125MHZ feedclock rather then a 50MHZ feedclock? (easier filtering)?How good are the ebay ones for 3 dollars. How the hell are they selling a whole board for 3$ when the chip itself is 20$?Is it a case of china buying 10000000 of them or are they fakes/quality control rejects/etc?

author: mamalala
author_rank: Unknown
timestamp: May 17, 2013, 07:40:04 pm
content: Quote from: ftransform on May 17, 2013, 07:01:24 pmThe higher the clock frequency of the chip, the "cleaner" the output waveform. What these DDS chips do is rather simple. They have a lookup-table with a cosine waveform, connected to a DAC. The table is in turn connected to an accumulator, to which the frequency-tuning word is constantly added with each input clock pulse. The lookup table has a finite size, naturally, in case of the 9850 it equals 14 bits, IIRC.Imagine the case where you would want 50 MHz out and have 100MHz in. Then you get only two discrete values per full cycle of the output, basically a square-wave. At 25MHz out you already have 4, etc. So the higher the input frequency for a given output frequency, the more discrete steps you have per cycle in the output waveform. The more steps you have, the less filtering you need.BTW, i have successfully used the AD9835 overclocked at 100MHz without problems, and that's the cheap Chinese ones from eBay.Greetings,Chris

author: Dave
author_rank: Super Contributor
timestamp: May 17, 2013, 07:43:50 pm
content: How about using a simple microcontroller and an external DAC. Making a DDS for a fixed low frequency shouldn't be too hard. It's probably the cheapest option.If you want to go even cheaper, you can drop the external DAC and just use an R-2R ladder with a buffer.

author: codeboy2k
author_rank: Super Contributor
timestamp: May 18, 2013, 09:26:03 am
content: Quote from: Dave on May 17, 2013, 07:43:50 pmThis EDN article uses a weighted summing amplifier as a 3-bit DAC, a PIC10F200 and 3 digital output pins to produce a FSK keyer. A Sallen-Key LPF at the output removes the harmonics. The code is designed for 1200Hz and 2200 Hz, perhaps it can be modified for 50kHz and 100kHz. A crystal controlled PIC can be used for frequency accuracy instead of the 10F200. More bits can be added if needed.http://www.edn.com/design/analog/4313815/Simple-FSK-modulator-enables-data-transmission-over-low-speed-linkIt's basically an implementation of what Dave suggested above.

author: Skimask
author_rank: Super Contributor
timestamp: May 18, 2013, 12:11:56 pm
content: Quote from: ftransform on May 17, 2013, 07:01:24 pmI asked myself the same questions. Don't know what the deal is, fakes, rejects, etc. Dunno. Like I said, I got 4, I'm happy.But you're looking for some precision. You could easily desolder the crystal on these ebay DDS modules and replace it with a high quality one.ve7xen posted some 'scope pictures of the output for me and the pictures are accurate.https://www.eevblog.com/forum/index.php?action=post;quote=233719;topic=16990.0That's what I'm getting on my 'scope. I'd post some pictures, but his are much better than what I'd be able to do.Control is dirt simple. SPI interface. Drove mine with a 12F1822 for testing.

author: vk6zgo
author_rank: Super Contributor
timestamp: May 19, 2013, 01:28:57 pm
content: A crystal oscillator on 50kHz,with a splitter/buffer,one output fed to a tuned amplifier at 50kHz to clean up the waveform.The other output to a doubler stage to 100kHz,with another 100kHz tuned stage to remove any fundamental or other harmonics.Both outputs are locked to the same crystal,so both have a high degree of stability.

author: ftransform
author_rank: Frequent Contributor
timestamp: May 19, 2013, 04:48:48 pm
content: Quote from: vk6zgo on May 19, 2013, 01:28:57 pmdoubler stage?

author: PA4TIM
author_rank: Super Contributor
timestamp: May 19, 2013, 04:53:20 pm
content: What about a 10 MHz good (maybe gps locked ) reference, then a prescaler and some dividers to get to 100 Khz.. Then some serious filtering (not difficult at 100 KHz). If the 10MHz drifts 1 Hz (and it will probably not, , your 100 KHz will only drift 0.01Hz.But id less accuracy is OK, take a 1 MHz Xtal. (I have a 100 kHz Xtal but I think those are rare)

author: ejeffrey
author_rank: Super Contributor
timestamp: May 19, 2013, 08:06:16 pm
content: Quote from: PA4TIM on May 19, 2013, 04:53:20 pmA DDS is a much better idea, as the harmonic content is much less so the filtering is much easier. Rejecting the 3rd harmonic of a square wave is not actually that easy regardless of frequency. If you want a lot of attenuation you end up needing a fairly high Q filter, which then becomes sensitive to component values and drift. Even a 3 bit DAC made from microcontroller pins and a few resistors will be dramatically better (at least in terms of harmonic content -- the microcontroller jitter will introduce some phase noise).

author: vk6zgo
author_rank: Super Contributor
timestamp: May 20, 2013, 07:28:57 am
content: Quote from: ftransform on May 19, 2013, 04:48:48 pmA doubler stage is a type of frequency multiplier where the output of an RF amplifier is tuned to twice the frequency to which the input circuit is tuned.This implies a fair amount of non-linearity in the amplifier in order to have enough second harmonic energy to operate successfully,which is why I suggested a tuned RF stage following the doubler,so as to reject any low levelfundamental or third & higher harmonics which may get through.This type of frequency multiplication has been used in the RF field for many years,is easy to get going,& uses only a few components.

author: ftransform
author_rank: Frequent Contributor
timestamp: May 20, 2013, 08:18:57 am
content: Quote from: ejeffrey on May 19, 2013, 08:06:16 pmPA4TIM does not approve of tom foolery like DACs. I do think the non-dac solution is cooler though... DAC is easymode.....

author: Paul Price
author_rank: Super Contributor
timestamp: May 20, 2013, 12:07:24 pm
content: Farnell.comCITIZEN AMERICA - CFV206 100.000KAZF-UB - CRYSTAL, 100KHZ, CYLFarnell Part Number: 1457087Citizen Part Number: CFV206 100.000KAZF-UBCRYSTAL, 100KHZ, CYLFrequency: 100kHzFrequency Tolerance: ± 30ppmLoad Capacitance: 12.5pFOperating Temperature Min: -20°COperating Temperature Max: 70°CCrystal Mounting Type: Through HoleCrystal Case Type: 2mm x 6mmNo. of Pins: 2Operating Temperature Range: -20°C to +70°COutput Frequency: 100.000kHzSeries: CFV206Cost: approx $1 eaUse 1 opamp to make the 100KHz sinewave osc and feed output into a CD4013 D-Flip Flop configured as div/2 to get 50KHz, send attenuated(a single Resistor Capacitor RC filter which kills much of the sq. wave harmonic content) output to the lo-pass filter(see attached below). Bingo you have with precision and purity: 100KHz and 50KHz.The LTC1563-2/LTC1563-3 are a family of easy-to-use, 4th order lowpass filters with rail-to-rail operation. TheLTC1563-2, with a single resistor value, gives a unity-gain filter approximating a Butterworth response. TheLTC1563-3, with a single resistor value, gives a unity-gain filter approximating a Bessel (linear phase) response. Theproprietary architecture of these parts allows for a simple unity-gain resistor calculation:R = 10k(256kHz/fC)where fC is the desired cutoff frequency. For many applications, this formula is all that is needed to design a filter.For example, a 50kHz filter requires a 51.2k resistor. Inpractice, a 51.1k resistor would be used as this is theclosest E96, 1% value available.Or just use 50K resistors and it will work fine since there is no harmonic less than 100KHz in the input.

author: madires
author_rank: Super Contributor
timestamp: May 20, 2013, 12:51:42 pm
content: Quote from: ftransform on May 20, 2013, 08:18:57 amIt's kind of sad that we end up with following quite often:Q: How do I solve such and such problem?A #1: Use a MCU!A #2: I can program that in 5 minutes!

author: Zad
author_rank: Super Contributor
timestamp: May 20, 2013, 04:07:52 pm
content: If you are using an embedded micro then it is relatively trivial to program an interrupt routine to generate 100kHz and 50kHz pulses. Put a 5-pole RC low-pass filter on the pins to remove all the odd-numbered harmonic components and you are sorted.

author: Paul Price
author_rank: Super Contributor
timestamp: May 20, 2013, 04:14:23 pm
content: ZAD,Have you built such a circuit and tested it? This doesn't seem to be an optimal solution because interrupts are jittery and create phase noise and the spikes you output to the filter are troublesome step functions, as spikes cause filters to ring and so your circuit would ring like a 50 and 100KHz bell in regard to output and do a little phase tap dance.

author: codeboy2k
author_rank: Super Contributor
timestamp: May 20, 2013, 06:07:59 pm
content: sounds like we need a video testing all these methods

author: ejeffrey
author_rank: Super Contributor
timestamp: May 20, 2013, 06:11:01 pm
content: Quote from: madires on May 20, 2013, 12:51:42 pm1) MCUs are so cheap, available, and easy to use that they are in fact now the best option for many applications. When someone asks "I want to learn about discrete logic, can you help me do X with it?", I say go for it. When someone asks "what is the best way to do X", I try to tell them the best way -- frequently that is a microcontroller.2) In this instance, my suggestion was *not* to use an MCU, but a dedicated DDS chip (granted, it might require a micro to program). A dedicated DDS chip will provide excellent performance. Using a micro "soft-dds" was intended as a low cost option that will still give better performance than a square wave generator + filter.

author: Paul Price
author_rank: Super Contributor
timestamp: May 20, 2013, 06:22:11 pm
content: There is no simpler nor less complicated nor lesser power consumption, nor lower-cost solution to generating the 100KHz precision sinewave oscillator than using a 100KHz xtal that costs 1 US$, only requiring a simple one-transistor circuit to generate an accurate, extremely low phase noise, extremely stable and very low distortion precision sinewave oscillator.

author: ftransform
author_rank: Frequent Contributor
timestamp: May 24, 2013, 11:47:54 pm
content: that sounds too simple, I don't like it.Turns out a square wave is acceptable, go figure!

author: madires
author_rank: Super Contributor
timestamp: May 25, 2013, 12:44:58 pm
content: Quote from: ftransform on May 24, 2013, 11:47:54 pmThat's called the KISS principle :-)Using complex solutions for simple problems is asking for trouble, sometimes. Unfortunately the complex solutions are running fine most times :-)