Audio Signal Detection for Automatic Input Switching
I put in some time last night working on my amplifier project again after I had received all of the remaining ICs and parts I need for the electronics late last year. One of the decisions I made was to have multiple inputs – a default for an Apple TV (or insert media box) and auxiliary (via minijack and Bluetooth) - and therefore a method of switching between the two. I don’t want to have any physical interaction for input switching when the use case is so clear cut. The default input is always the chosen input unless you want to play music from a phone or iPod (through minijack or BT) at which point it will switch automatically by detecting the signal. It should be (and is) smart enough to do this on its own. There is even a delay before switching back to the default input to accommodate song transitions.
I was able to modify Rod Elliot’s Signal Detection Circuit, originally designed to toggle power to a subwoofer, to run on a 5V supply by using a LM358N dual op-amp and 2N3904 transistor and changing some of the resistor and cap values. I especially like this circuit because it allows the logic to be contained within a few chips in the analog section and doesn’t need to involve the Arduino or any of the digital components. It toggles the output high when a signal is detected and this goes to a diode OR gate (to be combined with an "active stream" signal from the BT board) and on to a Maxim MAX4616. The Maxim chip is a 4xSPST analog switch that works perfect for this application (toggling between two inputs) because 2 of the switches are normally open and the others normally closed. Also, it’s available in a DIP package that makes it easy to prototype, something that’s hard to find for this type of IC.
- Solder the BT breakout board, hook it up to the summing op-amp and add it into the mix (so to speak)
- Solder all of the LEDs and the two drivers to some stripboard to prototype
- Troubleshoot until my eyes cave in