Connecting a Telephone handset to a USB Sound Card

I have a bit of a thing for ruggedised telephones like the ones you see on railways and industrial settings. In the UK the main manufacture is Hubbel, formerly Gai Tronics, formely DAC...

Their phones cost a fortune new but occasionally pop up on EBay for reasonable prices, however they're usually in some state of disrepair and spare parts cost a fortune. £200 for a replacement handset for a £600 phone. Yikes! (Incidentally I suspect this is why the end up on EBay, it makes more sense to buy a new one than try to get spares)

For a long time I've wanted to create my own custom internal controller to replace any that are broken, with the added bonus of converting them to SIP. I had some concerns about interfacing the handset / reciever with a soundcard as telephones generally operate at a different impedance to your average speaker and microphone, so I connected one up as a proof of concept. 

I chucked a photo up on Twitter and it was suprisingly popular so I thought I'd document the process


Telephone handsets have different impedances and properties which make them differ from a standard headset. Some may damage your soundcard. Some may become damaged by connecting them to a soundcard. In theory if things go really, really wrong you might damage the computer it's connected to, although they often have fuses and other protection to stop this from happening. No guarantees though.



You'll need a couple of things to get started:
  • CM108 USB Soundcard (~£5)
  • Telephone Handset - I used one from a Gai-Tronics commander, but others may work. Unfortunatly I can't guarantee which will be compatible.
  • Soldering Iron / Hot Air Rework Station / Solder / Electronics Tools / Wire

Identifying the speaker and microphone

If you're not sure which wires are for the Microphone and Speaker (Reciever / Transmitter) an oscilloscope might be useful. You can connect it up to the wires and whistle into the Microphone and observe the wave on the scope. Experiment to find the wires with the most amplitude. Note that the speaker will work as a Microphone, but not a very good one. So you may see a signal but greatly reduced vs the Mic. 

If you don't have an oscilloscope you can skip this step for now.

Converting the CM108 soundcard

The CM108 provides a DC bias to the microphone intended to power electret microphones but this isn't required for a traditional telephone handset so we remove it. I'm not entirely sure if this is required but it gave me peace of mind I wasn't going to fry anything. (Could anyone confirm?)
First of all you will need to remove the Mic and Speaker sockets. I'd suggest doing this with a hot air rework station, but you might be able to cut the legs and use a standard soldering iron.

Once they're out the way you can them remove the DC bias components, circled in the image below. Again I'd suggest hot air and some tweezers, but you might be able to get away with using a fine tipped soldering iron.

The image shows some cut tracks - this is for another application and they can be ignored.

Modified version of the soundcard, with sockets and DC bias components removed.
(Reproduced with permission from Neil Mooney M0NFI)

Connecting the handset to the soundcard

Once you've prepared the soundcard you can then go about connecting the handset. If you've not already determined the microphone and speaker I'd suggest doing this in a way that allows you to swap them around easily.
The image below shows which of the exposed pads does what. Note theres a few holes between the pads, these can be useful for adding a bit of strain relief (although I suggest once tested and completed you beef it up, by either placing it in an enclosure and / or adding a generous amount of hot melt glue. The PCB is covered in etch resist which should help avoid shorts, but try to avoid shorting anything. On my handset the speaker and mic polarity didn't matter but your milage may very.
USB soundcard with wires attached
To make it easier I soldered some "hook up" or dupoint wires with the pins on the end to insert them into the connector on the handset. For a more permenant solution you could solder the handset cables directly to the board, assuming you've identified the microphone.
The soundcard and handset connected up. On my handset blue was the mic, and red was the speaker 

Connecting the soundcard to the computer

Once the required mods and connections have been made you can gingerly connect it up to your computer. Before you do turn down the volume and try to avoid generating any sounds if you can (including notifcations!)

To test the handset out I used Audcacity (There has been some scandal about the privacy policy recently but I wasn't too concerned)

Open up audacity and select the input as the CM108 USB Device. Leave the output set to your normal speakers / headset for now. Click record and speak into the microphone. You should see the waveform appear on screen. After recording for a few seconds you can play it back. If it's really, really quiet you might have wired up the speaker. Try swapping the connections around and re-testing.

Once you're confident you've identified the microphone you can select the output to use the CM108 USB device and playback the audio, slowly increasing the audio until it's at a good volume through the handset. For me 50% was more than loud enough, but I could go as far as 100% without distortion or damage.
I recorded myself via the handset and saved it to an mp3 file you can listen to here (This is the raw, unprocessed audio). Note there is a slight high pitched whine on the audio. A 100kHz to 3000kHz band pass filter did reduce it, but didn't remove it entirely - there's some experimentation needed there.

If you do make your own USB handset I'd be interested to see it in action!

No comments:

Post a Comment