Author Topic: Question: Cheap pure sine wave genertor 1khz?  (Read 22142 times)

0 Members and 1 Guest are viewing this topic.

Offline Verticon

  • Contributor
  • Posts: 22
  • Country: de
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #75 on: July 28, 2021, 09:29:49 pm »
Yes, I've built several of these state variable oscillators. But mostly with wide frequency range from 10Hz to 100kHz. At 1 kHz they have a typical distortion level below 0.001% even with OP-AMPs like 5534. The 1980 Tektronix SG505 (wide frequency range) with a similar oscillator technique has a typical 1kHz distortion of 0.0003% which corresponds to -110dB.

So if they mean 0.0064% (which is only -84dB) it is an easy task. But even -124dB should be not out of reach with this oscillating principle tweaked for a fixed frequency.
 

Offline trobbins

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: au
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #76 on: December 28, 2021, 12:17:30 am »
A recent enhancement on the approach that uses a soundcard to generate %HD levels down at the 0.00001% level is that REW introduced a 'coherent averaging' capability mid last year.  That option allows the noise floor for assessing HD levels to be dropped by quite a few dB, and hence assists the nulling process of HD contributions.  It should also assist any process that tries to insert a notch filter in the loopback path as a way to confirm that the DAC is actually generating such low levels of HD%, compared to the DAC + ADC generating such low levels.
 

Offline Grandchuck

  • Frequent Contributor
  • **
  • Posts: 754
  • Country: us
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #77 on: December 28, 2021, 03:18:45 pm »
trobbins, do you happen to know if REW software plus an interface like the Focusrite Scarlett Solo would be capable of measuring THD levels around -120dB or better?

Thanks
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7043
  • Country: nl
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #78 on: December 28, 2021, 04:47:39 pm »
should also assist any process that tries to insert a notch filter in the loopback path as a way to confirm that the DAC is actually generating such low levels of HD%, compared to the DAC + ADC generating such low levels.
In principle a low pass filter is enough to distinguish adc distortion from dac distortion, though a notch filter simplifies the calculation.
 

Offline pandy

  • Contributor
  • Posts: 14
  • Country: 00
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #79 on: February 08, 2023, 09:05:04 pm »
Apologies for reviving this thread but as no one before proposed something that will be probably simplest, cheapest yet very clean source of for example sine (but not only) signal - circuit using some memory (uC?), sequencer (uC or dicrete logic) and additional elements (like for example CD4000 series powered with for example 15V to increase overall SNR). In memory single bit delta-sigma i.e. PDM single bit sine (or other) waveform is stored and sequentially outputted to single pin - i.e. serial out - with sufficient oversampling and wise embedded resources use probably simple uC with sufficient memory will be more than OK - with help of common SPI output it may deliver 1kHz at few MHz sample rate efficiently turning such uC into sinewave signal source with very high quality beyond typical 16..20 bit - something like SACD audio quality.

2000 sine samples (single sine period) with 64 times oversampling will require approx 16KB table - 128 times oversampling will be 32K etc...
Sine frequency can be changed by using different clock. There is possibility to use some tricks to reduce required memory and/or to increase sampled signal phase accuracy if signal is like sine - similar to tricks used in DDS/NCO.

If uC is equipped with PWM then using high order delta sigma (multibit) very high quality signal reproduction can be created even with relatively low PWM resolution (<8 bit) but high sample rate - there is many possibilities to use digital resources and get high quality analog signal.

To create PDM, open source software can be used for example https://pcmdsd.com/Software/PCM-DSD_Converter_en.html
 

Offline scopeman

  • Frequent Contributor
  • **
  • Posts: 327
  • Country: us
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #80 on: March 03, 2023, 03:44:44 am »
Have you seen this? Looks like a great start to me:

https://www.romanblack.com/onesec/Sine1kHz.htm

Sam
W3OHM
W3OHM
 

Offline jonpaul

  • Super Contributor
  • ***
  • Posts: 3656
  • Country: fr
  • Analog, magnetics, Power, HV, Audio, Cinema
    • IEEE Spectrum
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #81 on: March 03, 2023, 04:29:32 am »
Jim Williams 1970s app notes from National Semiconductor and Linear Technology

j
An Internet Dinosaur...
 

Offline scopeman

  • Frequent Contributor
  • **
  • Posts: 327
  • Country: us
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #82 on: March 05, 2023, 05:54:17 pm »
Looks like this is the ticket:

Available in 1KHz -155 to -160dB Distortion level. A 10KHz version is slightly higher.

https://viccc42.wixsite.com/uld-audio

Sam

W3OHM
 
The following users thanked this post: edavid

Offline Grandchuck

  • Frequent Contributor
  • **
  • Posts: 754
  • Country: us
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #83 on: March 05, 2023, 06:28:07 pm »
There is also this:  https://www.akitika.com/1kHzOscillator.html

I have this one and it works well; however to verify its extremely low distortion specifications is a bit beyond my current setup.  I am able (with REW and a Focusrite Scarlet Solo) to approach verifying that level of performance.
« Last Edit: March 05, 2023, 06:32:50 pm by Grandchuck »
 
The following users thanked this post: edavid

Offline pandy

  • Contributor
  • Posts: 14
  • Country: 00
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #84 on: March 08, 2023, 11:59:18 pm »
If someone is interested then i've attached file (due limitations of upload extension is hex but in fact this is bin file with content of the 10 sine periods coded by delta sigma modulator like DSD) - file is small - 8192 bytes - technically it can be stored in some memory and after conversion from parallel to serial used to recreate sine with high quality - target sample rate should be around 6.5MHz to get 1kHz.
Signal should have around 160dB SNR but everything depends on power supply and remaining circuitry. Probably small (8 pin AVR like?) uC with SPI should be able to play such sine.

To generate file i used SoX from https://audiodigitale.eu/repo/sox/ - this SoX has added DSD converter, bellow commands i've used to create signal:

Code: [Select]
@sox --multi-threaded --buffer 131072 -S -V -D -r 1024 -t raw -e unsigned-integer -c 1 -b 32 -n sine_period.raw synth 1 sine 10 gain -n -0.0021125518979949800 stats stat
this one create 1024 samples of the sinewave (10 periods) as 32 bit PCM

Code: [Select]
@sox --multi-threaded --buffer 131072 -S -V -D -r 44100 -t raw -e unsigned-integer -c 1 -b 32 sine_period.raw sine_period.wav
this one read previously created 32 bit PCM sinewave and store it as wav - this is optional step - wav is widely supported so generated sinewave can be easily inspected with help of the common audio editor

Code: [Select]
@sox --multi-threaded --buffer 131072 -S -V -D -r 44100 -t raw -e unsigned-integer -c 1 -b 32 sine_period.raw sine_period.dat
another optional step - 32 PCM is converted to text file so it can be easily imported to for example spreadsheet

Code: [Select]
@sox --multi-threaded --buffer 131072 -S -V -D -r 44100 -t raw -e unsigned-integer -c 1 -b 32 sine_period.raw -t raw -e unsigned-integer -c 1 -b 8 sine_pdm.raw rate -s -a 2822400 sdm -f sdm-8
another optional step - delta sigma bitstream is stored as bytes so it can be easily imported to common sample editor as normal 8 bit signal and later for example filtered to recreate sinewave

Code: [Select]
@sox --multi-threaded --buffer 131072 -S -V -D -r 44100 -t raw -e unsigned-integer -c 1 -b 32 sine_period.raw sine_pdm.dat rate -s -a 2822400 sdm -f sdm-8
optional - delta sigma bitstream is created as text file so it can be imported to for example spreadsheet

Code: [Select]
@sox --multi-threaded --buffer 131072 -S -V -D -r 44100 -t raw -e unsigned-integer -c 1 -b 32 sine_period.raw sine_pdm.dff rate -s -a 2822400 sdm -f sdm-8

This one is non optional - delta sigma stream is created from 32 bit PCM and stored as DSD DFF file - after removing header (126 bytes) attached sine_pdm.bin was created

To remove 126 bytes header i use small but nice hexeditor called XVI32 http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm
bellow script for hexeditor to cut first 126 bytes
Code: [Select]
ADR 0
DEL 126
EXIT
« Last Edit: March 09, 2023, 12:03:53 am by pandy »
 

Offline bozidarms

  • Regular Contributor
  • *
  • Posts: 176
  • Country: at
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #85 on: March 09, 2023, 11:53:15 am »
Victor`s  1kHz is Nr.1 - can hardly be better.

THD: -135dB  --  0.0000178%

6dBV = 2Volt(eff) = 5,6Volt(s-s) = 8,2dBu
« Last Edit: March 09, 2023, 07:29:09 pm by bozidarms »
 

Offline Grandchuck

  • Frequent Contributor
  • **
  • Posts: 754
  • Country: us
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #86 on: March 09, 2023, 03:31:13 pm »
Thanks Boz!  How did you achieve that low noise floor?
 

Offline bozidarms

  • Regular Contributor
  • *
  • Posts: 176
  • Country: at
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #87 on: March 09, 2023, 05:03:11 pm »
Hi Grandchuck
Quote
Thanks Boz!  How did you achieve that low noise floor?

That is one RTX6001 Audio Analyzer and 1 Million-point FFT length
« Last Edit: March 09, 2023, 05:09:01 pm by bozidarms »
 

Online Martin72

  • Super Contributor
  • ***
  • Posts: 7019
  • Country: de
  • Testfield Technician
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #88 on: May 14, 2023, 06:30:45 pm »
Only a few more components and then mine is ready.
I still have to equip the notch filter board.

Online Martin72

  • Super Contributor
  • ***
  • Posts: 7019
  • Country: de
  • Testfield Technician
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #89 on: May 17, 2023, 09:53:30 pm »
Oscillator board now complete assembled(except connections), for the notch filter board I thought I already have all the parts, but today I recognized that the OPA209 chip got the wrong package... :P
Nevertheless, the other parts will be soldering tomorrow.
I´m curious about the oscillator, will test/adjust it soon.
 
The following users thanked this post: RoGeorge

Online Martin72

  • Super Contributor
  • ***
  • Posts: 7019
  • Country: de
  • Testfield Technician
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #90 on: May 19, 2023, 09:27:17 pm »
Notchfilter assembled...

The package on the pcb is for SO8, a real small one - But the opa09 I got from mouser is even smaller..
SO8 Variants are out of stock at the moment, so I must wait.
Or assemble the existing one somehow on the board...

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 7012
  • Country: ro
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #91 on: May 19, 2023, 10:06:33 pm »
Worth a try, the smaller one might fit.  Its middle 2 pins can touch their respective PCB pads.  If not, bend them sideways a little, so they can be soldered directly to the middle 4 PCB pads.  If the marginal pads are too close or touching the middle PCB pads, put some Kapton tape underneath the corner pins, then use thin wires to solder the corner pins to their corresponding PCB pads.
 
The following users thanked this post: Martin72

Online Martin72

  • Super Contributor
  • ***
  • Posts: 7019
  • Country: de
  • Testfield Technician
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #92 on: May 19, 2023, 10:41:56 pm »
Hi RoGeorge,

Got the same thoughts and when everything will go wrong (delivertime too long), I´ll try this out.
Will be a nice surgery under the andonstar microscope.. 8)

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 7012
  • Country: ro
Re: Question: Cheap pure sine wave genertor 1khz?
« Reply #93 on: May 20, 2023, 01:26:51 am »
Indeed, under the microscope it's doable.

Once I've soldered a chip same size as yours 4 times (the chip, a 16bits ADC for a thermocouple, was not working apparently), only to realize after replacing the chip for the 4th time that all the previous chips were in fact OK, just that there were reflections on some data lines while controlling the ADC.  :palm:



The shoddy soldering in the pic is the 4th one, where no care was spent for the look, believing at that moment that all the chips were bad anyway.  It's been years since then, and never properly rework the soldering.  ;D
« Last Edit: May 20, 2023, 01:30:33 am by RoGeorge »
 
The following users thanked this post: Martin72


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf