Analog Circuitry for Raspberry Pi based Telephone Switchboard

Thread Starter

arswaim

Joined Jul 18, 2021
2
Hi,

This is my first post to this forum, so I apologize if this is in the wrong section or is otherwise off-topic.

I've been working on a project to connect a few rotary-dial phones using a Raspberry Pi for the switching logic. The design goal is to have four phones connected with two circuits, allowing for two simultaneous calls. I've made a fair bit of progress and the Raspberry Pi can now:
  • Detect on-hook and off-hook events for each line
  • Count the pulses from a dial to determine which number was dialed
  • Ring a line when its number is dialed from another line
  • Stop ringing as soon as either the calling line goes on-hook or the line being rung goes off-hook
  • Connect the calling and called phones to a free circuit when the call is answered
  • Disconnect the phones in a call from a circuit when either phone goes on-hook

My problem is with the second to last step, connecting the two phones to a single circuit. It works, inasmuch as the two callers can hear each other, but the volume is very low. I'm fairly convinced that this is due to a basic lack of understanding on my part of how POTS systems work, and I'm hoping that someone can point out the really stupid mistake I'm making :)
I'm using some fairly old equipment, but I don't think the equipment is at fault. I tested it on an actual land line, and it worked fine. Also, when I connect the two phones in series like this:
Phones in series.png
The volume is very good.

It seems, from what I read, that I should be able to connect these phones in parallel to a voltage source, but when I do I can't hear the other phone. However, if I put a resistor into the mix like this, I can hear the other phone, although at a fairly reduced volume:
Phones in Parallel.png

Here's the relevant circuitry in my project. I've left out the parts which handle ringing and the various connections to the Raspberry Pi, since they're not relevant here. When a call is completed relays R2a and R2b are energized, and obviously the phones are off-hook.

System Diagram.png
The two capacitors allow the voice path to travel around the high-resistance coil of the off-hook detector relay but still send current through for off-hook and dial pulse detection. Relays R1a and R1b connect to the Raspberry Pi, and the other relays are controlled by the Raspberry Pi.

As I mentioned, the sound is audible, just quite soft. I've also experimented with putting a choke between R2 and the negative terminal, which seems to have some effect, but not much.

I'm only using 24V, so maybe my expectations of volume are unreasonable? But I still think I'm missing something very basic. I don't have much experience with analog circuitry, unfortunately.

Thanks in advance for any help or advice!

Alex
 

Sensacell

Joined Jun 19, 2012
3,432
You need to increase the AC impedance of the loop- the phone system uses inductors to raise the impedance at AC- where the audio signals are.
 

Ramussons

Joined May 3, 2013
1,404
In your 2nd drawing, replace R1 of 100 ohms with an Inductor on each side of the PS having about 50 milliHenry / 100 Ohms.
See the effect.
The phones will not work without sufficient current, but must face a High Impedence with the Power Supply.
In actual practice, phones are never fed power through a Resistor, but an Inductor. The DC resistance of the Inductor limits the current to a safe value.
 

Thread Starter

arswaim

Joined Jul 18, 2021
2
Thanks very much for the suggestions, @Sensacell and @Ramussons ! I had thought about using inductors, but to be frank wasn't sure where they fit into the circuit. I'll give that a try.

@DickCappels , understood about the voltage. My choice was based on the fact that my line length is very short compared to the actual phone network, and that I had a power supply that could output 24 V, but not one that could generate 48 V :)
 

PhilTilson

Joined Nov 29, 2009
131
A little disappointing to see a Raspberry Pi-based system using so many mechanical relays! There are solid-state analogue alternatives available, you know!
 
Your circuit is kinda bad.

Of and on hook is basically detected by the DC voltage. i think it's somehting like 48 on hook and 5V on hook.

You should really use a 600:600 ohm transformer at the exchange and put a 25mA current source between the two of them. The audio is then isolated from the DC by the transformer. I've done this when i wanted to fix a phone.

There are some ring generators out there. Here https://www.mouser.com/datasheet/2/391/supertex_hv461-331911.pdf , https://www.microsemi.com/document-portal/doc_view/10617-pd-5036-datasheet The AC signal is superimposed on the DC.

You don't want your ring signal to feed back to the audio.
 

Ramussons

Joined May 3, 2013
1,404
For a 4 phone setup, you can avoid switching the DC. Instead switch only the Audio. You can use Analog Switches controlled by the Raspberry. In such a case, you will not need Inductors either- And no Relays.
I had done some playing around with something very similar 40 years ago. But that did not include switching.
 

Ramussons

Joined May 3, 2013
1,404
All exchanges were standardised to +ve ground. The idea came from the days of open overhead wire network, where _ve voltage was "Live" to avoid corrosion due to Electrolysis.
There are smaller exchanges that work off -24 volts too.
 
Top