
Recently, as part of an iPhone development project I’ve been working on with the Institute of Zoology and Birkbeck, I had a need for an audio line in adapter so that we’d be able to record stereo audio from an audio sensor. The application tags audio data with GPS information as part of a citizen-scientist data collection project.
Strangely (or perhaps I didn’t dig around the interweb long enough) I didn’t find many resources for a home-brew line-in adapter and the ones I found were pretty vague and hard to follow. So Peter and I put our heads together and rolled our own. It’s a fairly straightforward circuit, but has a little twist, because the iPhone OS is smart enough to detect what’s plugged into the stereo jack. (The diagram above is a lot more clear than anything I found.) This particular project only required a left channel audio input to the monaural iPhone mic, but if you wanted to route both left and right channels to the mic, that’s represented by the dashed line.
The resistor+capacitor network provides a pull-up that the iPhone is looking for to detect whether you’ve got a standard stereo headset plugged in or whether you’ve got a microphone (i.e., iPhone) headset and can take a phone call with it. This particular circuit is tuned for the audio sensor we’ve been using, but is about the right spec for most audio recording purposes and works fine with the audio recording app that ships with the iPhone. The parts cost about £3 and I whipped one up in about 10 minutes!









