An open API service indexing awesome lists of open source software.

https://github.com/osresearch/rotary

Rotary phone interface for the Adafruit FONA boards
https://github.com/osresearch/rotary

adafruit arduino electronics fona gsm phone retrocomputing teensy

Last synced: 6 months ago
JSON representation

Rotary phone interface for the Adafruit FONA boards

Awesome Lists containing this project

README

          

![Outbound call state machine](https://farm4.staticflickr.com/3694/32869954060_f3c01daa31_z_d.jpg)

This is an extension on Adafruit's [`FONAtest.ino`](https://github.com/adafruit/Adafruit_FONA/blob/master/examples/FONAtest/FONAtest.ino)
example code to allow it to be used with a rotary phone. The Teensy
2.0 decodes the pulses and implements the state machine to allow you to
place outbound phone calls. In-bound calls are working and can activate
the ringer when on USB power, but the boost converter circuit is a work
in progress.

The dialtone is generated by the FONA and under control of the teensy,
but ringing and dialing is done by the cell network. There is not a
proper "off hook" tone in the FONA, so the closest version was used.

Since the entire phone number must be passed to the `ATDT` command
string, the system must try to detect when the user is done dialing.
There is currently a multi-second delay after the last number.

During a call pulses will be translated to DTMF, but the user will
not hear them on the handset. There is also no comfort tone, which
makes using the phone feel "dead".

Wiring
===
![Inside the phone](https://farm3.staticflickr.com/2808/32833764510_fcd14da721_z_d.jpg)

* Teensy Gnd -> FONA Ground, FONA Key, Phone F (blue?)
* Teensy Vcc -> FONA Vio
* Teensy Pin 0 -> FONA Reset
* Teensy Pin 1 -> Phone RR (green on the dial), rotary dial
* Teensy Pin 2 -> Phone L1 (RJ45 green), hook relay
* Teensy Pin 6 -> FONA Ring indicator
* Teensy Pin 7 -> FONA RX
* Teensy Pin 8 -> FONA TX
* Teensy Pin 9 -> boost converter pwm
* Teensy Pin A0 -> boost converter voltge divider

The boost converter circuit needs to be drawn.

Note the [FONA 32u4 pinout](https://learn.adafruit.com/adafruit-feather-32u4-fona/pinouts) is a bit different:

* GPIO 8 -> FONA TXD (Soft Serial)
* GPIO 9 -> FONA RXD (Soft Serial)
* GPIO 7 -> FONA Ring Indicator
* GPIO 4 -> FONA Reset

Todo
===
![Dialup internet](https://farm4.staticflickr.com/3845/32372052844_b7e6990ddc_z_d.jpg)

* Redial support.
* ~~Incoming call state machine~~ - Done. Incoming calls works (although they play a tone in the speaker)
* ~~Disable headset ring tone.~~ - WONTFIX, since the bell overpowers it quite easily.
* Ringer driver circuit. Looks like 15V will engage the bell solenoid, so a simple charge pump and low frequency PWM should do it. -- Almost done, need to find parameters to work with 3.7V LiPo.
* ~~PCB design to mount FONA, Teensy and wire headers for the phone connections. -- Started in `pcb/rotaryfona.sch`, but no where near ready.~~ On hold since the FONA 32u4 has a MCU built in.
* Package everything to fit into the phone.
* Buy a red phone, cut a hole for USB charging cable.
* Teensy powered from the battery? Battery switch?
* Figure out why 300 baud isn't working with the FONA as well as it did with my cellphone.
* Text to speech for SMS received - only supported in the 800H, not the 800L.

State Machine
==
![Rotary Phone State Machine](https://rawgithub.com/osresearch/rotary/master/states.svg)

The rotary phone code is implemented as a state machine to try to
keep it clean and easy to extend. Unfortunately there isn't an easy way
to round trip from the code to this diagram, so it doesn't exactly match
the executable code in [`Rotary.cpp`](./RotaryFona/Rotary.cpp).
Also, nearly every state other than `RINGING` has an implicit edge
back to `ON_HOOK` if the user hangs up the phone while in that state.