I have built a simple wired intercom were it consist of a master and a slave wherein it only consist of a speaker which convert to a mic whenever a button is pushed. The problem is that, from the master the slave is only connected with only 2 wires.
You could add series capacitors to block DC and have a push button bridge the one at the slave out to allow DC to flow so operate a relay at the amp end to swap inputs and outputs of the amp around.
I'm off to bed as it is really tomorrow here in Oz, but I'm sure someone else could help with a circuit. It may take a bit of experimenting to get it working.
If the changeover between Mic and Speaker takes place in the master, you need only a DPDT switch to do what you need.
Speaker 1: One Wire is Ground. The other goes to Amplifier Input / Output
Speaker 2: One Wire is Ground. The other goes to Amplifier Output / Input
If you want the option to permit changeover at both ends, you will need to replace the switch with a DPDT relay that operates on a Loop - like the loop signalling used in telephone exchanges.
I got this circuit from a friend but what kind of logic gate should i add at the comparator output in order to change the turn on the relay (from speaker to mic)?