I'm trying to use the mic input on my iPhone to record line level audio. I have made a cable with an attenuator as shown in the picture below.

Recording from my macbook pro works like a charm (3,5mm headphone jack).

Recording from my DJ mixer (stereo rca), or UR22 audio interface (1/4" jack). I get a rather loud buzzing sound. audio clip

This is my first time building something like this myself, I'm probably making an obvious mistake, would be nice if someone could help me out.

Update: turns out it was due to a faulty jack, not making proper ground connection on the TRS side.

to anyone wanting to to do the same, use the schematic, it works! but switch R1 and R2 for something lighter if you dont need heavy attenuation.

  • \$\begingroup\$ Your iPhone mic input will have a DC component that could be causing the problem. Maybe add a DC blocking condenser onto the circuit. \$\endgroup\$
    – F. Bloggs
    Sep 23, 2017 at 15:33
  • \$\begingroup\$ @F.Bloggs why would this be a problem when recording via PC and not via macbook? \$\endgroup\$
    – Diego
    Sep 23, 2017 at 16:11
  • \$\begingroup\$ The output topology on the devices are obviously different, otherwise you wouldn´t have the problem. The MacBook may have a better/more tolerant driver circuit than the UR22, or your DJ mixer (notorious for bad/cheap electronics). Only one way to find out! \$\endgroup\$
    – F. Bloggs
    Sep 23, 2017 at 16:28
  • \$\begingroup\$ @F.Bloggs where in the circuit should I add the capacitor and what value should it be? \$\endgroup\$
    – Diego
    Sep 23, 2017 at 17:03
  • \$\begingroup\$ It needs to go between the junction of the 3 resistors and the MIC input. 100nF should do it. I´d aslo think about dropping the level of attenuation - change the 330k resistors to 50k - or even less. The clever thing would be to replace with a stereo pot (100k?) so that the unit is more flexible and usable with many different devices. \$\endgroup\$
    – F. Bloggs
    Sep 23, 2017 at 17:19

2 Answers 2


Audacity says your hum is 50Hz and -37dB which is quite high.

The cause is due to ground currents and high impedance between the two power sources from Y filter ground currents in the DJ mixer which is AC powered or powered by different outlets.

Assuming the power cords are far from the audio cables, then the common mode hum can be reduced by two methods;

a) Reducing the differential ground impedance between DJ case or jack shield and Iphone ground input (DCin) or by connecting both to earth ground.

b) raising the common mode (CM) impedance of both signal and ground from the DJ Mixer using an "Audio isolator" which the RCA pugs and jacks with a large CM choke or DIY and make it with the cables cut into a large audio CM choke. This effectively balances the signal source.

b) is preferred to isolate the iPhone from earth ground for leakage current ( which feels like a buzz) when holding the phone and touching another earth gnd or bare feet on non-insulated concrete or grass.

To further explain this, I found this video; https://www.youtube.com/watch?v=l4famaQmWnA


What you have drawn is the right approach.

The audio sample doesn't tell us what the noise level is like relative to the signal - music for example. Your phone may have automatic gain control (AGC) which is boosting the volume a large amount during the quiet periods.

  • See if you can turn this off and what the result is.
  • If you can't turn it off then try recording some beeps (like the BBC time signal, for example) and see if the noise level "ducks" down and creeps back up in the quiet periods. If it does AGC is your problem.

According to Disable AGC and highpass filter on IOS:

iOS has automatic gain control and a high pass filter on the mic input. You may want to disable this if doing an audio app.

Adding this to the iOSAudioIODevice will disable it.

setSessionUInt32Property(kAudioSessionProperty_Mode, kAudioSessionMode_Measurement);

And this will re-enable it.

setSessionUInt32Property(kAudioSessionProperty_Mode, kAudioSessionMode_Default);

I know little about iOS. I accidentally touched an iPhone once.

enter image description here

Figure 1. iOS uses the pinout on the left.

Make sure you have line and ground the correct way around.

Line output levels

Apple discussions says the MacBook Pro audio out is as follows:

Line/Headphone Output

During playback of a 1 kHz, full-scale sine wave (44.1 kHz output sample rate, 24-bit sample depth, 100 kΩ load, unless otherwise specified) the audio line output has the following nominal specifications:

  • Jack type: 3.5 mm stereo
  • Maximum output voltage: 2 VRMS (+8.24 dBu)
  • Output impedance: < 24 Ω

Note: For best results, equipment plugged into the line/headphone output jack should not connect the audio ground to other grounds, such as the chassis or “green-wire” ground.

Meanwhile the UR22 user manual page 17 says:

LINE OUTPUT 1/L 2/R (Impedance balanced)

  • Maximum Output Level +10dBu
  • Output Impedance 150 Ω

On the face of it these look fairly similar.

  • \$\begingroup\$ the iphone does not have AGC -clip of recording via UR22: dropbox.com/s/hpm9thoudshsjx2/Buzz%20Time%20Signal%202.m4a?dl=0 -clip of recording via Macbook Pro: dropbox.com/s/dn0etvms9ixjyhz/… the noise to signal level is high, i think this is because there is alot of attenuation going on, the buzz does not change when changing the volume. \$\endgroup\$
    – Diego
    Sep 23, 2017 at 16:09
  • \$\begingroup\$ Good work with the time signal beeps. I'm just wondering a few details: (1) Are you using your attenuator lead when recording from the MacBook or direct? (2) Can you give the cable pin-pin details for both situations? Add the details into the question. \$\endgroup\$
    – Transistor
    Sep 23, 2017 at 16:20
  • \$\begingroup\$ @Diego: Watch the pinout. See my update. \$\endgroup\$
    – Transistor
    Sep 23, 2017 at 16:30
  • \$\begingroup\$ (1) both recordings were made with the same attenuated cable. (2) I have updated the diagram in my question, I hope that clears things up. \$\endgroup\$
    – Diego
    Sep 23, 2017 at 16:43
  • \$\begingroup\$ See my update. I'm no wiser. \$\endgroup\$
    – Transistor
    Sep 23, 2017 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.