8 Input Shift Registers and Pulse Dialing

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 the proposed setup on a bread board so the design can be tested. Also laid out the board is the dial pulse detection circuitry. I have soldered in a 600 ohm isolation transformer so I can plumb in a phone and have taken 36v power from the temporary Dupont connector on the Veroboard. The optocoupler is an 4N26 and is will eventually be connected to one of the inputs on the shift register to feeding to the Arduino to convert the pulse train to a digital number when a destination line is dialed. 

The pulse detection circuitry as added to the Veroboard and operation confirmed by an LED that blinks to the pulse train as the number is dialed. The next step will be to connect it to the shift register input. There is quite an interesting explanation of capturing pulse dialing with an Arduino here, including some simple coding.


A close up shows the 1w 1k resistor and capacitors feeding the Zener diode and resistor necessary to produce the voltage drop needed to trigger the optocoupler. The other side of the isolation transformer  will eventually be used to feed in the call progress tones to the caller. The output from the exchange side of transformer will eventually feed into the source phone relay matrix. Where a track has been cut I find it useful to mark it on the other side of the Veroboard with an indelible pen. Still missing is the bridge/call sense relay but I have shorted the connection so I can take the outputs of the four way optocoupler into the shift in register and so check which line receiver has been lifted.

Comments

Popular posts from this blog

12 Boxing it up

11 The Relays do the Exchanging

1 The Beginning