Author Topic: Selecting plug/jack to connect split keyboard  (Read 4417 times)

0 Members and 1 Guest are viewing this topic.

Offline wolfv

  • Thread Starter
  • Posts: 269
Selecting plug/jack to connect split keyboard
« on: Fri, 17 June 2016, 03:36:19 »
I am designing a split keyboard, with left and right matrices connected by Serial Peripheral Interface (SPI) with 5 wires.
Please help me decide on a plug/jack to connect the two sides.   The candidates are:
  * 6-pin mini-DIN connector (PS/2) has 6 wires (male-to-male 6-foot lengths are readily available)
  * 6P6C Modular connector (RJ12 phone) has 6 wires (7-foot lengths are readily available)
  * USB mini and USB micro have 5 wires
  * other suggestions are welcome
The cable will be about 3 or 4 feet long.
Which plug/jack would you use to connect 5 wires of a split keyboard?

Thank you.
« Last Edit: Fri, 17 June 2016, 03:47:01 by wolfv »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Selecting plug/jack to connect split keyboard
« Reply #1 on: Fri, 17 June 2016, 04:24:08 »
Sounds like this is a round the back of a chair cable rather than one which will be plugged/unplugged often?

If so another option would be hirose HR10A-7P-6P and similar (there's one with rubber and one without) which is expensive but solid metal and has to be unclipped it before it will unplug. Fiddly to solder but so solid and looks cool if that's a concern.

I've just had a read about PS/2 and when used for a keyboard/mouse 2 pins aren't used - the cables might be fully wired as it's from a time when quality was more important than penny pinching, but I'd want to check the ones 'readily available' today before saying it's a good choice.  The connectors are big and I remember bending the pins on these - not designed to be unplugged often.

Similar opinion on RJ12 - the connectors are fragile (the flappy clip breaks off after repeated bending then the connctor falls out easily) so it's fine for a static installation but not good for portable.

Personally I'd probably go for mini USB and make my own - connectors and sockets are cheap and easy to get, it's designed so that power and ground connect first so no damage if it's accientally removed while powered on, and small and solid if you do transport it without being too small making soldering hard.
« Last Edit: Fri, 17 June 2016, 04:25:42 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline MOZ

  • KING OF THE NEWBIES
  • * Maker
  • Posts: 3981
  • Location: Jo'burg
  • Busy making stuff
Re: Selecting plug/jack to connect split keyboard
« Reply #2 on: Fri, 17 June 2016, 05:11:35 »
USB Type-C > microUSB > miniUSB

Offline Data

  • Posts: 2608
  • Location: Orlando, FL
Re: Selecting plug/jack to connect split keyboard
« Reply #3 on: Fri, 17 June 2016, 06:42:17 »
Use a 25-pin serial cable for MAXIMUM RETRO.


Offline climbalima

  • Posts: 130
  • Location: Boston MA
  • likes building stuff
Re: Selecting plug/jack to connect split keyboard
« Reply #4 on: Fri, 17 June 2016, 09:36:56 »
Sata cables ala ve.a

Sent from my SM-G920V using Tapatalk


Offline wolfv

  • Thread Starter
  • Posts: 269
Re: Selecting plug/jack to connect split keyboard
« Reply #5 on: Fri, 17 June 2016, 12:11:35 »
Thank you for your suggestions.  I like the idea of USB or eSATA.
How to attach the jacks to a perfboard with 0.1 inch hole spacing?

The cable will run behind the back of a chair.  But should be able to plug in a shorter cable if desired.
« Last Edit: Fri, 17 June 2016, 12:19:13 by wolfv »

Offline wolfv

  • Thread Starter
  • Posts: 269
Re: Selecting plug/jack to connect split keyboard
« Reply #6 on: Fri, 17 June 2016, 13:04:24 »
Personally I'd probably go for mini USB and make my own - connectors and sockets are cheap and easy to get, it's designed so that power and ground connect first so no damage if it's accientally removed while powered on, and small and solid if you do transport it without being too small making soldering hard.
I guess the USB Micro-B plug would be harder to solder because it's smaller.

"USB Mini-B Breakout Board"  with 5-pin 0.1" header are readily available.   And it is easy to solder onto perfboard.
Digi-Key has a selection of USB Mini-B plugs.  So I can buy a 6-foot USB Mini-B cable, cut off the A plug, and solder on a B plug.

Thanks for all your suggestions. :thumb:

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Selecting plug/jack to connect split keyboard
« Reply #7 on: Sun, 19 June 2016, 03:29:25 »
Sounds good, just be aware that if you wire it up following the standards the top pin on one end will be the bottom pin on the other - you don't want to put 5v through your I/O expander backwards!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline wolfv

  • Thread Starter
  • Posts: 269
Re: Selecting plug/jack to connect split keyboard
« Reply #8 on: Sun, 19 June 2016, 19:10:03 »
I can buy a 6-foot USB Mini-B cable, cut off the A plug, and solder on a B plug.
Well that won't work.  USB cables only have 4 conductors, SPI needs 5 conductors: https://en.wikipedia.org/wiki/USB#Pinouts
So I will make my own USB cable from 6-conductor stranded flat telephone wire terminated with USB mini-B plugs on both ends.
Would the flat telephone wire work well?  Is there a better source for 5 or 6 conductor cable?

Sounds good, just be aware that if you wire it up following the standards the top pin on one end will be the bottom pin on the other - you don't want to put 5v through your I/O expander backwards!
Not sure what that means.  After making the USB cable, and before soldering the USB breakout boards to the perfboard, I will plug the cable into the USB breakout boards and check continuity between the pins labeled GND, ID, D+, D-, 5V:

Thanks.
« Last Edit: Mon, 20 June 2016, 01:51:27 by wolfv »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Selecting plug/jack to connect split keyboard
« Reply #9 on: Mon, 20 June 2016, 02:16:29 »
USB cables have four wires and a shield which can be used as a fifth, but you will need to cut off both ends.  You can cut off the molded plastic and reuse the mini connector too.  I'd get a six foot cable and make one for home and one portable out of it.

That breakout has labels so you won't be wire it up backwards - you'll see what I was saying when you wire it up :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Data

  • Posts: 2608
  • Location: Orlando, FL
Re: Selecting plug/jack to connect split keyboard
« Reply #10 on: Mon, 20 June 2016, 07:32:54 »
Have you considered RJ45?  The connectors are pretty cheap and should be easy to work with.

http://www.mouser.com/ProductDetail/Amphenol-Commercial-Products/RJHSE5E80/?qs=sGAEpiMZZMvQhAhQbXdbBo6UjPILBaUyolmoOgSS3ec%3d

You can make your own pass-through cables VERY easily and there are a billion off-the-shelf options in every length, color, and style you can imagine.  They have 8 wires and you only need 5 so there's room for future growth, depending on how you design your PCB.

Edit: VERY nice drawing here:  http://www.mouser.com/catalog/additional/Amphenol_RJHSE5E8X.pdf
« Last Edit: Mon, 20 June 2016, 07:36:57 by Data »

Offline hanya

  • Posts: 132
  • Location: Japan
Re: Selecting plug/jack to connect split keyboard
« Reply #11 on: Mon, 20 June 2016, 09:07:45 »
Some SPI devices require chip select signal to detect end of transmission. I think you need VCC, GND, MOSI, MISO, SCK and CS, 6 pins.
What device are you planning to use?
PFU HHKB JP, Sanwa MA-TB38 trackball

Offline wolfv

  • Thread Starter
  • Posts: 269
Re: Selecting plug/jack to connect split keyboard
« Reply #12 on: Mon, 20 June 2016, 18:24:31 »
After some more thinking, I settled on the following split-keyboard connections.

For the prototype: 5-socket 0.1" female header on perfboard, and 5-pin header soldered to 6P6C phone wire.  This setup is also convenient to test on a bread board switch matrix.
For the second version: eSATA connector on PCB, and 5 ft eSata cable.  Shift registers and resistors will be SMT rather than through the hole.

Some SPI devices require chip select signal to detect end of transmission. I think you need VCC, GND, MOSI, MISO, SCK and CS, 6 pins.
What device are you planning to use?
The split keyboard is 18 keys on each hand.  One hand has Teensy LC.  The other hand has three 74HC165 shift registers daisy chained.
This excellent tutorial shows how: http://www.gammon.com.au/forum/?id=11979
I already tested the electronics with 5 wires and firmware on a breadboard.
« Last Edit: Mon, 20 June 2016, 18:43:08 by wolfv »