Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

The general and simplified view of my circuit is something like that:

General Scheme

Using a microcontroller I want to select between two sound signal sources (S1 or S2). S1 is a signal that comes from a microphone (low voltage), S2 comes from an Arduino microcontroller (0-5v). When connected, the signals are aplified and transduced to sound waves by means of a speaker.

I've tried to use a conventional Relay but when switching it creates a spike that is amplified and can be heard. I want a silent switch.

The signals S1 and S2 are never simultaneoulsy "on", so another possibility would be something like that:

Second possibility

Where a device (triac) blocks (opens or closes the circuit), the triac could also be controlled by 5v from the microcontroller. A diode could be placed to block the signal and protect S2.

Looking to a device that could achieve that I found the Solid-State relays and the TRIACs. After trying to understand the differences between them and which could be the most suitable for this application I still have some doubts.

Which scheme and device would you use?

share|improve this question
add comment

3 Answers 3

up vote 3 down vote accepted

For this sort of application, you can use a simple SPDT analog switch such as the MAX4544:

enter image description here

You can get them in an 8-pin DIP from Digi-Key for $1.32.

share|improve this answer
    
Will it create any spike/noise when switching or is unnoticeable? –  Maties Pons Apr 29 at 9:14
1  
@MatiesPons To mitigate the switching noise, you could try AC-coupling the two sources to the inputs of the switch. This would eliminate the DC offsets which I think is creating the spike. If you have the relay still hooked up, you could try it with that. Try connecting a 1 µF capacitor between each source and the relay (or analog switch) inputs. The 1 µF is just a suggestion, you may want to experiment with different values. –  tcrosley Apr 29 at 12:59
    
I can't believe that! I was thinking a lot about which could be the source of the problem and I ended up believing that was the switch itself who was creating the spike. But the problem really was that the S1 comes from a microphone that it's being biased, so the signal has a DC offset of 2.2V. After connecting it to a Capacitator there are no spikes anymore. The first thing before ask a question is to find the correct source of your problems... At least using the IC that you have proposed the switch will be much more quick. Thank you very much. –  Maties Pons Apr 29 at 14:04
add comment

Why don't you use an analog multiplexer like AD8170 or 74HC4051?

enter image description here

share|improve this answer
    
Because I am dump enough for not having thought about it before... Thanks. –  Maties Pons Apr 29 at 9:16
    
Another reason for not using it is that it is not terribly well suited for the purpose. The AD8170 is a video multiplexer, as should be apparent from the 75 ohm termination resistors R2 and R3. With a gain-bandwidth product of 250 MHz, It is gross overkill for the intended application (microphone output). Making a PC board for the unit probably requires excellent high frequency techniques to keep the internal amplifier from oscillating. –  WhatRoughBeast Apr 29 at 16:43
add comment

If the two signals are at a different potential then there will be switching noise when you switch, whether you use a relay or a solid state switching element.

If you already know that the two will not be active at the same time, you can probably just use a resister from each to the amplifier input. The resisters will mix the two signals at the amplifier and you will have no switching noise since both sources are always connected.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.