Trying to solve an EFT burst immunity issue - Page 1
Forum section: electronics / projects

author: dkonigs
author_rank: Regular Contributor
timestamp: February 23, 2025, 06:21:48 pm
content: So I've been pulling my hair out over this issue for a good part of the past year. I even thought I had sufficiently solved it at one point, only for it to suddenly rear its ugly head again this week.I've been working on a device that's powered from AC mains, and which acts as a host to a USB peripheral. Whenever there's an EFT event on the power cord, there's a good probability that the connection to the USB peripheral will flake out and need to be reset. Fortunately, nothing else on the device seems to actually be affected by these EFT events so far.In testing, I've induced the EFT event using 3 different methods:Switching on/off power to a wall-wart powering a halogen light, which is connected via a splitter to the same power cord as the unit (this is basically energizing/de-energizing a transformer, with no PE/ground connection)Switching on/off power to an AC motor, which is connected via a splitter to the same power cord as the unit (also 2-prong with no PE/ground connection)Using an actual EFT Burst generator deviceI can reproduce the issue with all 3 methods. As far as a solution, I'm content with needing firmware-based recovery to handle the harshest cases of #3, but I want to handle #1 and #2 without needing to go there. Right now I'm reproducing this again with #1, so that's what my current testing has focused on. (Its also the easiest case to test.)For some basic context, here's a simplified block diagram of the system:And here's a simpified/isolated schematic of what the AC input path looks like:Which is based, in part, on this recommendation from the AC/DC converter's datasheet:In the system's normal configuration, PE (Protective Earth / Ground) is connected to the metal chassis and to the ground plane of the logic board. Its also connected to the shields of the USB connectors. (I've wondered about the specifics of this for some time, sort-of finally settling it viathis discussion thread.)Now in the process of trying to debug this issue, I've separated all the major pieces of the system and have tested things somewhat separately. In my test configuration, all electrical connections between the power board and logic board (+12V, GND, PE) can be connected/disconnected/tested separate from each other. In doing this, I've learned a lot about what's happening, but not necessarily how to best fix it.As currently designed, the EFT event can travel from the power board to the logic board and cause issues, overanyof the electrical connections between the boards.If I externally power the logic board, and only make one of the connections (e.g. GND), the problem still happens.If I add a filter to the +12V/GND DC connection (e.g. something involving ferrite beads and a CMC), and donotmake the PE connection, then the problem actually goes away.With the above DC filter in place, the moment I make a connection between PE and GND directly or through a capacitor), the problem returns.With the above DC filter in place, if I connect PE and GND through an inductor, then the problem does not return. (I'm just not sure its actually a good idea to do this.)Another interesting twist is that there's actually nowhere in the system that PE is actually electrically connected to the EFT event source on the AC (or unfiltered DC) side. So when I look at the actual PCB layout, my current working theory is that the EFT event noise is coupling to the PE trace under the AC/DC converter block via magnetic elements within that block or nearby DC traces.Ultimately, I feel like there may be two approaches to resolving this issue:Improve the filtering on the AC side so enough of the EFT pulse never gets into the AC/DC converterFilter it on the DC side, while also somehow safely filtering it from the PE connectionI'd much prefer the first one, but I'm kinda at a loss for how to best do that. I've been trying everything I can think of to improve the AC line filtering beyond what's seen in the schematic (adding X/Y caps, changing CMCs, adding a MOV at the front, etc) though its entirely possible I've missed something.In any case, I've been pulling my hair out over this issue and really want to solve it once and for all. Are there any good suggestions for things to try? Things I've missed?Thanks.

author: moffy
author_rank: Super Contributor
timestamp: February 23, 2025, 07:14:12 pm
content: Does your installation have a bonded/connected neutral and earth, or is the earth isolated from the neutral?

author: dkonigs
author_rank: Regular Contributor
timestamp: February 23, 2025, 07:24:25 pm
content: Quote from: moffy on February 23, 2025, 07:14:12 pmI can reproduce the issue if I completely disconnect the earth lead from the electrical connection going into the device.(But yes, earth and neutral are connected at the panel, which AFAIK is a fairly normal situation.)

author: moffy
author_rank: Super Contributor
timestamp: February 23, 2025, 08:55:10 pm
content: Sounds like the power supply might be the issue, just to confirm, if you power the logic board from an external supply as you have previously and no connections to the internal power supply the problem goes away?

author: dkonigs
author_rank: Regular Contributor
timestamp: February 23, 2025, 09:28:54 pm
content: Quote from: moffy on February 23, 2025, 08:55:10 pmIt depends. If I power the logic board from an external supply, but there's still a path to it from the power board (e.g. ground connected directly or through PE), then the problem is still there.But if there are no connections at all, then obviously there's no problem.At this point I'm convinced that the EFT noise is making it through the AC/DC converter to both the DC output and being induced in adjacent PE traces. So I want to stop it from doing that. Either from filtering it out at the input to the AC/DC converter (which I haven't succeeded at yet), or filtering on the DC output and finding an appropriate way to filter it from the PE->GND connection.

author: moffy
author_rank: Super Contributor
timestamp: February 24, 2025, 12:37:20 am
content: I don't know what the power requirements/space constraints are, but could you replace the AC/DC converter with just a simple transformer, rectifier, caps and linear regulator, to see if that works? I assume you have to treat the current power supply as a bit of a black box where only the input and or output can be affected.

author: KE5FX
author_rank: Super Contributor
timestamp: February 24, 2025, 12:48:50 am
content: Suggestion: measure the actual end-to-end shield resistance of the USB cables you have available. It won't take long to find some that are well out of spec, or even open entirely. Compare the results you get when testing with the best cables versus the worst.

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 24, 2025, 12:59:08 pm
content: First I'll get an easy suggestion out of the way:Have you tried adding common mode filtering caps (Y caps) to the input of the AC/DC supply, after the common mode choke? That in combination with the choke should suppress CM transients far better than just the choke alone. You want to lay things out such that the return path formed by those caps is as short as possible, and is not shared by any other sensitive circuits. Of course you'll have to limit the value of the Y caps based on leakage testing limits.

author: jwet
author_rank: Frequent Contributor
timestamp: February 24, 2025, 08:03:56 pm
content: I'm +1 on putting a high frequency cap past the CM choke and also on the supply output. You don't have any high frequency caps shown.Can you look a the USB traffic while you're doing the tests- I'm curious what the failure looks like to the USB receiver. USB is differential but all the single ended signals have meaning too.I can remember chasing EMI problems (mostly radiated, MIL-462) endlessly. I would joke with the test tech that it was all voodoo and what we really needed was to wear chicken bone necklaces.It sounds like ground contamination and its going everywhere. Good luck. Not envious.

author: dkonigs
author_rank: Regular Contributor
timestamp: February 24, 2025, 08:32:19 pm
content: Quote from: mtwieg on February 24, 2025, 12:59:08 pmQuote from: jwet on February 24, 2025, 08:03:56 pmBelieve it or not, this is actually one of the first things I tried. But when I tried it, I was still testing the full-up system. I'm not sure I tested it with PE disconnected from the target. I should probably do that, to see what happens.(The specific Y caps I used were 2200pF Vishay VY2222M31Y5VS63V7, for reference.)Quote from: jwet on February 24, 2025, 08:03:56 pmI did this early on in testing. I believe what I saw was some sort of device reset happening. If I pushed the device further downstream from the host unit by sticking a hub in the middle, then I'd see the event at the hub port instead of the host port. Hard to tell if its power noise or signal corruption, or both depending on the situation. Though I suspect signal corruption.Quote from: jwet on February 24, 2025, 08:03:56 pmYeah, I'm pretty sure that's what is actually happening here. Or at least that's definitely what happens once I've managed to filter everything else.In the middle of this mess, I watched bits of some Rick Hartley presentations where he said a few very interesting things I'm best remembering as:PE (protective earth) is only for safety, and should not be considered to have anything to do with EMIWhen connecting PE to the chassis, you need to have some inductance or there will be problemsThe second item jumped out at me the most, because if I had DC filtered and connected PE to signal ground with an inductor in the middle (instead of a capacitor) then the EFT problem didn't happen. But he never elaborated further on this point, and I have yet to find any reference/book discussing it either. I really want to know more about that bit of advice.But while poking around, I foundthis forum postshowing pictures of a board where the chassis grounding points are connected to circuit ground with ferrite beads. That's a solution I'm starting to consider some version of, but I've never seen any other examples or diagrams of it anywhere else.

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 24, 2025, 10:57:09 pm
content: Quote from: dkonigs on February 24, 2025, 08:32:19 pmI have a strong feeling there's some details about how things are connected which are not being communicated properly... I was assuming EUT is only connected to PE at one place (the earth wire of the AC cord). But if that's true, then your statement "I'm not sure I tested it with PE disconnected from the target" doesn't make much sense, as without any PE connection the Y caps should do nothing at all.Perhaps the USB device connected to the EUT is also connected to PE by some other path? All such connections have to be accounted for to give useful advice...QuoteSounds like tautology. Calling it PE means it has a safety role for the device, but that doesn't mean it can't/shouldn't also be used as a functional earth (FE) as well.QuoteRidiculous. Surely there are some situations where this helps, but those are exceptions, not the rule. Also adding anything in series with PE is problematic from a safety perspective (it can be done, but have to keep both safety and EMC in mind).

author: dkonigs
author_rank: Regular Contributor
timestamp: February 24, 2025, 11:27:48 pm
content: Quote from: mtwieg on February 24, 2025, 10:57:09 pmSorry, I forgot to word things correctly and the context was lost.What I meant by "PE disconnected from the target" was actually "PE disconnected from DC circuit ground".In the original design, PE is connected to DC circuit ground through the chassis. But I've found that if I manage to filter the EFT noise from the DC connection between the power board and logic board, but this connection still exists, then the noise still manages to couple back into the logic board through it. (I mention this in my earlier posts.)Quote from: mtwieg on February 24, 2025, 10:57:09 pmThe USB device connected to the EUT gets its connection to PE the same way as the rest of the logic board, through the same connection points as the logic board. Its not a separate path, so disconnecting one disconnects the other.Quote from: mtwieg on February 24, 2025, 10:57:09 pmAnd this is the conundrum. Many people think as you do, but Mr. Hartley is also regarded as somewhat of an authority on the subject. I really wish he elaborated further when making that remark. I've found it mentioned in two presentations of his, but they both sound like repackaging of the same general speech.Ultimately, I need to figure out how to do two things:Prevent the EFT pulse from getting into DC circuitry on the logic board via AC L/N, by filtering it out on either the AC or DC side of the AC/DC converterPrevent the EFT pulse from getting into DC circuitry on the logic board in via AC PE, which it could either come in on or get coupled into, especially since PE needs to connect to DC ground somewhere and somehow.

author: dkonigs
author_rank: Regular Contributor
timestamp: February 25, 2025, 04:14:17 am
content: Okay, a little progress tonight.If I add the Y capacitors between the CMC and the AC/DC converter, and if Ido not connectPE to DC ground, then the EFT problemdoes notappear to happen.As of right now, the current state of my bench tinkering setup with the power board looks like this:Now there might be more components to the left of the AC/DC converter than I actually need, and I'll iterate on that, but right now my goal is to basically bodge it all in there just to see what happens.Of course the big problem remains that if I connect PE to DC ground anywhere in the system, then the EFT noise gets into the system and causes my problem to occur. The only "bench fixes" I've found for this thus far are to either not connect it, or to connect it through an inductor of some sort.So any suggestions on how to handle this roadblock?

author: jwet
author_rank: Frequent Contributor
timestamp: February 25, 2025, 05:47:39 am
content: How about a 100 nF and 1 uF ceramic to the right of the power supply? C2-4 are all low F.

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 25, 2025, 06:59:10 am
content: Quote from: dkonigs on February 24, 2025, 11:27:48 pmStill not very clear... to me, the "DC circuit ground" could refer to the negative terminal of the AC/DC supply on the power board, or to the GND plane on the logic board. From the perspective of RFI these two should be seen as distinct, especially since you had mentioned adding a filter to the power connection between the two boards.QuoteOk, was wondering maybe if the device had its own power supply or something.QuoteRight, there are lots of rules of thumb floating around, many of which are probably totally rational in the right context. But many times some of these RoTs will directly contradict each other. Trying to apply them thoughtlessly isn't the smart way to approach EMC. For example, a common RoT is to make a very low impedance connection between USB connector shells and your chassis, mainly for ESD mitigation. That's directly at odds with disconnecting the logic board GND from PE/chassis.I don't think it's worthwhile to derail this thread by debating over which RoTs are better, or which reference materials have the more authoritative source. Just don't let yourself get overly preoccupied with any one RoT, and don't seize on the first mitigation which seems to help.

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 25, 2025, 02:13:38 pm
content: I've attached a more detailed diagram of your setup (or my understanding of it, that is).With this diagram as a reference I have a few questions:1. Does the IEC receptacle mount directly to the chassis? Does that mounting create a connection between PE and chassis? (probably no unless it has a metal body). Does the diagram correctly show how the PE line of the IEC receptacle is connected internally, or does it actually connect directly to chassis instead?2. Is the shell of the USB connector connected directly to LOGIC_GND?3. Does the shell of the USB connector make direct contact with the chassis at all (even a tiny bit??)?4. What is the "filter" you mentioned between the two boards?5. R4 and R7 represent the connections between the boards' "DC circuit grounds" to the chassis. I'm guessing making either of these connections leads to the disconnect behavior?I've defined the "true" earth arbitrarily as basically equivalent to what you'd get by driving a ground stake into the earth (same as PE). Arbitrary, but it works as a reference. Per my understanding, the only conductor between your setup and PE is the ground conductor of the mains cable. Large objects will have parasitic capacitance to PE as well, represented by C6 and C7.From this diagram, it's expected that if you connect the Y capacitors C2 and C3, and also short R4, then common mode transients from V1/V2 are going to cause the chassis voltage to "bounce" relative to PE. Typically one would expect that if both boards' circuit GND are connected to chassis, then none of the circuitry on those boards can be effected by this (assuming its surrounded by the chassis which acts as a shield). Every node on the boards bounces together, causing no issue. However, there are a couple issues with this:1. The chassis bounce will cause some current to flow via the USB cable and C7. It's possible that this current is what leads to the USB disconnect. I wonder if you could try putting the USB device inside the chassis, or at least put it on top of the chassis and directly bond the USB device's GND directly to the chassis (thus helping the USB device bounce along with the chassis without current flowing on the cable)?2. Because the AC filter is inside the chassis, the conducted current spikes through C2/C3 and the wires to the receptacle may propagate to your sensitive logic board via near/far field coupling. Moving the line filter components outside the chassis could test this. A shielded power entry module with a filter built in might be worth trying, if you're not already using one.

author: dkonigs
author_rank: Regular Contributor
timestamp: February 26, 2025, 05:53:29 am
content: Quote from: mtwieg on February 25, 2025, 02:13:38 pmThe diagram is a decent representation.Just a few clarifying notes:1. I have the major components of this system disassembled on the bench, to help isolate things.2. Assume that the "power board" half of the chassis and the "logic board" half of the chassis are currently separated for testing, and can be connected with a wire.Quote from: mtwieg on February 25, 2025, 02:13:38 pm1. The IEC receptacle is PCB mount and has a plastic shell. The PE connection from the receptacle to the chassis occurs through a dedicated PCB trace to a mounting hole. (as my initial block diagram attempts to show)2. The shell of the USB connector is connected directly to logic GND. (I can break this connection for testing, via various USB dongles.)3. The shell of the USB connector does also make direct contact with the chassis4. This "filter" is a small board with some ferrite beads, a CMC, and some small capacitors. But the Y capacitors seem to do the same job in practice, so its safe to assume its not there and not get distracted by it. Its just something I was testing along the way.5. Any connection from DC circuit ground to the chassis, if the chassis is also connected to PE, leads to the disconnect behavior. (Except when that connection is made through an inductor.)Quote from: mtwieg on February 25, 2025, 02:13:38 pmYes, that's fine.Quote from: mtwieg on February 25, 2025, 02:13:38 pmI'll have to think about this a bit. Moving the USB device inside the chassis is impossible, but bypassing the cable ground may be do-able on the bench (but its not do-able as a real solution). Likewise, moving the line filter components outside the chassis isn't possible either. That being said, in the past I've had intermittent success using an external line filter. But very intermittent, and once I think its working it suddenly stops working.The issue I have with the "it all bounces together" theory, in my mind, is that there are inductive elements filtering L/N, but there's nothing filtering PE. So PE is sort-of a "bypass" to the line filtering in the system. That being said, I have seen evidence that putting an inductive element between the incoming PE wire and the chassis is a thing. Just not a very common thing. Special chokes for this do exist, and power entry modules with built-in inductive elements on PE also exist.Finally, another angle I've been exploring is coupling within the power cord itself. I've rigged up a special cable that lets me separate the PE wire from the mains cable just *before* the transient source, and then connect it to the target chassis directly. When I do this, the glitch is far less common than when I do not.Ultimately, I think we have an issue of an EFT pulse getting in via PE. In the real world, it can couple to PE via various means, but in a lab test it can be put there by test equipment directly. And what I need to figure out, is how to stop an EFT pulse on PE from mucking up an attached USB device.And speaking of that device, it may not even be the power rails that are the problem here. It could very well also be the signal wires that are being affected. After all, they are pretty close together in various spots and I have heard that USB signaling is quite susceptible to this stuff.(This is why I'm okay if lab equipment can break things by putting in a bad enough burst, as long as more real world noise sources like modest motors and transformers cannot.)

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 26, 2025, 01:51:44 pm
content: Quote from: dkonigs on February 26, 2025, 05:53:29 amI understand that when troubleshooting issues like this it's natural to "explode" things in order to understand how different components affect the phenomenon.... but these comments are the opposite of clarifying.QuoteOk, makes sense. Hopefully the Y caps also connect directly to the same trace (as opposed to connecting indirectly through the chassis).QuoteOk.QuoteQuoteYou've mentioned that connecting "DC circuit ground" to chassis causes the disconnect behavior, I was assuming you had been making/breaking this connection via mounting holes or some other wiring. Could you be more specific about what change you made to cause the behavior to change? Were you adding insulation around the USB connector to prevent contact with the chassis, for example?QuoteOk I'll just assume the "filter" block is a pair of wires.QuoteSee response to 3 above.QuoteRight, just making suggestions for investigation. There's probably other ways of configuring things to get a similar effect (basically to reduce C7). I don't know about the size/shape of your chassis or USB device, a picture would help a lot.QuoteIf a properly implemented external line filter (with common mode filtering) doesn't significantly mitigate the issue, then that's a red flag that something is very wrong with the setup, or we're completely misunderstanding the issue (for example could actually be a radiated immunity issue).Do you have any ability to adjust the "amplitude" of the EFT transients? If not and your only indicator of whether your mitigations are working are "disconnect" or "no disconnect," then that will make troubleshooting very difficult. i.e. would be hard to tell if a mitigation isQuoteNot sure how to interpret this, depends on whether "PE" refers to the "true" ground in my schematic or to the chassis, or the wire in the cable, etc...QuoteNo surprise that specialized products exist so long as people are willing to pay for them. Doesn't make them actually useful though...QuoteWhat's happening on the other end of the PE wire? Is it going back to the same power outlet as L/N, or taking a different path to PE?QuoteYes, it's important to keep in mind that a test lab may introduce the transients in a different way than how you're doing it now. For example, they might be created via an injection transformer on all wires in the power cable, including PE. In that case, there would basically be no way of preventing your ground from "bouncing". IMO I would worry about that after actually figuring out why your disconnect is happening. If you have a problem worth solving, it's worth fixing even if it's not exactly what happens at the EMC lab.QuoteOh absolutely. I put C10 on my schematic to represent a more direct disturbance to signals (though there are probably many other ways to couple in).

author: dkonigs
author_rank: Regular Contributor
timestamp: February 27, 2025, 06:14:24 pm
content: Quote from: mtwieg on February 26, 2025, 01:51:44 pmIn an effort to hopefully clarify things for real, and maybe get the conversation back on track, I've made some new diagrams showing exactly what sort of configuration I'm using for this troubleshooting effort.Here is an updated version of that initial drawing, showing how the boards are actually laid out for testing and also showing that "PE wire" I keep referring to:Additionally, here is a diagram showing how I'm injecting the EFT noise into the system in this configuration:(It basically happens whenever I toggle the switch on or off.)Quote from: mtwieg on February 26, 2025, 01:51:44 pmThey do.Quote from: mtwieg on February 26, 2025, 01:51:44 pmI've been making/breaking this connection via connecting/disconnecting the wire I show in the updated diagram above.I've also been testing putting various things along that wire's connection path, just to see what happens.(Direct connection or any capacitor in-line, the glitch still happens. No connection or inductor in-line, the glitch does not happen.)Quote from: mtwieg on February 26, 2025, 01:51:44 pmI've seen no evidence that its a radiated immunity issue, because I've never reproduced it when I physically disconnect whichever wire I think its coming in over.I've also had past success with an external line filter, but am not having present success. My current working theory is that the EFT noise is coupling to PE in the power cord, and then this is the only wire coming into the system that doesn't go through some sort of choke. So once it connects to DC signal ground, it gives the noise a path straight into it.Quote from: mtwieg on February 26, 2025, 01:51:44 pmI do have an actual EFT burst generator that I've also used for testing. But the problem I've run into is inconsistent results on the probing side. None of the normal scope probe options (regular or differential) have worked well. I've only recently started using RF probes, but only with the "lamp transformer". I should try those with the EFT burst generator.Quote from: mtwieg on February 26, 2025, 01:51:44 pmYes, that's my plan. I want to be immune to these issues under the normal ways they're likely to happen in the real world, even if I need the firmware to implement a more disruptive "recovery" process to handle the cases a test lab is likely to generate.Finally, I've long suspected that it may actually not be the power rails to the USB peripheral that are the actual problem. But rather, that all this crap is corrupting the USB data signal itself. The fact that the relationship between "burst event" and "device hicup" isn't exactly 1:1, and is more likely to happen when there's active communication, seems to point in this direction. I'm planning to do more direct testing of that soon, via isolators and such.

author: TimNJ
author_rank: Super Contributor
timestamp: February 27, 2025, 09:56:44 pm
content: So, what exactly is your aversion to using a "ground/earth choke" as you already mentioned worked? Does the earth serve a protective function? (Does it need to meet requirements for PE?) If you are not sure, then just assume that it does. What inductor did you use by the way?In my experience, a few hundred uH is often sufficient. You can accomplish that with a few turns of 14-18AWG earth wire through a high permeability (e.g. u=10K) toroid, maybe 15-20mm in diameter.Most standards evaluate whether an earth connection meets PE requirements by measuring resistance or voltage drop at the test current specified in the standard, which is often 2x the rating of the breaker it is expected to be powered from. So, for a 15A or 20A breaker, the earth conductor is tested at 30A or 40A for 2 minutes, typically. If the voltage drop is sufficient and the wire does not melt, become disconnected, or cause another hazard, then it is OK.As for USB and EFT, I solved a customer EFT problem by increasing the shielding coverage of the USB cable, and ensuring that the shield terminations on each end are solid and have 360 degree coverage to the connector shell. Try a few differen USB cords and see if any work better. I've had good experience with Tripp-Lite

author: dkonigs
author_rank: Regular Contributor
timestamp: February 27, 2025, 11:00:07 pm
content: Quote from: TimNJ on February 27, 2025, 09:56:44 pmIts not so much my aversion as everyone else's here, though it does add complexity to the assembly. And if I do it everywhere PE touches GND (as opposed to just at the power inlet) it becomes a lot more complex. Regardless, the "inductor" I tested was basically a length of wire wrapped many times around a snap-on ferrite block, which I measured at about 300uH.Quote from: TimNJ on February 27, 2025, 09:56:44 pmQuote from: KE5FX on February 24, 2025, 12:48:50 amQuote from: jwet on February 24, 2025, 08:03:56 pmOkay, I'm going to answer the rest of these together. Just this afternoon, I've made a big breakthrough in my troubleshooting of the problem.First, I put a USB protocol analyzer (Total Phase Beagle) in-line with the connection between the USB peripheral and my embedded host. This gave me an independent way of monitoring things, and lets me see these EFT-induced reset events *regardless* of activity on the host UI. (this is important, because it lets me test more devices than just the ones which the host firmware can show active monitoring data from)I then did my thing, plugging in a variety of test devices and toggling that switch (which generates the transient), while watching the output from the USB analyzer. These were the results:My USB peripheral as constructed -has transient issueCheap USB mouse -has transient issueUSB serial dongle -no issueGood USB keyboard -no issueGood USB mouse, with the same cable as my peripheral -has transient issueGood USB mouse, with original cable -no issueMy USB peripheral, with original cable from the good USB mouse -no issueBingo! It was the cable all along!Now all the order troubleshooting and variables from above are still in play, and I'm going to start working backwards on that soon. But my guess is that the cable was already marginal enough that a little extra energy making its way from PE to the cable's GND or Shield pushed it over the edge.This also explains why I kept thinking I fixed it, only to later discover I hadn't. Manufacturing variations on the cable itself changed things just enough from prototype to prototype.Now, I basically have two ways I can go about fixing this:Figure out how to make it work despite the cable, by doing something involving extra filtering around the host USB connector or the cable-to-PCB input on the USB device.Just get a better cable.Now option 2 is probably the right choice. The issue is that I need to figure out exactly where/how to get a better cable that still meets my physical requirements. The cable I'm using is a captive device cable designed for a USB mouse. This means that its a normal USB-A plug on one side, and on the other side it has a rubber strain relief followed by something similar to a JST PH connector. Its also rather thin and flexible. (The mediocre cable I'm using is actually a mass-produced "replacement cable" for the "good USB mouse" I cited above, hence why its cheap and easy to get.)Any suggestions for where/how to get such a cable? (Could be custom, but doesn't have to be custom.)I kinda wish I had the gear to just put all these cables into a test jig and figure out how they characterize, but the right way to do that seems to involve the next major oscilloscope model up from mine or this $15k box from Total Phase.

author: aeg
author_rank: Regular Contributor
timestamp: February 28, 2025, 03:11:39 am
content: Almost all USB cables made today use crimped shield termination for the full-sized A and B plugs. This tests OK at the time of manufacture, but goes high resistance by the time the cable is put to use. You can see it right away with a DMM. Foxconn used to make cables with soldered shield termination, I don't know if they still do. Maybe look on the jacket of your good captive cable and see who made it (although the cable may have been assembled by someone other than the bulk wire manufacturer).I've made my peace with the idea that I should make things work with lousy cables. But since you have to operate in the presence of EFTs, you may not have that luxury.Conversely, is it possible that the "good" cable does not terminate the shield to the JST connector, and the shield connection is actually making things worse?

author: dkonigs
author_rank: Regular Contributor
timestamp: February 28, 2025, 04:43:52 am
content: Quote from: aeg on February 28, 2025, 03:11:39 amI haven't cut anything open yet, but I did just do some casual multimeter testing to see what things looked like. Its hard to get a stable resistance reading of these things, especially the shields, but I tried.The "good" cable measured ~0.4 ohms on the shield and 0.8-0.9 ohms on the other conductors.The "bad" cable measured 0.8-2.0 ohms on the shield, and 0.6 ohms on the other conductors.(Of course I'd take the absolute values of all these with a grain of salt, as my probing was a bit janky, but the gist of it probably tells the story well enough.)Now I'd obviously want to be able to handle bad things happening with bad cables as elegantly as possible, but I really don't want to depend on firmware recovery for my own hardware when I can avoid it.I just wish I knew where to find these cables outside of AliExpress. I've started looking into places that do custom USB cables, but this is something that should be at least semi-off-the-shelf if you know where to look (and I don't). And on the surface, the captive-end strain relief doesn't seem to be a standard custom cable offering (unless I'm looking in the wrong place, which I might).For a visual reference, this is the sort of cable I'm dealing with:

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 28, 2025, 01:38:11 pm
content: Quote from: dkonigs on February 27, 2025, 06:14:24 pmOk this is helpful.QuoteOk now things make more sense. It's similar to shorting/opening R4 in my diagram. It's definitely plausible that the bounce on the logic board GND is made larger (relative to the "true ground") by adding the PE connection to the logic board (either through the chassis or your wire). Without that connection, a little bit of the transient will still get through via the Y caps inside your AC/DC supply. You could try increasing the impedance of your AC common mode choke to further block the injected transient, but there's only so much a choke can do by itself.By the way, it might be worthwhile to check if the CMC and Y caps is are forming an undamped resonance (just probe its output voltage during the transient). In some cases this can cause the input filtering to do more hard than good. Adding a bit of damping resistance usually resolves this.QuoteAlso makes sense, but I assume that breaking this PE connection or adding a choke to it could make other tests (i.e. ESD, maybe conducted/radiated emissions) harder to pass...QuoteI'm guessing the line filter was connected similarly to the one on your power board, i.e. its connection to PE is just through a power cable, as opposed to the line filter having its own very low impedance connection to PE. In the former case, it's likely that its effectiveness would depend greatly on how close it is to the source of the transients.QuoteNot sure what scope probes have to do with this. Also keep in mind that adding probes or other test equipment can drastically alter things. Particularly how the probes are grounded. Best to only use fully differential probes for this sort of stuff (I'm guessing you're referring to voltage probes).QuoteYeah I'm assuming whatever standard you're testing to allows you to define your own pass fail criteria for most immunity tests.

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 28, 2025, 01:49:00 pm
content: Double posting to address the USB discussion:Quote from: TimNJ on February 27, 2025, 09:56:44 pmIt's unclear to me where such a choke would be placed such that it helps with the EFT issue without affecting other EMC tests.QuoteYeah will have to pass a ground bond test if the chassis is conductive and accessible by the user.QuoteTripp-Lite is good, Molex also makes good USB cables IME (having dissected numerous ones myself).Quote from: dkonigs on February 28, 2025, 04:43:52 amBased on the picture I'm guessing the "shield" is one of the two black wires on the JST connector. I would cut it open to see if there actually is some sort of shield, and how it's connected. But even if there is a shield, the fact that it connects at one end via a long "drain wire" likely defeats a lot of the protection the shield could offer. If the USB device uses a wire-to-board connector like that instead of a proper USB shell, then IMO that's a problem with the device itself.QuoteShort story is you can find just aboutanythingon AliExpress/Ebay/Amazon, but you have almost no control over what you actually receive. This is especially true for generic media cables. You aren't entitled to consistent sourcing from these distributors.One thing maybe worth trying is starting with a "good" USB cable (i.e. one with good shielding but with USB connectors at both ends), and hacking one end to connect to your USB device, either by crimping its wires to the JST connector, or soldering them directly to the device PCB. See if it makes a difference. Also try soldering the shield directly to the device GND plane, instead of via a long drain wire.

author: dkonigs
author_rank: Regular Contributor
timestamp: February 28, 2025, 07:14:20 pm
content: Quote from: mtwieg on February 28, 2025, 01:38:11 pmThe idea with probing is to have a way of actually measuring the effect of various filters. In the past, I've used a differential probe. I'm just not sure the one I have (EEVblog HVP70) can handle a high enough frequency to usefully capture the (repeatable from a generator) EFT pulses. Also, RF probes are tempting for trying to follow this crud around the circuit. But fortunately I can easily see the effects of a failure, without having to actually measure the energy.Quote from: mtwieg on February 28, 2025, 01:38:11 pmI believe it does. For the majority of my use cases, simply being able to recover in firmware is fine. The exception is that there are a few situations where my device could actually trigger a power transient (by controlling an external device that causes it) while its also trying to use the USB peripheral at the same time. In these cases, having to wait for the recovery would be a problem for the user. My ultimate goal is to be immune to all these cases, while being able to recover when its "other people's hardware" or more unusual and extreme circumstances.And now to the USB discussion...Quote from: mtwieg on February 28, 2025, 01:49:00 pmI can't really use cables for this that aren't designed for OEM use as a "captive device cable." Just wish it was easier to find the sort I want, without having to order a custom product.Quote from: mtwieg on February 28, 2025, 01:49:00 pmI took a few more pictures that could be helpful. The "good" cable visually looks almost identical to the "bad" cable, believe it or not. The actual jacketed wire is a smidge thinner, but there are clearly differences in how the shield is connected (and probably in insulation).This is what the "good" cable looks like:And this is a close-up of the device-side connectors of both cables:The most obvious difference is that the shield wire on the "good" cable is different from the rest and covered in something that looks like heatshrink. Meanwhile, the shield wire in the "bad" cable looks just like any other wire.Quote from: mtwieg on February 28, 2025, 01:49:00 pmYeah, I know. The problem is that for a lot of things, this is the only easy/accessible/obvious way to actually but stuff. But it also means you need to be able to qualify that stuff yourself. Elsewhere in my projects I'm using various optical filters to cut out stray IR, where the "normal optical companies" are so obscenely expensive that I can't ever justify their prices. The AliExpress stuff is "good enough" so I'm fortunate in actually having access to a spectrometer so I can actually test the stuff I'm getting.Quote from: mtwieg on February 28, 2025, 01:49:00 pmNo need to go down this rabbit hole of more testing chaos. I just did a much easier test this morning that has pretty much settled the argument.For the setup, I did the following:Installed the "good" USB cable (as shown above) into my USB peripheral device.Setup an "unmodified" latest prototype of my main (USB host) embedded device. This means the AC power input path shown in thefirstpost of this thread, without any of the extra filtering bits added to it. It also means a completely closed and earthed metal chassis.Plugged the power cord into main device into my EFT burst generatorI then started up my test routine, and had the burst generator do its thing. I had it send 1kV EFT bursts on L, N, L and N, and E. My setup didn't even flinch, and everything continued to work perfectly.(I also tested with a USB peripheral using the "bad" cable, and the problem reproduced almost immediately.)So yeah, its the cable, and swapping the cable seems to fix it.Finally, to add a little bit of parts clarification as to what these cables are:Good cable = Captive USB cable ripped out of a Logitech G102 mouseBad cable = Captive USB cable sold as a replacement cable for a Logitech G102 mouse(so obviously I cannot use this specific "good" cable, as it has branding and isn't sold by itself, but I can use it for bench testing)

author: mtwieg
author_rank: Frequent Contributor
timestamp: March 02, 2025, 02:12:57 pm
content: Quote from: dkonigs on February 28, 2025, 07:14:20 pmThis is going to make things much messier for you. The USB specs do allow for captive cables, but it's unclear what requirements it puts on their construction (especially regarding shield connections). You're likely to see much more dodgy-ness in captive cables assemblies than normal USB cables.Can you share the product page where you're buying these from? I'm curious what sort of info they provide (drawings, certifications, etc), if any.QuoteExternal inspection basically won't tell you anything about the shielding. Most you can do without tearing it apart is test continuity of each of those black wires to the USB-A shell. I have seen USB cables where there is no shield of any kind, and the "shield" conductor is just a drain wire, or worse it's just spliced to the GND wire. Easiest way to tell is to dissect them.QuoteNot sure what to tell you. Yes, Amazon/Aliexpress/Ebay have polluted the world with trash, but the "good" manufacturers/vendors are still out there. You just have to find them and buy more directly.QuoteGood news then! I guess you have a supply chain issue then, not an EMC issue.

author: dkonigs
author_rank: Regular Contributor
timestamp: March 29, 2025, 05:30:15 pm
content: Okay, I've been down the rabbit hole with cables now, and figured I should provide an update.I've tested numerous cables, and also have done teardowns of portions of most of them.There are also two actual tests I've been using to quantify how various cables perform.Do I pick up a lot of noise when I run the cable through a current clamp and do an EMC scan?Does the USB device glitch out when I hit the host with pulses from my EFT Burst generator?I've also now tested many different cables:"Replacement mouse cables" sourced off AliExpress, 3 different actual designsActual Logitech OEM cable from the above mouseCustom USB cable I had build to my specifications to hopefully match the above connector-wise.CableMatters USB 2.0 (A->C) cable that I kludged by chopping off the USB-C end and attaching the same connector as the previous cablesOut of the box, the only cables that actually passbothof my tests are the Logitech OEM cable and the kluged CableMatters cable.The 3 AliExpress cables have similar construction. No shield, just a drain wire going from the USB-A connector shell to a pin on the opposing JST connector. They differ in the quality of how this drain wire is attached, and don't look identical on the emissions test, but ultimately are all failures.The Custom USB cable actually has a foil shield, but the manufacturer apparently never bothered to connect it. So the USB-A shell is connected to the JST connector via only the drain wire. If I manually connect the shield (by slicing off the boot/sheath and applying copper tape), then the cable improves dramatically on emissions. It still fails on EFT burst, however.The Logitech OEM cable has no drain wire or foil shield. It only has a woven braid shield, which is correctly connected on both ends.The CableMatters cable is the oddest of the bunch. It has a drain wire, a foil shield, and a woven braid shield, but no ground wire. The drain, foil, and woven shields are tied together, and connected to both the shell and the ground pin.My likely next step here is to complain to the custom cable vendor and see if they can fix the issues. Connecting the cable shield properly is an obvious thing to fix. But as I said, that only seems to fix the emissions. So what I'm wondering is what aspect of cable construction is the reason the Logitech and CableMatters cables pass EFT immunity, but the others don't. My guess is that it could either be the woven braid shield, or something about how the D+/D- wires are twisted, or something else I'm not thinking of.I'm probably just going to explain the issue, ask about shield connection, and ask if they have any other cable stocks I could try.

author: mtwieg
author_rank: Frequent Contributor
timestamp: March 30, 2025, 12:53:28 pm
content: QuoteNo surprises there.QuoteFoil shields are practically never connected directly to the shell (doing so would result in the foil tearing easily at the point of contact). The connection is made indirectly via contact with the drain wire or braid. So it sounds like the drain wire wasn't making sufficient contact with the foil? Was the drain wire on the shiny side of the foil tape?QuoteThat's odd, how does the braid terminate on the captive connector side? Usually I'd expect a drain wire to be used for that.QuoteAFAIK the USB spec doesn't require GND to be their own conductors. Though in some EMC scenarios this can be problematic...QuoteProbably the braid. Braid shields are typically more effective at lower frequencies which will matter more for EFT immunity. Foil shield effectiveness will also deteriorate as the cable flexes and it starts to tear, especially if it's a "tube" wrap instead of a "spiral" wrap.

author: dkonigs
author_rank: Regular Contributor
timestamp: March 30, 2025, 06:26:01 pm
content: Quote from: mtwieg on March 30, 2025, 12:53:28 pmI think the drain wire was in the middle of the cable, and the shiny side of the foil was facing outwards. There was no electrical conductivity between the drain wire and the foil. When I "fixed" this by stripping off some of the PVC jacket and wrapping the end with copper tape, emissions dramatically improved. EFT immunity didn't change, though.Quote from: mtwieg on March 30, 2025, 12:53:28 pmIt looks like the braid was kinda twisted into a wire and routed to the connector. I went ahead and stripped off some insulation on the JST PH connector end, and took a picture:(The picture doesn't show everything in spectacular detail, as I only stripped things so much, but it hopefully gets the idea across.)Quote from: mtwieg on March 30, 2025, 12:53:28 pmGood to know. I'm probably going to start by attempting to explain the issues and then ask if they have any other cable stock they can offer for this project. Perhaps one with a woven braided shield. I really hope they at least half-understand me, and/or provide a list of options to choose from. I'm worried they'll either act confused or ask me to specify something without knowing what my choices are.Of course I also need a thin/flexible cable (3mm OD or less) for this, which does limit my choices. But I know options exist, because the CableMatters cable is about 3mm and the Logitech OEM cable is about 2.5mm.

author: mtwieg
author_rank: Frequent Contributor
timestamp: March 31, 2025, 11:37:40 am
content: Quote from: dkonigs on March 30, 2025, 06:26:01 pmThey definitely should have known betterQuoteHuh, surprised that they took that approach, a drain wire inside the braid probably would have been easier to work with and function equivalently (again assuming the drain wire is in contact with the braid the whole way).QuoteThey should at least provide you with a drawing including:1. A cross section view of the cable including all its conductors and shields2. Some sort of pin assignment table showing how where all of those conductors/shields are terminatedSee attached for an example.The pin assignment table usually does not indicate specifically how the connections are made though. For example it won't distinguish between a braid being clamped solidly around a shell vs using the drain wire for the connection (or turning the braid into a wire like in the OEM cable). Might need to ask for extra detail there.A 3mm OD will probably limit wire choices quite a bit. Perhaps the OEM cable didn't have a drain wire specifically to keep the cable slim...Telling them they can use thinner wire for the data and power conductors might allow them to find a thin enough cable. Depends on how much supply current you need to provide.

author: dkonigs
author_rank: Regular Contributor
timestamp: April 02, 2025, 05:59:26 am
content: Quote from: mtwieg on March 31, 2025, 11:37:40 amWhile I do have drawings of the cable order, they're all focused on the design of the cable assembly itself. They don't show a cross-section of the cable stock. However, they do show the text description of the cable similar to the one you shared.That being said, I've been going back and forth with my vendor and they've found a better cable stock with the braid and we're going for a do-over. So I now have a new set of sample cables being made that will hopefully perform a lot better on my tests. Fingers crossed, and we'll see in a few weeks if this saga is finally settled.(I'm very much looking forward to putting this issue to rest, because I'm also going to have to make some design changes to my enclosure to accommodate the different strain relief. But that's not really an electrical issue.)