TRS connector question

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi.

I think there's a simple solution to this problem, but I can't quite figure it out.

I'm working on a project where various sensors are connected to the AVR ADC lines through TRS (1/4" stereo) jacks. The wiring is Tip: Wiper, Ring: +5V, Sleeve: GND.

That all works fine. The problem is that the TRS plugs may be removed while the micro is running, which can cause a quick short as the ring on the plug makes contact with the sleeve on the jack connector, etc. This doesn't fry anything, but it does cause the AVR to restart.

How do I protect against this? Do I need to put a diode in there somewhere? Also, what would be the best way to make the ADC signal 0v when no plug is connected?

The jack that I'm using has normally closed (i.e. when no plug is inserted) switches on each of the T, R and S contacts. Perhaps I could put those to use?

Any help or suggestions appreciated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Put a 100ohm R in series with the 5V line?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the response. I tried the 100ohm resistor, but I'm still getting the same behaviour. It's when the 5V contact on the plug touches the GND contact on the jack (and vice versa) that the AVR is reset.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using a jack-plug for this purpose is jack-plug abuse :) :) So far the teasing.

It depends of course on your system set-up, but how about a separate 78L05 to power the external pots ? I.e., the 78L05 supplies power to the jack-sockets. Simple, safe and short-circuit protected.

Quote:
The jack that I'm using has normally closed (i.e. when no plug is inserted) switches on each of the T, R and S contacts. Perhaps I could put those to use?
You gave the correct answer yourself: use that tipcontact, and connect it to ground.

It's a good idea to add a 10k resistor in each ADC-line, and add a ceramic capacitor of 0.1 uF between each ADC-input and Gnd. Safe for the ADC, the AVR etc.

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Using a jack-plug for this purpose is jack-plug abuse So far the teasing.

Haha, yeah, I know. Unfortunately I don't have a choice. I'm building a controller box for a guitarist, and he wants to connect his midi pedals.
Quote:
It depends of course on your system set-up, but how about a separate 78L05 to power the external pots ? I.e., the 78L05 supplies power to the jack-sockets. Simple, safe and short-circuit protected.

That's a good idea. I'll try it.
Quote:
Quote:
The jack that I'm using has normally closed (i.e. when no plug is inserted) switches on each of the T, R and S contacts. Perhaps I could put those to use?
You gave the correct answer yourself: use that tipcontact, and connect it to ground.

Right. That's how I had it wired originally, but I was fooled by the values I was seeing on the ADC input, which were actually a result of the AVR being reset.

Thanks for your help!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:)

Jackplugs, especially the nice chrome or gold plated ones, always make me think of guitars. So in this application it's a proper use 8)

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Put the wiper on the ring and the 5v on the tip.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Put the wiper on the ring and the 5v on the tip.

Unfortunately I can't -- the jacks are for MIDI pedals that are wired the other way around. It's a pretty stupid design, but this is how most manufactures make them.