DIY Audio Projects Forum
http://www.diyaudioprojects.com/Forum/

Audio switch
http://www.diyaudioprojects.com/Forum/viewtopic.php?f=12&t=6319
Page 1 of 1

Author:  Addman [ 11 Aug 2018, 16:59 ]
Post subject:  Audio switch

Hello all. This is my first time so be gentle :D

I am making a audio switch with 4 audio sources and one output to speakers.
To do so i will be using either pic or atmega chip and TQ2 5V relay.
To simplify I made a picture with only one input.
When relay is on pin 3 and 4 are connected for right channel and when off, 3 and 2 are connected.
Question is, should i ground the audio source (pin 2) when the relay is off or just leave the pin unconnected?

All help appreciated. Even on my relay choice :P

Author:  Peter W. [ 21 Aug 2018, 08:02 ]
Post subject:  Re: Audio switch

Addman wrote:
Hello all. This is my first time so be gentle :D

I am making a audio switch with 4 audio sources and one output to speakers.
To do so i will be using either pic or atmega chip and TQ2 5V relay.
To simplify I made a picture with only one input.
When relay is on pin 3 and 4 are connected for right channel and when off, 3 and 2 are connected.
Question is, should i ground the audio source (pin 2) when the relay is off or just leave the pin unconnected?

All help appreciated. Even on my relay choice :P


OK - this is a nature-of-the-beast issue.

a) Will the audio source tolerate running unloaded? Many (not all) solid-state sources do not like being run without a load.
b) If you do ground the pin (I would), run it through a 100 - 500 ohm, 2-watt resistor in any case. This will remove any risk to the source.
c) And watch like a hawk to make sure that resistor does not heat up.

Best of luck.

Author:  laurie54 [ 21 Aug 2018, 16:30 ]
Post subject:  Re: Audio switch

Wisdom gained, after it happens to you.
1- Question. Should a relay coil be controlled directly from the pin of the CPU?
2- Answer- no.
3- Reason- Fine when the pwr is first turned on, no problem, but, when the relay coil is d-energized and the magnetic field collapses a "high voltage shot" will be sent directly into the CPU pin destroying it.
4- Solution- Use a diode (1N400x) placed in reverse across the relay coil (anode to V+ on coil) so the high voltage spike will be sent back into the relay-coil instead of into the CPU pin. I know the temptation to not use a transistor to power the relay is strong as the CPU pins are capable of driving more current than the relay uses but since you already have a trans driving the LED add the relay in with the LED. That way the CPU is driving the trans and the trans is driving the LED and the relay (much safer). Still always put a diode across the relay coil. (anode to whichever relay coil pin is connected to V+ and cathode to the gnd return). You will be thankful you did it.

Author:  Addman [ 22 Aug 2018, 07:22 ]
Post subject:  Re: Audio switch

laurie54 wrote:
Wisdom gained, after it happens to you...


You are right about that and thank you for pointing that out.
After "digesting" the circuit for a day I did add a transistor and a flyback diode to save the cpu. I also added another relay to cutt of adio ground. Connecting the ground of 3-4 device's is not the smartest idea I have had :)

Author:  laurie54 [ 28 Aug 2018, 10:59 ]
Post subject:  Re: Audio switch

Don't worry about the gnd of devices which are not connected at that time. No need to disconnect them. Think of the average stereo amp system. All the grounds are connected together when the audio input signal wires are plugged into the back of the amp. When (from the front) a different source is desired one dials it up on the front selector switch. This switch is connecting the signal wires to the input of the amp. The ground wires are already connected.

Author:  gofar99 [ 28 Aug 2018, 17:13 ]
Post subject:  Re: Audio switch

Adding a bit to this...use UF400X rectifiers instead of 1N400X. They have faster response times and generally cost about the same.

Good listening
Bruce

Author:  Addman [ 29 Aug 2018, 18:13 ]
Post subject:  Re: Audio switch

laurie54 wrote:
Don't worry about the gnd of devices which are not connected at that time.


What about ground loop?
There will be 4 inpnuts. Record player and aux. Internally there will be bluetooth and fm receiver. Those have the same power supply.
Perhaps if I connect the gnd from ps to the device's and switch, and only signals from device's to switch?

Author:  Addman [ 30 Aug 2018, 03:02 ]
Post subject:  Re: Audio switch

gofar99 wrote:
use UF400X rectifiers instead of 1N400X.


I have both 1N4148 and UF4004
I think 1N4148 is faster. Thou I'm not sure since I'm terrible at reading those data sheets. :D

Author:  gofar99 [ 30 Aug 2018, 21:46 ]
Post subject:  Re: Audio switch

Hi, The 4148 is a small signal switching diode. It might work. But I have concerns about its maximum voltage rating. The reverse spike from a relay can be quite large and may cause the diode to fail. The UF4004 is much sturdier and would be my choice.

Good listening
Bruce

Author:  Addman [ 31 Aug 2018, 03:02 ]
Post subject:  Re: Audio switch

gofar99 wrote:
The UF4004 is much sturdier and would be my choice.


You are right on this. Better safe than sorry.

Thank you for this :)

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/