|
|||||||
| Home | Forums | Rules | Articles | Store | Gallery | Blogs | Register | Donations | FAQ | Calendar | Search | Today's Posts | Mark Forums Read | Search |
| Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc. |
|
Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving |
|
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
diyAudio Member
Join Date: Mar 2007
|
I set out to design an SPDIF signal detector/selector using an analog mux as the switching element. Little did I know that the project was going to morph into an audio signal detector/selector using relays.
The unique feature of this project is that I've utilised a small microcontroller to detect whether a signal is present on each of the 4 inputs. It works by using the builtin ADC to sample each channel at the maximum rate for a short time (100ms) and determining how many samples are above a threshold given in the firmware. If the number of samples is high enough, the signal is deemed to be on. Otherwise, this is similar to many of the other source selector projects out there. I've breadboarded the detection part of the circuit and written the detection firmware, and it works well, reliably detecting when a source is playing. I'll build in some delay so that e.g. track changes don't cause the indicators to go out. The status of the inputs will not affect the selected input, so when a signal goes away that input will stay latched until it's changed. I'll need to do some tweaking to figure out how sensitive it will be to quiet passages, and EMI for floating inputs. Output uses an 8-bit I2C expander to drive 4 sets of two LEDs (or 4 bipolar dual colour LEDs, which is my preference) to show signal presence and signal selected status, a 2-bit address (for the relay board interface) and an enable (active LOW) signal. The I2C signals are also available for a possible future slave mode to be read/written by a master controller. Input is a single pushbutton that switches to the next active source. If all signal sources go away, the previously selected one will remain selected until the button is pressed again, which will disable all inputs. Unfortunately this state will leave the output floating with my relay board, but I don't have a better solution without putting junk in the signal path. I would appreciate any comments. Please take a look at the board layout/schematic PDFs: http://www.gotroot.ca/~ktims/dump/au...20selector.pdf http://www.gotroot.ca/~ktims/dump/relay%20board.pdf And the BOM: http://spreadsheets.google.com/pub?k...j8i98ZqCAN4qbw |
|
|
|
#2 |
|
diyAudio Member
Join Date: Nov 2004
Location: Central Ohio
|
What are the inputs you are switching? Toslink receivers? Coax or AES?
|
|
|
|
#3 | |
|
diyAudio Member
Join Date: Mar 2007
|
Quote:
I may build a module that would replace the relay board with an analog mux and the hardware to switch SPDIF/AES signals, but for now I don't need this and would be able to make more use of the analog switching. This system *should* work with SPDIF as well when I have a need for it, at least the detection side should be fine. The relay board isn't the best approach for the SPDIF signals, but I think the layout and relays are good enough that it will work. |
|
|
|
|
#4 |
|
diyAudio Member
Join Date: Nov 2004
Location: Central Ohio
|
OK, your schematic makes more sense now. I am still concerned that your relays ground the input signals when the channel is off.
It would be better to terminate the "off" inputs with resistors instead of grounding. If the analog source drivers see a 600 ohm resistor switched in by the relay, they will not drive very much current if there is an output voltage. For digital, you would want to terminate coax with 75 ohm and AES with 110 ohm. Shorting to ground could damage the output circuit of the source. |
|
|
|
#5 | |
|
diyAudio Member
Join Date: Mar 2007
|
Quote:
The terminating resistor seems to solve both problems. 10K seems to be an average input impedance, why would I want to use something smaller? Wouldn't this potentially increase crosstalk by increasing the current flowing in the unused circuits? Or is the goal to force the signal as close to ground as possible without causing damage... |
|
|
|
|
#6 |
|
diyAudio Member
Join Date: Nov 2004
Location: Central Ohio
|
10K will work fine. You could probably use either 10K or 600 and not notice the difference.
|
|
|
|
#7 |
|
diyAudio Member
Join Date: Mar 2007
|
I've updated the relay board PDF to include my changes. Some parts shuffling was required to fit the resistors, but nothing too serious, and I've still managed to keep active analog signals from crossing or being so close there's no ground between them. I made another minor change as well; the unused side of the decoder no longer has enable asserted - not that it matters much. The digital signals are all static so there shouldn't be any interference from there; and I've kept them away from the analog where possible anyway.
The one thing I'm not happy with is the position of R1, but the only solution I can find is to move all the components except U4 north, but I like that idea even less than having this one part hanging off to the side because of what it does to the input connectors (or symmetry, take your pick). |
|
|
|
#8 |
|
diyAudio Member
Join Date: Nov 2004
Location: Central Ohio
|
I think you only need 4 resistors on the relay board...
On an "off channel", the signal path from pin 3 of a connector goes through a relay contact, through a single resistor to the other relay contact, and back to pin 1 of the connector. With the 2 resistors to ground in each channel, you will get current in the ground traces. With one resistor terminating, all the current returns back to the source. This way, there is no crosstalk or current in the ground trace. |
|
|
|
#9 | |
|
diyAudio Member
Join Date: Mar 2007
|
Quote:
The grounds on all sources are necessarily connected together so that the detection circuit can work. I tried to come up with a scheme to isolate them and alleviate potential grounding issues, but I wasn't successful. All the schemes I came up with were a fairly difficult load for the source, and I don't want to load the source appreciably more than if it were directly connected to the amp. I made the concession of spec'ing 1M input resistors for this reason (though I will probably try 100K, and even lower should be okay with all of my gear), which hurts the ADC performance pretty seriously due to the sample and hold input. |
|
|
|
|
#10 |
|
diyAudio Member
Join Date: Nov 2004
Location: Central Ohio
|
OK I get it now. You aren't switching the grounds.
I wouldn't do it that way, I think you will get unwanted currents in the ground traces. |
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WTB source selector switch | limono | Swap Meet | 1 | 23rd April 2009 07:47 PM |
| Relays for Source Selector | SRMcGee | Everything Else | 1 | 9th November 2008 10:02 PM |
| source selector | mnr102 | Multi-Way | 0 | 24th February 2008 11:11 PM |
| twisted pair signal, source selector and ground buss??? | cbutterworth | Tubes / Valves | 2 | 30th March 2007 07:39 AM |
| Here's a source selector | DragonMaster | Everything Else | 0 | 7th August 2005 03:52 AM |
| New To Site? | Need Help? |
| Page generated in 0.13493 seconds (82.76% PHP - 17.24% MySQL) with 10 queries |