# N00b needs code help - rotary phone to mobile phone conversion

hey all

I'm currently converting a vintage 60's desk rotary phone into a mobile phone. I have the handset and bells worked out, and the only thing that is confusing me is programming the rotary dial - to - keyboard thing. Basically, for each number you spin on the dial, you get a closed switch opening for around 0.05 seconds or so, the number of which depends on what was dialled (1 = 1, 5 = 5, 0 = 10 etc) with the switch closing for 0.05 seconds between each signal, and the time between each number is 0.5 seconds, and after 3 seconds of no action, the 'call' button is activated. That's the input. The output is 'pressing the buttons' on an old Nokia, or contacting a ground terminal with one of eleven (0 - 9 and 'call') terminals.

So:

[DIGITAL INPUT (pulses of open circuitness)] -> [identified and translated to the mobile (like a switch, connecting gnd and the associated terminal)] -> [if time between set of pulses is >1 sec, start new number] -> [if no pulses for 3 secs, activate call] .

I can do the turnoff bit physically, with the contacts that are activated when the handset is put down. XD

The only code I know is Morse :P, and although I know this can be done with arduino, I don't know how to write the code to do this. If you can help, it'd be appreciated.

Thanks.

UK rotary dials output at a rate of ten pulses per second, and were fairly simple, mechanically.

I think they probably suffer from a bit of contact bounce, which wasn't a problem for electro-mechanical Stroger exchanges, but may cause your Arduino some difficulty.

[if no pulses for 3 secs, activate call]

There is / was a contact on rotary dials that stayed open during the rotation bit so you could use that to gate the pulses and know when it had finished. You could I remember keep your finger in the dial and slow down the pulses and it would still work.

In fact you could tap out the number on the handset rest and get through.