Sine wave generator 10 mHz to 100kHz

Thread Starter

atomskaze

Joined Jul 10, 2017
4
Hello -

I'm currently working on a project for some colleagues and I was asked to design a sine wave generator that can go from 10 mHz (mili) up to 100 kHz approximately. The signal would have 10 mV peaks.

The alternatives I have seen are:
1. Arduino PWM with a DAC
2. XR2206
3. Wien Bridge Oscillator

I honestly don't know if I could achieve the whole range but I'll start to look up onto Wien Bridge Oscillator circuits and attempt a design in Multisim.

If anybody has any information or details that could help me with the design, please take your time and let me know!
 

Reloadron

Joined Jan 15, 2015
7,893
Given the options I would use an XR2206 Monolithic Function Generator as the center of the project. There was a time when several companies were offering kits for the chip which would make for easy building as it gives you a board and all the components to make a simple little plug and play function generator. A simple Google of "xr2206 kit" brings up several hits which look promising. Anyway, in the interest of keeping things simple that would be my choice.

Ron
 

Reloadron

Joined Jan 15, 2015
7,893
Crutschow brings up a very good point as to the purity of a sine wave. If you want very low distortion in your sine then the XR2206 may not be a viable option. My read is the XR2206 will get down to about 2.5% THD (Total Harmonic Distortion) and with good parts and tweaking can get you below that. I really do not know how good you can get. So you need to decide what is acceptable for your application.

Ron
 

atferrari

Joined Jan 6, 2004
5,018
Crutschow brings up a very good point as to the purity of a sine wave. If you want very low distortion in your sine then the XR2206 may not be a viable option. My read is the XR2206 will get down to about 2.5% THD (Total Harmonic Distortion) and with good parts and tweaking can get you below that. I really do not know how good you can get. So you need to decide what is acceptable for your application.

Ron
From my experience, tweaking is tricky. Very.

In the end I gave up.

An NCO controlled by a micro with a switched capacitor filter at the output was much better.
 
Last edited:

Thread Starter

atomskaze

Joined Jul 10, 2017
4
Hello -

Thanks for all your inputs. I haven't discussed distortion with my colleagues. As they are not electronics or computer majors, they'd probably want a perfect signal. But they also want the solution to not be expensive.
 

AnalogKid

Joined Aug 1, 2013
12,202
That is a 10 million-to-one frequency range, so achieving that entire range in one span is pretty much not gonna happen. And the technologies that are best for the low end, such as a lookup table and DAC, will be expensive at the high end. A DAC approach can change frequency instantly, but the low pass filter corner freq has to track it. OTOH, a phase shift or Wein bridge oscillator doesn't need an output filter, but has a step-frequency-change-settling-time of several cycles - multi-minutes at the lowest frequencies in your range. Is a combo system an allowed option?

If the settling time is not a problem, then a multi-band Wein or phase-shift oscillator could be built with D/A converters for the resistors and analog switches controlling the capacitors. With everything under uC control, the band changes would be invisible to the user. Relatively simple circuit, medium-difficult firmware.

ak
 

Thread Starter

atomskaze

Joined Jul 10, 2017
4
Thanks AnalogKid. I have been thinking of the possibility of different circuits for different ranges (like function generators have different settings for different ranges). I have seen some solutions that can go from 1 Hz to beyond the required max of 100 kHz.

However, I have not seen much for the 10 mili Hertz - 1 Hz that are required.

Now, for the application of the circuit the users will not be changing the frequency after the signal has been started. The user should configure the desired frequency and the system should generate the signal for N amount of time or until the user decides to end the run.
 

MrChips

Joined Oct 2, 2009
34,974
You can get the full range from 0Hz to 1MHz in one range if you go to a microcontroller solution.
The Arduino is not capable of this.

STM32F MCUs have 12-bit DAC built-in and would be a single chip solution.
 

crutschow

Joined Mar 14, 2008
38,598
But the MCU solution uses a DAC, the output of which need low-pass filtering. Surely the filtering will need more than one range?
For a 12-bit DAC, each step is just .04% of the full scale sinewave peak and the steps will occur at a frequency of 8,192 times the output sinewave frequency, so only a small amount of LP filtering should be needed to knock down the high frequency of the steps to an acceptable level.
One LP filter may be sufficient, depending on their tolerance for a small amount of high frequency noise.
If necessary you could have the MCU switch in a different LP filter depending upon the frequency setting.
 

MrChips

Joined Oct 2, 2009
34,974
Let us assume for the moment that the MCU can crank out 1M samples per second.
A 100kHz waveform would have 10 samples per cycle.
A 10mHz waveform would have 100M samples per cycle.
You only need one low pass filter with a corner frequency at about 200kHz.
 

Thread Starter

atomskaze

Joined Jul 10, 2017
4
I've been checking out some shields or breakout boards and came across this the MiniGen Pro Mini Signal Generator (https://www.sparkfun.com/products/11420).

I know the shield should be used with the Arduino Pro Mini. I currently have an Arduino Uno so I'm thinking I could solder male pins on it, connect it to a prototyping board and use my Arduino UNO to communicate via SPI. From the shield's description, I could solder a jumper to use the shield with 5 V rather than 3.3 V.

Also, I'm waiting on a final confirmation on the range of the frequencies needed. There is a chance that the 10 mili Hz - 1 Hz may not be needed.
 
Top