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?
Something like this may work for you:
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.