Retro know-how is “in” today. Vinyl information, print books, and even movie images have all made a comeback. And “renew, reuse, and recycle” is a development that acknowledges the worth and aesthetic of older gadgets. In line with that idea, I’ve in my possession a 1951 classic Western Electrical mannequin 302 rotary dial phone that I’m giving new life to.
The telephone “mind” is a kind of circuit, however not of the sort acquainted to us present-day electron jockeys. It’s primarily an analog pc that converts stepped rotational movement into digital information. It’s a mechanical analog-to-digital processor.
Amazingly, earlier than I dug into it and disconnected the interior wiring, the telephone was nonetheless 100% operational. All it wanted was an analog POTS (plain outdated phone service) landline. Whereas all long-distance telephone transmission and most native site visitors is digital today, the telephone system can nonetheless present analog POTS landlines from an area trade to households. These POTS traces are nonetheless absolutely appropriate with tools that’s practically 100 years outdated. I don’t have such a line into my home, but when I did, I may plug the unit in and make and obtain calls.
Inside the phone. DUANE BENSON
Giving an Previous Telephone a New Function
I’d prefer to make use of the telephone as greater than a desktop dialog piece. To that finish, I’ve put an ESP32 system-on-chip (SoC) module into the telephone. The ESP32 reads the numbers from the dialing motion and sends them on to my pc as an HID (human interface gadget). In different phrases, I’ve turned it right into a numeric keypad.
Because the telephone sits idle with the handset in its cradle (known as being “on hook”), the telephone is successfully disconnected from the telephone line by the hook swap within the cradle. The road from the native phone trade is charged with a DC voltage of round 48 volts, able to offering not more than about 100 mA. When the handset is picked up (known as being “off hook”), the usually closed (NC) cradle switches shut and a present loop is created between the telephone and the native telephone trade. At this level, the DC present loop is lively and an analog tone, known as a dial tone, is modulated onto the road on the trade.
The telephone is dialed (sure, that is the place the time period “dial a telephone” comes from) by inserting a finger in one of many numbered holes on the dial, rotating the dial to the top level, and releasing the dial. Because the spring-loaded dial rotates again to its house place, it passes an interrupter swap that breaks the present loop for about 40 ms. The present loop passes the interrupter as soon as for every rely of the selected digit. The break is roughly 60 ms between breaks. The timing is regulated by the mechanical clock spring that spins the dial again to its house place.
When you flip it to the quantity 3, for instance, it would spin again to its house place and break the present loop thrice, as soon as for every quantity it passes. Zero (0) is within the final spot and will get ten pulses. That signifies that in an analog rotary telephone system, numbers one via ten are represented, however the MSB for ten is basically stripped off to show it right into a zero.
A: Hook swap, B: Dial in use swap, C: Digit pulse swap, D: Cam to interact/disengage digit pulse swap, E: Cam (behind swap bar) to manage dial in use swap, F: Dial return spring. DUANE BENSON
The electrical circuitry is primitive, to say the least. It consists of a transformer, two capacitors (mixed right into a single lead container), an electromagnetic bell, the hook swap, and the dial swap.
The switches are a set of mechanical relays, with the rotary dial swap being fairly elaborate. The hook swap (A, above) is a double-pole, single-throw swap. Each switches are open when the handset is within the telephone cradle, known as being on hook, and closed when the handset has been picked up, off hook.
The dial setup is way more elaborate. It has a number of switches managed by a set of cams (D and E). One of many switches (B) is generally open, however closed when the dial is anyplace apart from the house place. The opposite swap (C) is a double throw such that one is generally open and the opposite usually closed. The flip states as soon as for every digit handed because the dial rotates from most to house. This swap generates the pulses that I rely. I take advantage of the usually closed half and rely pulses that transition from excessive to low.
The ESP32 Circuit
Earlier than going additional, you may need to obtain code from my GitHub web site. The software program is written in Adafruit CircuitPython, model 8.X. You’ll find it on my Github web page.
For my setup, I take advantage of the hook swap (A) as my “sleep” vs. “awake” swap. I don’t use the ESP32 sleep mode on this incarnation. It’s a USB wired connection, so I don’t want to fret about conserving battery energy. I’ll in some unspecified time in the future flip this right into a Bluetooth gadget after which an actual sleep mode shall be vital. For now, I simply wait in a “sleep” loop till the handset is picked up. Swap A is closed whereas on hook and open whereas off hook, so my whereas loop waits whereas not off hook.
As soon as off hook, I wait in a second whereas loop till the dial motion is taken. Inside the code, I ignore every part except swap B has closed. Swap B is generally open and closed when dialing. It’s closed within the photograph above as a result of dialing is in progress.
When swap B is closed, I rely any modifications within the state of swap C. C is double pole, so I monitor the closed facet and rely a damaging, or “off” pulse. It’s vital to notice that after studying any of the switches, I pause for five milliseconds to account for swap bounce.
As soon as swap B is open once more, I do know that dialing is finished, so I’ve my digit. I add 0x1d (29 decimal) to the quantity. That’s the offset to get to 1 (1) in the usual HID keyboard code. The telephone makes use of 10 pulses to symbolize zero (0) and, conveniently, so does the HID keyboard code.
Components Listing for Turning an Previous Rotary Telephone right into a Numeric Keypad
-
1950’s classic Western Electrical mannequin 302 rotary telephone (one which’s degraded sufficient to not be of historic worth)
-
CircuitPython with the Adafruit CircuitPython library bundle
ESP32 in protoboard, wired to dial. DUANE BENSON
Wiring It Up
I solely want three wire pairs to the ESP32. I additionally put a 0.01 uF ceramic capacitor on the ESP32 energy rail to assist fight noise. Swap A is related with the strong inexperienced wire, as seen within the photograph above, to the ESP32 +3.3 V bus and the white/inexperienced wire to ESP32 pin IO3. Swap B is related with strong blue to the ESP32 +3.3 V bus and white/blue the ESP32 pin IO4. Swap C is related with the strong orange wire to the ESP32 +3.3 V bus and white/orange to ESP32 pin IO5. Now, plug the telephone right into a USB port or hub, decide up the handset, and dial a quantity. The pc sees it as a quantity coming from a regular keyboard. That’s all there may be to it.
What’s Subsequent for the Venture
In some unspecified time in the future I need to flip this right into a Bluetooth HID gadget. Sadly, CircuitPython doesn’t but absolutely help the ESP32 Bluetooth within the TinyS3 board. I’ve to attend a bit for that help or change both the language I take advantage of or the board selection. Most ESP32s can run CircuitPython, MicroPython, or Arduino code. You may as well develop in native C. I simply want to search out some mixture with good Bluetooth help. I don’t anticipate greater than about an hour being essential to replace the code. At that time, I’ll want a correct deep sleep mode for the microcontroller. It ought to in any other case be the identical in operation.