Interfacing an Arduino to a rotary phone encoder wheelSat, Jun 11, 2011 at 11:02PM
A while ago I wrote some code for my arduino to read and manipulate the numbers dialed on an old rotary phone. Originally, I intended to interface my cell phone to this old device to achieve a nostalgiac effect; this project, however, was never finished. Therefore, I am releasing what I wrote under a CC license in hopes that it may be useful to other hobbyists.
When one spins the encoder wheel, two things happen. First, what I call an ‘active’ line opens up; this is how the software tells if a number is actually being dialed. Secondly, a normally-closed line opens once (like a reverse pulse) for each number. For instance, if I dialed a ‘5’ the line would go low five times.
The electromagnet is just a .375" bolt hand-wrapped in some 30AWG magnet wire from Radio Shack.
When the phone is on the hook, a small switch (taken from a computer mouse) closes.
The arduino reads these lines (the hook switch, the active line and pulse line from the encoder wheel) and carries out the appropriate logic for whatever the user has written in
The included PDE does work, and the abilities of the classes are documented in the YouTube video embedded below; however, the code is incredibly messy and hard to follow. Class usage should be apparent (there’s some documentation in the sketch), though.
Attached files: Schematic (PNG), Rotary Phone Functions (PDE)
Interfacing an Arduino to a rotary phone encoder wheel by Davis D. Remmel is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.