Tiny audio switcher eliminates repetitive plug swapping

usb-audio-switcher

[Phil] uses both his computer’s speakers and a set of headphones while working at his desk, but he was growing tired of constantly having to remove the headset from his sound card in order to insert the speaker plug. He’s been meaning to rig something up to make it easier to switch outputs, but never seemed to get around to it until he recently saw this LAN-enabled audio switcher we featured.

His USB-controlled switch features a single audio input and two audio outputs, which he mounted on a nicely done homemade double-sided PCB. The switch can be toggled using any terminal program, sending commands to the on-board ATtiny13A via an FT232R USB to serial UART chip.

The switch’s operation is really quite simple, merely requiring [Phil] to type in the desired audio channel into the terminal. The ATiny and a small relay do the rest, directing the audio to the proper output.

Comments

  1. Necromant says:

    Nice, although I would have used vusb + 2313 =)

  2. Tiersten says:

    This is pretty cool. My quick & dirty hack solution to this exact problem was just to wire up two sockets in parallel and live with the messed up impedence + lower output. This USB board would be much nicer :)

  3. Informant says:

    Hmm, I would have just used a cable splitter. But nice looking pcb, none the less. :)

  4. Gilliam says:

    “put a whole new shine on the word ‘overkill’ ”
    an input, 2 outputs, and a relay should be enough. a computer shouldn’t NOT have a header on the mainboard(or soundcard) for a front panel audio jack and do all the above for us.

  5. theorifice says:

    Using FETs to switch the audio would be a lot cleaner solution than having to resort to Relays.

  6. Jeff says:

    If you didn’t have a requirement to execute the switch from the pc, then a simple DPDT switch would accomplish the same goal. 3 audio ports all using a common ground, and a DPDT to switch between one output and the other.

  7. TMM says:

    What i have is a switched 6.5mm jack (DPST), with the signal wires to the speaker amp output jack hooked up to the switches.

    Plug headphones in, speaker amp is disconnected. No issues with impedance, and no power required!

  8. marc says:

    Huge overkill. It can be done with only FT232R on board, or like Necromant says vusb on Tiny2313.

  9. steeve says:

    he could also skip the mcu and control the relay bit-banging the FT232R ports…

  10. W1N9Zr0 says:

    Almost every motherboard nowdays comes with two outputs, one on the back labeled “Speakers”, one header on the motherboard labeled “Headphones” which connects to the front panel IO.
    You can control the output jacks separately from software.

  11. Christoph says:

    Most Mainboards have several audio outputs, why not use those?

  12. mohonri says:

    A very nice hack, well-executed. Although I’m not sure why you’d want to make it a computer-controlled switch for this application–why not just use a pushbutton DPDT switch?

    If this were stand-alone, why require a computer at all? Why not put an IR receiver of some sort on the board and take a signal from a remote?

  13. Chuck says:

    Nice job and an interesting approach. Just a recommendation for anyone else though: I switch between computer speakers and headphones often as well, all I did was plug in a stereo Y cable to turn the speaker output into two. Then sound always goes to both. I simply turn the computer speakers on/off as needed. Very simple, cheap, and accomplishes the goal. Not very “hackish” though :)
    Just my $0.02.
    -Chuck

  14. Well, can you really say it is a overkill to use mcu if ATTiny costs 1$? And mcu gives one advantage over using just RTS line: When OS boots, all sorts of drivers can go and poke around ports to test what is attached. With mcu you can implement locking mechanisms to prevent unwanted switching.

  15. Andrew says:

    Or buy a USB sound card. $2.14 from DX incl. shipping.

  16. jc says:

    Or switch sound outputs using pulseaudio at runtime

  17. Mike says:

    This is serious overkill.
    The comments remind me of the complaints of new programming students who refuse to understand why they need to design a flowchart and a class to add two numbers together, but then can’t design a class for their application later because it is too complicated.
    He could have used switch or a button, but he used something that provides knowledge that can be leveraged to solve larger and more complicated problems.
    I think it’s a decent hack.

  18. Mike says:

    This is serious overkill.
    The comments remind me of the complaints of new programming students who refuse to understand why they need to design a flowchart and a class to add two numbers together, but then can’t design a class for their application later because it is too complicated.
    He could have used switch or a button, but he used something that provides knowledge that can be leveraged to solve larger and more complicated problems.
    I think it’s a decent hack.

  19. Rick says:

    While a computer controlled switch is overkill for now, you could easily imagine writing a plugin for your media player that would switch the output to headphones when playing music.

    When not playing music, the speakers can be used to hear your new mail notifications and meeting reminders.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s