Close
0%
0%

Vintagephone - old rotary phone retrofitting

An open project to bring new functionalities to old rotary phones, keeping their fascinating vintage style alive.

Public Chat
Similar projects worth following
In this project an old rotary phone is opened and modified. It will no longer be used as a phone, but it will be retrofitted with a Wemos and a DFplayer to bring some new functionalities in a vintage style.

There are a lot of projects out there about retrofitting old phones, but this project is quite different since it will not use it as a phone, and it's not just an MP3 player, but we'll transform it in a do-it-yourself IOT device, a vintage version of the modern smart assistants.

The aim is also to create an open project and let easily replicate this hack on any vintage phone.

This reuse-recycle project will create a modern object from an old one, so the antique is also a useful object that can be used every day for small tasks and at the same time can make your home or office more beautiful.

Final features 

The vintage phone can be used to set an alarm by calling a number that represents hours and minutes, or you can dial a specific number to get current time and date, or call another number to hear meteo forecasts, and so on... 

Answers are heard by the user throught the handset, and requests are made by using the old rotary to dial commands.

I'd like to create a project that can be spread around, once the Vintagephone is assembled, it should be easy to be used also for non tech people as it once was calling with a rotary phone.

For tech users it would be easy change mp3 files with custom messages and write code to create new services.

Phonebook

Updated list of numbers you can dial to get messages:

#1        - tell the current time
#12       - set an alert after 2 minuts
#13       - set an alert after 3 minutes
...
#1999     - set an alert after 999 minutes
#11000    - set an alert at 10:00
#1-HH-MM  - set an alert at HH:MM
#2        - delete alarm
#21       - restart Wemos
#22       - adjust the time of Wemos from internet
#22-HH-MM - adjust the time manually to HH:MM
#22-YYYY-MM-DD - adjust the date manually to YYYY/MM/DD
#23      - activate AP to set the SSID/password to connect to wifi,
           latitude, longitude and utc for weather
#24      - play heads or tails
#25      - say yes or no
#4       - meteo forecasts (thanks to https://open-meteo.com/)

Reused components and modern parts

To keep the original taste some vintage parts are reused, here are all the parts involved:

1) Rotary dialing encoder

I've used the vintage rotary composer to dial numbers, numbers dialed become commands for the microcontroller

2) Original bells for a vintage sound 

I've powered the original bells and used that vintage ring, boost up converter DC-DC is needed to transform 5V to 12V. And also an L293D motor shield is used to alternate voltage to the bells to make it ring.

3) Vintage handset and switch

The handset is used to listen the messages. The two white buttons under the handset when it is hangup are still used as a switch.

4) Wemos board

It's my preferred board to make "Arduino" projects because it provides also access to wifi, if internet access is available there will be some functionalities, such as local meteo informations, autosetting date and time, more to come (suggest your ideas!).

5) DFplayer / micro SD card
The mp3 player with micro SD card provides audio samples for all the messages speaked in the handset, this means, number samples, meteo keywords, error messages, etc (no text to speech software is used).

6) Power supply

All the stuff has been powered with a 5V, 3000 mmA adapter.

Complete schema

Schematic
(the bells and the other parts are inside the old case!)

Code project available on GitHub

The whole code of the project is published on Github here:

https://github.com/giuliopons/vintagephone

mp3.zip

mp3 audio files organized in folders for DFplayer. Download the updated version from github.

x-zip-compressed - 1.78 MB - 04/27/2022 at 20:00

Download

rotary-phone-WEMOS.zip

This file contains the Arduino IDE files and the data folder with files used in the AP mode to configure the wifi connection. Download the updated version from github.

x-zip-compressed - 10.54 kB - 04/27/2022 at 19:48

Download

  • 1 × Wemos
  • 1 × DFplayer mini
  • 4 × Resistors
  • 1 × L293D mini motor driver shield
  • 1 × Power adapter 5V 3000mmA

View all 7 components

  • ​Wemos + bells + switch

    Giulio Pons05/15/2022 at 16:19 0 comments

    Ok, let's try to make those bells ring! How do they ring? Between the two bells there is a small hammer which rapidly and alternatively  move against the bells. It's moved with a magnetic field created by a coil.
    You can try to manually swap the + and - poles of a 9 volts battery to two pins of the coil, and sometimes you can hear a small "ding" when you change the poles! 
    So we need a way to feed in alternate current to two pins of the coil. The alternate current inside coils creates the magnetic field.
    Since our project runs with direct current we need a way to transform it. I've first added a boost up to raise the voltage from 5 V to 12 V. The raised voltage then goes to the controlled input of the LD293 shield. This shield is commonly used to drive motors with an external power source, but with two pins from Wemos we can turn on and off alternatively the power to the output to pins A+ A-.

    For example, we put 0 to A- and 1 to A+, then we can invert the values: A- to 1 and A+ to 0. So, if we use those A+ and A- to feed to the coil we have a signal that goes alternatively from -12 V to +12 V.

    Try some different delays to match the proper frequency that sounds nice!

    We can also connect a pin of Wemos to the switch to detect the close and open of the circuit.

    When you disconnect all the cables you can turn upside-down that old circuit board and see the stain tracks, you can also try with the tester to find the two pins that change the state when you move the lever that drive the switch on and off.

    Here is a small script that ring the bells a few times and then makes a pause. It will repeat until someone picks up the handset.
    #define PIN_HANGUP_SWITCH D1      // switch hang up
    #define PIN_BELL_1 D2
    #define PIN_BELL_2 D3
    
    void setup() {
      Serial.begin(115200);
      pinMode(PIN_HANGUP_SWITCH, INPUT_PULLUP);
      pinMode(PIN_BELL_1,OUTPUT);
      pinMode(PIN_BELL_2,OUTPUT);
    }
    
    //
    // Ring the bells!
    // Make a alternate square wave on bells coil with 2 pin and L293D driver
    void bells() {
      int maxRings = 5;
    
      byte cornettaStatus; // 0 = OPEN, PICK UP - 1 = CLOSE, HUNG UP
    
      while(maxRings>=1) {
        int i = 0;
    
        cornettaStatus = digitalRead(PIN_HANGUP_SWITCH);  
        if(cornettaStatus==1) Serial.println("Ringing...");
    
        while(cornettaStatus==1 && i<30) {
          digitalWrite(PIN_BELL_2,LOW);
          digitalWrite(PIN_BELL_1,HIGH);
          delay(20);
          digitalWrite(PIN_BELL_2,HIGH);
          digitalWrite(PIN_BELL_1,LOW);
          delay(20);
          i++;
          cornettaStatus = digitalRead(PIN_HANGUP_SWITCH);  
        }
        
        if(cornettaStatus==0) Serial.println("Picked up!");
        digitalWrite(PIN_BELL_2,LOW);
        unsigned long ti = millis() + 2000;
        while(cornettaStatus == 1 && millis()<ti){
          delay(1);
          cornettaStatus = digitalRead(PIN_HANGUP_SWITCH);  
        }
        if(cornettaStatus==0) Serial.println("Picked up!");
        maxRings--;
      }
    }
    
    void loop()
    {
      bells();
    }

    Here is also a video!

  • Meteo forecast service added

    Giulio Pons05/08/2022 at 17:26 0 comments

    Just added meteo forecast service with open-meteo.com Api.

    Dial number #4 to listen to meteo.

    Now I need to make some AP portal setting page to configure latitude and longitude.

  • Wemos + rotary dial encoder

    Giulio Pons05/06/2022 at 15:10 0 comments

    After the handset the rotary encoder disc is the most fascinating part of the old phones.

    The disc allows the user to compose a sequence of  numbers, each time you rotate the disc - which is a normally closed circuit - and release it, it will rotate back to its starting position and it will mechanically open a switch that make electric pulses. We can detect and count these pulses to determine each digit dialed.

    To count those pulses we have to connect two outcoming wires from the rotary encoder. In my Italian SIP model there are four wires, but we need just two: one wire should be connected to GND and the other one to a pin of our board to read incoming pulses. Here is the schema. The rotary dial is a normally closed circuit so the D8 pin of Wemos read 0 because it's connected to ground throught a 330 Ohm resistor.

    When a number is dialed, for example 3, the rotary open and close the switch 3 times, and the D8 pin reads three pulses of 1 because of the 5 Volts throught the series of the two resistors.

    On the Arduino forum I've found a discussion about the rotary encoder that points to this link with a function readNumber that correctly counts those pulses.

    In this video you can see pulses in the Arduino IDE plotter.


    You can try to plot the pulses with this code:

    int in = D8;
    
    void readNumber() {
      
      int needToPrint = 0;
      int count=0;
      int lastState = LOW;
      int trueState = LOW;
      long lastStateChangeTime = 0;
      int cleared = 0;
      
      // constants
      
      int dialHasFinishedRotatingAfterMs = 100;
      int debounceDelay = 10;
    
      int digits = 0;
    
      unsigned long nodialingtime = 4000 ;
      unsigned long lasttimernothing = millis() + nodialingtime;
     
    
      while( digits < 10 && millis() < lasttimernothing) {
    
        int reading = digitalRead(in);
        Serial.println(reading);
      
        if ((millis() - lastStateChangeTime) > dialHasFinishedRotatingAfterMs) {
          // the dial isn't being dialed, or has just finished being dialed.
          if (needToPrint) {
            // if it's only just finished being dialed, we need to send the number down the serial
            // line and reset the count. We mod the count by 10 because '0' will send 10 pulses.
            //Serial.println(count % 10, DEC);
            digits++;
            needToPrint = 0;
            count = 0;
            cleared = 0;
            lasttimernothing = millis() + nodialingtime;
           }
        }
      
        if (reading != lastState) {
          lastStateChangeTime = millis();
        }
        if ((millis() - lastStateChangeTime) > debounceDelay) {
            // debounce - this happens once it's stablized
            if (reading != trueState) {
             // this means that the switch has either just gone from closed->open or vice versa.
             trueState = reading;
             if (trueState == HIGH) {
              // increment the count of pulses if it's gone high.
              count++;
              needToPrint = 1; // we'll need to print this number (once the dial has finished rotating)
              
            }
          }
        }
        lastState = reading;
      }
    }
    
    void setup()
    {
      Serial.begin(9600);
      pinMode(in, INPUT);
    }
    
    void loop()
    {
     readNumber() ;
    
    }

    The script is included in the repository on Github.

    https://github.com/giuliopons/vintagephone/

  • ​Mp3 + Wemos + handset

    Giulio Pons05/04/2022 at 21:20 0 comments

    In these logs I will show how to retrofit your vintage rotary phone. I'll try to describe the main steps to modify the phone.

    The first step is to put together the DF mini player, the Wemos board and the old handset.


    The DFplayer mini is an MP3 player that can talk with your preferred microcontroller through serial communication with two wires.

    In this log we connect the player with the Wemos board. There is just a thing to pay attention to before connecting. The DFplayer has a 3V logic, and Wemos has a 5V logic. This means that a High signal is transmitted with 5V from Wemos and thus will damage your DF player. 

    So we need to put a resistor between the receiving pin of DF player and the transmitting pin of Wemos, in this kind of two pins wired communication the RX pin of a board is connected to the TX of the other device, and viceversa.

    In this case the second pin it's not necessary since the DF player is transmitting and Wemos is receiving and the 3V high signal is correctly received as an High signal also from Wemos, because it's more then half of 5V. 

    Everything above 2.5V is considered high, and everything under 2.5V is considered low. So it works.

    The DF player has two pins who bring left and right audio signals to the speaker and we connect them with cables coming out of the handset.

    To connect the handset you have to find the two proper cables out of the three cables available. 

    TIP: When you open the old phone, disconnect all the connectors from the parts you want to use, you need to access the cables of the handset and no other wiring should be linked to the rest of the old phone or this will change the behaviour of the system.

    Since I don't want to open the receiver, I've just tried two of the three cables. In my handset the cables to use are red and blue.


    Here is the schema:

    You can upload a few mp3 on your micro SD card, insert the cart in the player and test the process with the DF mini example scripts of the Arduino IDE library DFminiMp3

    I've used version 1.07.

    When you try the PlayMp3.ino example sketch you have to modify some lines, since in the Wemos board we use a Serial Software and not an Hardware software:

    So comment line 65 and uncomment 69 and 70.

    At line 69 change 10 with D6 and 11 with D5.

    If you hear your mp3 in the handset you did it!

    If not check these things:

    • check pin connections RX-TX and resistor on pin D5 as described in the above schema.
    • check folders name in your SD card, you should have only a folder named mp3 and inside a few mp3 files with names that are numbers zeropadded: 0000.mp3, 0001.mp3... and so on. Four digits numbered files.
    • if none of above, think about adding an external power source

  • Meteo service

    Giulio Pons04/29/2022 at 22:12 0 comments

    I'm looking for a meteo service which I'd like to call directly from Wemos to retrieve informations.

    I've found open-meteo.com which seems to be able to deliver, free and easy, an API endpoint to parse with Wemos.

    For example here are meteo informations for Milano (Italy).

    https://api.open-meteo.com/v1/forecast?latitude=45.51&longitude=9.16&daily=weathercode,temperature_2m_max,temperature_2m_min&timezone=Europe%2FBerlin

    Latitude and longitude should be inserted with the AP portal.

  • Code updated on github

    Giulio Pons04/29/2022 at 19:28 0 comments
  • MP3 file list

    Giulio Pons04/28/2022 at 07:56 0 comments

    I've prepared a list of all the files saved in the SD card (or needed). 

    Complete list updated here:

    https://docs.google.com/spreadsheets/d/1A5Z_0ZLCWuRMt66E694Saxo3OJwWO3L1QZXkWnyu8mk/edit?usp=sharing

    Audio files can be made with online services like this:

    https://murf.ai/

    Some thought is required on the syntax of the sentences...

    FOLDER\FILE      MESSAGE
    
    01\000.mp3 =     "00"
    01\001.mp3 =     "01"
    01\002.mp3 =     "02"
    01\003.mp3 =     "03"
    01\004.mp3 =     "04"
    01\005.mp3 =     "05"
    01\006.mp3 =     "06"
    01\007.mp3 =     "07"
    01\008.mp3 =     "08"
    01\009.mp3 =     "09"
    01\010.mp3 =     "10"
    01\011.mp3 =     "11"
    01\012.mp3 =     "12"
    01\013.mp3 =     "13"
    01\014.mp3 =     "14"
    01\015.mp3 =     "15"
    01\016.mp3 =     "16"
    01\017.mp3 =     "17"
    01\018.mp3 =     "18"
    01\019.mp3 =     "19"
    01\020.mp3 =     "20"
    01\021.mp3 =     "21"
    01\022.mp3 =     "22"
    01\023.mp3 =     "23"
    01\024.mp3 =     "24"
    01\025.mp3 =     "25"
    01\026.mp3 =     "26"
    01\027.mp3 =     "27"
    01\028.mp3 =     "28"
    01\029.mp3 =     "29"
    01\030.mp3 =     "30"
    01\031.mp3 =     "31"
    01\032.mp3 =     "32"
    01\033.mp3 =     "33"
    01\034.mp3 =     "34"
    01\035.mp3 =     "35"
    01\036.mp3 =     "36"
    01\037.mp3 =     "37"
    01\038.mp3 =     "38"
    01\039.mp3 =     "39"
    01\040.mp3 =     "40"
    01\041.mp3 =     "41"
    01\042.mp3 =     "42"
    01\043.mp3 =     "43"
    01\044.mp3 =     "44"
    01\045.mp3 =     "45"
    01\046.mp3 =     "46"
    01\047.mp3 =     "47"
    01\048.mp3 =     "48"
    01\049.mp3 =     "49"
    01\050.mp3 =     "50"
    01\051.mp3 =     "51"
    01\052.mp3 =     "52"
    01\053.mp3 =     "53"
    01\054.mp3 =     "54"
    01\055.mp3 =     "55"
    01\056.mp3 =     "56"
    01\057.mp3 =     "57"
    01\058.mp3 =     "58"
    01\059.mp3 =     "59"
    01\060.mp3 =     "minutes"
    01\061.mp3 =     "hours"
    01\062.mp3 =     "and"
    01\063.mp3 =     "alarm set in"
    01\064.mp3 =     "AP activated, check Vintagephone in wifi networks"
    01\065.mp3 =     "You had set an alarm at this time"
    01\066.mp3 =     "Hours or minutes not valid"
    01\067.mp3 =     "It is"
    01\068.mp3 =     "It's been"
    01\069.mp3 =     "alarm set at"
    mp3\0000.mp3 =     "line available"
    mp3\0001.mp3 =     "connection lost/ended"
    mp3\0002.mp3 =     "voice mail sound"
    mp3\0003.mp3 =     "busy line"
    mp3\0004.mp3 =     "line available"
    mp3\0005.mp3 =     "busy line"
    mp3\0006.mp3 =     "line available"
    mp3\0007.mp3 =     "line available"
    mp3\0008.mp3 =     "line available"
    mp3\0009.mp3 =     "line available"
    mp3\0010.mp3 =     "modem/fax"
    mp3\0011.mp3 =     "modem/fax"
    mp3\0012.mp3 =     "the dialed number is not available"
    
    TO BE RECORDED:
                         "restarting wemos"
                         "alarm deleted"
                             "Time updated from internet"
                         "Missing wifi

  • Schema and code added

    Giulio Pons04/27/2022 at 20:19 0 comments

    I've added the schema of the project made with Fritzing.

    Also uploaded mp3 files for italian.

    If you want to replicate the project in another language you just sosbitute the mp3 files (a list with proper translation in english still to come).

    And the files for Arduino IDE.

    Code zip contains also a "data" folder which contains css/html files for the AP portal. You should install SPIFFS to upload them to the pseudo-file system of the Wemos.

  • Code?

    Giulio Pons04/26/2022 at 22:23 0 comments

    I will upload code and MP3 files soon.

  • Mp3

    Giulio Pons04/26/2022 at 22:18 0 comments

    DF player works with a micro SD.

    Bought one and filled with MP3 files with numbers. Spent some times to understand folders and MP3 libraries.

    Since I am italian I have used files in italian language.

    Found some files with same tone sound of italian old phones. Edited with Audacity to fit the needs.

    Made some files with online text to speech converter.

View all 14 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates