EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Circlotron on April 22, 2018, 11:17:29 am

Title: Audio oscillator with SPDIF or Toslink output
Post by: Circlotron on April 22, 2018, 11:17:29 am
I have a fairly reasonable quality DAC that I used to use between my CD player and amplifier. Don't really use it nowadays, and seeing it has a distortion at max output of 0.0018% I thought it might make the basis of a good audio oscillator to 20kHz max. Just needs to be driven from a SPDIF or Toslink source that is generating the actual frequency. Is there such a source?
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: The Soulman on April 22, 2018, 01:27:01 pm
Cheapest and easiest would be to use computer with one of the many generator programs available freely in
combination with a usb to spdif interface, make sure it supports the resolution you want, as the cheapest ones generally max out
at 16bit 48KHz.
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: NiHaoMike on April 22, 2018, 02:09:30 pm
You can use a FPGA board.
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: Circlotron on April 23, 2018, 12:24:26 am
Cheapest and easiest would be to use computer with one of the many generator programs available freely in
combination with a usb to spdif interface, make sure it supports the resolution you want, as the cheapest ones generally max out
at 16bit 48KHz.
I do have one of those, a cheap one though, and while it works it produces a chk-chk-chk noise on the output along with the desired signal. I don’t know how many different ones I would have to buy until I found one that worked properly.
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: hamster_nz on April 23, 2018, 12:55:18 am
A Raspberry Pi, or even an ESP32 and something based around https://d3uzseaevmutz1.cloudfront.net/pubs/proDatasheet/CS8406_F6.pdf could be an interesting project.

Because it is optical, Build quality doesn't have to be spectacular for good results. Perfboard for the win! :D
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: Zero999 on April 23, 2018, 07:47:21 am
I have a fairly reasonable quality DAC that I used to use between my CD player and amplifier. Don't really use it nowadays, and seeing it has a distortion at max output of 0.0018%
How is that possible? That looks like marketing to me.

The resolution of a 16-bit audio is less than that.
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: Circlotron on April 23, 2018, 10:50:13 am
I have a fairly reasonable quality DAC that I used to use between my CD player and amplifier. Don't really use it nowadays, and seeing it has a distortion at max output of 0.0018%
How is that possible? That looks like marketing to me.

The resolution of a 16-bit audio is less than that.
Maybe the distortion figure is for 24-bit mode?
Anyway, this is the unit -> https://archive.org/stream/Silicon_Chip_Magazine_2009-09_Sep#page/n13/mode/2up (https://archive.org/stream/Silicon_Chip_Magazine_2009-09_Sep#page/n13/mode/2up)
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: BradC on April 23, 2018, 11:37:18 am
Silicon Chip also did a neat audio generator that had an SPDIF output. Altronics used to sell a kit for it, but now I check and it's gone. It was a pretty neat unit, but the kit was $$.
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: SiliconWizard on April 23, 2018, 02:33:39 pm
To benefit from your low distortion DAC, you need a low distortion generator. Less trivial than it seems.
You didn't mention what kind of signal you want to generate? Pure sine? Other waveforms?

There are pretty expensive units, such as this: https://www.nti-audio.com/en/products/digirator-dr2 (https://www.nti-audio.com/en/products/digirator-dr2)
(Probably not worth it if all you want is to reuse your DAC.)

As others have suggested, a PC/ or SBC-based solution is probably your best bet for a simple and low-cost approach, yet with the ability of generating low-distortion signals. If you have access to I2S signals on your DAC, you may not even need an additional SPDIF board (some SBCs have I2S built-in).

You could also do this with a microcontroller or an FPGA, but there will be significant dev time, especially if you want some kind of UI.
Title: Re: Audio oscillator with SPDIF or Toslink output
Post by: _Wim_ on April 23, 2018, 07:55:01 pm
Cheapest and easiest would be to use computer with one of the many generator programs available freely in
combination with a usb to spdif interface, make sure it supports the resolution you want, as the cheapest ones generally max out
at 16bit 48KHz.
I do have one of those, a cheap one though, and while it works it produces a chk-chk-chk noise on the output along with the desired signal. I don’t know how many different ones I would have to buy until I found one that worked properly.

Make sure you levels are not clipping. Try lowering the level in your software package, this could be the reason of the noise...

What software package are you using? I had good luck with Room Equalizer Wizard (REW) in the past, which is freely available