Rotary dial phone WWW & calculator

Enter the internet like it's 1980

Rotary phones are fun, the ingenuity of the dial in combination with the electro-mechanical logic at the telephone exchange made it possible to allow telecommunications to evolve. But, these wonderful devices have completely disappeared from our desks (for many good reasons though). But wouldn't it be nice if you could still use such a device to open up your web-browser and visit your favorite website, with just a single dial. Or perhaps dial a complete IP address and visit that. And for some basic calculations you can also use your phone as an input device. Keep in mind that this project is a gadget, a gag, a joke. It should not be taken too serious. HOWEVER... it does work and it does so quite elegantly! So how fun is that!

Imagine this...

You speak with a colleague about a specific website (that you have already bookmarked) and have a discussion about it that requires you both to take a look at it. So you offer to open a web-browser to take a look, then you do not touch the keyboard or mouse, but reach for the rotary dial phone that was hidden underneath a pile of paperwork. You clear it out, pick up the dial, hear the dial-tone and dial a number, bweeeeieieirieirieireip noises come from the receiver and the website shows up on your screen. You act like this is completely normal and continue the discussion about the contents of the site. Then when you are done, you hang up the phone and the web-browser is closed and you continue like nothing special happened. Leaving your colleague in complete confusion about what just happened. Now how fun is that?
And all this isn't that difficult to achieve, considering I already did all the work for your. So all you need to do is to find an old rotary dial phone with a single push-button , connect it to an Arduino pro micro with 2 resistors, 3 wires, an USB cable and perhaps a small case to neatly put it into.

How can this be achieved?

Below is the "schematic" of the internals of the phone and how the Arduino pro micro is connected. As you can see, you only need 3 wires. The Blue wire is connected to the Arduino's ground, the Green wire is connected to an IO-pin (used as input) via a resistor and by using internal pull-ups this line is now able to detect the pressing of the phone front button. The Red wire is connected to an IO-pin (used as input AND output) via a resistor and by using internal pull-upps this line is now able to detect the situation ON/OFF-hook and the dial pulses. The Red line is also used to apply a output signal, by quickly switching from input to output and modulating the output voltage between 0 and 5V and audible tone can be produced in the receiver. So with this simple circuit and some smart firmware we can detect on/off-hook, dial pulses, front button activity and make some sounds.
Unfortunately we cannot make the bell ring. This would require additional electronics as the ring-voltage is required to be much higher then 5V, but this is not a problem, because the project has no use for the bell anyway. In the beginning I thought it would be nice to make the bell ring when an email message was received, however, making that happen would be beyond the standard USB HID keyboard command-set. Meaning that it would require custom driver software to be loaded into the PC making the project instantly much more complicated.

The 3D printed parts

In order to place this project into a neat case, I decided to use a standard wall-mount phone outlet and add a lid to the bottom side. This worked out pretty well. So now everything is combined into one single simple case.
This huge connector can be hidden somewhere behind the PC. It may not look pretty but it is the best way to prevent modification to the cable of the phone. This way the phone can be used without any modifications and you even can easily swap between phones if you ever wanted to. The Arduino Pro Micro was fasted with a little bit of hot-glue, this prevents it from wobbling around in the case and saved me from the effort of making a complicated set of hooks to keep the board in place. This because the board itself has no mounting holes because it is intended to be connected to another board by the use of headers.

General usage

System setup
No software needs to be installed, no special drivers are required. This device acts like a regular USB keyboard and is designed to operate with the Firefox web-browser and the standard calculator app. But you do need to do some very simple "configurations" to your systems taskbar in order for this device to work properly.
In order to use the Firefox web-browser it's icon should be placed onto the windows taskbar as the first item from the left. This allows it to be started using Windows+1 keyboard shortcut. You can achieve this by right clicking on the icon and selecting the option "add to taskbar" from the menu.
In order to use the calculator app it should be placed onto the windows taskbar as the second item from the left. This allows it to be started using the Windows+2 keyboard shortcut. You can achieve this by right clicking on the icon and selecting the option "add to taskbar" from the menu. Below is an image that shows you how your taskbar could look like when this is done.
The phone
The phone has a hook, a dial and a white button on the front panel. When taking the hook of the phone you can directly speed-dial a bookmark, or start the calculator app or start a browser and dial the IP address or number based URL. Pickup the handpiece/receiver, you will hear a dial tone, dial 0-9 to use a specific function:
        1-8 = speeddial mode
          9 = calculator mode
          0 = IP / URL dial mode
        
The button on the telephone has a function too. It is intended to put the dial into shifted mode. So by pressing the button the functions for each dial position get another function. This basically doubles the functionality of the dial and allows us to instruct the device with other info than just numbers. The two situations for the dial are shown below (left=normal, right=shifted)

Modes of operation and how to use them...

What this rotary phone to USB device does is using the phone not as a phone but as a device to control your web-browser or calculator, by generating the keyboard codes that correspond to the functions coupled to the dial positions of the phones rotary dial. There are 3 modes of operation:
speeddial mode
The speeddial mode, will open a web-browser and goes to the x-th item on your list of bookmarks. So assume you have a list of 25 bookmarks, then you can only access the top 8 using the speeddial function. Pick up the handpiece/receiver, dial a number 1-8, this openes a web-browser and the list of bookmarks will be opened, then the cursor goes down to the item 1-8 depending on the number dialed and selects that bookmark and opens it. When you are finished with the web-browser, you must place the handpiece/reciever back onto the "hook" of the phone and the web-browser will be closed.
calculator mode
The calculator mode allows you to do some simple calculations, like adding, subtracting, multiplying and division. Pick up the handpiece/receiver, dial a 9 to enter the calculator mode. And the calculator app will be opened. Now you can do some basic calculations by dialing the numbers 0-9 and functions . - + * / = When you are finished with the calculator, you must place the handpiece/reciever back onto the "hook" of the phone and the calculator app will be closed.
IP-address and number based URL dialing mode
Dial IP-addresses
Pick up the handpiece/receiver, dial a 0 (just like you would dial a 0 on a company phone to connect to an outside line) and a browser will be opened. Now you can dial the numbers of the IP address and for the '.' the 'enter' or the ".com" or any other kind of non numerical character you must use press the shift button then dial the desired character.
Unfortunately, not many websites allow you to directly visit them with an IP-address. Sometimes a warning is shown, something nothing happens at all. That's why the dialing of number based URLs is much more fun.
Dialing number based URLs
The Chinese, for various reasons, do use number based URL's. From a western perspective (considering I (the author if this annual) am from Europe) this sound a bit strange at first but there is a perfectly fine explanation for it, in the next chapter is explained why. But first this is how it works in practice: Pick up handpiece/receiver, dial a 0 (just like you would dial a 0 on a company phone to connect to an outside line) and a browser will be opened. Now you can dial the numbers of the IP address and for the '.' the 'enter' or the ".com" or any other kind of non numerical character you must use press the shift button then dial the desired character.

Note about number based URLs

Number based URL's aren't entirely non-existing but they are an exception in the western world. A few examples:
          In the Netherlands, the URL 9292.nl originates from 0900-9292 (a phone number you can call to get public transport travel directions.
          In Sweden there's 1177.se a website for health care
          In the UK there's 111.nhs.uk an online (non urgent) emergency service.
          118118.com is a directory service provider that picked up a lot of popularity before mobile phones became the primary way to search for local businesses.
          In Australia there's 131500.com.au the URL originates from the public transportation directions phone number of the past.
          In Italy there's 187.it for Telecom Italia. Telephone companies customer service had short numbers beginning with 1.
        
But the above number based URL's are merely to be considered as exceptions, we may state that most western websites have a text based URL. And having an URL or website that consists of a number may therefore be associated (by westerners) as cheap or may let them think that it really means that the most desirable version of a specific URL was already taken.
In China, though, that's usually not the case. In fact it is the complete opposite to what most western people are accustomed to. Because if you are seriously looking at Chinese companies online, you may notice that it's quite common for Chinese website names to include digits or even consist of numbers entirely. This is much less common with the names of English-language websites. There are a couple of reasons for this. Firstly, numbers are often easier for Chinese people to remember than Latin letters as these are not their native used symbols. Secondly, numbers often have extra meanings in Chinese. So you may now consider the fact that dialing a URL mainly consisting of numbers, using an old rotary dial phone like this project does, now becomes much less "strange" or awkward. You may even tend to believe that it could be practical to visit website using a rotary dial phone, but that would merely be a matter of personal taste.

Numbers have meanings in Chinese

The second reason number domain names are popular in China has to do with the huge number of homophones in the Chinese language. That is, the large amount of words that sound alike. Because there's quite a limited amount of syllables in Chinese languages, many words end up sounding similar or identical. Numbers are no exception. Because all numbers in Chinese sound similar to other words, it's difficult to avoid certain associations growing between numbers and the words they sound like. This can also be put to use by intentionally choosing numbers to mimic the sounds of other words. Here are some common associations between numbers and similar-sounding words in Chinese:
          1 () can sound similar to "want" or "is going to" ().
          2 () can sound similar to "love" (), but also means "stupid"!
          3 () can sound similar to "life" or "birth" ().
          4 () is generally bad as it sounds like "death" ().
          5 () is quite versatile, as it can sound similar to many different words. Most commonly it is used as "I / me" (and), and "not have" ().
          6 () can sound like "flow / stream" (), "stay" () and "fortune" ().
          7 () can sound like "arise" ().
          8 () can sound like "prosper" (in 发财), and two eights side-by-side (88) can look like the character for "double happiness" ().
          9 () can sound like "long lasting" or "eternal" ().
        
Because of this, certain combinations of numbers can be quite significant. 14, for example, can sound like "will die", and is thus quite undesirable. Similarly, 18 can sound like "will prosper" and is quite desirable. Digits are even more convenient when you consider that the words for numbers are homophones for other words. The URL for the massive e-commerce site Alibaba, for example, is 1688.com, which sounds when pronounced something like "yow-leeyoh-ba-ba", not perfect perhaps, but very understandable and a good reminder. But is isn't always about the way it sounds and the digits in a domain name usually aren't random either. For example the Internet company NetEase uses the web address 163.com. This is a throwback to the days of dial-up internet when Chinese Internet users had to enter 163 to get online. And the phone companies China Telecom and China Unicom simply re-used their well-known customer service numbers as domain names, 10086.cn and 10010.cn, respectively.
And finally, there's the wide, wild world of Chinese internet slang which may have originated by the fact of people dodging censors (or just nosy parents) and using homophonic numerals are perfect for such a task. So 748 is telling someone to go to hell, 555 basically means a crying emoji, 233 means you"re laughing, and 520 is "I love you". And if you wanted to really kick it up a few notches, there"s 2010000, which means "I love you for 10,000 years". How's that for your Valentine"s Day Instagram hashtag?

Examples of Chinese Website Names with Numbers

The effects described above would have been used when the below Chinese website names were created: 126.com and 163.com are owned by Netease, which is a general Internet services website, similar to Yahoo. Many people in China use 126.com for their email. 126 read in Chinese sounds very roughly like "I love you" in English.
          88.com online gaming and general Internet services website
          51.com online gaming site. The name sounds like "I want"
          51job.com job search website. The name sounds like "I want a job"
          56.com video-streaming website. The name sounds like "I stream"
          3.cn a shortcut to Jingdong Mall (is at jd.com)
          4399.com China"s first and largest online gaming website
          92.com buying and selling used cars
          12306.cn a place to order your train tickets
          4008-517-517.com McDonalds" delivery online, "517" sounds a bit like "I want to eat."
        
Note that official Chinese company names are always written in Chinese characters even though these aren't always included on their website. It's important to realize that the English names of Chinese companies aren't the true name, but just a way to name them in the west...
You may ask yourself, "why don"t Chinese web addresses just use Mandarin characters?" well that's because that"s a pain, too. The Internet Corporation for Assigned Names and Numbers (ICANN), which sets the rules for web addresses globally, has periodically hyped the expansion of domain names to include non-Latinate scripts, but Chinese web sites have yet to take full advantage.
Keep also in mind that it is difficult to type Chinese characters on an alphabet-based keyboard. Some devices require a special plug-in to type in Chinese URLs, and even then it takes longer to type or write out characters than to input a few digits. Plus, for web sites that want to expand internationally but don"t want to alienate foreign audiences with unfamiliar characters, numbers are a decent compromise.

Easter egg(s)

Normally, easter eggs are to be hidden but if nobody expects an Easter egg, nobody will look for it so then nobody will find it and all the fun that went into making it was essentially for nothing. So if you really want to find out about the egg(s) in this project, just browse through the user manual and you'll know all about it.

How it works

The whole project is nothing more then an spiced up keyboard example for the Arduino Pro Micro (or Arduino Leonardo). So despite the tech of an Atmega 32U4 behaving like a keyboard... no other special magic happens. The main reason to do it like this is simply because it is the easiest as no special drivers are required. Everything works out of the box. This way you can use it on any computer even if you don't have administrator rights for it and therefore aren't allowed to install any kind of software or drivers. Which might be the case if you want to use this device at work. In order to control your computer through the use of only a keyboard there is a small trick to be pulled, it is the trick of using keyboard shortcuts. Keyboard shortcuts are quite normal keyboard commands for general purposes (OS related shortcuts) or for a specific type of program (program related shortcuts). Because this device acts like a keyboard, the information is going only in one direction. From keyboard to computer. There is no way the computer can let the keyboard know in which state it's in. This means that you cannot just send a set of key presses and hope for the best, because then weird things will happen eventually. So the trick here is to force the OS (using OS related shortcuts) into a known state and work your way up to the program from there and then perform the program related shortcuts. Opening the web-browser (which is an app expected to be located on the first position of the taskbar) can be started using: WINDOWSKEY+1 which means "start 1st item on the taskbar". But this would be problematic when Firefox is already open, as it would mean that we don't know in which state it is and this causes problem especially when closing it later on, because we might be closing something the user doesn't want to be closed. So it would be best to open up a completely independent instance of the web-browser:
KEY_LEFT_GUI + KEY_LEFT_SHIFT + 1 (= Focus to the taskbar and open a new instance of the app on the first position of the taskbar) delay for 2.5 seconds (=Allow some time for the app to start, some systems are just very slow an we must accept that)
KEY_CONTROL+L (= Focus the address bar (and selects all within) so you can begin typing)
KEY_DELETE (= Clear text if there was any)
Opening the bookmarks menu and selecting an item could be the following set of key events: KEY_LEFT_ALT, B, KEY_DOWN_ARROW, KEY_DOWN_ARROW, KEY_RETURN But unfortunately... this seems to work on an English version of the OS and therefore an English version of Firefox will be installed. But doesn't work when a Dutch OS is running and a Dutch version of Firefox is installed. Because in the Dutch version the B isn't used for Bookmarks but for something completely different. Instead an A (for blAdwijzer) would be required. This makes this sequence of key-presses almost completely useless if you want to use it on different systems. Therefore a different combination must be used. Fortunately, the use of the combination: KEY_CONTROL+SHIFT+B, KEY_DOWN_ARROW, KEY_DOWN_ARROW, KEY_RETURN does something similar and equally useful. Therefore that combination will be the preferred one for this project.
Finally, when the user decides to hangup the receiver on the hook (terminate the call), the web-browser must be closed. Closing the web-browser is something similar:
KEY_LEFT_GUI + T (=Focus to or "open" the taskbar)
KEY_HOME (=Make sure we are at the start (first position))
KEY_UP_ARROW (=Arrow up to make a selection from currently opened instances)
KEY_END (=Choose the last instance of the application (this fails only if the user has openend another instance manually after using the phone BEFORE the receiver was put down)
KEY_RETURN (= Confirm chosen selection from the (possible) list of items)
KEY_LEFT_ALT+KEY_F4 (= The application close command)
So as you can see, it is not impossible to control your computer through the use of blind keyboard presses. But you have to make sure you are using the right key events, otherwise you might be doing things that may be something completely "undesirable" if you are executing these in the wrong application. Therefore as shown above, care has to be taken to prevent this as much as possible. By forcing an extra HOME command and using new instances.

Downloads:

All files related to this project are available for download on my github page https://github.com/JanDerogee/Rotary-dial-phone-WWW