Electronic – How could you detect a microphone attached to a smartphone

audioiphone

I've a circuit that makes sounds through an a standard audio jack (3.5mm) and I would like to connect it to a smartphone (let's say iPhone).

When I connect it to an iPhone, it will be detected as headphones, so it would listen not only to my circuit but also on the iPhones built-in mic.
If I take my jack and connect it to a microphone – it would detect a HeadSet connection and then listen only on the audio jack mic input.
If I substitute the microphone with a resistor – it loses that detection and goes back to headphones (my assumption was it detects resistance. probably was wrong).

Any ideas how a smartphone would detect a microphone connected and how that could be simulated?

Many thanks!

Best Answer

The the problem is probably the standard 3.5mm jack. Smart phones use four pole 3.5mm jacks to add a mic to a headset. There are two configurations used but the most common (read what Apple pushes) is to have the sleeve as mic in, ground on the adjacent ring, right audio on the next ring then left on the tip.

Pinout with list of phones

I know that most recent Samsung phones reverse ground and mic in. I actually built a small crossover cable to get around this issue.

According to this page the mic should work if the resistance is about 2.2k ohms.

I only assume this works based on the success of using my crossover cable to use a headset/mic with button designed for iPhone on my Galaxy S.