Skip to content


IPhone Audio Breadboard Adaptor

OnScopeWe want to play with our IPhone, use it for some work shop projects. There are two connectors to work with, I stared with the audio headset. The IPhone uses a 4 pin 3.5mm (2.5mm) plug connector for access to right and left audio and the microphone input. I started looking online for a plug and remembered that I tossed an old Slingbox into the scrounging bin recently, it had a Audio/Video cable which used a 4 pin plug, so I dug it up.

I made a solderless breadboard adaptor using one of the Slingbox cables and a prototype adaptor PCB I’ve been working on for an adaptor kit at Curious Inventor. This kind of problem is exactly what that prototype adaptor was made for. I have a bunch of connections that need to be kept together and adapted to the solderless breadboard.

The left and right audio outputs are shown on an oscilloscope in the picture here. The IPhone breadboard adaptor is plugged in next to an audio tip jack adaptor. I used this setup to test the audio outputs and the Microphone input.

Output from an IPhone signal generator application is shown on the scope. The application is called “Oscillator” but I cant find a good direct link to it. Let me know if you do. Its available in the IPhone App store. There are some other audio generators, scopes, and spectrum analyzer applications for the IPhone, some are very expensive. Let us know with a comment If you have used any of these.

With this adaptor setup we can do some audio interfacing projects. I think its nice to have it directly connected to a breadboard. Next is to get something working with the Arduino, with audio interfacing or with the docking connector.

More after the jump…

SlingShot

The PCB from my old Slingbox and the adaptor cable are shown above. In addition to the cable we can scrounge two 4-Pin jacks form the PCB. The other connectors might be useful too. From left to right, DC Power jack, mono tip jack, RJ45 jack, S-Video jack, 4-Pin Jack (score!), old TV RF module (almost useless today), another S-Video jack, another 4-Pin Jack (score again!), and finally a big button. The board also has two crystals, an oscillator, and a few power devices that can be reused. 

 

4PPlugBeautyShot

A close-up of the 4-Pin tip jack and the adaptor end I put together. The two wires at the base of the adaptor (at top in picture) are strain reliefs. There are 5 available pins on the prototype bread board adaptor plus two that bring the power rails forward (labeled GND and VCC). I pinned them as Right Audio, Ground, Left Audio, Ground, then Microphone input. All the grounds are common.

 

 OnBB

Future project Plans

  • Scrounge the useful connectors and parts from the Slingbox PCB.
  • Make an adaptor which allows the use of an IPhone headset with with the PC/Laptop.
    • Separate audio and microphone jacks
  • Make an adaptor which lets me use a standard headset with my IPhone
    • I don’t want to carry two headsets anymore… one for laptop and one for IPhone.
  • Tackle the dock connector, there is a serial port there!

I would like to interface the IPhone with the Arduino. Has this been done? Using audio or the docking connector? I know some have done interfaces that use networking. The control signals are sent wirelessly. What about direct connections?

Audio Interfacing Ideas

  • Use tones to send data. The Arduino would listen with an A/D and send using an I/O pin data back to the IPhone.
    • Could implement a slow serial port using this approach. Maybe even a faster one using some tricks. I would be happy with 1200BPS but 9600BPS would be great. Use MODEM technology, FSK etc..  Start with two tone detection.
    • At the very least, an Arduino or other microcontroller could receive and send basic signals using Audio.
  • How about a X/Y scope driving display for the IPhone. Like the oscilloscope clock. I think this would be neat if not too useful.
  • IPhone applications!
    • The first that comes to mind is to use the IPhone as a display/interface for embedded projects. For example an Arduino could send data to the IPhone for display and receive button press information back. The key is to make the IPhone into an I/O expansion device, keep it simple and let the Arduino have control. It could even use the Wi-Fi and internet access via the IPhone.
    • How about using the IPhone to drive a robot. A simple way would be to use two Frequency-to-Voltage convertors (done in software) on the left and right audio, left might control forward/backward movement with right controlling steering. Mount the IPhone so the camera can be used by an application to give input to the software.
      • I remember seeing a robot using the IPhone, is that what they did?
      • Maybe use OpenCV for some kind of navigation or follow thing, there has been a lot of these kinds of robot projects recently.
  • Use Voltage to Frequency converters to get a slow dual channel D/A output and a slow DC input to the IPhone for recording projects. The idea is to get DC voltage output and measurement by converting tones to and from the IPhone.

If I can find all the parts I would like to make a breadboard adaptor for the IPhone audio to enable some neat hobbyist projects.

Comments Please:

  • Any suggestions for projects that use the IPhone Audio Jack?
  • Past projects that use the IPhone Audio Jack?
  • A good place to find the connectors, Jack, Plug, or adaptor cables?
  • Anything else?

Posted in Arduino, Discovering, Hacks, Ideas, Microcontroller, Projects, Scrounging, Scrounging Parts, Workshop Tools.

Tagged with , , , , .


9 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Aldrin Leal says

    Actually, the iPhone Mic also has a Remote – works with some ipods as well – playback/pause, forward, rewind, volume up and down.

    Have you looked into that?

  2. Dan Watts says

    This is a clever, overlooked way of interfacing hardware with an iPhone. It doesn’t require jailbreaking or any hardware modification to the iPhone. (I thought OS 3 was supposed to make it easier to interface hardware through the dock port, but I haven’t seen anything new of that sort yet).

    I love your idea of using it to interface with an Arduino without the need of a PC – if you can pull that off, it will open the door to a lot of new uses for the iPhone (though most of them would likely require jailbreaking).

    The “iPhone Hacks” book by O’Reilly describes a couple of projects that use the audio jack or external microphone for serial communication – an IR controller and an external keyboard. The latter, in particular, is quite a worthwhile project.

    This book lists a source for a 4-pole audio jack splitter — ” 4-pole Y-splitter from Radtech (part number 13757 from http://radtech.us/products/iPhoneCables.aspx), the ProCableAudio Y Cable Splitter 3.5 mm” — but I couldn’t find any sign of it at that web site. Given their prices, I suspect it would be quite expensive to buy. If the Curious Inventor offers a 4-pole splitter for sale I’ll definitely buy one or two!

    Dan.

  3. admin says

    @Aldrin… I knew there was some way to pick and hang up calls, figured it was by shorting one of the signals to ground. I will certainly look into that. Do you have a link to some more information to share?

  4. admin says

    @Dan… I’m fairly sure we can use the audio input/output as I described. The bad part is that without jail breaking you have to pay Apple to get any software running on the IPhone. Maybe we can do an App for the store that enables basic comunications to the IPhone/Arduino via WiFi. Keep it super simple. This way anyone could get that app and then write code in Processing to control it remotely. I know this is not really like running a program on the IPhone but it might be easier to develop. Jail broke phones will work great though.

    I was hoping to see better access to the serial port and a blue tooth serial connection. I do believe 3.0 has made interfacing easier. I am exploring IPhone dev now and hope to find out soon. Anyone doing some I/O work with new IPhone OS want to do an article?

  5. Berni says

    That is a interesting idea to use the audio port for data transfer. I dont see why it couldn’t be done at a fairly nice speed too.

    There is a better trick on doing this tho. The Bluetooth stack often has a serial port in it. There is a certain chip from National Semi that gives you a RS232 to bluetooth bridge. That means you can communicate wirelessly trough bluetooth at a few Mbit, while being as simple as having a real RS232 port on the phone. If you are interested i could tell you more, since its a amazing chip that needs 0 exetrnal components (even internal antenna) to turn bluetooth in to a RS232 port

    Do not know how easy it is to use a bluetooth serial port on the iphone but it was easy as pie on my WM6.0 pocketpc as the virtual com port was accessed the same way you would access a real physical com port on a PC (Only a few lines of code to make it work)

  6. Jack says

    This article is pretty interesting. I’ve been meaning for awhile to get into iPhone app development, but haven’t gotten around to it. More a hardware guy than software guy. But I might just have to play around more with my iPhone and try out what you’ve posted here.

    I look forward to reading what you manage to do with the dock connector!

    Also, this a bit off-topic, but I noticed the Owon O-scope pictured above, and was wondering what you thought of their scopes. I’ve been looking for a decently prices digital scope for awhile, and would really like to hear the opinions of someone who has actually used one of these Owon models.

  7. jadiaz says

    I had started to pursue this idea as well but got pretty busy at work. I was able to find that apple requires you to be a member of two programs. One is the iPhone dev program. This basically takes care of the software side. The other is the Made For iPod program. http://developer.apple.com/ipod/
    this is where the hardware comes into play.

    I wasn’t able to dig further into it because of time constraints.

  8. Matt John says

    ccnp training

  9. Bill Schuller says

    As reported here iPhone Hacks from O’Reilly documents a method for creating a serial interface via the audio port. To be honest, I stumbled across that while searching for the guys who have a more polished commercial SDK wrapped around the same idea. Oh wel…