Go Down

Topic: Switch Advise (3.5mm Audio Cable) (Read 1 time) previous topic - next topic

command_z

Please see image attached. I have an Audio Source that I would like to be able to switch the output between two different speakers.

I am unsure of which switch to use. It could either be a physical push switch, but It would be better if I could control the switch with the Arduino by sending either digital HIGH or LOW.

Any recommendations? Thanks!




DVDdoug

For a mono source, you need a SPDT (single-pole, double-throw) switch (with 3 terminals).   For stereo, you need a DPDT (double-pole, double-throw) switch (with 6 terminals).    In this configuration, the common terminal goes to the source, and each of the other terminals goes to a speaker.   (All of the ground wires just get connected together.)  You could call this an A/B switch, since it switches between speaker 'A' and speaker 'B'.  (Wikipedia switch configurations)

Quote
but It would be better if I could control the switch with the Arduino by sending either digital HIGH or LOW.
A relay is an electrically controlled switch.   Relays also come in various configurations such as SPDT and DPDT.   (If you can't find an appropriate SPDT relay, you can use 3-terminals of a DPDT relay.) 

If you can find a relay rated at 5V coil voltage at 40mA or less, you can drive it directly with the Arduino.   Higher voltage/current will require an additional transistor or MOSFET, and possibly a higher supply voltage.   

With low-power audio (like you might get through a 3.5mm connector), you shouldn't have to worry about the contact voltage/current ratings on the switch or relay.

A regular 'ol mechanical relay is probably your best bet.   There are also solid-state switches and solid-state relays.   Most solid state relays are SPST, so you'd have to use more than one, and many won't work with audio.    Solid-state switches are also usually SPST, but you typically get more than one switch in a package, so you can wire them in various configurations.

command_z

Thank you Doug! This is great information!

I think I will stick with the SPDT switch.

Go Up