73 lines
3.8 KiB
Typst
73 lines
3.8 KiB
Typst
#import "template.typ": article
|
|
|
|
#show ref: it => {
|
|
[(#it)]
|
|
}
|
|
|
|
#show: article.with(
|
|
title: [Stop Using TRRS for Split-Keyboard Interconnects!],
|
|
authors: "Foo",
|
|
)
|
|
|
|
TRRS (Tip Ring Ring Sleeve, or, as you may know it, "headphone jack with microphone support") cables have long been the go-to connector between split keyboard halves.
|
|
They are cheap, compact, and thanks to their popularity, come in a variety of aesthetic styles.
|
|
|
|
However, TRRS jacks were only designed for passive electrical components, and expose a serious flaw when used actively.
|
|
When a TRRS cable is (dis)connected, the tip of the plug will slide past every single contact of the jack.
|
|
Likewise, the first contact of the jack will slide past every contact of the plug.
|
|
|
|
To illustrate this, let us consider a TRRS setup where 5v is applied to the tip.
|
|
In this example, assume this plug is on the passive side of the board, receiving power from the active side plugged into USB.
|
|
When fully plugged in @5v_plugged_in, everything is connected properly.
|
|
However, when pulled out, 5v immediately makes contact with the TX line @5v_partial_plug.
|
|
|
|
#grid(columns: 2, gutter: 20pt,
|
|
[#figure(
|
|
image("./trrs_fully_plugged_in_5v_tip.svg", fit: "contain"),
|
|
caption: "A 5v tip TRRS fully plugged in.",
|
|
) <5v_plugged_in>],
|
|
[#figure(
|
|
image("./trrs_partially_plugged_in_5v_tip.svg", fit: "contain"),
|
|
caption: "A 5v tip TRRS starting to be pulled out. Notice the short between 5v and Tx.",
|
|
) <5v_partial_plug>],
|
|
)
|
|
|
|
When the 5v Aurdino Pro Micro dominated as a keyboard MCU, a brief short between 5v and Tx/Rx may have been acceptable.
|
|
However, due to the emergence of RP2040 powered drop in replacements for the Pro Micro, such as the Elite-pi or KB2040,
|
|
3.3v logic levels are now commonplace among keyboards.
|
|
Thus, shorting the 5v power line with a logic pin is a surefire way to burn out at least a GPIO, if not your whole MCU.
|
|
|
|
Now, what if we put the 5v at the base, so that it is the first pin disconnected?
|
|
|
|
#grid(columns: 2, gutter: 20pt,
|
|
[#figure(
|
|
image("./trrs_fully_plugged_in_5v_sleeve.svg", fit: "contain"),
|
|
caption: "A GND tip TRRS fully plugged in.",
|
|
) <gnd_plugged_in>],
|
|
[#figure(
|
|
image("./trrs_partially_plugged_in_5v_sleeve.svg", fit: "contain"),
|
|
caption: "A GND tip TRRS starting to be pulled out. Notice the short between 5v and Rx.",
|
|
) <GND_partial_plug>],
|
|
)
|
|
|
|
In this case, we are looking at the active side of the board, connected to USB, and supplying power to the passive side.
|
|
Now when unplugged, the 5v contact of the jack will immediately make contact with the Rx line,
|
|
pulling it up to 5v and damaging the pin on the passive side of the board.
|
|
|
|
No matter what order we put the contacts in,
|
|
one end of the TRRS cable will be unsafe to unplug while powered.
|
|
No other electronics found in your home suffer permanent damage from simply being unplugged in the wrong order.
|
|
In a moment of carelessness or forgetfulness, damage to hardware could easily happen.
|
|
|
|
So what are the alternatives?
|
|
USB-C, while almost as small as TRRS, are more expensive component wise and
|
|
having the same connector for board-to-board and PC-to-board connections may lead to user error.
|
|
There are also a wide variety of JST and Molex connectors, some of which rival TRRS in size,
|
|
but premade cables are not readily available,
|
|
and many connectors have a tendency to work themselves loose over time.
|
|
My personal favorite are 4P4C connectors, also known as RJ9, RJ10, or RJ22.
|
|
While bulky on the PCB, the connection is sturdy, cables are availible, and one can make one's own cables with a cheap crimping tool.
|
|
There are of course other connectors, and any with at least 4 conductors will work for a split keyboard.
|
|
Unfortunately, there does not seem to be a perfect connector, but there are many alternatives better than TRRS.
|
|
|
|
_This article is dedicated to the late pin D26 of Jonathan's Ferris Sweep. He is forever grateful that the Elite-pi has extra GPIOs._
|