Electronic – How to get a relay to recognize when a TRRS jack is plugged into the iphone

inputiphonerelayswitches

I'm working on a project where I would like to put an aux input in my car. I was thinking of hooking up my CD changer output wires to a relay and then hook up the aux wires to the other part of the relay.

The part that I'm getting stumped is that I would like to have the relay switch automatically when I plug the jack into my iPhone, and then when I unplug it, it would go back to the CD changer. I'm trying to avoid hooking up a mechanical switch to drive it.

I was wondering is there anyway that this is possible? I have the idea but just not sure how to execute it. Any help would be great!

Best Answer

A lot of 3.5mm jacks (headphone jacks) have contacts that are opened or closed when you insert the jack. So you could figure out a circuit from that, you might even be able to find one that will let you do it without the relay. Take a look at this one with a double internal switch.

enter image description here

See how in this image you could connect 3 and 2 to your head unit, and 5 and 4 to your changer. Then when you plug in your iphone 3.5mm cable it'll break contact with 5 and 4 and instead connect the iphone through 3 and 2. (pin one is your gnd).