Browse over 10,000 Electronics Projects using the Page Numbering provided at the bottom of each Page.

Homemade PBX

Homemade PBX

It works! From a telephone, it sounds indistinguishable from the real telephone network. When a call to another extension connects through, there is no click, you merely hear the dying oscillations of the bell as the handset is lifted away. Phones and answering machines of every description have been tried with this and all work fine.

This is intended for educational and/or entertainment purposes. In no way is it sufficient information to duplicate the circuit. Perhaps it will satisfy the next person who asks about it after reading the brag reference I inserted into this old Usenet posting.

Eight telephone extensions with roughly telco spec voltages and currents (48V onhook, 90VRMS 20Hz sinusoidal ringing, about 25mA loop current offhook.) Ring trip is sub-spec but can handle at least 3 “500” type rotary dial telephone sets in parallel without false tripping. Lines are not balanced, nor is one side ground.

One central office line capable of inbound calls (ring detector) and outbound calls with DTMF and pulse dialing (selectable, independent of the type of extension phones. That is, the PBX can convert tone-pulse and pulse-tone.)

Three internal voice buses, meaning up to three calls in progress simultaneously. Telco standard call progress tones (dial, busy, fast busy, audible ringing.)

Example Usage
Call arrives on outside line. All extensions that currently have outside ringing enabled (toggled with 082) ring with the same cadence as the outside line.
Extension 5 picks up the call. All phones stop ringing.
Extension 2 picks up too, gets dial tone. Wishes to join the incoming call, so dials 09. Connected to extension 5 and the outside line.
Extension 1 dials 9. Gets busy signal. Dials 02, gets stutter dialtone confirmation, hangs up.
Extensions 2 and 5 both hang up, terminating the outside call. Extension 1 gets a single short ring. Picks up the phone, is automatically connected to the outside line.
Extension 1 makes a pulse-dial call but the outside line is configured for DTMF so the PBX converts the digits.
Extension 1 parks the call by flashing, then dialing 05.
Extension 7 forwards all calls to an outside number by dialing 0697451576. Extension 3 retrieves the parked outside call by picking up and dialing 041.
Extension 8 dials 01800 to ring all available stations with the four-short-bursts ringing pattern. Prearranged signal for a certain person to pick up, whatever extension they are nearest. Extension 5 picks up, call is completed.
Extension 3 wishes to access a special feature on the outside line, transmits a flash by flashing to enter command mode (confirmed with stutter dial tone), dialing 9. And so on… 

Hardware Design Philosophy
This is not a low-cost design intended for publication and exact reproduction by others. It was completely tailored to what components I already had and what was cheap to buy. It is also not terribly efficient; if in doubt I insert an extra op-amp buffering stage or more clamping diodes just to be sure. The low-tech relay switching matrix is because I had tons of relays but no CMOS switches, and didn’t know how to use the latter at the time anyway.
The massively oversampled digital tone generator is because I am a digital weenie. Similarly offhook detection in the line circuits could probably be done with solid-state circuitry but I actually like the chatter of the relays as phones are dialed.

Analog Hardware
Let’s start with the line circuit. There is one of these for each extension.

The voice paths 1-3 of all the line circuits are connected together. So if any given pair of line circuits select the same voice paths with relays K3 and K4, they can talk with each other. Any line that is not currently connected to a voice path is terminated via a 600 ohm resistor so that it doesn’t sound funny.

When the phone goes offhook, current is drawn through the 200 and 300 ohm resistors and the line relay K2, which closes. Via the debounce circuit a clean OFFHOOK- signal goes to the control complex. Pulse dialing and switchhook flash are detected by timing the OFFHOOK- signal in software.

The large voltage changes caused by this are kept out of the voice circuitry by capacitor C2, which at 4uF is much larger than it needs to be.

To ring the line, ring voltage is generated and relay K1 is activated. This places capacitor C1 effectively in parallel with the relay coil, shunting the potentially strong ring current around it so that it doesn’t chatter (which would result in “false trip”, i.e. a false offhook indication.) However if the phone goes offhook, the capacitor is discharged by the DC current and the line relay closes within one or two cycles of the ring waveform. The control complex then immediately cuts off ringing by opening relay K1.

That’s all there is to it, except for very careful sequencing of the relays. For example, the control signal to K1 is synchronized in hardware to the zero crossings of the ring waveform, and the voice path is connected via K3/K4 only when C2 is in steady state, so that no click results. For example, if the line has just picked up after being rung, a brief delay occurs before the call is connected.

Connected to each voice path is the circuitry to detect DTMF tones and generate audible call progress tones. I don’t have a schematic for it, but I do have a wiring diagram which is just as good:

Visit Here for more.