To make a simple and quick conversion circuit, I want to use a PICS general I/O, with a max input of 5V. The phone's positive line has three levels when dialing with pulses. 48V (hook on) , ~10V (hook off) and 0V low level during dialing. I want the PIC to see the two low levels as 0, and the high level as 1. I also need to protect the PIC against over voltage during ringing, when the line goes through 110V AC with 30Hz frequency. During ringing I also need to protect against negative voltages.
Since the PIC has ESD protection in the form of diodes on the IO's, I could rely on them to do the voltage protection. This seems like a bad idea though, since they are poorly speced in the datasheet and the data sheet advice against using them this way. The built in diodes has a voltage drop of about 0.6V. To beat these diodes I put in a BAT54 in the same fashion This is a Schottky diode with 0.35V forward voltage drop, so that it shunts overvoltage before the internal diodes.
Here's what the interface looks like:
|Phone line to PIC I/O interface|
and the board so far:
|Interface and PIC along with a row of LEDs. Phone line connectors to the left, top and bottom.|
I've tested having the PIC flash an LED when detecting high/low level, and there seems to be no spurious errors with this setup. Next step is to start counting pulses with the right time spacing, and register what number is dialed.