Close

DTMF tones and states

A project log for DIAVOX Cellphone

Turning an old diavox phone into a cellphone. No smart stuff, just a telephone. Pick up the handset and dial just like the old days.

anders-helgessonAnders Helgesson 01/15/2025 at 10:103 Comments

It's been a week, and I've spent time on the project now and then.

With the keypad working, I need to output the dialing tones and DTMF tones for each digit pressed as a line level signal. I want the tones play when testing the keypad matrix further.

I've never worked with audio stuff at component level before so this is a great opportunity for learning. I've decided to use a 12-bit DAC to output the tones to an Op-amp as Pre-amp and Buffer which should then be fed into the codec AUX input. For testing I'm going to feed the signal to an amplifier connected to a small breadboard speaker. I was missing some components so I have ordered them.

While waiting for more components, I continued to work on the software side. I need to store the data for each tone in lookup tables so the CPU doesn't need to calculate them at run time.

I've also decided to add another state, a key pressed state. The code will enter this state when a key is pressed on the keypad, check which key is pressed and output the DTMF tone until the key is released. When you release the key, it will store the key pressed in a vector, keeping track of the digits pressed. It will then transition back into the dialing state. This time the dialing input timer is started and the dial tone is turned off. If the timer expires the code will transition into the calling state, where it will try to call the entered number.

I think I need a new state for when the recipient hangs up. It should play the tone to indicate this.

If you leave the handset off for some time, it will play the handset off alert tones and, if there is no input for a set time, go to sleep. Can I have the modem register the phone as busy, while it self goes to sleep? Handset off = no calls :)
Should the phone be set as busy? It might be better not to have it as busy? Would the caller keep trying, thinking that the phone is in use? What settings can be done in the modem?

What other tones might I need? Perhaps if you try to make a call without reception? Low battery?

Holding down the R key while lifting the handset, should it be put into speed dial mode?

Holding down the R key during the dialing or active call goes into command mode, where you can adjust the volume and other settings using the keypad.

I also need to check for the reset switch, if activated it should return to dialing state with a clean slate.

Discussions

Ken Yap wrote 01/15/2025 at 12:32 point

The DAC probably generates waveforms of sufficient amplitude that you can skip the opamp.

  Are you sure? yes | no

Anders Helgesson wrote 02/06/2025 at 21:24 point

Thanks for the advice! Sorry for the late reply.
You were correct. It would have saved me some time If I actually read this comment before moving on. Didn't see any notifications about so I missed it.

  Are you sure? yes | no

Ken Yap wrote 02/06/2025 at 21:48 point

HAD's notification system is unreliable at times. :-(

  Are you sure? yes | no