Author Topic: Surge protection grounding and fail-safe biasing for isolated RS-485?  (Read 4836 times)

0 Members and 1 Guest are viewing this topic.

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22356
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Surge protection grounding and fail-safe biasing for isolated RS-485?
« Reply #25 on: March 02, 2023, 02:34:36 pm »
I had basically the same layout as them, adapted for the Fly-back with all their extra capacitors for EMI (see attachment). What is wrong with their layout, just too complicated?

Zoom out a little bit.  Is that a slot in the ground pour around the area?  Notice they left bottom layer ground poured over everything.  See what I mean about odd?

Better to just pour ground everywhere.  Their dividing it by layers probably just makes things worse, but it makes things 1000% worse when it's misread as a gap across all layers(!).


About the filters, did I get this right that you would go for something that looks more like that? You mentioned a few things about the larger capacitor and I am not sure if this is what you meant. Thanks!

Err, check the orders of magnitude there.  Compare the values on the simulation to typical component parameters: the <= 50mΩ ESRs are typical of ceramic caps of respective value, by themselves.  The larger ones like 200m are either tant/alum or ceramic+resistor.  Nothing is over an ohm.

You only need one or two large ceramics with no added ESR, and either a few more ceramics with ESR added, or tant/alum of specified ESR.

So like 10uF ceramic plus 47uF electrolytic would likely be fine, and no resistors needed anywhere.

Exact impedances depend on regulator rating and desired ripple; at high currents, you might need a bunch of caps in parallel, and with a dense enough array made with ceramic, their ESRs will dampen each other well enough.  The same isn't true with few of them, connected with thin traces.

It also depends on what the source is.  If it's a 12V supply right beside, its internal ESR is probably enough (they use electrolytics often enough, but it would be good to check to make sure) that a single ceramic might do at the regulator.  If it's on a cable (like an adapter, or wired to something else), the cable has inductance (~0.5 uH/m) which can resonate with your caps.  In that case damping is required, and you need the C || (R+C) motif.  A TVS might also be desirable, say if hot-plugging ever occurs -- the inrush current can overcharge ceramic capacitors (partly by this ringing, partly by the dropoff in capacitance as voltage goes up), blowing the regulator.  (Damping helps greatly with this as well, and I would recommend an electrolytic > 10x ceramics or a TVS for this purpose.)

For example how I like to lay things out, here's a small regulator in a recent project:



PS1 is an on-board AC-DC converter module; its input connections aren't shown.  The ceramic + electrolytic + ferrite bead filtering is almost certainly total overkill for the application, but whatever.  C23 and C69 are at some distance (~cms) so C55 helps dampen their combination (as well as the FB's inductance, with C22).

There are other large ceramics (with electrolytics) on the +5V, local to the loads; they're not shown here of course.



Single layer views:
https://www.seventransistorlabs.com/Images/ConvLayout2.jpg Top
https://www.seventransistorlabs.com/Images/ConvLayout3.jpg Mid 1
https://www.seventransistorlabs.com/Images/ConvLayout4.jpg Mid 2
https://www.seventransistorlabs.com/Images/ConvLayout5.jpg Bottom

C23 would be better placed below IC1 but there was a board edge, and not really enough room to move everything up to compensate.  It's fine.  The +V trace (C23-1 to IC1-5) should be, oh, 10mm tops, that might even be pushing it; it's around 5-7mm here.  Depends on exactly how sharp (rise/fall time) the regulator is.  As you can see, ground runs directly underneath (and adjacent to) all the top-side components, so the switching loop between IC1-6, D3, C23 and IC1-2 and IC1-5 is quite small.  The wide body of C23, and flanking vias to GND, help reduce its inductance further.  Notice the relatively circuitous route for D2 (which I think wasn't needed in the end anyway?; depends -- some regulators have the diode internal, some don't; the LMR is just one of several alternates selected for IC1), which is fine, it's just topping up a cap.  C24 itself is pretty close, but if it couldn't be routed under D3 to pin IC1-1, two vias and a short bottom-side trace would still be acceptable.

Inner plane is used only for 3.3V here, which comes off the regulator IC14 directly into a cap C49 and vias to the plane.  0.1uF bypasses are scattered about, keeping the plane nice and stable.

Zooming out further, GND/3.3V span the bulk of the low-voltage area with no gaps larger than a couple vias.  The supply section here is placed off to a corner, so any ground-loop currents in the local area are not intercepted by signal traces running across the rest of the low-voltage area.  (Only WDTC, and that bus of traces on the top side, get very close.  Several of which are unused test points, like TP_PB2.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: kreyszig

Offline kreyszigTopic starter

  • Regular Contributor
  • *
  • Posts: 131
  • Country: ca
Re: Surge protection grounding and fail-safe biasing for isolated RS-485?
« Reply #26 on: March 03, 2023, 01:21:40 pm »
Zoom out a little bit.  Is that a slot in the ground pour around the area?  Notice they left bottom layer ground poured over everything.  See what I mean about odd?

Better to just pour ground everywhere.  Their dividing it by layers probably just makes things worse, but it makes things 1000% worse when it's misread as a gap across all layers(!).

Yes I had noticed that the bottom layer in their design did not have a slot, and yes I found it a bit odd since they other layers had it. I thought their intent was to separate the power ground from control ground to reduce noise outside the SMPS?

About the filters, did I get this right that you would go for something that looks more like that? You mentioned a few things about the larger capacitor and I am not sure if this is what you meant. Thanks!

Err, check the orders of magnitude there.  Compare the values on the simulation to typical component parameters: the <= 50mΩ ESRs are typical of ceramic caps of respective value, by themselves.  The larger ones like 200m are either tant/alum or ceramic+resistor.  Nothing is over an ohm.

You only need one or two large ceramics with no added ESR, and either a few more ceramics with ESR added, or tant/alum of specified ESR.

So like 10uF ceramic plus 47uF electrolytic would likely be fine, and no resistors needed anywhere.

Ok thank you. For the outputs, what do you think would be appropriate?

Exact impedances depend on regulator rating and desired ripple; at high currents, you might need a bunch of caps in parallel, and with a dense enough array made with ceramic, their ESRs will dampen each other well enough.  The same isn't true with few of them, connected with thin traces.

It also depends on what the source is.  If it's a 12V supply right beside, its internal ESR is probably enough (they use electrolytics often enough, but it would be good to check to make sure) that a single ceramic might do at the regulator.  If it's on a cable (like an adapter, or wired to something else), the cable has inductance (~0.5 uH/m) which can resonate with your caps.  In that case damping is required, and you need the C || (R+C) motif.  A TVS might also be desirable, say if hot-plugging ever occurs -- the inrush current can overcharge ceramic capacitors (partly by this ringing, partly by the dropoff in capacitance as voltage goes up), blowing the regulator.  (Damping helps greatly with this as well, and I would recommend an electrolytic > 10x ceramics or a TVS for this purpose.)

My circuit is likely to be ~1 m away from the port of the other circuit through a cable, so damping is probably a good idea. Thank you for the layout information!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22356
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Surge protection grounding and fail-safe biasing for isolated RS-485?
« Reply #27 on: March 03, 2023, 02:43:29 pm »
Yes I had noticed that the bottom layer in their design did not have a slot, and yes I found it a bit odd since they other layers had it. I thought their intent was to separate the power ground from control ground to reduce noise outside the SMPS?

In what sense; control ground where?  There's no AGND pin on this device (some regs have that though).

The fact that they have input and output exiting in different directions means there is an overall path across local ground loops, i.e. the ground that VIN is bypassed to is different from the ground VOUT is bypassed to.  Measuring these nodes at a distance, there will be some voltage between them, that is not due strictly to the ripple on each one by itself (i.e. V(VIN, local GND) + V(VOUT, local GND) != V(VIN, VOUT)).  This is probably a small effect, because ground is overall fairly dense still, despite their odd layout.  Small enough you wouldn't notice it in comparison to the ripple on each node by itself. 

Like, the weirdest thing about their layout is probably this:



Notice the length between GND pin and vias.  Switching current flows through this path, thus the chip's internal ground is offset by the voltage drop along here.

Like this:



Now, C1 especially C/D do bypass along this path, so I'm overstating things a bit.  The switching current flows between VIN/GND and SW so the common-mode isn't dropping across the full ~5nH.  But it is if there's high-frequency currents flowing out of the SW node; most inductors have a high-frequency series-resonant or capacitive mode which is relevant here, and that current will drop through this full path.

So much better to use vias directly:



and remove the ground slots (what were those doing anyway, more ground is better?!).

Notice the path between pin 7 and C1D can be widened, reducing inductance a bit additionally.

Speaking of inductors -- one wonders just what they had there.  I haven't seen one with that footprint before.  Does it really have a ground connection -- core connection, or shield, perhaps?  That might contribute noticeably to EMI: both in reducing emissions by not having the bulk of the inductor body have switching noise on it, and by increasing its capacitance, and therefore CM switching currents as mentioned above.  (Which is a local effect, manageable by layout or filtering; the inductor body acting as a tiny antenna however is not, and would require shielding if it is found to be excessive.)



If you are going to use ground slots, the proper way to apply them here is to rout around the circuit, leaving it as a peninsula.  VIN, VOUT, and any signals, are routed along an isthmus between the peninsula and the main board.  It doesn't need to be as narrow as "isthmus" implies, indeed it should be wide to keep inductance down, but also width implies local loop currents can flow into it.  More that it should be longer than it is wide, so those loop currents die out along its length.  Anyway, all signals coming along this path shall be bypassed and filtered to it.  This acts like a single point, and there is zero voltage across an ideal point so we've eliminated ground loop from the system.  Notice also it's a three-terminal regulator: VIN, GND, VOUT (...and whatever control signals).  You can't have any common mode on a common-ground system by definition, so we've again eliminated ground loop.

As for the control signals, they should be filtered as well as they can be, given their bandwidth.  Here, just EN and PG need to leave the site, if at all.  A ferrite bead along the isthmus, with a bypass cap at either end (100s pF to 10s nF, kinda who cares?), should be adequate filtering.

If you needed, like, some kind of data signal here -- I don't know, maybe an SPI controlled regulator? -- you might simply deal with EMI on a system level (because you can't compromise SPI bandwidth too much: usually SCLK has a maximum rise time for example, or maybe the bus is shared with other fast devices), or it can be communicated as a differential pair using data chokes to cross between ground domains (additionally, using RS-422 transmitters/receivers seems terribly overkill for this, but would certainly do the job..), preserving signal bandwidth without carrying as much ground loop noise into the bus.

Maybe a more meaningful example would be something like, a module, or "shield" if you will, that's got onboard power, and it's dirty -- they did a shitty layout and you can't fix it, it's a 3rd party module -- and it's also got, I don't know, Ethernet coming in or something.  Maybe its noise can be isolated off to one side, and the signals (RMII I suppose?) carried via CMCs to the quiet side.  This wouldn't address the common mode out the connector though; you'd still need some kind of grounding solution to keep noise down at the BS terminator node, more or less.

...If you don't know about typical Ethernet circuits, this probably isn't very meaningful, and that's alright.  These probably aren't very meaningful examples without diagrams anyway.

In any case, the point is, even if you need to pass high-speed data along such a ground-isolation route, there are methods to do so.  They might not be preferable (adding a bunch of CMCs and filtering, when the problem could likely be solved with better layout, or choice of less noisy parts), but it is possible.


Quote
Ok thank you. For the outputs, what do you think would be appropriate?

If the loads are nearby, added ESRs might not be necessary.

The isolated output might have two 10uF's, total, say, one at the rectifier, one at the chip?

5V output, if routed over some length, probably should have some damping, to terminate the PDN (power distribution network).  Exact values, and spacing of bypass and bulk caps along the route, depends on where and how it's routed.

If inner plane, just some bypasses scattered about is probably fine.

If 5V just goes to a couple loads then a 3.3V LDO, a couple 10uF (total as required by the MP4576) and maybe a bulk cap will be fine.  Again, exact value and placement depends on routing.

The 3.3V in turn (if applicable), depends in the same way.  Choose an LDO with low GND pin current (check for a plot of I_GND vs. VIN; it can be shockingly bad on some bipolar types, or is rarely a concern on CMOS types), and check for any discussion of stability vs. ESR and C_OUT values.  Modern types are designed for low ESRs so put on as much ceramic as you like.  Older types require ESR within a range so you will need a bulk cap (with its ESR) to be dominant, at least near the reg's cutoff frequency (typically 10-100kHz).  It's okay to have low-ESR bypasses in parallel here, as long as they don't reduce the ESR in this particular frequency range.  Which means, using much less total value bypasses than bulk cap.

And so on for other supplies.

Tim
« Last Edit: March 03, 2023, 02:52:26 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22356
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Surge protection grounding and fail-safe biasing for isolated RS-485?
« Reply #28 on: March 03, 2023, 02:57:56 pm »
I should notate that a little better actually, like this:

Note that there's very little inductance between C1 A/C and B/D, and C/D are closer to the chip ground than A/B are.  As for capacitance or stray modes of L1, they manifest like this, some effective series resonant circuit in parallel with it.  So switching current flowing through Cp and such must also flow through the total ground-return path, it's not saved by the shorter path between pins 7/8 and C1 C/D.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline kreyszigTopic starter

  • Regular Contributor
  • *
  • Posts: 131
  • Country: ca
Re: Surge protection grounding and fail-safe biasing for isolated RS-485?
« Reply #29 on: March 03, 2023, 05:14:35 pm »
Thank you,

I now understand much better the issue with the ground slot, and what you say about the isthmus makes a lot of sense. Also adding vias closer to the chip and getting rid of the local ground plane there makes sense.

I really need to educate myself better about filtering though, and although I have some understanding of what you are saying, I have little to no intuition regarding this stuff, all I have is some knowledge based on an engineering course I took 20 years ago and where we were doing lots of linear algebra and played with the complex inductance. So when I look at this type of circuit all I think about are a bunch of equations, pole diagrams and equations, I lack the intuition and a higher level of understanding of this. If anyone know a great resource that could help me this would be great!

Edit: I created this new thread to discuss about the filtering aspect, since it is a bit off-topic for the current thread: https://www.eevblog.com/forum/projects/approach-to-design-a-multi-stage-rlc-low-pass-filter/
« Last Edit: March 06, 2023, 07:17:22 pm by kreyszig »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf