-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recommended future improvements #6
Comments
For the ESD component, NUP4114 looks like a good option for the future. It has low capacitances compatible with USB 2.0 speeds; I would not worry at all about the need for USB 3.0/3.1 Superspeed compatibility because this board (nor any 2-layer board) is already unable to handle anything near that data rate. This component includes protection for the power rail, and is even a little lower cost and smaller (for the SC-88 a.k.a. SOT-363 package at least). |
Nice, thanks for your input, really awesome feedback here! Let me explain some of the design decisions here.
The problem here is that we have seen many users connect their daughterboards in the reverse direction of the connector. This causes a negative spike in the GND, as you mentioned. If we use a uni-directional TVS, that problem will generate high back-currents in the PCB components, potentially damaging them. This also happens with custom cables that have GND and VCC backwards, which are fairly common, specially with those DIY custom cable kits. EDIT: took a look at some datasheets and a unidirectional TVS would indeed have an even better effect on this. Awesome! Thanks.
The ESD protection chip used does not have a rail for the power supply, only for the data lines, hence the TVS diode. It is also made with ultra-high-speeds in mind and, most importantly, made in the same format as the USBC connector. USBLC series and NUP as you suggested are ideal for USB2.0 connections and USB connectors that have only two data pins. This is specially important because the data lines speeds are much higher than transients in the power rails, so even if we used an integrated solution like USBLC or NUP, they are not ideal because their filtering is not ideal. However, having super-speed protection here doesn't matter much here and I agree. The big reasion this chip was used is it is cheaper, smaller and more reliable than USBLC or NUP since the routing needed is much simpler (it has a "flow-through" pinout). The most critical part of the daughteboard is that space between the USBC and the JST connector. I couldn't make it work with the USBLC because it was too big and the routing got unfeasible. There is another potential issue here. The USBC connector in USB2.0 is four-channeled, because it has two sides. Using chips like NUP and USBLC force you to join the data lines before the chip, which might cause ESD issues. If this was a USB mini conenctor or something similar, where you only need two channels, those chips would be fine. This is why I can't simply remove a channel from the ESD chip for the VBUS, and dedicated a TVS for it. We are discussing this and we might get back to USBLC. I agree with you -- with some more effort we could make it work with this chip, removing the discrete TVS. The other designers went by your opinion, while I particularly disagree.
The fact that the GND is tied to a single path makes a world of difference -- that means there are no ground loops inside the case. As you might know, ground loops are extremely detrimental to the circuit and are potentially hazardous to the user. Having the ground supply come from a single path is paramount to ensure user ESD safety. Second, the problem with hard-grounding the case to the GND is that we never know if the shield is grounded and earthed in upstream or not. They are generally not earthed, due to the isolated power supplies, but they are generally grounded. Even then, there are instances where the outlet neutral is grounded, and some modern power supplies do not properly isolate earth and ground. Having shield grounded also generates more ground loops, but this time on the cable itself, which can potentially destroy the upstream port but, more importantly, fry components on the PCB or even shock the user. Hence why the metal enclosure is drectly grounded and the signal ground is isolated with a ferrite bead. Ideally here I'd make an RC shield discharge, but that'd ideally require a 1206 resistor and an 0805 capacitor and I couldn't make it work in the tight space. The ferrite bead also makes for the potential shift effect. If a voltage spike happens on GNDPWR, the bead will delay it but not avoid it.
Here I agree with you. Soldermask is not a reliable insulator. However, I could not make this PCB work with a single layer, hence why I used the back copper layer for the low speed signals. Remember that the case is grounded; if we route the USB signals in the back copper for a long distance, we can have significant parasitic capacitance and destroy signal integrity there. I think it is a good impovement to try and make a C4 version that is single layered, but I will have to spend more time on that. Also, the screw pads are metallized for a reason. The soldermask will not be scraped off during fastening because there is no soldermask to scrape there.
Indeed, the correct term is not "shorting", but the README is not meant to be itty-gritty correct. Most of the users in this hobby do not have a technical background but do understand "grounding" and "shorting". The term "shorting" here means that any spike current is directed to ground. Anyone that knows the characteristic transconductance curve of a Schottky diode will known what "shorting" means here.
Then again I agree with you, but I couldn't make this work in a single-layer PCB. I will work better on this.
Right again. But you gave my response here. This was the best I could do on a two-layer board, and four-layer here would be way overkill. TLDR: I agree with you in all aspects (except the single path ground), but I couldn't make everything fall into spec in a 2-layered board. I will work harder on it. I think your feedback here is amazing, and we have a nice route to C4:
EDITS: typos and grammar EDITs 2: This was discussed with the designers. We are making a new C4 version using: I think your feedback here is amazing, and we have a nice route to C4:
Thank you for your amazing considerations! |
Thank you for your comments and feedback on my recommendations, and for taking them into consideration! On the few topics where we seem to have a different understanding (i.e. grounding and the 2 vs. 4 channels), I'd love to discuss more--if you're so inclined--so that the resulting daughter board design is unassailable. If it turns out that my thinking is wrong somewhere I'd love to correct it and learn more in the process, so I'll go into pretty good depth about my reasoning and just lay it all out there. Feel free to call me out on anything, or ask for more details if I happen to gloss over something important. Starting with the topics we appear to be in agreement on: Understood regarding the "flow through" layout and I agree the selected TI part can make that a bit easier, especially under the objective of needing to support four channels. I think a change to a TVS that clamps at just above 6V is very good. And if you are going to use integrated VBUS protection, then the discrete TVS itself won't be needed at all I'm not sure exactly which edit of yours was the most recent, but if it is the one indicating that you plan to use a unidirectional TVS, that is great news, as unidirectional should provide even better protection than the bidirectional TVS. While it is a nice goal to get USB traces to spec, I think that is going to be very challenging to achieve with a 2 layer board (unless the board is unnaturally thin), simply because the traces will need to be really wide. I think if you aim to just make them as wide and short as you can (as wide as the pin footprints, basically), that should suffice, much like how traces can be necked down for a short distance to reach the inner balls of a large BGA device. Regarding the 4 channels: Regarding ground loops: What is ground? In this context, I would define this simply as the ground pins of the USB connector, or nets connected to those ground pins. So, from those definitions, what can be concluded? (Note, I know I'm covering probably obvious stuff but I'm trying to ensure nothing is missed) But what about currents from normal USB power? If there are multiple connections to the case and the board uses a fairly solid copper plane, then yes, it is quite true that some amount of current will prefer to flow through the parallel path(s) provided by the mounting holes and the case. As this current flow can be fully accounted for (that is, current isn't incentivized to go elsewhere), the consequences of this are very limited; you will have a very small voltage potential across some mounting holes at worst. However, as you suggest, it is still a ground loop, or a parallel return current path. So I would propose a third option that offers the increased reliability of multiple connections, and also eliminates the potential for uncontrolled ground current flowing through the mounting holes: tie the mounting holes all to each other (and only each other) through a copper perimeter, and then provide a single trace from the GND traces to the ganged-together mounting hole copper. This single trace shared among the four mounting holes would ensure that zero USB ground current flows through the mounting holes, yet provides increased reliability for ESD currents that come in from the case (or for more flexible assembly configuration where fewer mounting holes are actually used). Additional observations: I'm not sure what is implied in reference to the hazard to the user, and what is meant by user ESD safety; are you suggesting that the user could be shocked electrically, and that this circuit can somehow help mitigate that? I am curious what scenario is envisioned where this could occur. If the user shuffles their feet on the carpet a lot and touches anything conductive (metal case of a keyboard, metal case of a computer, another person, etc.) they are going to be subject to a small shock regardless; I don't see how this is preventable. The only responsibility we have is to clamp that voltage and protect the mechanical keyboard internal electronics. To shock the user in any manner will require more than 5V, which no normal mechanical keyboard should be doing anyway, as it won't have access to anything more than 5V through the USB connection. Again, thank you for even just taking the time to consider my recommendations. Any feedback is very welcome; I figure if we're all going to use be using a common, unified daughter board, then, it makes good sense to ensure the design is as robust as it can be. |
Is there any work being done on this? I love the idea of a unified breakout board, and I'd want to incorporate support for it in a few designs, but I'm a bit hesitant to start from a design where I can see obvious flaws in the design. Especially ones pointed out where I see no work for close to a year. I'd be more than willing to submit updates for the design if it's welcomed, but I see no point in people doing the same work twice. |
I haven't made any updates outside of what is contained in my pull request. Gondolindrim and I have had a few attempts at follow up discussions since then, but there has been no full resolution that has brought us into 100% agreement thus far (to my knowledge). Fortunately, the issues where we see differently don't make much difference in practice; they are things that might come up if you must to meet fairly rigorous requirements than what most custom mechanical keyboards undergo (e.g. FCC testing, or high-speed USB data transfer rates). For the vast majority of keyboard applications, you can use either design without consequence. That said, I am interested in better understanding the obvious flaws you mention; if they are problematic in my pull request as well, I'd like to make updates to correct any such flaws. If you are referring to issues that I raised, it wouldn't hurt to have more input and understanding of what you consider needing to be addressed the most. Also, if you prefer to discuss your thoughts in a more informal setting, the Keyboard Atelier discord server pcb-discussion channel is a great place for that. |
Yes, me and David are in talks for C4. I can assure you C3 was run through eye diagram, EMI and ESD tests and it is perfectly usable and was shipped by the thousands in recent projects |
Oh, I'm quite confident it works as is, and it most certainly has better protection than the average mech keyboard (cheap china ones are outright abysmal!) But I think we all agree there is room for improvement. One of my main points would be that being concerned about users plugging thing in the wrong way is perfectly fine, but it shouldn't compromise the ESD/EMI side of things. Users will forever finds ways to make a perfectly working design misbehave somehow. Is sort of took a halfhearted stab at it, and quickly found that I could get the USB signals a lot cleaner and in a single layer, but it requires swapping the pins on the connector and running a cable with opposing contacts. And since that's a 'breaking change', meaning I'd not want to fork out on my own if I could rather influence you guys, and we get a C4 design that I'm happy to use. |
In reviewing the design of the Unified Daughterboard I found some room for improvements in future iterations of the design:
The text was updated successfully, but these errors were encountered: