Author Topic: How hard to make Keyboard with passthrough hub?  (Read 1449 times)

0 Members and 1 Guest are viewing this topic.

Offline bmmcwhirt

  • Thread Starter
  • Posts: 207
  • Location: Indiana
    • KB9YEN
How hard to make Keyboard with passthrough hub?
« on: Tue, 21 March 2017, 02:04:50 »
So here is some background and my thoughts on what I am envisioning.

I have come to love my TKL boards as they fit nicely on my desk. However I have also become very interested in Blender 3D which makes extensive use of the numpad. The obvious conclusion is to just add a USB numpad so that it can be put away when not in use. This takes up several USB ports though. Since Dell Acer, Asus and Apple are all moving to the USB-C port standard I thought it would be a nice idea to have a USB-C 3.1 Keyboard that has it's own hub built in so you can just attach the numpad to the keyboard when you want it and evan have an additional port for connecting your mouse.

I'm competent enough to layout a circuit and produce a board, but my actual electronic engineering skills only go as far as building counters and audio filters at this point. So I'm hoping someone with a bit more knowledge could tell me how practical this would be and how feasible it would be with the availability and cost of this newer interface.

I've seen the TPS65982(http://www.ti.com/product/TPS65982?keyMatch=TPS65982&tisearch=Search-EN-Everything) chip which ranges from $6-12 USD but I don't know if that is the ideal starting point for something like this.

I've also looked at TUSB8041(http://www.ti.com/product/tusb8041) which ranges from $7-15 USD.

I open this up to some brainstorming of minds greater than my own.

Offline ErgoMacros

  • Posts: 280
  • Location: SF Bay Area
Re: How hard to make Keyboard with passthrough hub?
« Reply #1 on: Tue, 21 March 2017, 02:18:13 »
If you're feeling mechanical and not that electrical how about finding a really small 4-port hub, something like this for USB 3.1 Type C USB-C to Multiple 4 Port USB 3.0, $19:
    https://www.amazon.com/Top-Longer-Aluminum-Multiple-Adapter-Supported/dp/B012IJC6YS/ref=sr_1_5?ie=UTF8&qid=1490080231
I'm sure there are many more out there, this is just the 1st one I grabbed.

Remove the case, change the length of the cable to your computer, if desired. Dremel out the case as needed to expose the hub's USB ports, epoxy it inside your keyboard, and you're done! With a very high probability of success. :)
Today's quote: '...“but then the customer successfully broke that.”

Offline bmmcwhirt

  • Thread Starter
  • Posts: 207
  • Location: Indiana
    • KB9YEN
Re: How hard to make Keyboard with passthrough hub?
« Reply #2 on: Tue, 21 March 2017, 08:30:25 »
I've considered that but I enjoy the learning process and building things. I'm getting my new Macbook Pro soon and I'll have a 7port USB hub on the doc for the desktop for sure, but I'm still interested in learning how to build a board with it built in.

I've got a pretty good grasp on using a teensy and hardwiring a keyboard.

Offline sinusoid

  • Posts: 160
  • fd > ESC
Re: How hard to make Keyboard with passthrough hub?
« Reply #3 on: Tue, 21 March 2017, 10:09:17 »
Fff yeah blender.  ;D

Numpad is kinda slowish. Don't learn it, there are better ways.

Check Miniukof's Leader Key addon:
https://github.com/miniukof/bl-leader_key
Best. thing. ever.


If that's not your boat, try using official pie menus addon, Q shows the view menu. You can modify them too, adding options.
Also enable the 3D Navigator addon, it's useful sometimes.

Offline bmmcwhirt

  • Thread Starter
  • Posts: 207
  • Location: Indiana
    • KB9YEN
Re: How hard to make Keyboard with passthrough hub?
« Reply #4 on: Tue, 21 March 2017, 16:56:56 »
Fff yeah blender.  ;D

Numpad is kinda slowish. Don't learn it, there are better ways.

Check Miniukof's Leader Key addon:
https://github.com/miniukof/bl-leader_key
Best. thing. ever.


If that's not your boat, try using official pie menus addon, Q shows the view menu. You can modify them too, adding options.
Also enable the 3D Navigator addon, it's useful sometimes.

Leader method is far slower and less intuitive. With the numpad you just press the key that is most logical to the view you want based on the arrows printed on most numpads. The only non-intuitive thing is 5 being ortho/persp instead of top. IMHO 5 and 7 are swapped from what they should be.

Offline zlittell

  • Posts: 80
  • Location: NW IN
    • My Projects
Re: How hard to make Keyboard with passthrough hub?
« Reply #5 on: Wed, 22 March 2017, 10:01:29 »
Both of those packages are going to be difficult to solder.  QFN is possible but still difficult and the other is BGA so without hot air you will be SOL.  I normally use my reflow oven for BGA as well because it takes the guess work out of hot air.

USB is tricky.  It is differential signaling.  You HAVE to match the length of the traces within spec to match trace impedence.  There are very specific rules and they only get tighter with USB3.x

I suggest going something in the TQFP route.  I use TI for stuff like this personally as well.

My honest suggestion is go with the high density TQFP like this http://www.ti.com/product/tusb4041i and read some tech notes http://www.atmel.com/images/doc7633.pdf
Match those trace lengths and lay a ground plane under the ENTIRE USB area (if you split it up or start cutting out spots for traces you risk creating capacitors on your PCB).  I use a tantulum cap right at the Vusb input from the bus, but for home use this might not be necessary.  Also I use correctly spec'd ferrite beads on Vusb and GND also not necessary for a home design.

That is about the best advice I can quickly give you.  Have fun!

Edit: also there are limits to inrush current and stuff like that (incase you decide to go RGB crazy on your keypad hub.  It would help to read the USB spec.  I have done this and can attest it is a dry read.  Since you only really plan on laying out a hub you could probably get away with just using google to read lots of tech notes.

-Zack-
« Last Edit: Wed, 22 March 2017, 10:04:41 by zlittell »

Offline rvense

  • Posts: 6
Re: How hard to make Keyboard with passthrough hub?
« Reply #6 on: Wed, 22 March 2017, 18:09:40 »
I think generally the dev and application notes from TI and similar are quite good at telling you what you need to do. Read them very carefully, look up all terms you don't understand, study schematics for evaluation boards where they're available. I don't think it's impossible to get it working, especially not if you can find someone to look go over your design. The only physical hurdle is having the right gear and technique to solder the chips, as has been stated.

USB-C is to my understanding much more difficult to work with than USB2, which is a single pair of wires for data. I would consider taking the simple USB2 hub chip zlittel links to, it seems like it could match your requirements.

Offline bmmcwhirt

  • Thread Starter
  • Posts: 207
  • Location: Indiana
    • KB9YEN
Re: How hard to make Keyboard with passthrough hub?
« Reply #7 on: Wed, 22 March 2017, 19:12:34 »
Both of those packages are going to be difficult to solder.  QFN is possible but still difficult and the other is BGA so without hot air you will be SOL.  I normally use my reflow oven for BGA as well because it takes the guess work out of hot air.

USB is tricky.  It is differential signaling.  You HAVE to match the length of the traces within spec to match trace impedence.  There are very specific rules and they only get tighter with USB3.x

I suggest going something in the TQFP route.  I use TI for stuff like this personally as well.

My honest suggestion is go with the high density TQFP like this http://www.ti.com/product/tusb4041i and read some tech notes http://www.atmel.com/images/doc7633.pdf
Match those trace lengths and lay a ground plane under the ENTIRE USB area (if you split it up or start cutting out spots for traces you risk creating capacitors on your PCB).  I use a tantulum cap right at the Vusb input from the bus, but for home use this might not be necessary.  Also I use correctly spec'd ferrite beads on Vusb and GND also not necessary for a home design.

That is about the best advice I can quickly give you.  Have fun!

Edit: also there are limits to inrush current and stuff like that (incase you decide to go RGB crazy on your keypad hub.  It would help to read the USB spec.  I have done this and can attest it is a dry read.  Since you only really plan on laying out a hub you could probably get away with just using google to read lots of tech notes.

-Zack-

Thanks, that's a ton of great info. I always use ground plane and power plane. It was a lot easier to do with Eagle but since they went to an obnoxious monthly subscription I've moved to KiCAD. I didn't know about the tight tolerances on the trace lengths so I'll download the USB 3.0 and 3.1 spec. I'm aware of how large and dry they are as I've had to read the TCP, IP and UDP specs. I'll be using a Aoyue 2703A+ which is an ok system that has variable flow hot air. I'll start by building my own hub first I think. If I can make that work then adding it into a keyboard design should be straight forward.

Offline bmmcwhirt

  • Thread Starter
  • Posts: 207
  • Location: Indiana
    • KB9YEN
Re: How hard to make Keyboard with passthrough hub?
« Reply #8 on: Wed, 22 March 2017, 19:47:33 »
I also came across this.

https://hackaday.io/project/9715-usb-type-c-breakouts

His breakouts will be very useful for breadboarding things. There is a note about swapping some bins in the design by another user so I may need to modify the design before I make any to play with. I'll keep that handy and do my reading but I thought I'd drop it here for anyone following this that might also be interested.

Offline zlittell

  • Posts: 80
  • Location: NW IN
    • My Projects
Re: How hard to make Keyboard with passthrough hub?
« Reply #9 on: Thu, 23 March 2017, 11:13:20 »
I am not sure exactly what is needed for the 3.0 hub, but do your research.  USB3.0 introduces a lot of overhead to devices.  I am still going to insist that if you have no real reason to make the hub 3.0 don't.  There are more pins per connector, the connectors are MUCH more expensive, trying to get those pins broken out of that BGA is going to be a challenge with hobby level board production, etc.  If this is solely a numpad with a hub to connect a keyboard USB2.0 is more than overkill.

Edited to remove stuff about pin muxing and power negotiations.  I think that stuff only applies to the Type-C connector.  I mainly spend my time with 2.0 and haven't had a reason to move to 3.0 yet.  Maybe if this goes well for you I will put a 3.0 hub on the CSGO buy bind pad I plan on making.  Would let me connect a flash drive at superspeed
« Last Edit: Thu, 23 March 2017, 11:19:41 by zlittell »

Offline bmmcwhirt

  • Thread Starter
  • Posts: 207
  • Location: Indiana
    • KB9YEN
Re: How hard to make Keyboard with passthrough hub?
« Reply #10 on: Fri, 24 March 2017, 10:51:33 »
I am not sure exactly what is needed for the 3.0 hub, but do your research.  USB3.0 introduces a lot of overhead to devices.  I am still going to insist that if you have no real reason to make the hub 3.0 don't.  There are more pins per connector, the connectors are MUCH more expensive, trying to get those pins broken out of that BGA is going to be a challenge with hobby level board production, etc.  If this is solely a numpad with a hub to connect a keyboard USB2.0 is more than overkill.

Edited to remove stuff about pin muxing and power negotiations.  I think that stuff only applies to the Type-C connector.  I mainly spend my time with 2.0 and haven't had a reason to move to 3.0 yet.  Maybe if this goes well for you I will put a 3.0 hub on the CSGO buy bind pad I plan on making.  Would let me connect a flash drive at superspeed

So this is what started my adventure. I like having the space freed up by using a TKL for my everyday work. However I've started playing with Blender 3D and it's very keypad dependent. So the obvious solution is to have just a separate keypad I can connect when needed. I do my work on a Mcabook Pro so only 2 USB ports so I have to have a hub anyway why not integrate it into the keyboard. On top of that in May my laptop will get upgraded to the new Macbook that uses USB-C. I do all the 3D rendering on a networked render box and just do my modeling on the macbook.

This obviously isn't something that is for everyone or that I intend to mass produce. I could just swap in a full sized keyboard when Im using Blender, but where is the fun in that? You don't learn anything. Even if I fail to do this, I will have learned something from it. I just think having a USB hub built into a USB-C connected keyboard will free up a lot of desk space that would otherwise be taken up by a separate hub. Everything right now is theoretical, but I will probably grab some chips to play with in a week. Unfortunately this week's paycheck has to goto bills, but it does give me more time to read up on the options that are available. Right now the TUSB320 still looks like the best option.