Author Topic: Could you Check my boards wiring schematic before I send it to etching?  (Read 6610 times)

0 Members and 1 Guest are viewing this topic.

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 103
Hi,
I am developing a kind of modular Keyboard. The Idea is to have a 6x5 ortho board with a built in USB hub, so that you can daisy chain as many of these as you like.
However, I have little experience with designing my own electronics and wanted to ask if you guys could take a look at my schematics? (See attached below)

The USB hub design I took from this Dutch guy:
https://muxtronics.nl/nanohub.html
And it uses this chip:
http://ww1.microchip.com/downloads/en/devicedoc/00001726b.pdf
I was worried that even a short chain of boards would quickly exceed the max capacitance of the USB port. So, I was recommended this chip:
https://www.onsemi.com/pub/Collateral/NCP380-D.PDF

The Atmega, keys and LED parts are pretty straight forward. What I am uncertain of is:
  • Did I correctly implement the USB hub chip?
  • I placed the NCP380 just after the ingoing USB port. Is that correct? I also connected the flag pin but it is only mentioned with battery charging. Is the flag pin necessary?
  • I get what the capacitors are for but I am not so sure where, which and how many to place.
I guess digging through all chip documentation is a bit much to ask but a few pointers so that I can read up on the topic would be greatly appreciated. :D
« Last Edit: Wed, 17 April 2019, 22:35:56 by Blitzschnitzel »

Offline nevin

  • Posts: 1646
  • Location: US
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #1 on: Mon, 15 April 2019, 12:57:08 »
one thing to look into... when setting up as separate keyboards, essentially (each on their own controller right), the modifiers will not transfer to the other boards. (i believe, please correct me if i'm wrong, might be only on certain OSs?). i'd set up a typical split board (TRRS) with usb hub then make your additional standalone modules. Try it with a couple keyboards plugged into your computer. Hopefully one of them with Fn layers to test that as well as normal modifiers (shift, alt, ctl, etc...)
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 103
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #2 on: Mon, 15 April 2019, 13:15:40 »
THX. Yes, I am aware that layer keys will only affect each individual board but the idea is more to have as many boards as needed to not having to use layers at all. Shift and control keys would still work normal as this is handled in the OS.
This kind of setup would be handy for video editors etc. who need a lot of macros on the top layer. I am also thinking about a rotary encoder and a 12x5 segment down the line.

Offline nevin

  • Posts: 1646
  • Location: US
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #3 on: Mon, 15 April 2019, 15:07:28 »
I just tested it on my computer (Mac) and none of the modifiers cross. (used Viterbi & Magicforce 68). This may be a mac specific issue.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 103
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #4 on: Mon, 15 April 2019, 15:21:49 »
hmm... OK that’s good to know. Do you mean layer modifiers or also standard modifiers like shift? Windows seems to treat all keyboards as one and just waits for keypresses. So, I can just press shift and a on separate keyboards and get A.

Offline nevin

  • Posts: 1646
  • Location: US
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #5 on: Mon, 15 April 2019, 15:45:36 »
No modifiers crossed, including shift. Fn will definitely not cross as that's per controller/keyboard specific. Testing on Ubuntu here in a min. (windows may be the exception)
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline nevin

  • Posts: 1646
  • Location: US
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #6 on: Mon, 15 April 2019, 16:05:11 »
Standard modifiers (shift, etc.) cross on ubuntu 16.04 LTS (used viterbi & GH60). The Magicforce didn't work with ubuntu so i did the same test again on the mac with the same viterbi & GH60 combo, still no cross on mac. Must be the way the drivers are handled between the different OSs. But it's something to note depending on the planned customer base.

So it's possible with a couple OSs but really isn't the way it should be done for the main keyboard. And i'd bet, even on "compatible" OSs you might run into issues with certain programs not registering the multiple/main keyboard correctly. You can still do what you envision, just run the main keyboard as a standard split board (TRRS).
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #7 on: Mon, 15 April 2019, 16:28:13 »
FYI. Mac OS just tested shift & option using 2 keyboards:
  • MBP laptop, built-in
  • WEY TEC  HK2000c, running USB interface
Shift on WEY TEC affects characters typed on the MBP. Same for option.
and the reverse is true... shift (or option) on the MBP affects the characters typed on the WEY TEC.

macOS siera, 10.12.6
Today's quote: '...“but then the customer successfully broke that.”

Offline nevin

  • Posts: 1646
  • Location: US
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #8 on: Mon, 15 April 2019, 16:58:37 »
What about 2 external keyboards (don't use the built-in keyboard) which is more the scenario OP is looking at.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Lanrefni

  • Posts: 117
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #9 on: Mon, 15 April 2019, 17:40:03 »
On Windows 10 modifiers worked across my BFO-9000 and Laplace,but Fn keys did not.

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 103
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #10 on: Mon, 15 April 2019, 18:07:53 »
Thanks Guys. There should really be no problem for Windows and Linux. I’ll fully test Mac support later.
Right now, I am a lot more interested in the PCB design. :D I just found out that I need to put 5.1k resistors between CC1, CC2 and ground. Otherwise real USB 3.1gen2 ports won’t work. The resistor value also seems to have something to do with power delivery but I haven’t understood that yet. But I need a lot of current for long chains. ;D
« Last Edit: Mon, 15 April 2019, 18:13:45 by Blitzschnitzel »

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 103
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #11 on: Wed, 17 April 2019, 21:29:39 »
I've updated the schematic with some changes. Even if you can't find any errors in the wiring diagram, please let me know. That would also be useful information. :)

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 103
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #12 on: Sat, 20 April 2019, 08:57:02 »
I've put some thought into it and I think I'll add some dip switches so that you can kind of take one board out of the USB chain and make it a slave to one of the other boards. This way you wold have modifiers carry over from at least two boards using two of the unused USB-C lanes. I'm now thinking about some kind of safety so that users can’t damage their USB-C ports if they set the dip switches wrongly.
Input on the circuit diagram is still welcome. ;)

Offline vvp

  • Posts: 887
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #13 on: Mon, 22 April 2019, 11:09:41 »
I assume the schematic in the first post of this thread is still the one you are interested about.

USB spec without power delivery circuit allows at most 0.5 A after it was requested with the device descriptor. You cannot lit your LEDs with full duty before the logical connection is established. Notice your LEDs take about 0.42 A. You hardly have any power budget for the other downstream device connected to the hub. Connecting some other device to the hub will probably results in problems if it is not very low power and you lit the LEDs with full duty.

You can get bigger power/current using USB power delivery spec. AFAIK this still requires another integrated circuit to handle power deliver negotiation.

If your DC-DC converter (NCP380) does not have soft startup with internal resistance at least 44 Ω then you also do not obey maximum capacitive load of 10 µF in parallel with 44 Ω resistor (USB spec). Notice you have the 120 µF filter capacitor there. No idea whether the rest of you circuit would be OK with only 10 µF capacitor.

No quick ideas otherwise. I did not use the parts you  are using so I would need to study the data sheets ... and you can do that as well.

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 103
Re: Could you Check my boards wiring schematic before I send it to etching?
« Reply #14 on: Tue, 30 April 2019, 14:00:39 »
Thank you so much for your input. As far as I can tell, in this setup, the USB-hub controller requests high power mode. The line to the flag pin should request USB-BC mode, although I should probably connect it to the other port. Is the protocol for the high-power mode request the same in USB 2.0 and 3.0?
I have found this chip which can request the 3 Amps from USB-C:
http://www.ti.com/product/TUSB320
My target max current draw without LED backlight is about 80mA. What would a good compromise between current draw and brightness be if you don’t know what LEDs users will use? I’ve seen designs which use 1k LED resistors.
The NCP380 has soft start up and I used the 120µF cap because it is in one of the example setups in the documentation. But I am not sure if it is needed for my design. How do I know where and what size of capacitors I need?