Levelled Sine Wave Generator - Page 1
Forum section: electronics / testgear

author: edba
author_rank: Contributor
timestamp: March 24, 2025, 02:45:58 pm
content: HiI am trying to look for a levelled sine wave generator, which provides a constant amplitude over a frequency range of 20 Hz to 20 kHz (audio bandwidth). Does anybody have any recommendations?Bredba

author: edavid
author_rank: Super Contributor
timestamp: March 24, 2025, 02:58:33 pm
content: Quote from: edba on March 24, 2025, 02:45:58 pmLevelling is used in RF generators where the modulator/output amp/attenuator path can't be made with a flat frequency response.In the audio range the output path can be made very flat, so levelling is not used.What is your desired amplitude flatness spec?

author: blackdog
author_rank: Frequent Contributor
timestamp: March 24, 2025, 03:52:11 pm
content: Hi,One possibility is to use the DDS chip AD9833,which gives you a perfectly flat frequency characteristic in the audio range between 20 and 100KHz.With an Arduini Nano, AD9833 Library and a good Rotary encoder (about 15$) you get for little money a very flat Frequency characteristic.What is the output level you need?For the AD9833 it's about 0.5V and you need an amplifier stage behind that.Keep in mind that building and testing takes a lot of time and knowledge and especially if you want to make money with it you better buy a function generator.The last couple of years I always recommended the Siglent SDG 1032X, but it has now been replaced by the SDG 1032X Plus, which is a bit more expensive because it is a 16Bit model.These feature generators are also extremely flat in the audio region, usually I can't measure any deviation until about 1MHz.The advantage of these models is that you then also have a very nice square wave.If you can still buy the somewhat older SDG 1032X then it is the best for a virtually prfect square wave up to 1V Top-Top at the output as terminated.Sincerely,Bram

author: edba
author_rank: Contributor
timestamp: March 24, 2025, 04:14:11 pm
content: I don't want to build anything, somebody told me you can buy levelled signal generators where the amplitude stays constant over a desired frequency range. I am finding the signal/function generators I am using have to be slightly tweaked every time you adjust the frequency from say 100 Hz to 1 kHz, you need to adjust the amplitude 10 or 20 mV if you have a 1 Vpp for example. Is there anyway of auto calibrating this out?

author: edavid
author_rank: Super Contributor
timestamp: March 24, 2025, 04:18:35 pm
content: Quote from: edba on March 24, 2025, 04:14:11 pmHow are you measuring the amplitude? Are you sure your measuring instrument is more accurate than the generator? What was the load during the measurement?What was the amplitude accuracy spec for the generators that you tried?And as I asked before, what is your actual accuracy requirement?In general, a more expensive generator will be more accurate.

author: TimFox
author_rank: Super Contributor
timestamp: March 24, 2025, 04:36:42 pm
content: There are commercial DDS-based generators that cover the audio frequency range.If properly designed, their amplitude is very constant over frequency, even down to sub-audible frequencies.My Wavetek 98 is flat within +/- 0.3 dB up to 300 kHz. They are widely available used.

author: David Hess
author_rank: Super Contributor
timestamp: March 24, 2025, 04:48:28 pm
content: Low distortion oscillators better be better than 0.3dB over their output range without leveling. What kind of flatness do you require?

author: TimFox
author_rank: Super Contributor
timestamp: March 24, 2025, 04:52:05 pm
content: Before I retired, one of my coworkers wrote a specification document with “0” for a parameter analogous to flatness.I responded that that was a “pious wish”, not a specification.

author: bdunham7
author_rank: Super Contributor
timestamp: March 24, 2025, 05:15:27 pm
content: Quote from: edba on March 24, 2025, 04:14:11 pmYou need to figure out how accurate you need it to be. 10mV out of 1V is 1%, that's not spectacular in AC voltmeter terms but it is less than 0.1dB in audio terms. Probably good enough for many things. As an example of something a bit better, I just checked a Siglent SDG2042X at 500mVRMSfrom 10Hz to 50kHz and I get less than 500µVRMSdeviation in amplitude, or <0.1%. That's less than 0.01dB and is approaching the tolerance limits of a very good 6.5-digit DMM. Getting flatter than that starts to get tricky and expensive.

author: David Hess
author_rank: Super Contributor
timestamp: March 24, 2025, 05:21:02 pm
content: Quote from: TimFox on March 24, 2025, 04:52:05 pmVHF sources can be leveled to 0.05dB without too much trouble. That is good enough that even short coaxial cables will ruin the flatness.I think I could design a leveled analog audio source to 0.01dB by using sampling at the leveling point. An SR1 Audio Analyzer is specified as ±0.020dB worst case over the audio band.Quote from: bdunham7 on March 24, 2025, 05:15:27 pmHow did you check it? Some AC multimeters could be that good if their high impedance dividers are properly compensated. I would not rely on an oscilloscope for that kind of flatness even at low frequencies unless it is a sampling oscilloscope.Keithley had a multimeter which supported audio measurement but it has been discontinued. I wonder how good it was.Update: The discontinued Keithley 2015 has a specified source flatness of ±0.1dB, and calculated measurement flatness of ±0.01dB. Get one of those.

author: TimFox
author_rank: Super Contributor
timestamp: March 24, 2025, 07:01:38 pm
content: Some good AC voltmeters have sufficient input capacitance (probably from a compensated input attenuator) to induce a non-trivial drop from the 25\$\Omega\$ source impedance of a 50\$\Omega\$ cable terminated by 50\$\Omega\$.The hp 3403C is 24 pF. The Marconi 2610 is 50 pF.At 1 MHz, 25\$\Omega\$ and 50 pF is about 0.8% error.Less bad at 20 kHz, of course. Worse with an unterminated coax.

author: bdunham7
author_rank: Super Contributor
timestamp: March 24, 2025, 07:36:10 pm
content: Quote from: David Hess on March 24, 2025, 05:21:02 pmFluke 8846A. Guaranteed spec 0.06% from 10Hz to 20kHz, characterized to be well within that spec against a better meter that isn't here right now. Connected directly to the AWG with a reasonably short cable and no termination. The max deviation that I saw was about 400µV low at exactly 20Hz (not 15 or 25) and then going about 300µV high as I approached 50kHz. Within the audio range the deviations at each test point were typically 100-200µV. The deviations are not relative, those are absolute referenced from exactly 500mV.A 120MHz DDS-based AWG really should be pretty flat at low frequencies, there's no good reason for it not to be. Absolute accuracy is another matter, I wouldn't necessarily expect such good results and perhaps I won't get them if the temperature changes.

author: David Hess
author_rank: Super Contributor
timestamp: March 24, 2025, 10:39:14 pm
content: Quote from: TimFox on March 24, 2025, 07:01:38 pmThat is a good point. Most are somewhat more than 100 picofarads.

author: G0HZU
author_rank: Super Contributor
timestamp: March 24, 2025, 11:56:06 pm
content: There's probably a good choice of external USB sound cards that could do this. However, another contender is the Analog Discovery 2 (or the 3)The AD2 is 14 bit so it won't deliver ultra low distortion or an ultra low noise floor but it will be hard to beat for frequency response in terms of flatness across AF frequencies. I'm not sure how it compares to the modern function generators from Siglent or Rigol in this respect. I'd expect any differences to be negligible assuming the Rigol and Siglent gear is bug free in this respect.The Waveforms software that is bundled with the AD2 offers some nice (very smooth) sweep modes too.I doubt anyone would need anything flatter across the OPs requirement of 20 Hz to 20 kHz outside a metrology lab. I'd still be looking at a decent USB soundcard for something like this though, especially if noise floor, low level spurious and distortion are also important.

author: bdunham7
author_rank: Super Contributor
timestamp: March 25, 2025, 01:00:58 am
content: Quote from: G0HZU on March 24, 2025, 11:56:06 pmA quick check of an (original) AD set to 50R and connected in the same way gives much worse absolute results but near-perfect flatness. I had to enter an "amplitude" of 689mV to get 500.3mV which was as close as I could get to 500mV. Obviously it should have been 707mV. However, that 500.3mV is flat from 10 to 50kHz within 0.1mV. At 300kHz the deviation from the meter's reading after applying a correction factor from the most recent calibration is about -0.2mV or 0.04% error. Of course that last point is subject to all sorts of uncertainty.

author: G0HZU
author_rank: Super Contributor
timestamp: March 25, 2025, 01:25:54 am
content: I just powered up my AD2 and I think these things can be calibrated by the user. I may have tried to cal the scope app many years ago but I'm not sure about the waveform app.I tried measuring it using my Keithley 2015 THD as this can typically measure distortion down to about -80dBc and it can measure the Vrms quite well too. See below for a screenshot. Many years ago I wrote a THD app for the 2015THD and I think this is the first time I've used it since well before lockdown...The Keithley 2015 measured 705mV for a 1V peak setting from the AD2. This should really be 707.1mV rms. This is quite good and I think it might be possible to calibrate the AD2 to improve on this.The flatness across 20 Hz to 20 kHz was very good. I'm not sure which is the weak link, the AD2 or the Keithley 2015 in this respect.

author: MarkusAJ
author_rank: Contributor
timestamp: March 25, 2025, 01:35:04 am
content: Quote from: edba on March 24, 2025, 04:14:11 pmI suggest checking the REW software (it is free) and decent ADC/DAC like the MOTU M2, or Focusrite Scarlet 2i2.You will get audio frequency generator with ultra low distortions and almost everything what you need for audio work for about $200.00.Link to REW software:https://www.roomeqwizard.com/features.htmlLink to MOTU M2:https://motu.com/en-us/products/m-series/m2/Link to Focusrite Scarlet 2i2:https://us.focusrite.com/products/scarlett-2i2

author: 2N3055
author_rank: Super Contributor
timestamp: March 28, 2025, 10:56:41 pm
content: Like Bram said above, modern AWGs are quite flat in low frequency range.Also people questioned use of (well done) RMS measurement with modern 12 bit (or more) scope as a replacement for old thermal RMS voltmeters that are harder and harder to get in good order, if you already don't have one from long ago.Used was SDG6052X as signalgen. Scope was 1GHz SDS6000H12, roughly equivalent to SDS3000xHD for this test.180mV RMS sine, swept from 100 Hz to 5 MHZ in step mode (new function on SDG6000X in last FW). 50 Steps in 113sec.On scope P-P and AC RMS (Stdev) measurement was used together with FFT in peak mode. Flattop window.Combined flatness for AWG/scope combined is better than 16mdB (0,016dB) from 100Hz to 5 MHz.I also tried Picoscope 4262, that is 5 MHz 16 bit scope.With same AWG.To 1MHz it was 0.1dB, to 2 MHz 0,2dB. -1dB point was at 3.5MHz.I would say those are good enough results for many uses.