Posts

12 Boxing it up

Image
So now I have a working exchange consisting of four lines, numbered 122,222,322 and 422. I made the numbers three digits just for the sake of it really. My first exchange used 11 as the post-fix so I used 2 this time just because. If the extensions are not dialed as above then it will be a false number and a fast busy tone is played to the handset. Here it is boxed up and mounted on the wall. The segment display is used to describe call progress but when the exchange is idling it displays random characters generated every second just to show it's still alive. The red button resets the Arduino and the two black lumps on top are the fuses for the DC feed and the AC ringing. Above it are the junction boxes and batteries used by the Plan 7. Removing the lid shows how the exchange fits in the box. The large single Veroboard shows the exchange itself, so from top to bottom, the powers supply caps and VR's, to the left the call sensing, in the middle the isolations transformers for th...

11 The Relays do the Exchanging

Image
All that's left to do now is add the relays that will connect each source to each destination phone . As I have four lines I will need a set of eight solid state relays arranged so that one of each of the four source lines can be linked to one of the four destinations line via the bridge relay. I've been using the  Panasonic AQW210EH  throughout with the exception of the ringing relay. As in the bottom left(ish) of the picture, I take four feeds from each of the phone lines and arrange two 18 pin sockets (empty in the picture) to hold the four eight pin relays. At the time the picture was taken I've added copper links to two of the relays so I can dial and link my two phones in either direction, either as source or destination. A more detailed picture shows more copper links added, so we have a relay between each phone and the source and destination lines, each running down a copper strip of the Veroboard, to the right of relays. Each relay will be actuated by a link...

10 Output Shift Registers

Image
By this stage I'm nearing the point where pretty much everything needed to connect a call over two phones is in place; on the source phone I can detect OH (and potentially send a dial tone) as well as detect a dial pulse train. On the destination phone I can send it ringing current to operate the bells and detect OH if the call is answered. What I'm going to need next are some outputs to activate the relays to bridge and route calls, send ringing current and operate the dialing tones. So it pretty obvious I'm going to need many more outputs than the ones available on the Arduino. To get round this I'm going to use a couple of daisy chained  SN74HC595's   shift registers to give me 16 outputs for the price of three on the Arduino, as shown below. I end up with an output map something like this... #define C595SourceRly1 1  // 1 to 8 will operate the relay matrix #define C595SourceRly2 2 #define C595SourceRly3 4 #define C595SourceRly4 8 #define C595DestRly1 16 #define ...

9 Ringing and Answering Phones

Image
Andrews circuit design to detect when a ringing phone has been answered actually gave me a fair amount of trouble to understand. If I'm honest I would confess I still don't really understand on a technical level exactly how it works, more that it does "work". But what really didn't help was not realizing that there are two types of transistors, PNP and NPN, and for a long time was using the wrong one - no wonder it wouldn't work! I guess we learn by our mistakes and once I had it figured out I was up and running. Andrew was very helpful during this time patiently answering all my questions. As Andrew explained, and I hopefully I have this right, the way I see it is that the 47 ohm resistor generates a small current before the destination phone is answered, enough to stop the base on the transistor passing current. When the phone is answered the base current flows to earth activating the transistor which in turn activates the photo cell in the optocoupler which...

8 Tone generation

Image
Every decent telephone system needs to give feedback to it's user as to it's current operational status. This ha s been done since  time immemorial  by using progress tones. I only need three types of progress tones; a  steady tone for showing the exchange is ready for a call, a ringing cadence progress tone, usually two short bursts of tone separated by a second, and a "fast busy" cycling tone to show a false number has been dialed. So what we will need is some way to generate these tones and have them fed to the user operating the phone.  I'm sure there are very many ways to generate a simple sine wave but I have a job lot of NE555 timer IC's so that's where I'm going to start. Using a NE555 timing calculator (this one  is my favorite as you can enter the desired frequency and it will generate the options for the resister/capacitor combination to achieve it). I'm not too concerned about the cycle lengths since I'm going to feed both outputs ...

8 Input Shift Registers and Pulse Dialing

Image
On the Arduino I have only a limited amount of IO pins, 20 in all. This would probably be enough pins if I just wanted 4 inputs for call sensing, 2 for pulse and off hook detection and the rest to operate the relays but I want to add a DTMF transceiver and to connect to an outside line so I'm going to need quite a few more. Enter stage right the  74HC165 shift in register for the inputs. This has 8 inputs which will be configured as per the map below... #define ShIn_L1_OH_Pin 128 // call sense line 1 #define ShIn_L2_OH_Pin 64  // line 2 #define ShIn_L3_OH_Pin 32 #define ShIn_L4_OH_Pin 16 #define ShIn_OH_Pin 8 // source phone off hook and used for the pulse dial train #define Dest_Phone_OH_Pin 4 // call answered, ie destination phone off hook //#define Call_Progress_Pin 2 // not used #define External_Ring_Pin 1  // incoming call from outside exchange #define SHIN_CLEAR 0  // used to check no inputs are active With the shift register IC at the top right, below shows t...

7 Call Sensing

Image
Now I have power I can start to building the first component of the exchange - call sense control. I add in the the 3w 1k resistor that will feed power to the four lines. When a handset is lifted the line is energized and so will operate the quad ILQ74 optocoupler that will eventually fit into the 16 pin socket. Below the socket are the diodes, the 1w 1k resistors and 10k pull-up resistors for each line that will operate the optocoupler. Also present is the 4 way socket that will hold the  Panasonic AQW210EH  solid state dual relay  the will switch out the call sense lines once a handset is lifted. The other relay will be used to "bridge" the source and destination phones between the radial capacitor when a call is connected.  The lesson to learn here is always check the data sheet as I made a mistake in the wiring feeding the optocoupler. From the picture above I have the feed going from top to bottom, in on pin 1, out on 2, in on 3, out on 4 and so on. In rea...