Teleexchange

You might also like

Download as pdf
Download as pdf
You are on page 1of 6
3101/2022, 00:25 Telephone Exchange ‘The Wayback Machine - https://web.archive.org/web/20080816033456/http://www.holmea.demon.co,uk:80/Exchan. Telephone Exchange Design Photos ‘Schematics Back to projects Introduction This miniature, 8-line home telephone exchange (PABX) works with standard telephones and features high-quality, user-friendly progress tones. Connection to telephones is via a two-wire unbalanced loop with a common ground. Only pulse dialling is supported although the exchange could be adapted to use a DTMF tone decoder. Subject to lacal telecom regulations, an outside line could be connected. There is already a spare transformer winding which would be suitable for this. Connection of unapproved devices to the UK public telephone network is illegal. History T've been making telephone exchanges since I was 12 or 13. My dad brought telephones home from work for me. My first efforts were manual exchanges with some form of switchboard in my bedroom and extensions around the house. I wasn’t allowed to install old telephones just anywhere so I had to put them in places like the garage and the shed. ‘An early attempt to make an automatic exchange using relays and a uniselector ended in tears. My first working exchange used reed relays controlled by a Commodore PET personal computer. I co-built another using CMOS bilateral cross-point switches as a 2nd year undergraduate project, and I designed a third for my final year project. My supervisor told me I couldn't spend the rest of my life designing telephone exchanges! ‘This is the first exchange I've designed in 17 years. My interest was re-kindled when I came across an article by LD Gunn in Wireless World of August 1980*. His Ingenious "Miniature, ten-line telephone exchange” used only 22 relays. It was enhanced by J H Kulper whose "16-line PABX with options” was published by Wireless World In four parts from November '83. + See page 49 Sept '80 for corrections. Other designs include: G F Goddard's "Miniature automatic telephone exchange" using relays and uniselectors, published in Wireless World Feb '72 with modifications by P F Gascoyne in April ‘72, Practical Wireless ran a design by 3 ‘Thornton Lawrence using TTL logic and reed relays in Feb '75 with modifications by G M Rossetti in March and August "76, The Maplin "Digi~Tel" by Robert Kirsch, using CMOS crosspoint switches, appeared in "Electronics" the Maplin magazine in September '82. Finally, Elektor published the "Microprocessor-Controlled Telephone Exchange” by A. Rigby in October '90 with corrections in January "91. 1 was going to build @ copy of L_D Gunn's exchange until, whilst mulling over ways to replace some of the relays with opto-isolators, I discovered the variety of different opto-devices that are now available and had the idea of using opto- coupled triacs for switching. I also discovered the TLPS98G "photo-relay" for which the manufacturer's data sheet lists telephone exchanges as one application, I've made extensive use of these, and the more conventional phototransistor type opto-isolators in this design. 1 always wanted to make a truly all-electronic exchange with zero moving parts. The challenge was that standard telephones require a high AC voltage for ringing. Most designs handle this by having at least one relay per line. This is, 2 perfectly practical approach that I would probably take myself if I were designing a commercial product, The main advantages of opto devices are their reliability, small size, low cost and silent operation. The analogue circuitry of this exchange fits on a single eurocard. Overview ‘The analogue circuitry comprises the following parts: + Call sensor + Originating loop + Destination loop + Transmission bridge + Tone generator + Ring Trip Call sensor hitpsweb.archive.orgiweb/200808 160334S6/itp www holmea.demon.co.uk/ExchangelDesign htm 48 3101/2022, 00:25 Telephone Exchange When the exchange is idle, power is applied to the call sensor via a TLP598G photo-relay, The sensor comprises 8 CNX35U opto-isolators - one for each line. When an extension is lifted “off-hook", its associated opto-isolator asserts a sense line. If only one sense line is asserted, the controller latches the binary code of the originating extension and initiates a call. The call sensor is powered-down until the end of the call o ating Loop ‘The calling line is connected to the originating loop by an opto-triac. Loop current flows through transformer TL. secondary, and through the CNX35U loop status opto-isolator which detects dialling pulses and, ultimately, hang-up, A-small time delay Is allowed for things to settle down before dial tone is delivered to the caller via the primary of transformer T1. If the loop is not closed at the end of the time delay, the exchange reverts to the idle state. Destination loop The called extension is connected to the destination loop by an opto-triac. There are two paths through the loop: for DC only via transformer T2 and a TLPS98G photo-relay; and for AC via the AC ringing generator and a TLP3043 opto- triac. The paths are switched alternately producing the required ring-ring effect interspersed with silence, The 598 and 3043 light emitting diodes are connected back-to-back as a safety interlock. The TLP3043 contains a zero-crossing circuit to ensure a clean switch, Ring Trip Recess $ a asveac ; a Lom Leer ‘The ringing voltage applied to the line is that of the ringing generator plus a DC offset. The average voltage equals the DC supply. Only AC can flow during ringing because telephone bells are AC coupled. Answering creates a DC path through the telephone allowing DC to flow. ‘The 47-ohm resistor samples the line current. The voltage across it is low-pass filtered to attenuate the AC component. When the call is answered, the DC component operates the BC640 PNP transistor which asserts the Trip input tc controller. A high voltage PNP transistor is required. The BC640 has a Vceo of 80V. Ring trip is an appropriate name for this circuit because it's quite critical in operation. Too much AC current, due to too many telephones connected in parallel across the same line, leads to false triggering. This is why BT approved appliances must quote 2 REN. This circuit was developed and tested with a SOHz ringing supply. BT has an even harder job to distinguish DC from AC because they use 162/3Hz! Transmission bridge hitpsweb.archive.orgiweb/200808 160334S6/itp www holmea.demon.co.uk/ExchangelDesign htm 216 3101/2022, 00:25 Telephone Exchange i tJ a ‘The secondaries of transformers T1 and T2, and the 2u2 coupling capacitor form the transmission bridge. The transformers act as low frequency chokes, passing DC to the carbon microphones whilst presenting a high impedance to audio frequencies, ‘The transformers were salvaged from an old cordless telephone. Similar types can also be found in modems and other mains-powered telephone appliances, ‘The primary of T1 is connected to the tone generator. The primary of T2 could be used for an outside line facility Tone generator ‘The tone generator takes up approximately one quarter of the analogue board area. It was felt that high quality sinusoidal tones were worth having. Square waves and or S0Hz mains hum sound unpleasant and are not user~ friendly. This little exchange sounds like the real thing! ‘An LM324 quad op-amp generates three independent sine waves. The fourth amplifier is used as a supply splitter to generate a 2.5V virtual earth. Wien bridge oscillators are used with a simple diode shaping circuit to control the amplitude. The resultant harmonic distortion is minimised by adjustment of the presets and by subsequent low pass filtering, ‘The tones are coupled to the originating loop via transformer T1. An emitter follower drives the primary. The required tone combination is selected using @ 4016 quad bilateral switch, To prevent clicks, the 2.5V virtual earth Is connected in the gaps between rings, When all the switches are off, the emitter follower goes tri-state and thus does not load the speech path. ‘The frequencies are best adjusted using a frequency counter and oscilloscope. Adjust the frequency in small steps by alternating between the presets. Shift the frequency with one and then correct the shape and amplitude with the other, Keep each pair of presets at roughly the same resistance, Frequency accuracy of around 1% is easily achieved. The UK and US frequencies are as follows: uk us Busy 400 Hz Engaged 400 He Ringing 400+450 Hz 4404480 Hz Unobtainable 400 Hz Dial tone 350+450Hz 3504440 Hz uk us Tone 1 350H2 350H2 Tone 2 4soHz 440H2 Tone 3 a00Hz 480H2 hitpsweb.archive.orgiweb/200808 160334S6/itp www holmea.demon.co.uk/ExchangelDesign htm si6 3101/2022, 00:25 Telephone Exchange Short bursts of instability on the virtual earth are visible on an oscilloscope. 1 suspect the load is too capacitive for the LM324 as a unity gain follower. Looking like overly rounded CW envelopes; the bursts are low level and too high in frequency to be audible. Controller ‘The controller, comprising 3 programmable logic devices (PLDs) plus discrete HCMOS, occupies an entire eurocard. RC delays and Schmitt triggers are used for timing. I would use a single chip micro-controller if I were making more than one of these! ‘The Atmel ATF16V8B PLDs were programmed using the Atmel version of WinCUPL downloaded from www,atmel,com for free. ‘The master PLD is a state machine with the following states: Dial tone Dialling Ringing ‘Answered [Engaged | [Unobtainable| ‘The apparently random encoding is critical. ST_IDLE must be 7 because that Is the power-on reset state, The other values were found (by trial and error) to make the design fit. Although CUPL is a declarative language, the source code for the state machine looks almost procedural: sequence State present ST_IOLE Af IRESET & SEIZE next ST_OFF_HOOK; default next ST_IDLE out IDLE out TRIG; present ST_OFF_HOOK Af RESET next ST_IOLE; if IRESET & TIMEOUT next ST_DIAL_TON: default next ST_OFF_HOOK; present ST_DIAL_TONE Af RESET # 1B next ST_IOLE; Sf IRESET & B & !TIMEOUT next ST_DTALING out DIAL; default next ST_DIAL_TONE out DIAL; present ST_DIALING Af RESET # 1B next ST_IOLE; Af IRESET & B & TIMEOUT & UNOB next ST_UNOBTAINABLE; if IRESET & B & TIMEOUT & IUNOS & ENG next ST_ENGAGED; Sf IRESET & B & TIMEOUT & IUNOS & IENG next ST_RINGING; default next ST_DIALING out DIAL; present ST_RINGING Af RESET # 1B next ST_TOLES Af IRESET & B & TRIP next ST_ANSWERED out DEST} default next ST_RINGING out DEST; present ST_ANSWERED Af RESET # 1B next ST_IOLE; hitpsweb.archive.orgiweb/200808 160334S6/itp www holmea.demon.co.uk/ExchangelDesign htm 46 3101/2022, 00:25 Telephone Exchange default next ST_ANSHERED out DEST; present ST_UNOBTATNABLE Af RESET # 1B next STILE; default next ST_UNOBTAINABLE; present ST_ENGAGED Af RESET # 1B next ST_IOLE; default next ST_ENGAGEDs append TRIG.d = 6 & IA; This compiles to: stateo.d Statel.d => statez.d RESET 18 RESET # 1B & Istateo 4 RESET # 1B & Istatea # 1B & Istatet # Stateo & statet # 1B & Istater # Stated & state2 # State1 & [State2 & TIMEOUT # Istater @ statez # Statee & ITIMEOUT # Statel & State2 & !TRIP 4 ISEIZE & Stateo & state # Statel & IState2 & ITIMEOUT —# IENG & Stated & [State2 & TIMEOUT & IUNOB # Stateo & Istatel & TIMEOUT # ENG & Stated & IStatel & IUNOB # [stated & State2 & ITRIP DIAL and DEST are asserted in 1f and default clauses so that they don't suffer a one-cycle dropout on state changes. ‘The append statement routes dialling pulses to the TRIG output to clock the 74HC191 counter and re-start the timer, ‘This causes a change of state from ST_DIAL_TONE to ST_DIALING. The timer is re-triggered by each dialling pulse. Timeout occurs at the end of dialling. Idle ye Seize fl ee Tig Le FLL LE Timeout t cA t r bal OOOO Off Dial _ Idle hook tone Dialing (3) ‘The next state may be ringing, engaged or unobtainable, The number dialled is compared with that of the originating extension to detect engaged; '9' and 0’ are unobtainable. The counter starts at 11112 so the final count is one less hitpsweb.archive.orgiweb/200808 160334S6/itp www holmea.demon.co.uk/ExchangelDesign htm 56 3101/2022, 00:25 Telephone Exchange than the number dialled, ‘The slave PLD controls tones and ringing. The rate or "urgency" of the ring is controlled by an adjustable low frequency Schmitt trigger oscillator. The ring pattern repeats every 16 cycles: 44 cycles][1 cycle)[3 cycles|8 cycles) Ring [Pause [Ring [Pause ‘The PLD source and compiled JEDEC files are available for download here: 16V8.MASTER [State machine [PLI 16V8.SENSE [Call sensor 16V8.SLAVE [Ringing / Tones lo. ke iS El F E TLP598G "Photo-relay" [= TLPS98G 2a <} This device contains a pair of optically controlled N-channel MOSFETs, joined at the source, with reverse backing diodes. The drains and the common source terminal are externally accessible. In DC circuits, the FETs can be connected in parallel to increase current handling capacity by joining the drains. The device is connected into AC circuits by the drain terminals only. AC current flows through one FET and one diode at a time. See also Markus Wandel’s Homemade PBX Copyright © Andrew Hoime, 2003 EEEEEE BER sncrovencimea. demen.co.si hitpsweb.archive.orgiweb/200808 160334S6/itp www holmea.demon.co.uk/ExchangelDesign htm 86

You might also like