toslink mix board design?

Hi everyone. So I have a spare arduino kicking about and I would like to create a mixer for my home audio. The idea behind it is relatively simple

4 inputs; pc, blu-ray, tv, spare
4 outputs; dac, speakers, hifi system, spare

What I ideally want is to be able to set which input and which outputs are on at any time. Say if I wanted my pc on, but I wanted audio to go to my heaphones, and speakers. I would slide up pc, then headphones and speakers like a normal audio mixer.

The sliders are just normal sliding potentiometers that I had in mind. The hard part is that ideally I would like to be able to control volume using the potentiometers.

The toslink pcb headers have 3 pins each, the reciever is vin, vcc, ground. While the transmitter is vout, vcc, ground.

So I would trust that to lower the volume I would lower the voltage output? How could I do this? If I dont have to use the arduino then that is fine.

As im not doing switching, all the voltages would meet together then go to the outputs. For example, all vout pins would be connected together, then connected to all the vin with the volume adjusters inbetween.

Has anyone done something like this before or know how to? As toslink can be converted to 3.5mm jacks so it shouldnt be too different to that I believe?

Thanks for any help,

ok sorry for the multi post but i didnt want to simply update my original post so people can see there is an update.

i have been doing some research, now by the looks of it people are using either PGA2310 ICs to control their volume or digital potentiometers

These sit in between the Vout of the reciever and the Vin of the transmitter. and the resistance applied causes the volume to become adjusted. As i have 8 volume sources (4 in and 4 out) using digital pots is going to get expensive, being that i would need 4 double pots at almost £5 each.

the PGA2310 is a lot more expensive at £15 but i can't actually find how many sources it can control the volume for?
Now as a digital pot is used for basic volume control, as it is suppose to be a simple mixer board, would i not be able to use a sliding pot to the same result as a digital pot? being that they would both just apply a resistance between the Vin and Vout ?

TOSLINK is a fibre optic connector that will be carrying a digital signal so you cannot use a potentiometer to reduce it's volume.

ok so a very large change to question after realising my stupidity :slight_smile:

the easiest outputs on my devices seems to be toslink, as all my main device have this and it will send out the raw data. now I have realised that toslink is raw data and can not have its volume controlled as it is not analog the question changes. so I now have the inputs done very easily, its controlled from a switching IC which just switches the inputs so I only have one. but the question now is,

if I can get a connecter for the end of the toslink cable that will convert toslink to a 3.5mm jack for direct analog output, would I not simply be reading the toslink adapter then creating my own preamp?

and I believe that is what the pga2311 does? so for this I would have a pga2311 on each output device, which it states it can drive 600ohm headphones by itself. as my headphones a DT770 pro 80ohms my tv can hardly power them so if I connected the output from the toslink receiver to the pga2311, and have that control the volume, then output directly to a 3.5mm jack which almost all my devices are, this should work fine if i'm correct?

this all hinges on the fact that if the toslink to 3.5mm jack converts the signal to analog, the toslink receiver should do the same, so surely I could actually mix the input streams together like you can mix analog inputs together? allowing multiple input streams to go to even a single output? say output from my pc, and output from my mic to go directly to my headphones?


ok so i found a little project that will help me a lot,

using the diagram he supplies i understand that i need a receiver (decoder) for the toslink and a DAC. the components he uses for this are;

CS8416 reciever
CS4397 dac

using these i would be doing the following;

toslink inputs
switch ic
2 PGA2311's
output sockets

using this it would accept the toslink data, let me switch them saving the need to decode all 4, decoding the selected input, sending this output to both PGA2311's for volume control on 4 outputs

the decoder and dac he stated are rather old now and are also surface mounts which i am unable to solder so would like some normal terminal versions. does anyone know of some good alternatives? i can find some but i am unable to understand if they are any good or not. ideally i am looking to order from as that is where i will be getting my PGA2311's from

which makes my choices these;

there are over 1000 DACs, and only 1 audio processor which is socket mountable leaving me with it being a TDA7439. i have no idea idea what they need to have specs wise, i understand roughly what they do but not what makes them good...

so help on this would be greatly appreciated

I have a few major concerns... :frowning:

4 inputs; pc, blu-ray, tv, spare
4 outputs; dac, speakers, hifi system, spare

  1. The signal over S/PDIF/TOSLINK is sometimes encoded, such as Dolby AC3 from a DVD or Blu-Ray. These encoder/decoder formats are covered by patents, and (I'm not 100% sure about this) I don't think you can buy the decoder chips without a license. If you simply want to switch & pass-through the digital signal to your home theater receiver this is not an issue, but if you want to decode & convert to analog, it's a concern,

  2. S/PDIF/TOSLINK is already outdated! Some of the high-resolution Blu-Ray formats only work over HDMI. If your Blu-Ray player (or computer) has an S/PDIF connection, it should "work" with any DVD or BLu-Ray disc, but you won't have all of the formats and depending on the player's features, high-resolution surround formats may be down-mixed to stereo.

  3. Surround sound is now standard with DVDs & Blu-Ray, and you are talking about 4 outputs (two stereo outputs?). You are putting-in a TON of effort on something that can't handle surround sound.

A few other thoughts...

Anything related to TOSLINK is likely to be surface mount. So far, I've been able to avoid surface mount on my home projects but most "complex" chips are surface-mount only. You may be able to find one that has fairly reasonable lead spacing. Where I work, we have lots of fine-pitch surface mount parts (CPUs & memory, etc.) and I wouldn't even attempt hand-soldering these.

600ohm headphones by itself. as my headphones a DT770 pro 80ohms my tv can hardly power them

It's a line-level output. You need to add a headphone-amplifier stage. You can buy low-power amplifier chips, and the circuit is easy to build. The LM386 is very popular. I've used the LM380 and some other stereo chip that I can't remember maybe (LM1887?).

If your TV has RCA connectors it's also a line-output, not designed to drive headphones. a normal audio mixer.

Do you really need to mix signals? Doing that in analog is simple with a summing amplifier made from an op-amp. It's also simple in digital (since it's just summing), but for that you need a CPU (or microcontroller).

Since posting I have pretty much a full dac being built to handle my digital to analog control and a lot more knowledge on what I am doing.

I am using this project

The bloke who did it is putting the receiver and dac on a smd to dip converter so I can use those.

For now I am going to just build the dac, then have all the analog outputs summed together through an opamp circuit as you stated.

The 2 ics being used can be controlled directly using i2c communication so I can send that directly through from my arduino. The only things it will be doing it

Switching the output source on the receiver, and controlling the right and left volume levels on the dac

I dont plan for surround sound, my speakers are only 2.1 as its only a small room and I have annoying neighbours. So it wont need to drive or deliver surround sound.

And by outputs I mean 4 headphone (3.5mm) jack style outputs.