I bought a cheap sound card for my PC with optical output, a 10 m fiber cable and a digital to analog converter.
The circuit was very simple, just a TOSLINK receiver, a monostable cuircuit and a transistor. Since I also had to feed to signal trough to the converter, I used the S/PDIF coax input of the DA-converter rather than to TOSLINK in order to save an optical splitter. And it was awesome in its simplicity and it also did its job.
However there is a reason why I talk in the past tense about this device and I don't have pictures of it: It isn't alive anymore because it had a major drawback: Start up clicks on my speakers. Nasty, loud clicks. And that wasn't caused by my circuit, it was the converter itself. Probably uncharged decoupling capacitors at the output. You could use some relays at the output of the converter to disconnect the speakers until the caps are charged, but that's a third circuit and a third box. I decided to take another path in order to combine all three circuits (the power switch, the converter itself and the relays) into one - and it turned out that with the ability to disconnect the speakers from the converter output, the power switch circuit becomes obsolete.
Rather than using relays I used an analog multiplexer CD4052 and a charge pump for a negative supple voltage, since the output is AC centered around ground. An ATtiny84 does the switching for the charge pump and decides whether to turn on or off the output. A 10 k resistor is used to keep the outputs at well defined level when shut off.
Here is the code that runs on the little AVR. Basically just 50% duty-cycle high frequency pwm on the charge pump for the charge pump and an interrupt triggered "monostable" circuit with predefined time constant. I know that the same thing could also be achieved by a smaller microcontroller, the ATtiny84 was the smallest I had lying around though.
And this thing got rid of all the noise. I am sure the manufacturer could have captured equivalent measures without much effort or price hike.
This is part one of a little three (or more) part series about my experiences with TOSLINK and S/PDIF.
Click here to read part two of the story.
- Marv
No comments:
Post a Comment