Questions about designing a digital input selector module

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I want to design a digital input selector. I don't know of any available in the DIY world of the kind I want to get/design/build, though it seems ultra-simple to me.

I want to select one out of N inputs. For each input, I want there to be a coax socket and an optical socket, and a simple mechanical DPDT switch to select coax-or-optical for it.

I'm using the term "way" to refer to one input, as in "4-way" selector where I select one "way" out of 4.

My questions:
  • Can I switch between the coax socket's output and the optical module's output (these optical sockets are tiny modules with a couple of resistors and power lines, like what Twisted Pear Audio offers) with a DPDT switch, if all three are within a couple of inches from each other mounted on the rear panel of my DAC? Is any active or passive component needed other than the switch? The output from the switch will be fed to the selector mechanism, which will be relays (my next point...) mounted within 2-3 inches of the switch.
  • Can I do input selection using relays, instead of the kind of active circuit usually used? I'm proposing to use a DPST relay for each input "way", so that I will switch both signal-live and signal-ground wires.

Do you think this will work?
 
Last edited:
Probably better to do the switching with digital logic chip(s). Less jitter, reflections, noise, etc. A switch could always be used to control the digital logic.
Ok, about the "way" selecting. Can you point me to any selector circuit I could use? I am unaware of any selector module or ready-to-build circuit other than the one from Twisted Pear Audio. It would be nice to at least get to study one or two other examples.

And any comments about my idea of using a DPDT switch to select between optical and coax?
 
I was hoping to switch SPDIF and not go into I2S. :(

Same type of switching as far as a dac goes, SPDIF has to be conditioned to 3.3v logic levels in most cases. You just would not need as many signals switched at once as would be the case for I2S.

Or, you want to switch before the conditioning circuit? If not sure, a typical conditioning circuit is shown on page 12 of:
https://www.st.com/content/ccc/reso...df/jcr:content/translations/en.DM00431633.pdf

TOSLINK normally comes out of the optical receiver at 3.3v (LVCMOS) logic levels, so that could go right into one of those selector modules without any further conditioning.

Also, something like AK4118 lets you come in with multiple SPDIF inputs, select one, and output I2S (in case that might be of any interest). https://www.akm.com/akm/en/file/datasheet/AK4118AEQ.pdf
Only needs a 75-ohm resistor and a small coupling cap for each incoming SPDIF line.
 
Also, something like AK4118 lets you come in with multiple SPDIF inputs, select one, and output I2S (in case that might be of any interest). https://www.akm.com/akm/en/file/datasheet/AK4118AEQ.pdf
Only needs a 75-ohm resistor and a small coupling cap for each incoming SPDIF line.
Am unable to figure out at first glance whether this chip generates SPDIF too, instead of I2S.

And if I am going to use this chip, I guess I can use the Twisted Pear 4:1 mux/demux more easily, since it's available as a ready-to-use board and generates SPDIF. Both options let me select from 4 inputs (even the AK chip handles only 4 inputs if I use the parallel mode of control). The remaining question then becomes, can I use a DPDT switch to toggle between an optical module and an RCA coax input?
 
Last edited:

MAX455 suggested in that thread will work, and it is a simple, straightforward solution too.

I was pointing you to a project of my own that has been completed and proven operating to satisfaction (by myself:))

Here

That project employs purposely built digital audio front-end WM8805 capable of up to 24-bit/192KHz. It re-clocks its spdif output so that the jitter of incoming feeds does not propagate downstream, unlike an analog video buffer/switch such as MAX455 which is garbage in garbage out in terms of jitter hygiene.
 
This is very interesting too. Thanks.

This project seems to have a lot of intelligence and automation. Is it possible to drive the selection manually using a dumb rotary switch without getting any microcontroller into the picture?

To be able to operate as a mux WM8805 must be controlled via a serial bus. The chip does have "hardware" operation mode that requires no microcontroller. Unfortunately in that mode, it becomes a simple one-channel receiver by its design, and its internal mux does not work, so useless for your purpose.

As far as the automation/"intelligence" goes, I"ll be happy to share the Arduino codes with anyone interested in the project. For me, a simple, inexpensive Arduino nano was a great part of the fun of doing that project.
 
To be able to operate as a mux WM8805 must be controlled via a serial bus. The chip does have "hardware" operation mode that requires no microcontroller. Unfortunately in that mode, it becomes a simple one-channel receiver by its design, and its internal mux does not work, so useless for your purpose.
Yes.

The Max455 seems to have a hardware mode where I can simply control the input selection using three wires of input.

In your design, the easy way to add a rotary switch would be to interface such a switch to your Arduino, I guess.
 
……

In your design, the easy way to add a rotary switch would be to interface such a switch to your Arduino, I guess.

You are right. In fact I did have rotary encoder control in mind. In the PCB design, TP29 - TP32 are fan-out from the Arduino and are reserved for a rotary encoder with a push button. They line up at 0.1" spacing ready for a wire header. +5V and GND also go along the same header in case a fancy non-contac type encoder is to be used. I have since found cellphone control to be more than adequate, and have not implemented the rotary control.
 
MAX455 suggested in that thread will work, and it is a simple, straightforward solution too.
I am tempted to try the MAX455, driven by a rotary switch through a 74HC148. It'll give me eight digital inputs, and I can set up four with coax and four with the IR receiver modules to take Toslink.

Will the MAX455 have enough bandwidth to handle 10MHz or faster square waves? By my very textbookish calculations 24/192, two channels, will be about 10Mbits/sec. I don't know what a video amplifier or switch can handle. The datasheets do talk about 50MHz, but then those are sine waves, right?
 
I am tempted to try the MAX455, driven by a rotary switch through a 74HC148. It'll give me eight digital inputs, and I can set up four with coax and four with the IR receiver modules to take Toslink.

Will the MAX455 have enough bandwidth to handle 10MHz or faster square waves? By my very textbookish calculations 24/192, two channels, will be about 10Mbits/sec. I don't know what a video amplifier or switch can handle. The datasheets do talk about 50MHz, but then those are sine waves, right?

The 50MHz bandwidth of MAX455 is spec-ed at unity gain. However, In reality you'd want to have a video buffer operate at 6db gain, then terminate the output with two 75-R resistors, one at near end, one at far end, to bring back the original signal level at the far end termination. This is because video buffers hate capacitive load, from cables for example, and tent to oscillate or ring when subjected to one. At 6 db gain into 150-R load you will have about 30MHz bandwidth. I'd say it's less than ideal but probably ok for 24bit/192KHz, depending on anticipated cable length.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.