The PCB I made recently was for this project that converts audio from a TOSLINK input to analog stereo.
My new TV has no analog audio outputs – only an optical one (and its speakers suck), and the “home theatre” system (a Sony DVD player with a 5.1 speaker system) accepts only analog stereo. If I bought a home theatre system I would have made sure it has an optical input, or at least “line in” inputs for the 5.1 so that I can use the amp. This little project was designed to bridge the 2 systems (with loss of audio quality).
The circuit is really simple – most of the heavy lifting is done by 2 main ICs – the DIR9001 digital audio receiver and a WM8762 DAC.
My design decisions are mainly driven by cost, and was largely influenced by this circuit, which just consists of the DIR9001 receiver.
The DIR9001 is the cheaper digital audio decoder, compared to the CS8416. To simplify things, I decided to use a single 3.3V supply and the WM8762 meets this criteria. It’s a fuss-free IC that has integrated output filters. Since the output of the DAC is relative to the supply voltage, the volume might be a little on the soft side, but that’s not a big problem since it will be fed to an external amp. The fibre optic receiver has a 3V and 5V variant. The 3V variant is able to withstand up to 3.6V.
There is an on-board 3.3V LDO regulator, as well as a Schottky diode for reverse polarity protection. The regulator accepts up to 20V, and has a maximum dropout voltage of 1.2V. Adding the diode forward voltage, we have a range of about 5V to 20V. I chose a rather large regulator that provides up to 1A, but the circuit definitely consumes less.
Component size. SMDs are cheaper than through-hole parts, so I decided to go all SMD, which is why I required a PCB. The DIR9001 is only available in TSSOP, so it’s not like I had a choice. I prefer bigger components as my eyesight is not that good. I settled on 0805 components based on this thread on the adafruit forum.
Everybody loves blue LEDs – i just had to use one too. Blue LEDs at 0805 have a rather high foward voltage drop of about 3.3V, which is dangerously close to the supply voltage. To be on the safe side, I used an 0603 instead, which had a VF of 2.85. The PCB footprint I used can accommodate an 0603 as well.
Since I will have 10 copies of the same PCB, I thought I’d make the design slightly more flexible. 4 pins meant for additional processing of the audio data were brought out onto solder pads, and the control pins (for settings like FMT, CKSEL) had resistors to Vcc. These control pins have an internal pull-down resistor, so if we need to set it low, the resistor is left unpopulated. DIP switches occupy space and are not necessary as the settings won’t need to be changed often nor on-the-fly.
The DAC requires a master clock, which is several times the sampling frequency. This can be obtained from the DIR9001, recovered from the optical signal. Looking at both datasheets, only 128 * Fs can be used if the DAC is to support all audio sampling frequencies. The WM8762 could use 192 * Fs, but unfortunately the DIR9001 cannot output such a clock rate. At the DAC output is a 20kHz low-pass RC filter, whose values are derived from the active filter recommended by the datasheet.
The PCB was made to fit in a plastic enclosure I obtained locally. Since it was to be sitting behind the TV, it should be in some box. SMD components are mounted on the top side, and connectors will be mounted on the underside.
Adding RCA jacks directly to the PCB meant that I had to cut out 2 large holes for them, so I cheated a little and went with a 3.5mm stereo jack instead. The RCA cables will then be connected via an external adapter.
I thought the final product was quite good, although the cutting of holes in the enclosure was not.
I suck at cutting holes.
The best hole that I cut was for the DC input jack.
Depending on the DC wall wart used, the 10uF capacitor before the regulator might not be sufficient. I tried a 12V unregulated wall wart from Black&Decker and it didn’t work. The regulator gave an output of about 3V (measured using a multimeter) and the DIR9001 was kept in reset state. I had to replace the 10uF with a 100uF.
Also, the blue LED was more towards cyan. I was expecting a darker shade of blue. I should remember to check the wavelength when I look for a blue LED next time.
The other problem which can’t be seen in the photos is that the LEDs are too bright. I calculated 15mA for the LED current, which I think is wayy too much. Since the LEDs not used for lighting, I should probably run them at lower than 10mA, or maybe even less than 5mA. The bright LEDs are also giving off quite a lot of heat, and not to mention, consuming unnecessary power. I tried to compensate for that by making smaller holes for the indicator lights, but they are still very bright.
Schematics & Partslist
|4||0.1uF||C-EUC0805||C1, C2, C3, C8|
|5||5.1k||R-US_R0805||CKSEL, FMT0, FMT1, PSCK0,
|5||10uF||CPOL-EUA/3216-18R||C4, C5, C9, C10, C12|
- only FMT1 needs to be populated, according to the schematic
- where C0G for caps are specified, it means try to find a low tolerance cap (less than 5% preferable)