via Printer Port


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 Frequency High Frequency Key Q3 Q2 Q1
697 Hz 1209 Hz 1 0 0 1
697 Hz 1336 Hz 2 0 1 0
697 Hz 1477 Hz 3 0 1 1
770 Hz 1209 Hz 4 1 0 0
770 Hz 1336 Hz 5 1 0 1
770 Hz 1477 Hz 6 1 1 0
852 Hz 1209 Hz 7 1 1 1

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---------
Bits A7 A6 A5 A4 A3 A2 A1 A0 B7 B6 B5 B4 B3 B2 B1 B0
Pin# 09 08 07 06 05 04 03 02 11 10 12 13 15 X X X

(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.


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: [email protected]