The aim of this project is to create a pulse to tone converter for the Socotel S63 rotary phone, using an Arduino Nano Every board (ATMEGA4809 chip, SKU ABX00028).
The rotary phones are composing digits by sending pulses. The amount of pulses
represents the digit. However, this way to represent digits is not supported
anymore by phone services, it has been replaced by DTMF
(Dual Tone Multi Frequency) (the beep
you hear when pressing a key). It is
now this tone which represents the dialed digit.
So this project aims to convert the pulses of the rotary S63 phone to DTMF, in order to be able to use this phone again to make calls.
Prerequisites :
- A GNU/Linux host (other hosts are compatible too, but the documentation is GNU/Linux oriented).
- An Arduino Nano Every board.
- Installed softwares :
- docker
- docker-compose
- git
- make
First, clone the repo and go inside it :
$ git clone [email protected]:nm2107/S63-pulse-to-tone.git
$ cd S63-pulse-to-tone
Plug the board into your host. The board path is generally /dev/ttyACM0
.
If it's different, you can still specify it when running make commands by using
the DEVICE
var :
$ DEVICE=<path> make <target>
Make sure you have read and write accesses to the board :
$ sudo chmod o+rw /dev/ttyACM0
Then, build the docker image and install required dependencies :
$ make build install-deps
Finally, compile the app and upload it to the board :
$ make compile-release upload
If the upload task hangs with the following message :
avrdude: jtagmkII_getsync(): sign-on command: status -1
try to push the reset
button on the board, and to run again the upload
task.
To open a shell inside the docker container, run :
$ make shell
Any additional dependencies should be installed via updating the install-deps
make target to ensure reproducibility.
To build the app with serial logging enabled, run :
$ make compile
and then, upload it to the board :
$ make upload
You can then see the logs with :
$ make monitor
- Count pulses to determine the dialed digit.
- [WIP] Generate the DTMF tone corresponding to the dialed digit.
- See this formula to know how to compute the cutting frequency of the low pass filter. Also, the figure 7 of this link uses a low pass filer, the capacity of the components would be appropriate here too :).
- Be able to make a call. Would make sure if the dialed digits could be sent one by one when dialing, or if they should be sent in a row at the end of the dialing (after a timeout) instead.
- Draw electronic scheme of the final board (Arduino pins wiring, S63 wiring, and other electronic components placement) (e.g. using Fritzing).
- Design the final board circuit in order to build it (e.g. using KiCAD).
- [WIP] Constantly update the doc accordingly to the progresses done here.
- Support
*
and#
dialings. May require some dialed digits combination and timeouts. - Put the board asleep when the phone is hung up in order to save power consumption.
-
Chip documentation :
-
S63 phone maintenance :
-
Rotary phones wiring :
-
Other projects hacking a rotary phone :
-
DTMF generation examples and PWM explanations :
- http://ww1.microchip.com/downloads/en/Appnotes/doc1982.pdf
- https://github.com/KC7MMI/AVR314-DTMF-Generator-for-Arduino
- https://github.com/310weber/rotary_dial
- https://github.com/inaxeon/rotarydial
- https://passionelectronique.fr/pwm-arduino/
- https://www.renesas.com/eu/en/document/apn/pwm-producing-dtmf-signal-dtmf?language=en
- https://emalliab.wordpress.com/2022/01/23/arduino-nano-every-timers-and-pwm/
-
TCA and TCB timers of the ATmega4809 chip :
-
List of available registries keys and bitmasks for the ATmega4809 chip, (using the Atmel AVR GCC toolchain ; requires this project installation first) :
.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/iom4809.h