38
\$\begingroup\$

My AC-DC adapter gives output of 12V and GND. I tried to search for suitable DC barrel plugs
and found that most of them have three terminals

So, pin 1 is positive in my case.
1. Which pin should I connect to GND, 2 or 3, in my PCB?
2. What should be done with the remaining pin?
3. Why are there 3 pins for 2 contacts? What is the advantage of this design?

\$\endgroup\$

1 Answer 1

63
\$\begingroup\$

The jargon for this type of connector is "switched jack". Not only is it common for barrel jacks to have switches, but also for some other types of jacks, like phone jacks of all types.

When you insert the plug, the connection between pins 3 and 2 breaks. This is useful for cutting a battery out of the circuit when a DC adapter is plugged in. Imagine you have a battery which is grounded via the 3-2 connection. When you plug in, 3-2 breaks and so the battery's ground connection is lifted. Now the battery is protected from two unwanted actions: discharging, and being charged. (It's still a good idea to put diodes in the circuit in case the switch fails for whatever reason.)

Or, this can be used for building a circuit which detects the insertion of the DC plug. For instance, when the 3-2 connection breaks, some microcontroller I/O pin could be pulled up to VCC, and then the firmware knows that the device is on an adapter.

If you don't take advantage of this, you can leave pin 3 unconnected in your PCB, or you can ground it so that it is permanently connected to 2.

In any case, the extra pin provides extra mechanical strength too. In other words, solder pin 3 to a pad, even if that pad has no traces to it.

In general there exist many types of switched jacks with various switch configurations. For instance, there exist stereo jacks which have a pair of switches that close when the plug is removed. This can be used on the input side of an audio (or other) device to ground high impedance amplifier inputs when nothing is inserted, so as not to leave them floating, inviting noise. On the output side, it can be used to disconnect main speakers when headphones are plugged in.

Jack switches are not always "break" switches (normally closed, open upon insertion); there are jacks with "make" switches also (normally open, closed on insert).

In some applications that use phone jacks, a "make" switch switch is simulated by using a stereo jack with a mono plug, or a stereo plug into a four-connection jack. If you insert a 1/4" or 1/8" mono (tip-ring) phone plug into a stereo (tip-ring-sleeve) jack, the plug's sleeve, it bridges the sleeve-ring contact, acting as the closure of a switch. This can be used to turn a battery-powered amplifier on when the plug is inserted: a common trick in electric guitars with on-board amplification such as active pickups. Cell phones also use the same trick to distinguish whether a headset or headphones are plugged in. Headsets have a TRRS plug for supporting the microphone, whereas headphones have a TRS plug. When you plug in headphones, they ground the jack's outer ring (second R) contact to the sleeve contact, which the phone detects, and thus keeps using the built-in microphone for audio input, sending only audio output to the phones.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.