Using TRS Audio Jack Switch

Status
Not open for further replies.
Hello,
I have a question about using a Tip switch on an audio jack. I want to determine when the user connects a headphone jack (or 3.5mm TRS connector) into the device. I am using a SJ-43515TS-SMT Audio Jack and a high(3.3V), low(0V) output needs to be sent to a microcontroller.

I cant figure out a way so that the ac sound wave doesn't couple back to the digital input.

An externally hosted image should be here but it was not working when we last tested it.


This is the pinout:
Pin 1: Sleeve
Pin 2: Tip
Pin 3: Ring
Pin 4: Ring
Pin 5: Switch (connected to pin 2 when no plug inserted/open when plug is inserted)


Whats the most efficient way of completing this task?
 
Hi,

Connect a resistor (or voltage divider) to the ucontroller positive
supply and connect the other end to the input and pin5. Connect
pin2 to ground. Insertion of the plug (no internal connection pin2)
will allow the input to rise from ground to +ve.

🙂/sreten.
 
Status
Not open for further replies.