Building your own pulse to tone converter

Related article: A crash course in using GPO telephones in the modern world

A few months ago I purchased a Rotatone module for one of my vintage telephones. It’s a great product, but in the event that you find something you don’t like about its functionality, there’s not a lot you can do about it, because it’s not an open source product. Also if on a very tight budget, you could save yourself a bit of money building your own too.

Rotatone module (red) installed into a GPO 746F

Fortunately there are a few projects kicking around the internet which make for quite a good starting point. One of the earlier efforts was undertaken by Boris Cherkasskiy and subsequently improved on by Arnie Weber on this bitbucket repository. Arnie includes some gerbers with this, which I’ve fired off to Seeedstudio PCB and made some of my own of, forming the basis of this project. I have to say it is quite a luxury to be building someone else’s design for once!

Arnie Weber’s pulse-to-tone converter PCB – as constructed by him
For the benefit of those who don’t use Eagle (like me) this is Arnie’s rendition of Boris’s original design.

All of these are based on the application note AVR314 from Atmel, which includes some tricky code that generates DTMF tones using the PWM module of an AVR. Complicated stuff which I am not going to go into the details of.

My build of the original design

My changes to the design

When I built the original design, I found that while it did work – there were a couple of problems with it:

  • It would only dial on a VOIP terminal adapter (Cisco VIC in my case). My BT Landline didn’t seem to recognise the DTMF tones
  • It presents a significant AC load on the line, attenuating speech by 70%, making conversations rather hard to hear

For these reasons I wouldn’t recommend building the original design. Below is my revised schematic (I do not yet have any gerbers for this):

The main change on my design is the power supply. By replacing the Zener and Resistor arrangement with a 78L05 I have managed to reduce the AC load to virtually nothing, meaning speech volume is now the same as it was before installing it.

We can see how this problem sneaked in: R1 of the original design was first specified to be 2K, which kept impedance in check, but left it with a voltage droop problem, this was revised to 220 ohm, which fixed the droop problem, but made the impedance cripplingly low. Having a 78L05 fixes all of this, and we can do away with that 200uF capacitor while we’re at it.

This also happens to fix the BT landline problem, as that was simply that the tones were too quiet, thanks to it attenuating its own output!

I also upped the series & pull-up resistor of the hardware de-bounce circuits to 100K to reduce the DC load on the line, reducing the de-bounce capacitors proportionally too. Pulses look just as clean as before on my scope.

One small drawback with this revised design is that it’s now possible to hear a faint clicking noise on the line while dialing, this is because the AVR draws a little bit of power when it wakes up to process a pulse, creating an audible blip on the line. Annoying but certainly not a problem. In some ways it actually makes it sound a bit more authentic as it emulates the clicking that would have originally been heard on the line during pulse dialing. I have noticed that the Rotatone product does this too, so they must have had the same problem.

There is no noise on the line during the call as the AVR puts its self to sleep after dialing has completed.

External connections are unchanged.

My version of the code

I have made quite a few alterations from the original implementation – adding “Redial” functionality, as well as simplifying the programming of speed dials.

You can get my code here on github. Alternatively the code on Arnie’s repository works just fine, but functionality differs significantly.

Wiring it up

The exacts of how these are wired varies significantly from phone to phone, you’re on your own there. It is safe to say that interchangeability between converter designs is good. My GPO 746F was originally wired for a Rotatone, and I found that this board dropped straight in its place, with the red wire connected to LINE, and the blue wire connected to GND.

I kept the original blue, pink and grey wires for the connection to the dial, which are wired on as pictured.

Shopping list

I ordered most of the parts for my board from the Mouser UK website.

  • 1x ATTINY85V
  • 1x 78L05 5V Regulator
  • 1x 4 MHz crystal
  • 2x 22pF ceramic capacitors
  • 1x BC547 transistor
  • 2x 0.1uF (100nF) ceramic capacitors
  • 2x 0.01uF (10nF) ceramic capacitors
  • 1x 330 ohm resistor
  • 1x 4K7 resistor
  • 4x 100K resistor
  • 1x 27V 1W zener diode
  • 1x 4 position 8.25mm pitch barrier terminal i.e. OSTYK42104030, Molex 38700-7504, Molex 38700-7304 (with mounting ends).

Programming the AVR

There’s quite a few different ways to do this, I’ll let you do your own research. Your programmer will need:

The .HEX file from here

Correctly set fuse bytes:

  • LFUSE: 0xCC
  • HFUSE: 0xDF
  • EFUSE: 0xFF

The user manual (for boards running my code)

Normal dialing

Just pull the dial round from the desired number to the fingerstop and release immediately.

Dialing * and #

for * Pull the dial from ‘1’ and hold on the fingerstop for 2 seconds until you hear a beep, release, and a tone for * will be generated.

For # do the same but use ‘2’.

Redial

Pull the dial around from ‘3’ and hold on the fingerstop for 2 seconds. Release when you hear the beep, and the last number will be redialed.

Speed dials

There are 7 speed dial locations. 0, 4, 5, 6, 7, 8, 9. Pull the dial around  to the fingerstop and hold for 2 seconds, release when you hear the beep and the desired number will be dialed.

Programming a speed dial

Pull the number of the desired location around to the fingerstop and hold for 4 seconds, you will hear a two-tone beep. Release the dial.

You are now in programming mode. Now simply dial out the number you wish to store, releasing the dial immediately after each digit. You will hear a simple beep after digit. Once complete, hang up, the number is now saved.

When doing this you will likely have your telephone exchange furiously beeping at you because you haven’t dialed a number. If annoying, you can enter the BT “quiet line test” (For people in the UK) during programming.