First off i'm using arduino as MCU. I have two internal speakers inside a box to output the sound from a FM Rádio Module, but i have also an stereo jack in my box, so anyone can plug a external speaker or earphones and listen to music. I want to cut off internal speakers when someone plug a stereo jack. My PCB mount stereo jack is in round format and only have 3 pins (GND RIGHT LEFT) it doesn't include the switching options. How can i detect when the jack is plugged into external jack and cut off internal speakers?
-
\$\begingroup\$ You have two independant sound outputs ? If you cannot use a jack socket with detection (even hacking some wires soldered to the additional contacts), you will need some way to measure the load resistance, which is not trivial, as you need to generate an AC signal, precisely measure the current... \$\endgroup\$– TEMLIBAug 30, 2015 at 16:13
-
\$\begingroup\$ Typically you'd just get a different jack. There are an immeasurable amount of audio jacks that have switches inside of them that detect exactly this. Its way easier than trying to hack apart a connector. \$\endgroup\$– FunkyguyAug 30, 2015 at 16:16
-
1\$\begingroup\$ Those connectors in your photo look like coaxial power connectors, not 3.5 mm stereo jacks. \$\endgroup\$– Peter BennettAug 30, 2015 at 16:19
-
\$\begingroup\$ You have two independant sound outputs: No. Yes i must use this jack format because the case, jack should enter in a horizontal way, using the rectangular format is not a option :(. I know it will be easier but i must use this format. How can i meassure the load resistence? Also i have edited the post with the jack i really got \$\endgroup\$– Tiago ConceiçãoAug 30, 2015 at 16:24
-
\$\begingroup\$ Try this. \$\endgroup\$– EM FieldsAug 30, 2015 at 16:44
2 Answers
Consider using a connector like this one that has integrated switches.
You can find a selection of such connectors here. Use the filter for internal switches.
-
\$\begingroup\$ Hi, i know about that connectors. But as i said in the comment above i can't use it because it will not fit my case. There are any oval option that include the switches? \$\endgroup\$ Aug 30, 2015 at 16:26
-
\$\begingroup\$ @TiagoConceição: How much room do you have in your case? \$\endgroup\$ Aug 30, 2015 at 18:08
-
1\$\begingroup\$ Since they can fit this kind of connector in a moder mobile phone I really can't believe you don't have enough room. Just keep searching a bit for a smaller part. \$\endgroup\$ Aug 30, 2015 at 18:46
-
\$\begingroup\$ is not about the room, is about usability, check the case: dl.dropboxusercontent.com/u/18602178/IMG_20150813_024008.jpg Its a 3D frame to put in a wall with a front frame \$\endgroup\$ Aug 31, 2015 at 3:27
Something like this may work for you:
simulate this circuit – Schematic created using CircuitLab
C1/C2 may already be in the amplifier- often the amplifier output is AC coupled, otherwise they will have to be added.
This should work with passive devices such as headphones or speakers- if the device connected is actually an amplifier input it may not work without a resistor such as 10K connected across the input.
You can use a 4-resistor network for R1-R4 and two tiny ceramic caps for C3/C4. The chip is also very small.
-
\$\begingroup\$ Thanks i will test this. And the input may be passive or self amp device. It should work with both \$\endgroup\$ Aug 30, 2015 at 17:30