TeleComputer
Controller
via Printer Port





INTRODUCTION

With a simple circuit and a PC, we could apply the phone to control devices at home or in the office. The scheme is very straightforward. The phone line is being monitored by the PC. When there is a ringing signal, the PC answers and waits for the key-ins from the incoming call. If the sequence of dials matches with the security codes, the PC executes the instructions of control as entered.




Safety Comes First

This project makes use of the phone lines as a medium of communications. Before you start building the circuit, you must be aware that working with the phone lines, you maybe subjected to high voltages. The ringing signals across the phone lines could be as high as 130Vac and DC operating voltage is between 45 to 105V. Therefore exercise extreme caution when you work on the project. Transients caused by inductions, lightning or electrical faults could create overvoltages which are hazardous. At all times, treat the phone line with the same respect as you would with domestic AC lines.



DTMF Decoder

The MT8870 DTMF decoder by Mitel is the heart of the controller. This IC is a complete DTMF receiver integrating both the bandsplit filter and digital decoder functions. The decoder uses digital counting techniques to decode all 16 DTMF tone-pairs into a 4-bit code. Since we are only using the 3 least significant bits of the register, we could only read key numbers from 1 up to 7. The Steering output (pin#16) presents a logic high when it is detecting a valid tone pair thus serving as a good indicator for the presence of valid dialing inputs.

Functional Decode Table
Low FrequencyHigh FrequencyKeyQ3Q2Q1
697 Hz1209 Hz1001
697 Hz1336 Hz2010
697 Hz1477 Hz3011
770 Hz1209 Hz4100
770 Hz1336 Hz5101
770 Hz1477 Hz6110
852 Hz1209 Hz7111





PC Printer Port

The PC printer port offers an 8-bit output, a 4-bit output, and a 5-bit input ports for interfacing peripherals applications. We make use of 2 bits from the input port to monitor ringing and validate tone pair respectively. The rest of the 3 input bits at the input port interpret the dialing number stored at decoder register. An output bit is required to engage the circuit in an off-hook condition. For illustration purpose, another output bit is used to turn on a relay with an indicating Led. Theoretically, that leaves 10 controlling bits available for other device applications.

xxxxxx ----------Output Port--------- xx ----------Input Port---------
BitsA7A6A5A4A3A2A1A0 B7B6B5B4B3B2B1B0
Pin#0908070605040302 1110121315XXX

(Pin#18-25 are ground)
Table 2: Printer Port DB25 pin definition table.


Printer Port Reference: Computer Printer Port Controls





Project Circuit



There are three major parts in the circuit. A ringing signal is rectified through the diode bridge D1 and operates the opto-coupler IC1. The ratings and values of C1,C2 and C3 are very critical for the operation of the circuit. Values too high could result in damaging high currents while values too low could render erratic working conditions. The PC interfacing circuit monitors continuously the ringing, valid tone and dialing number signals at its input port. The output pins #2 and #3 turn the controlling relays on/off. Lastly, the transformer isolates the decoder circuit from the phone line when the phone is being answered. The dual led similates the phone off- hook conditions regardless of the phone line polarities. Again the resistor value in this branch is critical to proper operation and noise level across the phone line. All the values of components in the decoder circuit are as recommended by manufacturer. The +5V could be easily tapped from the PC. A steady 5 volt dc is provided between the red and black terminals in any of the PC power supply expanded sockets. The sockets are mainly for operating peripheral drives which in this case are convenient for our purpose.





Project Program

The program is written in BASIC. However you could write the program in any languages you are familiar with. All you have to follow is the logic. The program starts with detecting a ringing signal. It counts 3 rings within a specified time period (10-15 seconds) before it answers the phone. Once the controlling circuit is connected, the program monitors the St bit at the decoder. When the bit gets high, it indicates a valid incoming DTMF signal. The decoder register is then read via the input port and compared with the 4-word code in sequence. If the password is not matched, or the adjacent key inputs are not done within 5-10 seconds, the phone is put back in on-hook condition waiting for another call. If everything matches, the PC will execute controlling instruction by turning the output bit on after it hangs up the phone.






Conclusion

We are now in the decade of telecommunications. Telephones and computers become our ways of life. This project neatly introduces the basic concepts of combining the two technologies. Hopefully this is just the beginning of many projects making use of the readily available telephone/PC in the office or at home.

Ask for more details, cost and further applications for the module via:


Email Address: keensd@hotmail.com



1