Author Topic: Design suggestions for split keyboard  (Read 3781 times)

0 Members and 1 Guest are viewing this topic.

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Design suggestions for split keyboard
« Reply #25 on: February 04, 2023, 10:17:04 pm »
Sorry if I missed anything, but can't the two parts just communicate using UART, SPI or whatever and make one of them a USB HID device?
This is how all split keyboards are made as far as I know.

Why have a USB connection on each? Unless you want the option to use any of the two parts independently (for which i don't really see a use case), this doesn't make sense.
 

Offline eigenvektorTopic starter

  • Contributor
  • Posts: 41
  • Country: ch
Re: Design suggestions for split keyboard
« Reply #26 on: February 04, 2023, 10:46:58 pm »
ok I'm gonna have 2 usb ports on each keyboard half. The top port will always be UFP.
Now I have to decide between two options for the side port:
  • side port is always DFP: you have to connect the top port of one half to the side port of the other half
  • If the keyboard is connected to a host (computer), side port will be DFP. If not, side port will be UFP. Means you connect the side usb ports of the keyboard together (or the top of one into the side of the other if you wish as both ports on one half will be UFP)

questions:
  • how hard would it be to implement this USB "passthrough" in the mcu? If it's too hard I'd use a usb hub controller ic and that would automatically mean option 1
  • switching between UFP and DFP requires pulling down or pulling up the CC pins. Can I connect them directly to a pin on the MCU (with ESD protection ofc) or should I use some sort of separation like a transistor / optocoupler?
Thanks everyone for all the replies so far!
 

Offline eigenvektorTopic starter

  • Contributor
  • Posts: 41
  • Country: ch
Re: Design suggestions for split keyboard
« Reply #27 on: February 04, 2023, 10:55:36 pm »
@SiliconWizard I need a slim connector between the two halves which leaves mostly usb micro / c (also theoretically lightning).
As I might end up selling this product it would be good if it complies with USB standards. Besides as ejeffrey mentioned you could use a half as a hub if needed which is a nice to have.

I don't want to use a fixed cable as cables break, and I want it to be user-replaceable. And also yes I do want to be able to use each half independently. Usecase would be gaming: You only have the left half and a mouse on the table. Or If you mount each half to your armrests you don't want a cable going between them, you'd want to connect each half directly to your computer. For normal use and if your computer doesn't have to many ports you want to connect one half to the other to only use 1 port. Or if you want to have something between the halves like a big drawing pad a cable going across would be in the way. Hence why I want to have the ability to choose.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Design suggestions for split keyboard
« Reply #28 on: February 04, 2023, 11:49:32 pm »
how hard would it be to implement this USB "passthrough" in the mcu? If it's too hard I'd use a usb hub controller ic and that would automatically mean option 1

You should be able to make your USB module to look like a hub and a HID keyboard device connected to it. Then, when the other half is connected, you'll present it to the host as a second HID keyboard device connected to the same hub. Or, you can use a hub chip and connect both keyboards to it.

IMHO, it is easier to receive data from the second keyboard, decode them, and send the results to PC along with the data from the main keyboard. This way you only need to implement one HID device. There are some extra benefits to it, like your creature will be compatible with KVM switches.

switching between UFP and DFP requires pulling down or pulling up the CC pins. Can I connect them directly to a pin on the MCU (with ESD protection ofc) or should I use some sort of separation like a transistor / optocoupler?

The USB C specification requires resistors of certain value, so you need at least two specific resistors. UFP requires 5.1k pull-down resistors. The DFP pull-up resistors depend on the amount of power which the host can provide (don't remember the exact values). The easiest way is to use two pins. One will enable the pull-up resistor (by driving it high) and the other will enable the pull-down resistor (by driving it low). You'll need two sets of the resistors because USB C can be flipped, but you can control both sets with the same two pins.
 
The following users thanked this post: eigenvektor

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Design suggestions for split keyboard
« Reply #29 on: February 05, 2023, 08:27:44 pm »
You can either use a small USB hub IC inside each half (or just inside one of them) - in this case, the two halves will appear as two different keyboards from the OS POV, not necessarily a big problem, but something to consider.
Or, you can use a MCU with 2 USB OTG controllers - one configured as host and one as device. If you select a MCU supported by TinyUSB, this would be relatively straightforward to implement.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Design suggestions for split keyboard
« Reply #30 on: February 05, 2023, 10:59:30 pm »
JLCPCB has WCH CH334U in stock as an extended part for USD $0.60 in singles, but the WCH "datasheet" has no application examples.  A web search finds schematics for it, indicating one needs a 12 MHz crystal, and some 100nF and 1uF bypass caps.

Using a separate USB hub chip means one could attach their mouse etc. to the USB connector as well, plus of course chain the two keyboards if one wants to.
 

Offline eigenvektorTopic starter

  • Contributor
  • Posts: 41
  • Country: ch
Re: Design suggestions for split keyboard
« Reply #31 on: February 06, 2023, 11:33:34 am »
Looks interesting, would also mean I can use the smaller CH32V203 in QFN28 package which only supports 1 USB connection.
 

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3361
  • Country: nl
Re: Design suggestions for split keyboard
« Reply #32 on: February 07, 2023, 01:16:03 am »
For a one-off I would probably put an USB hub in one or both halves. That way you give each side it's own uC, and they can probably run the same firmware. There is a possible limitation that if you want to combine the shift from the left keyboard with another key from the right side. I'm not sure whether that works with USB HID.

Adding a hub in the Keyboard also gives you options for plugging in the mouse, card reader or occasional USB stick, etc.

But why do you want to make a split keyboard at all? A popular misnomer in advertisements is that you would have to hold your wrists at "unnatural" angles for a "straight" keyboard, but that is hardly true. If you relax your hands under the table, then put them above the table and look at them, you will likely find that your pinkies are closed more then your index fingers, and that already compensates for most of the discrepancy.

I think those split keyboards are mostly like Dvorak and other keyboard inventions. They look promising on paper and intention, but in practice the difference is (almost always) negligible and not worth loosing compatibility with "the rest of the world", and that is probably the reason the alternative solutions never gain much traction. I do recognize that they can be useful for some specialized cases though.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: Design suggestions for split keyboard
« Reply #33 on: February 07, 2023, 01:51:18 pm »
There is a possible limitation that if you want to combine the shift from the left keyboard with another key from the right side. I'm not sure whether that works with USB HID.
It's more an OS/keyboard driver issue than an USB one.
The HID reports from both keyboards will contain the status of the modifiers and (up to six) pressed keys.
In Windows and Linux, there's no problem in using, say, SHIFT on a KB and press a letter on another one - I remember this from when I implemented a CEC -> HID adapter, but I just tried again to make sure - one gets the expected result.
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: SiliconWizard

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6389
  • Country: ca
  • Non-expert
Re: Design suggestions for split keyboard
« Reply #34 on: February 08, 2023, 01:06:08 am »
But why do you want to make a split keyboard at all? A popular misnomer in advertisements is that you would have to hold your wrists at "unnatural" angles for a "straight" keyboard, but that is hardly true. If you relax your hands under the table, then put them above the table and look at them, you will likely find that your pinkies are closed more then your index fingers, and that already compensates for most of the discrepancy.

Clearly spoken as someone whose never needed or used a split keyboard.
Many good ergo style keyboards exist, but inherently they are: fixed tent, tilt/splay, and gap in the middle. The advantage of split is that you can adjust those differences if you desired.

https://kinesis-ergo.com/split-keyboards/
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: SiliconWizard

Offline eigenvektorTopic starter

  • Contributor
  • Posts: 41
  • Country: ch
Re: Design suggestions for split keyboard
« Reply #35 on: February 08, 2023, 09:59:00 pm »
But why do you want to make a split keyboard at all? A popular misnomer in advertisements is that you would have to hold your wrists at "unnatural" angles for a "straight" keyboard, but that is hardly true. If you relax your hands under the table, then put them above the table and look at them, you will likely find that your pinkies are closed more then your index fingers, and that already compensates for most of the discrepancy.

If you put your hands relaxed on the table, you will notice that your wrists will be relaxed and your hands will be approx 30cm apart with an angle of about 80 degrees between them. As standard keyboards are smaller width than your shoulders, they force your wrists into an unnatural bend. Having each half separate allows a fully relaxed wrist as well as whatever distance between the hands you feel comfortable with.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf