element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino Projects
  • Products
  • Arduino
  • Arduino Projects
  • More
  • Cancel
Arduino Projects
Blog Old Battleship Phone With Arduino UNO
  • Blog
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Steve524
  • Date Created: 22 May 2024 3:28 PM Date Created
  • Views 1091 views
  • Likes 7 likes
  • Comments 6 comments
  • project
  • uno
  • arduino
  • arduino projects
Related
Recommended

Old Battleship Phone With Arduino UNO

Steve524
Steve524
22 May 2024
Old Battleship Phone With Arduino UNO

This is an old restoration project of an old battleship phone which I retrofitted with an Arduino UNO and a BCD MP3 player module. The front of the phone has a selector switch which I tied to the inputs of the Arduino which then sends a BCD code to the MP3 module to select audio from one of the 12 positions. The audio I selected for each of the 12 positions is a different SIT tone (Situation Information Tone) used by the landline phones, you may recall what it is with the tones you hear when you mis-dial or no one is at the phone number you called. Two of the 12 samples are attached below.

imageimageimageimageimageimageimageimageimage

Fullscreen Old_Ship_Phone.txt Download
                       //INPUTS
const int ssp01 = 21;  //selector switch position 1
const int ssp02 = 22;  //selector switch position 2
const int ssp03 = 23;  //selector switch position 3
const int ssp04 = 24;  //selector switch position 4
const int ssp05 = 25;  //selector switch position 5
const int ssp06 = 26;  //selector switch position 6
const int ssp07 = 27;  //selector switch position 7
const int ssp08 = 28;  //selector switch position 8
const int ssp09 = 29;  //selector switch position 9
const int ssp10 = 30;  //selector switch position 10
const int ssp11 = 31;  //selector switch position 11
const int ssp12 = 32;  //selector switch position 12
const int LED33 = 33;  //Busy LED 33

                   //INPUT VALs
int ssp01val = 0;  //selector switch position 1   val
int ssp02val = 0;  //selector switch position 2   val
int ssp03val = 0;  //selector switch position 3   val
int ssp04val = 0;  //selector switch position 4   val   
int ssp05val = 0;  //selector switch position 5   val
int ssp06val = 0;  //selector switch position 6   val
int ssp07val = 0;  //selector switch position 7   val
int ssp08val = 0;  //selector switch position 8   val
int ssp09val = 0;  //selector switch position 9   val
int ssp10val = 0;  //selector switch position 10  val
int ssp11val = 0;  //selector switch position 11  val
int ssp12val = 0;  //selector switch position 12  val
int LED33val = 0;  //Busy LED 33    val

                       //OUTPUTS
const int op01 = 2;    //output pin d2
const int op02 = 3;    //output pin d3
const int op03 = 4;    //output pin d4
const int op04 = 5;    //output pin d5
const int op05 = 6;    //output pin d6
const int op06 = 7;    //output pin d7
const int op07 = 8;    //output pin d8
const int op08 = 9;    //output pin d9
const int op09 = 13;   //output pin d13 Busy LED 13

                //OUTPUT VALs
int op01val;    //output pin d2    val
int op02val;    //output pin d3    val
int op03val;    //output pin d4    val
int op04val;    //output pin d5    val
int op05val;    //output pin d6    val
int op06val;    //output pin d7    val
int op07val;    //output pin d8    val
int op08val;    //output pin d9    val
int op09val;    //output pin d13   val Busy LED 13

void setup()
 {
Serial.begin(9600);
pinMode(ssp01,INPUT_PULLUP);  //21 Input pins
pinMode(ssp02,INPUT_PULLUP);  //22
pinMode(ssp03,INPUT_PULLUP);  //23
pinMode(ssp04,INPUT_PULLUP);  //24
pinMode(ssp05,INPUT_PULLUP);  //25
pinMode(ssp06,INPUT_PULLUP);  //26
pinMode(ssp07,INPUT_PULLUP);  //27
pinMode(ssp08,INPUT_PULLUP);  //28
pinMode(ssp09,INPUT_PULLUP);  //29
pinMode(ssp10,INPUT_PULLUP);  //30
pinMode(ssp11,INPUT_PULLUP);  //31
pinMode(ssp12,INPUT_PULLUP);  //32
pinMode(LED33,INPUT);         //33 LED Busy pin input value 

pinMode(op01,OUTPUT);
pinMode(op02,OUTPUT);
pinMode(op03,OUTPUT);
pinMode(op04,OUTPUT);
pinMode(op05,OUTPUT);
pinMode(op06,OUTPUT);
pinMode(op07,OUTPUT);
pinMode(op08,OUTPUT);
pinMode(op09,OUTPUT);
  }

void loop() {

    op01val = digitalRead(op01);  
    op02val = digitalRead(op02);
    op03val = digitalRead(op03);
    op04val = digitalRead(op04);
    op05val = digitalRead(op05);
    op06val = digitalRead(op06);
    op07val = digitalRead(op07);
    op08val = digitalRead(op08);
    op09val = digitalRead(op09);
        
    Serial.print("op01 ");     // Serial.print output stuff
    Serial.print(op01val);
    Serial.print(" ");
    Serial.print("op02 ");
    Serial.print(op02val);
    Serial.print(" ");
    Serial.print("op03 ");
    Serial.print(op03val);
    Serial.print(" ");
    Serial.print("op04 ");
    Serial.print(op04val);
    Serial.print(" ");
    Serial.print("op05 ");
    Serial.print(op05val);
    Serial.print(" ");
    Serial.print("op06 ");
    Serial.print(op06val);
    Serial.print(" ");
    Serial.print("op07 ");
    Serial.print(op07val);
    Serial.print(" ");
    Serial.print("op08 ");
    Serial.print(op08val);
    Serial.print(" ");
    Serial.print("op09LED ");
    Serial.println(op09val);   
    
  ssp01val = digitalRead(ssp01);        
  if(ssp01val == LOW)           // 11111110 (Message1 00001.mp3)
  {
    digitalWrite(op01, LOW);    // 0 
    digitalWrite(op02, HIGH);   // 1
    digitalWrite(op03, HIGH);   // 1
    digitalWrite(op04, HIGH);   // 1
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp02val = digitalRead(ssp02);
  if(ssp02val == LOW)           // 11111101 (Message2 00002.mp3)
  {
    digitalWrite(op01, HIGH);   // 1 
    digitalWrite(op02, LOW);    // 0
    digitalWrite(op03, HIGH);   // 1
    digitalWrite(op04, HIGH);   // 1
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }  
  ssp03val = digitalRead(ssp03);
  if(ssp03val == LOW)           // 11111100 (Message1 00003.mp3)
  {
    digitalWrite(op01, LOW);    // 0 
    digitalWrite(op02, LOW);    // 0
    digitalWrite(op03, HIGH);   // 1
    digitalWrite(op04, HIGH);   // 1
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp04val = digitalRead(ssp04);
  if(ssp04val == LOW)           // 11111011 (Message1 00004.mp3)
  {
    digitalWrite(op01, HIGH);   // 1 
    digitalWrite(op02, HIGH);   // 1
    digitalWrite(op03, LOW);    // 0
    digitalWrite(op04, HIGH);   // 1
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp05val = digitalRead(ssp05);
  if(ssp05val == LOW)           // 11111010 (Message1 00005.mp3)
  {
    digitalWrite(op01, LOW);    // 0 
    digitalWrite(op02, HIGH);   // 1
    digitalWrite(op03, LOW);    // 0
    digitalWrite(op04, HIGH);   // 1
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp06val = digitalRead(ssp06);
  if(ssp06val == LOW)           // 11111001 (Message1 00006.mp3)
  {
    digitalWrite(op01, HIGH);   // 1 
    digitalWrite(op02, LOW);    // 0
    digitalWrite(op03, LOW);    // 0
    digitalWrite(op04, HIGH);   // 1
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp07val = digitalRead(ssp07);
  if(ssp07val == LOW)           // 11111000 (Message1 00007.mp3)
  {
    digitalWrite(op01, LOW);    // 0 
    digitalWrite(op02, LOW);    // 0
    digitalWrite(op03, LOW);    // 0
    digitalWrite(op04, HIGH);   // 1
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp08val = digitalRead(ssp08);
  if(ssp08val == LOW)           // 11110111 (Message1 00008.mp3)
  {
    digitalWrite(op01, HIGH);   // 1 
    digitalWrite(op02, HIGH);   // 1
    digitalWrite(op03, HIGH);   // 1
    digitalWrite(op04, LOW);    // 0
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp09val = digitalRead(ssp09);
  if(ssp09val == LOW)           // 11110110 (Message1 00009.mp3)
  {
    digitalWrite(op01, LOW);    // 0 
    digitalWrite(op02, HIGH);   // 1
    digitalWrite(op03, HIGH);   // 1
    digitalWrite(op04, LOW);    // 0
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp10val = digitalRead(ssp10);
  if(ssp10val == LOW)           // 11110101 (Message1 00010.mp3)
  {
    digitalWrite(op01, HIGH);   // 1 
    digitalWrite(op02, LOW);    // 0
    digitalWrite(op03, HIGH);   // 1
    digitalWrite(op04, LOW);    // 0
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp11val = digitalRead(ssp11);
  if(ssp11val == LOW)           // 11110100 (Message1 00011.mp3)
  {
    digitalWrite(op01, LOW);    // 0 
    digitalWrite(op02, LOW);    // 0
    digitalWrite(op03, HIGH);   // 1
    digitalWrite(op04, LOW);    // 0
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
  ssp12val = digitalRead(ssp12);
  if(ssp12val == LOW)           // 11110011 (Message1 00012.mp3)
  {
    digitalWrite(op01, HIGH);   // 1 
    digitalWrite(op02, HIGH);   // 1
    digitalWrite(op03, LOW);    // 0
    digitalWrite(op04, LOW);    // 0
    digitalWrite(op05, HIGH);   // 1
    digitalWrite(op06, HIGH);   // 1
    digitalWrite(op07, HIGH);   // 1
    digitalWrite(op08, HIGH);   // 1
  }
   
   LED33val = digitalRead(LED33);  // Read the state of the LED Busy value
  
   if(LED33val == LOW)             // Busy LED pin 33 INPUT (LOW = Playing)
  {
   digitalWrite(op09, HIGH);       // Busy LED pin 13 OUTPUT (LED = On)
  }
   else if(LED33val == HIGH)       // Busy LED pin 33 INPUT (HIGH = Stopped)
  {
   digitalWrite(op09, LOW);        // Busy LED pin 13 OUTPUT (LED = Off)
  }
} 
 
Play this audio clipPlay this audio clip

  • Sign in to reply
  • javagoza
    javagoza over 1 year ago

    Looks great. What a fun project.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube