Projects Research & Design Hub

Phone Message Monitor

Written by George Novacek

George built a phone message monitor that flashes red when a message is waiting for him. With a microcontroller and some basic circuitry, you can build a similar monitor and install it inside a phone.

  • How to build and MCU-based phone message monitor

  • What is the history of the plain old telephone (POT) technology?

  • How to integrate the optocoupler

  • Microchip ATtiny85 MCU

For years I had a common wall-mounted telephone. It featured an LCD, stored a dozen or so phone numbers, and could redial—all of which are basic features by today’s standards. Nothing to get excited about. But it had a big red light flashing when there was a waiting voice message.

When the phone eventually went to telephone heaven, I scoured the Internet to find a replacement, but all telephones claiming to have a message waiting function put just a little icon on their LCDs. No more flashing red light. In addition to the easy-to-miss icon, “message waiting” is indicated by a stuttered dial tone (SDT) when you pick up the phone to initiate a call. There is no indication when you receive a call. Being used to the flashing red light we missed messages or responded to them late. So I decided to build a message waiting monitor with a flashing red light that could be installed inside a telephone.

POT
Before discussing the design details, let’s take a short excursion into the history of the plain old telephone (POT). Officially, though some historians disagree, the telephone was invented by Alexander Graham Bell in 1876 while he worked on sending multiple telegraph signals over a single wire. Two years later, in January 1878, the first commercial telephone exchange began operating in New Haven, CT. Figure 1 depicts the typical circuitry of a traditional telephone, which didn’t change substantially for about a century. Because the telephone was invented before Lee de Forrest’s vacuum tube, it contained no active components. In this respect the telephone is an amazing feat of engineering. While pulse dialing is no longer supported in many areas, my black POT made in the early 1950s still works.

Figure 1 
Wiring diagram of a traditional telephone

In the 1960s significant improvements began making their way into telephones due to the arrival of transistors and, later, integrated circuits (IC). Tone, as opposed to the pulse dialing was among the first such improvements.

How does the POT work? Refer to Figure 1. A 48-V battery at the telephone exchange provides the power through the negative Ring (R) and positive Tip (T) terminals. The Tip is also grounded. With only passive components, the telephones needed 48-V DC to achieve sufficient range from the exchange. The positive voltage continues to be grounded to reduce corrosion of the wires. Note that 20 Hz, 90 VRMS is superimposed on the lines rings the ringer. The ringer in the diagram is an electromagnetic bell with its winding interrupted by capacitor C1 so that no DC current can flow through it. Upon taking the handset off the hook, S2 closes, the rotary dial S1 is normally closed, and the induction coil is included in the circuit. The coil has two purposes: it allows DC current of about 20 to 60 mA to flow, signaling the exchange the phone is off-hook. And, when off-hook, the induction coil presents a load impedance of about 600 Ω to the acoustic signals in the range of 300 Hz to 3 kHz to match the characteristic impedance of the telephone lines.

To initiate a call, one would take the handset off the hook, closing S2. The rotary dialer, electrically a normally closed, single pole switch then interrupts the current as many times as the number dialed (e.g., five times for number 5), at a rate of 10 pulses per second. Tone dialing in current telephones superimposes two-tone combinations on the line. In modern telephones magnetic components have been replaced with electronics.

— ADVERTISMENT—

Advertise Here

This is a fundamental principle of telephone operation, valid to this day. New devices are backward compatible with the old POTs.

WAITING MONITOR HARDWARE
My message waiting monitor is shown in Photo 1Figure 2 depicts the phone line interface circuit. Because the FCC and Industry Canada allow maximum 8 µA continuous quiescent current draw from the telephone lines when on-hook, a 5-V DC wall-wart powers the monitor.

Photo 1 
Voicemail waiting monitor
Figure 2 
Telephone line interface

Thanks to the rectifier bridge D1, the telephone line polarity can be ignored, the Tip and the Ring thus becoming interchangeable. Resistor R1 and the 130-V varistor RV1 are required for protection. A small fuse can be used in place of the 0.125-W R1.

Optocoupler U1 monitors the line to indicate the off-hook state. It draws 8 µA when the phone is on-hook. U1, CPC1301, is a Darlington optocoupler with large transfer gain is critical and may have to be selected for sufficient gain. Zener diode D3 makes sure U1 is off when the off-hook line voltage drops below 20 V. The on-hook line voltage is 48 VDCNOMINAL. Optocoupler U2 detects the 90 VRMS/20 Hz ring signal. Zener diode D4 ensures that the optocoupler is turned on when the line voltage exceeds about 65 V. Voltage rating of the components connected to the phone lines is critical and must be as shown in the diagram.

I used this interface in the past in another product and had it certified. So I’ve reused it. If certification in your area is required, it may be easier to purchase an already certified interface from Cermetek, Bogen, Xeca, ICXIS, and others.

To indicate off-hook status the monitor should draw 20 to 60 mA DC current. With optocoupler U3 energized by the microcontroller the interface goes off-hook and listens for the SDT. A gyrator circuit formed around Q1 replaces a heavy induction coil otherwise needed to retrieve the dial tone superimposed on the line’s DC voltage. The gyrator appears to the phone line as an inductance of about 40 H. Together with the optocoupler U3 31-mA DC flows through Q1 and U3. The audio signal load is the optocoupler U4 in series with the 4.7-kΩ resistor R5.

What about the signal impedance matching? With 600-Ω characteristic impedance of the telephone lines, 4.7-kΩ load represents a bit of a mismatch. But the dial tone comprises two low-distortion sine waves of 350 and 440 Hz and potential signal reflections above 440 Hz, whose wavelength is approximately 682 km (424 miles) is of no concern. Conductors begin to act as a transmission line at about one-eighth of the wavelength. In this case it would be 85 km (53 miles). I doubt there are telephone exchanges this far from the subscribers without some intermediate amplifiers. Numerous tests I conducted showed that impedance matching is not an issue for the monitor. It was more important for me to maximize the dial tone signal transfer through the optocoupler U4.

When the interface is commanded off-hook, the dial tone is seen across the U4 emitter load resistor R10. The SDT, if exists, lasts for 2 s.[2] Capacitor C3 provides AC coupling for the dial tone which is amplified by Q2 and its envelope extracted by diodes D5 and D6, filtered by C4 and shaped for the microcontroller by N-MOS FET Q3. Due to the N-channel MOSFET pinch-off voltage VGTH of approximately 2 V, the low pass filter time constant formed by R15 and C6 can be small and the envelope detection delay minimized. The SDT recognition is performed by software.

Using optocouplers increases the cost of the interface, but it provides full isolation from the telephone lines. Remember that the Ring line is –48 VDCNOMINAL against ground and 90 VAC—that is, 126 VPEAK appears across the lines during ringing. With my work bench and all the test equipment grounded, an accidental short to a phone line could have unpleasant consequences to microelectronics and my test equipment.

— ADVERTISMENT—

Advertise Here

The microcontroller, U5, in Figure 3 is an Atmel ATtiny85. Its wiring requires little explanation. As the input pins are also used by the in-circuit programmer connected through the header J1, 10-kΩ resistors R17, R18, and R21 provide the needed isolation.

Figure 3 
Process controller

MONITOR OPERATION
The monitor operation is straightforward. Whenever ringing or off-hook situation is detected, the monitor waits until both conditions no longer exist and the lines have gone on-hook again. Then, 5 minutes later, the microcontroller makes the interface go off hook and listen for the SDT composed of 10 pulses of 100 ms on and 100 ms off, followed by a continuous dial tone. If the SDT exists, the flashing light indicator is turned on until another ringing or off-hook situation occurs. Then the flashing light is extinguished and the detection process repeats itself until the message has been cleared and the SDT no longer exists.

The software is written in C++. The process is driven by 16.4-ms interrupt. Figure 4 is the state diagram describing the monitor’s signal processing. The source code is available online.

Figure 4 
Software state diagram

Before you connect to the telephone lines, study “TIA/EIA-855” carefully (Reference 1 below). Even if you’ve purchased a certified interface module (also called DAA), there are strict rules of operation. Make sure you do not violate any of them.

The monitor works. We have the flashing red light indicating a waiting message again. Life’s good. 

REFERENCE
[1] “TIA/EIA-855: Telecommunications, Telephone Terminal Equipment, Stutter Dial Tone Detection Device Performance Requirements,” http://ftp.tiaonline.org/tr-41/tr41Archive/Tr4132inactive/Public/2000-08-Vancouver/Chamney_TIA-EIA-855_000709cc_highlight.PDF.

RESOURCE
J. Fike and G. Friend, “Understanding Telephone Electronics,” Texas Instruments Learning Center, 1983.

SOURCE
Atmel ATtiny85 Microcontroller
Microchip Technology (formerly Atmel) | www.microchip.com

PUBLISHED IN CIRCUIT CELLAR MAGAZINE • MARCH 2016 #308 – Get a PDF of the issue

Keep up-to-date with our FREE Weekly Newsletter!

Don't miss out on upcoming issues of Circuit Cellar.


Note: We’ve made the May 2020 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

+ posts

George Novacek was a retired president of an aerospace company. He was a professional engineer with degrees in Automation and Cybernetics. George’s dissertation project was a design of a portable ECG (electrocardiograph) with wireless interface. George has contributed articles to Circuit Cellar since 1999, penning over 120 articles over the years. George passed away in January 2019. But we are grateful to be able to share with you several articles he left with us to be published.

Sponsor this Article

Supporting Companies

Upcoming Events


Copyright © KCK Media Corp.
All Rights Reserved

Copyright © 2021 KCK Media Corp.

Phone Message Monitor

by George Novacek time to read: 6 min