geekhack

geekhack Projects => Making Stuff Together! => Topic started by: F eq ma on Sun, 11 July 2021, 22:46:22

Title: Audio jack to usb?
Post by: F eq ma on Sun, 11 July 2021, 22:46:22
I like the click of a 1/4” audio jack.   Researching and ran across a “TRRS” 1/8” plug.  Not 1/4”, but ok.  Theoretically it can provide four connections, which happens to be the same as USB.

Could I wire one of theses to a USB cable?   So basically, a usb to TRRS to usb?   I know it is not ideal/efficient/practical….but is it possible?  I am not sure if there is some usb magic under the covers.

Adafruit has some connectors.
https://www.adafruit.com/product/2915
https://www.adafruit.com/product/2914

Ultimately, i am building a keyboard with a teensy++ 2 and I am researching daughter boards.   If I have to rewire, then why not do something odd.


Title: Re: Audio jack to usb?
Post by: suicidal_orange on Mon, 12 July 2021, 04:00:35
There's no magic in electronics - if you connect the right wires in the right places the signal will flow.  USB is supposed to have twisted and shielded wires but whatever connector you use the wires are separated in it for a little bit.

The main problem with TRRS is that when you plug or unplug it the pins short to the next one as they slide past.  If you never unplug while it's on that's not a problem but if you accidentally pull the cable out in use you might fry it.
Title: Re: Audio jack to usb?
Post by: Faceman76 on Mon, 12 July 2021, 04:10:02
How about Speakon or 4+pin XLR instead?

Sent from my SM-G975U using Tapatalk

Title: Re: Audio jack to usb?
Post by: Leslieann on Mon, 12 July 2021, 04:32:55
Old school connections were not magic they were just connectors, but it was also all analog, today everything is digital and you can't just brute force everything anymore.

Pin shorting is certainly an issue (depending how you face the connector) but so could internal resistance and RFI, there's basically zero shielding on those.
Title: Re: Audio jack to usb?
Post by: Findecanor on Mon, 12 July 2021, 08:20:58
TRRS are used for split keyboards only because the connectors and cables are are low-profile and widely available. Some vintage keyboards (really old ones) used TRS plugs.

Neither were meant to be hot-swapped, like USB plugs are.
Title: Re: Audio jack to usb?
Post by: yui on Mon, 12 July 2021, 08:52:04
It should work, most USB devises SHOULD have the necessary protections so that the 5V or ground sliding over the whole connector should not damage anything, but then macbooks had unprotected USB ports that if shorted fried the motherboard so not a guaranty

to me the safest way to do it would be:
Code: [Select]
Jack | S R R T
--------------
USB  | 5 D D G
     | V + - N
     |       D
hope my little table is readable :) (the point is to not have a possibility to short power, and as data lines should be able to resists to be tied up or down there should not be any possible damages SHOULD if everything is implemented correctly, if not then who knows, and having 5V at the shield side so it is the last one to connect and disconnect, and while only one of power and ground is connected no damage should be possible on the device side)
oh and you will have very low data rate, not that it matters for a keyboard, but still worth saying the TRRS connector was made for a bandwidth under 22KHz USB is in the few MHz at its slowest.

TL;DR: not stupid, could work, if all your setup is properly protected but even then your data rate is going to be abysmal.
edit: just saw that the monospace font was not monospace...
Title: Re: Audio jack to usb?
Post by: F eq ma on Mon, 12 July 2021, 13:47:53
Thanks everyone for the insights.   Totally forgot about shorts.   This is why I like this community.  Always willing to provide quality feedback.   I will probably go a different route but put this as a future experiment
Title: Re: Audio jack to usb?
Post by: Faceman76 on Mon, 12 July 2021, 16:09:09
Neutrik XLR and SpeakON jacks have the ground make contact first to prevent shorts.

Sent from my SM-G975U using Tapatalk

Title: Re: Audio jack to usb?
Post by: F eq ma on Tue, 13 July 2021, 18:07:50
Neutrik XLR and SpeakON jacks have the ground make contact first to prevent shorts.

Sent from my SM-G975U using Tapatalk

These Neutrik/SpeakON connectors are interesting.   Found some components on Amazon
https://www.amazon.com/Neutrik-NL4FX-speakON-Connector-Bushing/dp/B002BERXW6 with a panel like female that could be installed on a stacked case.

How bad is it to make a splitter so I could use either normal USB-c and alternative connecter.   Thinking would be if my alternate connector died, the I have the ability to go back to USB.

Time to experiment.
Title: Re: Audio jack to usb?
Post by: F eq ma on Tue, 13 July 2021, 18:35:53
Looks like Neutrik has specific usb connectors.    Not as exciting.

https://www.neutrik.com/en/neutrik/products/multimedia-connectors/usb

Title: Re: Audio jack to usb?
Post by: yui on Wed, 14 July 2021, 02:36:47
i just remembered that in the height of the MP3/4 player era some manufacturers used the audio jack as data and charge ports, but they also controlled all the in device protections and fabricated the cables, so who know what electronic wizardry, if any, they used.