Electronic – Detect 3.5mm stereo jack plugged in

audiodetectionstereo

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?

enter image description here

Best Answer

Consider using a connector like this one that has integrated switches.

enter image description here

enter image description here

You can find a selection of such connectors here. Use the filter for internal switches.