Mic mute switch for iphone

Discussion in 'The Projects Forum' started by Damon Moon, Mar 7, 2016.

  1. Damon Moon

    Thread Starter New Member

    Mar 7, 2016
    8
    0
    Hello experts,

    I am trying to create a mic mute switch that works with smart phones / tablets and all other devices with 3.5mm TRRS jack.
    I purchased switches and TRRS connectors and passive components to figure out the optimal circuit, but still struggling with the right circuit that doesn't generate the pop noise when the switch is toggled.

    Attached is the schematic I am using, but I still can hear the pop noise when the switch is toggled.
    I am using a simple rocker switch from e-switch. (Link)
    The capacitor value I am using is 100uF.

    Test environment:
    iPhone 6 64GB
    Voice Recorder Pro

    Thank you for your help in advance!

    D
     
  2. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    Put a resistor between the mic line and the capacitor. It will hold the cap at the DC level of the mic line so it doesn't pop when you flip the switch.
     
  3. Damon Moon

    Thread Starter New Member

    Mar 7, 2016
    8
    0
    #12, Thank you for your response! I will try it within the next 3 hours and let you know what I hear.

    What would be an appropriate value of the resistor? 10K ohm?
    FYI voltage between ground and mic was around 2.8V DC

     
  4. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    I would start with at least 10 times the impedance of the circuit, then calculate the time constant. Say, a 600 ohm microphone...start with 6000 ohms and calculate...6 tenths of a second. Yep. That's slow enough to be below human hearing range. I think the problem is, both of us don't know the impedance of your circuit, so just guess.:rolleyes: If you're wrong, you will hear a pop when you toggle the switch.:D
     
  5. Damon Moon

    Thread Starter New Member

    Mar 7, 2016
    8
    0
    Thanks!

    One interesting thing is that when I place a resistor between the capacitor and the switch, the switch does not function. It picks up sound regardless of the switch position. However, when I remove the resistor, it works.

    Am I placing the resistor in the wrong place?
    I used 10K, and 1M ohm.
     
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    Note that iphones sense the current going out to the mic. If it is too low, the phone assumes that nothing is plugged in and goes to the internal mic and speaker. If it is too high, the phone assumes that 3-contact ear buds are plugged in and mutes the microphone preamp.

    ak
     
  7. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    What's wrong with this picture?
     
  8. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
    @#12, do you mean put the resistor in parallel with the switch, so the cap is charged up, and works normally when closed, then it wont pop?
     
  9. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    Yes.
    The source of audio clicks is often a DC difference which is suddenly conducted or equalized by a switching event. I have had numerous experiences with this in designing audio amplifiers, to the point that nobody said there was a DC voltage on the schematic until post #3, but I knew it was there. In vacuum tube amplifiers, the symptom is often worse because the tiniest leakage in a capacitor can develop quite a charge.
     
  10. Damon Moon

    Thread Starter New Member

    Mar 7, 2016
    8
    0
    Thank you for all the comments!

    Here's the test results from last night.

    #1
    Currently, I don't have the resistor connected on the circuit, but I do have a capacitor of 100uF connected as shown in the attachment of my first post.
    • When the switch is turned on, microphone is muted.
    • When the switch is turned off, microphone is unmuted.
    I used the audio-technica ATH-m50x with iPhone control cable by IP-518B last night.
    Although I didn't hear the pop during a call as I toggled the switch, the person on the other side of the call heard it.

    #2
    I tried placing a 10K ohm resistor between the switch and the capacitor, but interestingly enough, the switch didn't work. I am guessing that my iPhone didn't recognize that a headset (with mic) has been plugged in like AnalogKid mentioned. It seems like the mic of the phone itself was picking up the sounds.

    #3 I haven't tried placing a resistor parallel to the switch yet. I will try it tonight.

    #4 I tried measuring the capacitance, but the numbers kept jumping around.

    @#12 - From your experience, what is the solution to making a smooth switching in audio amplifiers?
     
  11. Damon Moon

    Thread Starter New Member

    Mar 7, 2016
    8
    0
    Yes, it works. Thank you so much guys!

    I placed the 10k ohm parallel to the switch and the pop noise is reduced to a small tick. I want to play with different resistors now to see if I can reduce it even further.

    Thanks!!!
     
  12. Damon Moon

    Thread Starter New Member

    Mar 7, 2016
    8
    0
    FYI - This is the schematic I used. The iPhone recognizes the headset (when the switch is disconnected) and all the controls work as well.
     
  13. Damon Moon

    Thread Starter New Member

    Mar 7, 2016
    8
    0
    Dear Experts,

    I have a follow up question about headset detection.

    Because the iPhone doesn't detect the headset (with mic) and falsely detecting headphone (without a mic) when the mute switch is plugged in while on mute, I am trying to optimize the capacitance (thus resistance) of the capacitor to match the resistance of the iPhone mic.
    When the switch is turned on (mic=muted), the capacitor will be connected parallel to the mic across 2.8V, with the resistor being almost ignored.

    I measured that the apple's earbud resistance is 135k ohm.
    From the capacitor voltage discharge formula (detailed in the link below), I plugged in R = 1,350,000 (10x larger than the earbud mic), t = 0.1 sec, Vt = 2.8, Vo = 0.01.
    This gives me about 13nF capacitor to make the entire mic circuit close to 135k ohm.

    Am I calculating the formula correctly?

    http://electronics.stackexchange.co...stance-given-capacitance-and-charge-over-time

    Thank you so much for all your help, guys!!

    -D
     
  14. #12

    Expert

    Nov 30, 2010
    16,252
    6,751
    You never actually said what the impedance of the mic is, and I don't believe it is 135K, but here we go on the math: This is how we model a microphone with 135K of impedance. The goal of a mute switch is to reduce the audio level quite a lot. That would mean the capacitive reactance at the lowest frequency must be a lot lower than the impedance of the microphone. To cut the audio by 50 db you need to cut the voltage by 316:1 (db=20log V2/V1)
    If 135K is 315 parts of 316 parts. the capacitive reactance must be 428 ohms @ 20Hz and that's 18.6 uf. Xc = 1/(2PiFR)
    I don't believe your microphone is good down to 20 Hz, but this is a math demonstration. If the mic isn't all that good with frequency, the capacitor can be even smaller. If you need more than 50 db of muting, the capacitor gets larger. Engineering is always a compromise.:mad:

    Working with 100 uf, we want it to charge to +2.8 volts DC so it won't click when you throw the switch. The microphone allegedly has an impedance of 135K and we don't want to quench the audio (much) when the switch is open, so we use 10x the source impedance. 1 meg or 1.2 meg should work but electrolytic capacitors leak DC. Smallest leakage I have seen is 3 ua. That much current leakage would allow 3 volts across the 1 meg resistor and you don't even have 3 volts.:eek: That's where your tiny click is coming from.:(

    Let's use a 22 uf tantalum capacitor at $1.11. (They don't have any below 10 volts.) That gets the leakage below 1.5 ua on a hot day at 10 volts. Still not very good for a 1 meg circuit impedance, but tantalums are usually better than advertised and you're using 28% of the maximum voltage and way below 85 degrees C.
    http://www.mouser.com/Passive-Compo...-75hqv?P=1z0z819Z1z0wrkiZ1z0x8hf&Ns=Pricing|0

    We can also compromise on the audio loss through the resistor. Let's try 150K ohms. Unmuted loses audio at about 3 db and muted loses audio at 50 db. The leakage voltage across the resistor is about 0.063 volts and your click gets better.:p

    You can still play around with resistors higher than 150k. They will probably work.:)
    The best place to find free tantalum capacitors is on dead circuit boards. They don't have a predictable lifetime like aluminum electrolytics so they are usually still good.
     
  15. Trud09

    New Member

    Jul 5, 2016
    1
    0
    I am completely ignorant on all of circuits. A google search brought me to this thread. Would someone be interested in making one of these for me if I compensated? I can't seem to find what I am seeking. Sorry if this is not allowed, if so feel free to delete my comment.

    I would like a:
    trrs 3.5mm jack
    End call, volume up and down, and a mute button
    trrs 3.5mm Plug

    Is this possible? I was thinking about buying a dollar store headset and changing it to end in a plug instead of the headphones. Can there be a universal mute to work with headsets? I would like to use it with an iphone.

    Thank you for your help.
     
  16. Damon Moon

    Thread Starter New Member

    Mar 7, 2016
    8
    0
    Hi Trud09 -

    With the help from this community, I made the product and launched on Kickstarter.
    Thank you #12!

    http://kck.st/29gi7Ld

    Best,
    Damon
     
  17. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    Just a heads up. iPhones will soon drop the jack and the other manufacturers will probably follow.
     
  18. Kr4sh

    New Member

    Nov 19, 2016
    2
    0
    Sorry to see that your kickstarter didn't get fully funded :-(

    What did you end up settling on for the cap & resistor values? Curious what was wrong with your calculations?
     
  19. Kr4sh

    New Member

    Nov 19, 2016
    2
    0
    I built this circuit and it seems to work OK. It is great at reducing the pop when you mute, but I find that it doesn't totally mute the mic. It doesn't pick up casual talking (which is good) but if you tap the mic or blow into it, it will get picked up (bad).

    I have two 3.5mm PC microphones which have a resistance of ~800ohm and ~1100ohm.

    Currently I'm using a 470uf 16v cap and a 10k resistor. I've also tried caps: 330uf, 100uf and a 100k resistor.

    Am I doing something wrong? Or is this just as good as it gets? I would like to be able to totally prevent any audio from being picked up.
     
Loading...