Skip to content

osresearch/rotary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Outbound call state machine

This is an extension on Adafruit's 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

  • 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 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

  • 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

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. 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.

About

Rotary phone interface for the Adafruit FONA boards

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages