Introduction: Arduino Powered Desktop Telephone

Inspired by AVR314, DTMF Generator from Microchip, this project uses ATMEGA328 to replace a dedicate telephone dialer, in which functionalities could be customised towards a Smart POTS, Plain Old Telephone Service.

Supplies

  1. A functional desktop telephone.
  2. Arduino platform, Arduino UNO preferred.
  3. Sort of soldering and desoldering tools.

Step 1: Find a DTMF Functioning Telephone

Your old telephone dialer might be Pulse or DTMF signaling. A rotary dialer is usually a pulse one, and keypad dialer could be switchable for both. Locate the dial mode switch around your telephone set and make sure it is in the Tone or DTMF position. Connect the phone to the phone exchange or PBX (Private Branch eXchange) to verify the DTMF signaling works, because the DTMF signal generated by Arduino needs to be amplified for a reliable transmission to the telephone network.

Step 2: Locate the Dialer IC

Open the phone to make the PCB accessible. From the component side you may see ICs. A basic phone set might contain at least one IC which is a telephone dialer, others might be speech network, ringer etc. To identify the dialer if there are multiple ICs on it, just check if there's a ceramic oscillator with two small capacitors. These three components function a crystal oscillator for Pulse/Tone generation. Obviously the W91312 from Winbond is the dialer for this telephone.

Step 3: Find the Pinout for the Dialer

A basic phone dialer has power and ground pins, oscillator pins, matrix keypad pins and other input/output. From the picture above, ZD4 is a Zener diode, which is normally from 4.7V to 5.1V, in parallel with capacitor providing power supply. To make life easier, search the datasheet or applications note of W91312, you can get extensive information including the pinout and basic schematics rather than trace the PCB, which is a tedious task unless the datasheet is unavailable. From the document attach here, you may notice the W91312 is a member of W91310 series.

Step 4: Pin Map ATMEGA328 to W91312

There's no guarantee to make 100% pin to pin compatible between the microcontroller to the dialer. To minimize cut and soldering task for this prototyping, you should maximize the compatible pins. It is flexible to define the general Input/Output pins but not the pins for Power, Ground, Crystal oscillator and PWM if applicable. You can draft the pin map on a paper or put the net label on the schematics as shown.

Step 5: Emulation Setup(Optional)

  1. Desoldering the W91312 dialer IC from the PCB and soldering a compatible DIP IC socket on it as shown on the first photo.
  2. Make a plan for wiring on breadboard as shown on the second. I'm using an Arduino shield PCB for my setup.
  3. Link the IC socket with the breadboard with a flexible cable header as shown on the third.
  4. Flip over the phone to make the keypad accessible for test and debug while coding.

My Proteus project was not allowed to be uploaded here, I had to upload to the github.

Step 6: Finalize Your Arduino Power Telephone

If you are sure the code works as expected, you come to the final step to finalize your Arduino powered telephone.

  1. Disconnect the ribbon cable after the emulation.
  2. Cut the copper trace for the non compatible pins, and soldering the wires against your schematics. To make enough space for ATMEGA328, which is 28 pins DIP package, far larger than the 18-pin original dialer, I had to move some components from component side to soldering bottom, which shown on the photo above.
  3. Use a 16MHz crystal to replace the original 3.58MHz ceramic one.
  4. Unplug the ATMEGA328 from Arduino UNO board, put it on the dialer DIP socket. Double check the wiring, particular the power and ground, new 16MHz crystal.
  5. Reassemble your telephone.

You are ready for an online test.

Step 7: Power It Up & Online Test (Optional)

I have a portable PBX with three extensions. A HM9270 DTMF decoder was found on the PCB. It is known the output of the DTMF decoder is in BCD format from the datasheet, so I built a 7-segment display with a HEF4511 to link the BCD output from HM9270, which make the small PBX dual purposes, an exchange and DTMF tester.

Don't be confused by the word "online" as it has nothing to do with Internet. You may find online DTMF test website, or DTMF test application on Windows by means of soundcard. Find your own solution in your own preference or just skip this step, but....

When I connect to my PBX first time, I can hear dial tone when pickup the handset, but nothing I can hear when press the keypad. With a multimeter connect to the power supply, I found the voltage is too low as ATMEGA328 consumes more power than the original dialer. Fortunately, my phone has a battery cabinet which can accommodate 4 AA batteries otherwise I had to use external power supply. It works without power supply during emulation because Arduino was powered by USB from my computer.

Step 8: Connect to Public Telephone Service

If "a picture is worth a thousand words", a video is supposed to worth millions of words.

https://youtu.be/60nC5M8LVJI

Step 9: Discussion

Schematics: As attached in Step 7, it is a screenshot of my Proteus project for simulation purpose, not a physical buildup of this phone. The DTMF signal can be visualized with the virtual oscilloscope, and key press can be displayed on LCD.

Power Issue: I'm not sure it works without external power supply. If you want to reduce the power consumption, options are:

A. reduce the power supply voltage lower to 3.3V and

B. Increase the power current by decrease the limit resistor R13, and/or

C. Replace the crystal oscillator with lower speed one down to original 3.58MHz. Keep in mind that accuracy of DTMF signal might be scarified because of slow oscillation.

D. Enable sleep mode, wake up by hook switch connected to external Interrupt pin.

Footprint: ATMEGA328 is overkill for this project. A small foot print Arduino compatible microcontroller such as ATTINY84 is an elegant solution. External crystal oscillator can be emitted with internal 8MHz oscillation.