Zoom Phone

by diceyukita in Circuits > Arduino

1928 Views, 7 Favorites, 0 Comments

Zoom Phone

Zoom Phone

A few months ago I published an instructable for a bidirectional Physical Zoom Mute Button.

Back then I didn't think that we'll be using it for much longer, but turns out we are still living our Zoom life, and so I decided to evolve the Zoom Mute Button to a Zoom Phone. Yes that's right, a good old rotary phone that hooks up to Zoom. Pick up the phone, and you unmute yourself. Talk and hear through the phone's microphone and speaker. Put down the phone and mute yourself. Simple.

As an interaction designer, I was amazed at the beauty of the interaction design of a traditional phone in today's context. Here are some values you get from using a rotary phone with Zoom:

  • It's the opposite of hands-free: it's hands-full, which enables you to actually concentrate on the conversation
  • Picking up the phone = an obvious appeal that you want to talk
  • Covering the phone mic with your hand = the most trustful mute
  • Sandwiching the phone between your neck and shoulder to use 2 hands = a human centered cue that you are multitasking

Supplies

  • 1 x Microcontroller that support HID (e.g. Teensy, Arduino Leonardo, Pro Micro etc.)
  • A rotary phone (you can buy one very cheaply at online second hand shops)
  • A cheap USB headset (like this one)
  • Some cables/crocodile clips
  • Install SwiftBar
  • Install SF Symbols


Set Up

As explained, the Zoom Phone is an evolution of the previous Zoom Mute Button instructable, so the basic set up is the same. Head over to the Physical Zoom Mute Button instructable, and complete Steps 1-4.

Read the Phone State

1628173428662.gif

A rotary phone essentially creates a massive circuit with the telephone operator when the phone is picked up, and the voices are sent as pulse through that circuit. So it's easy to read the phone state: just put 2 crocodile pins on both sides of the phone holder mechanism that touch on default and detach when the phone is picked up. Hook up one of the crocodile clip to GND on the microcontroller, and the other on a pin of your choice.

Upload Code to Microcontroller

PXL_20210730_063747795.jpg

This code uses the Zoom's default Command+Alt+A shortcut key for muting/unmuting, so if you changed the shortcut key then you must change the code too.


As with the Physical Zoom Mute Button, this utilizes Swiftbar to scrape the mute state of Zoom, so it's bidirectional. If you've muted yourself on the Zoom app GUI, putting down the phone will keep you muted.


const int phonePin = 2;
int phoneState = 0;
static int prevPhoneState = 0;
String inData;
static String prevInData;
static bool isMute = false;


void setup() {
  Serial.begin(9600);
  pinMode(phonePin, INPUT_PULLUP);
  pinMode(LED_BUILTIN, OUTPUT);
}


void loop() {
  // indicate that the board is alive
  digitalWrite(LED_BUILTIN, HIGH);
  
  if (Serial.available() > 0) {
    char recieved = Serial.read();
    inData += recieved;


    // Process message when new line character is recieved
    if (recieved == '\n')x
    {
      if (inData != prevInData){
               
        //Serial.print("Arduino Received: ");
        //Serial.print(inData);
  
        if (inData == "audioON\n"){
          isMute = false;
        }
        else if (inData ==  "audioOFF\n"){
          isMute = true;
        }
  
        prevInData = inData;
        inData = ""; // Clear recieved buffer
  
        delay(100);
      }
    }


    prevPhoneState = phoneState;
    phoneState = digitalRead(phonePin);


    if (prevPhoneState==0 && phoneState==1 && !isMute) {
      //Serial.println("Muting");
      Keyboard.press(MODIFIERKEY_SHIFT);
      Keyboard.press(MODIFIERKEY_GUI);
      delay(100);
      Keyboard.press(KEY_A);
      delay(100);
      Keyboard.release(MODIFIERKEY_SHIFT);
      Keyboard.release(MODIFIERKEY_GUI);
      Keyboard.release(KEY_A);
    }
    else if (prevPhoneState==1 && phoneState==0 && isMute) {
      //Serial.println("Unmuting");
      Keyboard.press(MODIFIERKEY_SHIFT);
      Keyboard.press(MODIFIERKEY_GUI);
      delay(100);
      Keyboard.press(KEY_A);
      delay(100);
      Keyboard.release(MODIFIERKEY_SHIFT);
      Keyboard.release(MODIFIERKEY_GUI);
      Keyboard.release(KEY_A);
    }
  }
}

Hack the USB Headset

PXL_20211013_134833394.jpg

Registering a device as a USB microphone and speaker can be surprisingly time consuming, so for this instructable I suggest to hack a cheap USB headset. Crack open the speaker part and the microphone part, and get hold of each of the 2 cables coming out of them.

Connect It to the Phone Mic/speaker

Inside the rotary phone, there should also be 2 lines each coming out the microphone and the speaker. Solder them to the 2 cables of the USB headset.

Connect the 2 USBs to Your PC and Open Up Zoom

FSHETJKKUPIXUGM.jpeg

Select the USB headset in the Zoom mic/speaker settings (mine showed up as USB PnP Device), and you should be good to go! Enjoy the marvelous interaction design of a good old telephone.