circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

October 2004, Issue 171

Telephone Message Watchdog
An Intelligent Call-Forwarding System


The Telephone Message Watchdog is an H8S/2398-based message-forwarding system for home telephones. The touch-tone detection system triggers when your answering machine picks up a call. After the caller hangs up, the system contacts you on your cell phone or pager.


by Jingxi Zhang, Yang Zhang, & Huifang Ni

Nowadays, more and more people carry cellular phones, which are handy for conducting business outside the home and office. But, for reasons of privacy, most people don’t release their cell phone numbers to the public. As a result, it’s a common occurrence to miss time-critical phone calls placed to home and office lines. To solve this problem, we built the Telephone Message Watchdog, which is a smart device that instantly forwards a caller’s information from a home or office line to a pager. With the pager information, you can contact the caller with your cell phone.

The Telephone Message Watchdog is connected in serial between a telephone port and an answering machine. When you are out, an incoming call triggers the answering machine, which gives the caller two options: either leave a voice message or enter a callback number. The smart device monitors the answering machine’s status and holds a touch-tone signal until the calling process terminates. Then, the device automatically dials your pager number. If a caller leaves a phone number, the system sends it to your pager. If not, the system sends your home number so you know to call it to hear the voice message.

Before starting the project, we made a list of the functions we were shooting for. As you’ll see, we met all of our goals. The result is a low-cost system that complies with part 68 of the FCC rules to provide safe operation. 

H8S/2398 ADVANTAGE

To build this smart device, we knew we needed a microcontroller to monitor and control the telephone calling process. We decided not to use a hardware touch-tone detector and generator in order to reduce the chip count, simplify the hardware design, and lower the project’s overall cost.

Using software to detect and generate touch-tones requires the MCU to meet particular criteria. First, the MCU must contain an analog-to-digital converter (ADC) for converting audio signals, including touch-tone signals, to the digital domain. Because the telephone audio signal frequency bandwidth is approximately 3 kHz, the embedded ADC must be able to digitize the audio signal at a minimum of 6,000 samples per second. (The sampling rate must at least twice the highest signal frequency.)

Second, the MCU should contain a two-channel digital-to-analog converter (DAC) for the touch-tone generator. Both the DAC and pulse width modulation (PWM) units can be used for audio signal generation. However, the audio signal generated from the DAC has less harmonic distortion than that of the PWM unit. The touch-tone signal generated with lower order harmonic frequencies is easier to distinguish from voice signals.

Third, the MCU’s CPU core should possess adequate computation power to handle digital signal processing. In the touch-tone detection process, the signal is fed to as many as eight digital filters in a short period of time. Each digital filter is implemented using a series of 16-bit fixed-point multiplication and accumulation (MAC) operations. Therefore, a fast 16-bit multiplier in the CPU core is required.

Based on the aforementioned requirements, we selected the Renesas H8S/2398 microcontroller, which contains an eight-channel, 10-bit ADC converter with a sampling rate of up to 150 kHz. It also has a two-channel, 8-bit DAC converter.

The H8S/2398’s CPU performance is attractive. The system clock is 20 MHz, and a 16-bit addition operation takes one cycle (50 ns). The CPU instructions contain signed and unsigned multiplication and division operations. The 16-bit multiplication takes 1 µs, which is adequate for touch-tone detection.

An embedded DMA controller further enhances the CPU’s performance. With the DMA controller, the digitized data is transferred automatically to the digital filter frame buffer without CPU involvement. This feature liberates the CPU of the burden of servicing frequent data transfer interrupts and frees up power for the CPU to perform digital signal processing. The 8 KB of RAM storage make the digital filter frame buffers easier to design. There are 256 KB of flash memory for instruction storage, which is plenty for a small MCU.

Of course, the biggest incentive for selecting the H8S/2398 MCU was the H8 Renesas Design 2003 Contest. Renesas offered a free H8 starter kit. We selected the H8S/2398 starter kit from Basic Micro. The kit came with an evaluation board, LCD module, and software package for Renesas MCU development. The evaluation board simplified the hardware construction process.