2
\$\begingroup\$

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!

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

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).

\$\endgroup\$
4
  • \$\begingroup\$ Awesome thank you for the info! I must have gotten my terminology mixed up. Ideally I would like to just have a plug coming out from under my dash to go into my iPhone. So would that be possible to have it switch from CD Changer to Aux input when plugged in? \$\endgroup\$
    – Kevin
    Dec 16, 2012 at 1:18
  • \$\begingroup\$ Maybe make a little audio detection circuit with either some opamps or micro? Then you could detect when the iphone is playing and switch the inputs. \$\endgroup\$ Dec 16, 2012 at 1:57
  • \$\begingroup\$ Right on! Thank you for the suggestion. I have a huge favor, I'm not very electrical savey, is there any way I could get a rough schematic, on how it would be hooked up? Thank you so much - SomeHardwareGuy :) \$\endgroup\$
    – Kevin
    Dec 16, 2012 at 2:09
  • \$\begingroup\$ This works, but only if he wants to plug/unplug the cable rather than just the iPhone. For some car applications that isn't ideal... \$\endgroup\$ Dec 16, 2012 at 3:55
1
\$\begingroup\$

The goal

Let's tackle your end goal rather than your proposed approach. We want to get an aux input into the car's on-board installed audio receiver.

Mixer

You can just mix the two audio channels (CD player and iPhone). Honestly, this is most likely what you really want and you might find that you like this better than switching between sources.

The mixer will give you both audio sources all the time. Want to listen to just iPhone, press pause on the CD changer, want only the CD changer, don't play music on the phone.

The cool hidden feature here is that iPhone notifications (for example when you are using navigation, when there are incoming messages, when using SIRI, etc...) will play on top of your other source so you can get the periodic output from your phone without having to not listen to your CD's.

Mixer's broadly come in two types passive and active. For your application, I would strongly suggest an active mixer, since you will likely find the input levels too low with a passive solution (therefore you will have to turn your receivers' volume up very high, which is dangerous and bad for the speakers).

A simple, and perfectly viable approach is this one (following), which uses a couple of resistors, capacitors, and a single op-amp. It works on the principle of superposition, which I will explain in more detail if you so desire.

enter image description here

You can either go with adjustable resistors as suggested in the schematic or play with it on your test bench and then use fixed values for the final design. I'd recommend that approach, since cars vibrate and mechanically adjusted resistors tend to lose their position and tolerance over time under such conditions.

This circuit, as drawn, only mixes a single channel. For car audio, you typically have a stereo signal so you will need to duplicate the circuit (one for left and one for right). You mix, as you might expect, the two left channels together and the two right channels together resulting to two independent outputs (your mixed stereo signal).

Switching approaches

I suspect that you will use a mixer, but if you truly want switching here are some alternatives.

Microphone port impedance detection

I don't own an iPhone so I can't test it explicitly, but one way to do this is make use of the input impedance of the microphone port. The iPhones detect the presence of an external microphone by it's impedance. They test the input impedance of the microphone ring. You can detect their detecting and switch on that signal.

enter image description here

Audio tap

This circuit looks like the mixer above, but with only one input and you aren't going to listen to the output.

Use a very small capacitor (say 1nF) to tap the audio line and feed it into a high-impedance, high-gain configuration of an op-amp. It will be horrible audio, but you aren't going to listen to it and it will be easily distinguishable from white-noise. You can threshold the output and switch on that.

Put a mechanical switch

Why do we need to switch electronically? How about putting a SPDT switch in your glove box or on your dashboard.

Put a Wi-Fi connected switch

This guy made a Wi-Fi connected relay that he controls from his iPhone. There are commercial products available as well.

\$\endgroup\$
3
  • \$\begingroup\$ That schematic only shows a "mono" solution, which for some audio applications might not be ideal ;) \$\endgroup\$ Dec 16, 2012 at 5:33
  • \$\begingroup\$ @SomeHardwareGuy -- Good pick up. I'll edit as requested to improve. \$\endgroup\$ Dec 16, 2012 at 8:32
  • 1
    \$\begingroup\$ Yours is a better solution ;) I was just giving you hard time. \$\endgroup\$ Dec 18, 2012 at 4:53

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.