Inside the intercom, there is not enough space to hide everything, when the whole setup is done with jacks to connect the audio. So to address this problem, I opened the plastic case of the USB sound card and desoldered the connectors. Then I soldered wires to the spots where the connectors were. The connection of these wires will be discussed later in this step.
Most intercoms use the speaker as microphone. So this means that we have to devise a method to connect the same speaker to the output and the microphone input of the USB sound card. There is a push button in the front that was used originally to switch between listen and speak, so that can be of use to us.
It has to be said that I didn’t want to change anything on the outside of the intercom because it’s such a nice thing in great condition. Drilling holes in it was no option. Otherwise I could simply have added a DPDT switch to switch between input and output. So I had to find the next simplest method.
This is where the 5V DPDT relais comes in. We can use the push button of the intercom to switch it. To do this, we connect 5V to the push button and the second wire of the button goes to one side of the relay coil. The other side of the coil goes directly to ground. So when you press the button, the coil is activated and the relay switches. It is good practice to add a diode in the opposite direction over the 2 pins of the coil.
The center-pins of the DPDT relays are connected to the + and – of the speaker. The NO (Normally Open) pins are connected to the microphone input of the USB soundcard. The NC (Normally Closed) pins need to be connected to the output of the sound-card. But the signal of that output is not loud enough for the speaker so we need to put an amplifier between them.
The Amplifier I used, is quite simple to hook up. Everything is clearly marked on the PCB. Connect the 5V pin to 5V and the GND pin to GND and you have power. Then connect the output and GND from the soundcard to Rin and GND and connect R+ and R- to the NC pins of the relay.
When this is done, everything can be placed into the case. Connect the sound-card to the pi.
It is not a very good idea to try to power everything from the raspberry pi. So I found a 5V 3A wall adaptor to power this project. I did cut of the connector and connected everything inside to it. To do so I had to cut a USB cord. That allowed me to connect to the pi without having to desolder the onboard USB connector.
When everything is hooked up this way, your hardware is set up and the case can be closed.