Using Arduino and Rotary Telephone Dial to Control ‘Stuff’
Posted Sep 07, 2017 at 5:00 am
You can use an old rotary telephone dialer in conjunction with your microcontroller to implement all sorts of things; for example, you could use it to enter a series of numbers to unlock a safe.
In an earlier column, I introduced my current hobby project, which involves
-based Nixie tubes called Lixies.
Each Lixie contains twenty WS2812 tri-color LEDs — two per digit/numeral. This means we can daisy-chain multiple Lixies together, and the whole chain can be controlled using a single pin on a microcontroller, such as an Arduino, for example (see Using WS2812-based NeoPixels in embedded systems).
My plan is to use 12 of these Lixie beauties presented in pairs to indicate the number of years, months, days, hours, minutes, and seconds remaining to the target event.
Let’s suppose we wish to use the Countdown Clock to mark my 100th birthday, for example. This auspicious event will occur on May 29, 2057 (it might be a good idea to mark your calendar now so you don’t forget). Furthermore, it’s probably a good idea to set the kickoff time for 10:00 a.m., because I’m certainly not going to get up early on my 100th birthday. This means that we need some way to enter 57 05 29 10 00 00 to represent the year, month, day, hour, minute, and second, respectively. Once we’ve entered this date, the Countdown timer will use the current date and time to determine how long there is to go, and it will then start to display the number of years, months, days, hours, minutes, and seconds remaining.
So, how are we going to enter the target date? In fact, I’m planning on having multiple mechanisms, including using an app on my smartphone that can add, delete, and modify any events to be displayed on the Countdown Timer via Bluetooth.
But that’s a bit boring; we also want to provide a mechanism with a little more flair, flamboyance, panache, and pizzazz, and I have just the thing — a refurbished Western Electric #7 Dial for 500 series telephones from the 1950s that I picked up from OldPhoneShop.com.
This is the sort of mechanism we had on the phone in our house when I was a kid. Just in case you’ve never used one of these little beauties yourself, the idea is that you place your index finger into the hole corresponding to the number you wish to dial, then you rotate the dial clockwise until your finger reaches the end stop. When you remove your finger, a spring-driven clockwork mechanism returns the dial to its original position, generating a series of electrical pulses along the way.
In North America, the number ‘1’ generated one pulse, ‘2’ generated two pulses, and so on up to ‘9’ generating nine pulses, while ‘0’ generated ten pulses. Of course, nothing is simple. In Sweden, for example, they decided to use one pulse to represent ‘0’, two pulses to represent ‘1’, and so on up to ten pulses to represent ‘9’. Not to be outdone, in New Zealand they opted for ten pulses minus the desired number, so dialing the number ‘7’ would result in 10 – 7 = 3 pulses.
But wait, there’s more, because the people you really have to admire are the Norwegians. These little scamps really entered into the spirit of the thing by using the North American system for the bulk of the country and the New Zealand system for their capital, Oslo (one can only admire their devil-may-care attitude).
Returning to my dialer, when we turn this little beauty over, we see two switches. By default, the one in the center is open. This switch closes when we start to dial a number and it stays closed until that number has finished generating its pulses. Meanwhile, the switch on the right is closed by default. When we enter a number and release the dial, this switch opens and closes to generate the requisite number of pulses.
I just hooked two LEDs up to my rotary dial as illustrated below. I’ve arranged this diagram to reflect the photo above. The normally open switch in the middle of the phone (to the left of the diagram below) is connected to a red LED, while the normally closed switch on the right is connected to a green LED.
In the image below we see the actual setup. Note that the green LED on the breadboard is now on the left, because this matches its orientation on the telephone dial now that we’ve flipped it back over.
As an aside, you might be interested in the small circuit board plugged into the left-hand side of the breadboard. This is called a Toaster and it was created by Bradley Slattery who hails from Down Under. I pledged for two Toasters on Bradley’s Kickstarter project and I wish I’d gone for more because they are incredibly useful. You power your Toaster via a USB cable (there’s a USB mini socket on the top and a USB micro socket on the bottom, so you can use whatever cable you happen to have to hand). The Toaster provides you with 5V, 3.3V, and 0V fixed rails, and also a variable supply rail that you can set between 5V and 16V.
In the case of the LEDs and resistors, I just used some spares that I had laying around from an Adafruit Proto Shield. If you are using your own LEDs, you should always read their datasheets to determine the specified values for their forward voltage drop, Vf, and forward current, If. Having said this, if I can’t find a LED‘s datasheet, then — as a rule-of-thumb — I assume Vf = 2V and If = 20mA.
Using Ohm’s law, we know that V = IR, so R = V/I. I’m using a supply voltage, Vd, of 5V, so this gives us R = (Vd – Vf)/If = (5V – 2V)/20mA = (5 – 2)/0.02 = 3/0.02 = 150Ω. But enough of this chitter-chatter, check out this video I just took to see this little beauty in action.
As you can see, we start with the green LED on and the red LED off. As soon as we start to dial, the red LED also turns on. When we release the dial, the green LED pulses off and on some number of times corresponding to the number we dialed. As soon as the green LED has finished pulsing, the red LED turns off again.
Just for giggles and grins, a little while earlier I connected the pulsing switch to a 5V supply via a 10kΩ resistor and observed its response on an oscilloscope. The result from dialing the number ‘7’ is shown in the screenshot below.
When you hold the rotary dialer in your hands and enter a number, you really get a feel for the robustness of the mechanism (they had to be tough to survive years of use in rough hands). Having said this, it’s only now that I realize just how sophisticated it is.
Using some form of governor, the clockwork mechanism generates pulses that are almost identical in duration. In the case of my dialer, each pulse is high for 60ms and low for 37ms. One thing that did surprise me is that there is no detectable switch bounce, no matter how much I zoom in on the oscilloscope (I’d be interested to discover how the designers addressed this issue).
The main thing to remember here is that you can use one of these old rotary telephone dialers in conjunction with your microcontroller to implement all sorts of things. For example, you could use it to enter a series of numbers to unlock a safe.
In my case, my next task is to connect all of my Lixies together, and then I’m going to hook up my telephone dialer and use it to enter a target date and time. I will report back in a future column and I will also make any of my Arduino code available for you to play with yourself. Until then, as always, I welcome your comments and questions.
- Electronics of Tomorrow in Denmark Today
- Altium Acquires Upverter and EE Concierge
- How to Recover an Unsaved Word Doc
- Powering an Arduino: A Shocking Twist
- Building a Countdown Time Using Lixies
- Wheeltappers and Shunters
- Want a 2-Seat Flying Saucer?
— Max Maxfield, Editor of All Things Fun & Interesting Go to Link
<!– Brightcove –><!– Brightcove End –>