Help understanding ground planes / PCB review request - Page 1
Forum section: electronics / beginners

author: sparkydog
author_rank: Regular Contributor
timestamp: February 08, 2023, 10:51:23 pm
content: I am a complete and utter novice to electronics, knowing just enough to a) be dangerous, and b) know that I don't know anything.I'm working on a design for a project that will involve designing several boards as well as using pre-built (or at least pre-designed) boards and various off-board components, including an Arduino Nano and seven-segment display.Icouldgo buy some off-the-shelf 5V power supply and worry about how I'm going to mount it down the road, as well as how I can run its output to both the Arduino and the display, but since a) I need to start somewhere, and b) I'm going to need a 12V board as well and might as well take advantage of minimum order quantities, I was thinking about building this to start:Basically, it's a power distribution board based around a Mean WellIRM-10-5(possibly overkill, but my 12V applications definitely want the IRM-10-12) using TE 4DB-P107-02 and 1776244-2 connectors. (And standard Molex 47053-1000's, but I don't plan to populate those on the 5V version.)I'm alsotryingto build this to pollution group 3 specifications, although the fan headers necessarily violate that. (This, however, is why I'm using 1.1mm clearance generally, 1.25mm for the ground plane, and 2.5mm for the AC traces.) Obviously, there is no "signalling" happening here, so Iprobablydon't need to worry too much about EMI?As to the n00b questions...Am I doing the whole "ground plane" thing at least somewhat right?...or should I skip the ground plane for this application?Do I have enough vias, or do I need to really go ham?Am I doing something horrible by being "very conservative" with my trace widths?...or in duplicating the AC traces top and bottom to effectively double their thickness?Do I need to be worrying about additional ESD / surge protection?If "yes", could I get away with a mains surge suppressor?Have I done anything else bone-headed?

author: thm_w
author_rank: Super Contributor
timestamp: February 08, 2023, 11:07:10 pm
content: - Can you use a 5V or 12V plugpack instead of an AC/DC module, or are there space constraints?- Is there an upstream fuse or circuit breaker?- What are the screw mounting holes electrically connected to? Is it a box that is earth grounded?On a board like this, you really do not need a ground plane at all. You can just have the traces going from the module to the header.

author: sparkydog
author_rank: Regular Contributor
timestamp: February 09, 2023, 03:21:17 pm
content: Quote from: thm_w on February 08, 2023, 11:07:10 pmIf by "plugpack", you mean a wall wart... then no, the "final product" (FP) needs to be hard-wired. I could, in theory, use a stand-alone PSU (which AFAICT would be basically identical to an IRM-10 anyway), but space *is* something of a concern. There are also other boards in the project where having the PSU on the board lets me run traces straight from the module to other components without needing points to attach external wires. Anyway, the "main" reason for this approach is to minimize the number of wire-to-wire connections needed and to provide more than one output. In particular, while my initial 5V won't be doing so, the 12V version of this *does* need to drive some fans, and, while I *could* fiddle with adapters, it would be convenient to just plug them into standard headers.Quote from: thm_w on February 08, 2023, 11:07:10 pmObviously, there's an upstream breaker. For "bench fiddling", that would just be a standard 15A, but the FP will use a 20A GFCI+CAFCI. Do you think I need a separate fuse? (That's... going to wind up being a fair number of fuses all told. Obviously, it would need to be slow-blow as well; IRM-10 has a 20A inrush.) I could also install a surge suppressor on the breaker box.Quote from: thm_w on February 08, 2023, 11:07:10 pmAgain, for "bench fiddling", probably nothing. The FPisin a metal box, and yes, the plan is that there should be a path-to-earth from the ground plane. (I anticipate attaching an earth wire directly to the box, and, yes, using conductive screws and/or standoffs to attach the various PCBs.) Hmm, Icoulduse 4DB-P107-03s and attach an earth directly?Quote from: thm_w on February 08, 2023, 11:07:10 pmYeah, that sounds reasonable. What do you think; is that better? (More importantly, is itcheaper? So far as I know, it doesn't make a difference.) Or does an earth plane improve safety and/or ESD protection?

author: sparkydog
author_rank: Regular Contributor
timestamp: February 09, 2023, 03:45:53 pm
content: Well, I supposehttps://electronics.stackexchange.com/questions/240092(TL;DR: add vias to the mounting holes) is good advice...

author: BillyO
author_rank: Super Contributor
timestamp: February 09, 2023, 03:53:11 pm
content: Those are not ground planes. They are copper pours. There is a (huge) difference.A ground (or voltage) plane would have no traces routed through it. It needs to be able to interact with the trace layers and provide a direct return current path for the signals. The return path will try to follow directly under the signal trace. If you use chopped up copper pours like this you actually reduce path integrity and impede the proper signal path and cause all sorts of problems like increased impedance, noise generation and ringing.You will be better off without them, or use a 4-layer design with ground and Vcc planes for the inner layers. JLC-PCB does small 4-layer boards for the same price as 2 or 1 layer boards these days. I'm sure most other oriental fabrication houses do too.

author: thm_w
author_rank: Super Contributor
timestamp: February 10, 2023, 01:40:45 am
content: Quote from: sparkydog on February 09, 2023, 03:21:17 pmYes a standalone PSU (wall wart) would be similar to an IRM-10 but then you don't have to deal with the AC sideat all.If you need to hard wire the AC side, thats fine, but if not, its usually 10x easier to use an AC/DC adapter (wall wart) and then run your design off of 12V. You would still have the headers and the PCB, just no 120V AC on the board.QuoteUsually any device thats certified for consumer use is either going to have a fuse or a fusible resistor to meet regulations.If this is for your own use, thats fine its not a requirement, but if its something you would sell, then you'll have to look up the regulations.QuoteIt doesn't make a difference for cost. Its just simpler to not have to put the planes in in the first place. ESD/safety it doesn't matter here.If you care a lot about those you'd want to put some filtering on the input of the IRM-10. I don't know to what extent it can handle surges, etc.Quote from: BillyO on February 09, 2023, 03:53:11 pmNo, ground planes can have routed traces and be broken up, that is not some hard rule. You could be more specific and call it a "ground pour", but its clear what OP is talking about and what advice they want.https://resources.altium.com/p/understanding-ground-planes-your-two-layer-pcbhttps://smtnet.com/library/files/upload/Copper-Ground-Pours.pdf

author: BillyO
author_rank: Super Contributor
timestamp: February 10, 2023, 03:44:39 am
content: Quote from: thm_w on February 10, 2023, 01:40:45 amDid you look at his layout?Never mind. You are an internet "expert". To tell the truth, I really don't care. I just wanted to pass on a few decades of experience but it's really no skin off my d##k what he does. He can just go randomly laying"ground pours"that break signal returns all he likes.Go ahead, give him some good advice.

author: sparkydog
author_rank: Regular Contributor
timestamp: February 10, 2023, 03:45:45 pm
content: First off, I want to say "thanks" to BillyO for the advice. I also subsequently went and looked up several videos that *also* advise against earthed pours. (And I will note that "ground plane" is indeed a misnomer here, as they would be connected toactualearth, probably in a literal sense that the "far end" is indeed a copper rod shoved into dirt, andnotto the PSU's "-".)That said, now I'm a little confused, as at least one of those videos wasfromAltium, as is the page thm_w linked which seems to be suggesting the opposite.Now, for this board and at least one other, I could pour anactualground plane. However, as there are no signals, there does not seem to be any clear reason to do so? (My current design is basically the same as posted minus the pours; so, all of the headers just have traces, as in the version posted, running back to the PSU's "-".) If Ididuse a pour, could that lead to warping issues, or does that not really apply to two-layer boards? (Some of the issues, e.g. layer unevenness, are "obviously" less relevant when there are no stacked layers. What isn't clear is whether the heat+epoxy step that causes warping even happens with a two-layer board. Is that relevant to the solder mask, or only when stacking more than one layer?) Also, what about earth; I want to say it's "ungood" to tie the PSU "-" toactualearth? (Meaning, the plane would have to steer clear of the mounting holes...)I'm going to have to revisit this later for a different board, and I'll be grateful for any advice on that one, but for now I think it's better to not complicate this thread any more than necessary.

author: BillyO
author_rank: Super Contributor
timestamp: February 10, 2023, 05:27:08 pm
content: There is nothing inherently wrong with having voltage referenced copper pours,except(and this is the important thing) when you have traces passing over breaks in the copper pour. The copper pour must be contiguous under the entire path of the signals. So, yes, technically a voltage referenced copper pour could have breaks in it to allow for traces, but you have to be careful not to route traces on the other layer that cross those breaks. 99.99% of the time, you are better off with one of the following scenarios:1) Don't use a copper pour if you can't avoid breaks in it that have signals crossing the breaks.2) Use a 4-layer board where one or more of the layers can be a contiguous voltage referenced plane. The usual layer stacking is "top signal layer -> voltage plane -> other voltage plane -> bottom signal plane". BTW, these are cheap these days. I use them for every thing.3) If possible, route all your signals on the one side, even if you have to use jumpers, and use the other side as a contiguous voltage plane.Of course you could just be very careful about your routing and not route signals over breaks in voltage planes. And there are more rules to doing this too. To me this is the toughest way to go and I have rarely seen it done in professional product design since the advent of 4 or more layer PCBs. My last PCB I had made by JLCPCB was a 100mm x 100mm board and it was the same price if I had it done with 2-layers or 4-layers.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 10, 2023, 05:45:29 pm
content: Well made pour! It's evenly and modestly stitched, targeting crossings and peninsulas appropriately.It's not obvious, however, what it's meant to connect to; chassis I suppose (mounting holes), but it doesn't connect to anything in the circuit so it's dubious how much value it really provides here.This may be of relevance:Some years back, a client went through evaluating AC-DC modules for EMI in a medical context. We found this worked well. Relevant facts: the output goes into a grounded structure, I think it was still isolated from it, but with enough capacitance to affect conducted emissions. Radiated of course is relevant regardless of grounding (since there's enough exposed wires to radiate from either end).Hmm, I forget if the box the PSU was in was plastic or metal; I recall heavy paint but don't recall if that was textured plastic or not. There was a conduit (carrying the output leads) up to the head unit which was metallic. Power was a typical 3-core round cable, integrated into the unit.The XP Power ECL10 and EML15 were looked at. Both gave pretty reasonable results by themselves, but exceeded limits by 6dB or so. The Y caps and output CMC were found most effective. The commercial grade modules were also tested, giving worse performance (+20dB or so?), so would've needed more filtering, if they were suitable, anyway (again, medical was required).For your application, I would suggest maximizing clearance/creepage around AC connections, and keeping the outputs distant. Filtering may be necessary, in which case an input (can be several ~mH) or output (can be 100s uH to ~mH) CMC, and a Y1 rated capacitor between [line or earth] and output common, similar to the above, is likely helpful.If this goes inside a grounded metallic enclosure, filtering with respect to that enclosure will be best. So, having earth onboard the PCB will be handy for that. 'Y' caps can be used to input and output to help out. Output can also be hard grounded, if that's acceptable elsewhere in the system (i.e. not making problematic ground loops).Preferably, don't do this blindly assuming anything. If you have some means of measuring noise, use that. An oscilloscope can be used to crudely measure noise. Preferably a setup is made, with LISN and everything, but even just probing the output with intentionally poor probe grounding (say, probe tip to output GND, probe ground clip to output GND through a 1k resistor -- so any common-mode noise between scope and output grounds drops across this resistor, while mains-frequency hum (coupled by the small capacitors) is largely shunted) can give at least a basic idea. For one-off in-lab hand-wavey purposes, peaks of ~100mV are probably tolerable -- mind that relevant radio services may be affected by such levels (mainly in the LF-MF-SW range). Standards require closer to 1mV (the measurement isn't really peak, they use a different detector that's sort of between peak and average -- but getting peak this low will certainly pass those methods as well).Tim

author: mariush
author_rank: Super Contributor
timestamp: February 10, 2023, 06:40:36 pm
content: You should consider rotating the fan headers 90 degrees ... this way the voltage pins are all in a horizontal line. It would also give you room for even more fan headers.You could use polygons or some thick trace to make a nice L shape connecting all voltage pins. See video below from around 16:00 to see example of using polygons. If you don't plan on connecting the rpm and pwm pins, you could have wide 12v trace run along the edge of the board.The ground could be a ground fill on the bottom, and you can simply have just some thermal reliefs on the ground pins

author: BillyO
author_rank: Super Contributor
timestamp: February 10, 2023, 06:51:37 pm
content: Quote from: sparkydog on February 08, 2023, 10:51:23 pmActually, just had a thought on this. For this particular application, which is just a power supply mount and output distribution, why not make the top layer a copper plane attached to 5V and the bottom layer a copper plane attached to Gnd. Then you can just dispense with the traces altogether and get the ultimate in low impedance between the PS and the headers. No need to a 4-layer board (not that it will be any cheaper).Blue is top (V+), Red is bottom (V-) (not to scale!)Note: connectors on the right are V+ on the lower terminal, sorry about that. But you get the idea, right?

author: sparkydog
author_rank: Regular Contributor
timestamp: February 10, 2023, 07:14:54 pm
content: Are online quotes justbroken, or why does everyone keep saying 4-layer boards are the same price? Both JLC and PCBWay are quoting me aboutdoublefor 4-layer compared to 2-layer. (Admittedly, this is without any gerbers uploaded.)Quote from: mariush on February 10, 2023, 06:40:36 pmI don't need more fan headers. Idoneed to keep the board as narrow as possible. (Any taller and my enclosure has to get bigger... again. I've already had to resize it several times; it would be nice to stop doing that!)Quote from: mariush on February 10, 2023, 06:40:36 pmWhat would be the point? I'm genuinely curious/confused... current is going to flow from the PSU to the terminals, is it not? Why is connecting the various output pins, all of which should be 0V relative to each other, considered useful? (Or are you just suggesting a routing that minimizes total trace length rather than connecting everything to the PSU using the shortest trace possible?)

author: BillyO
author_rank: Super Contributor
timestamp: February 10, 2023, 07:20:36 pm
content: Quote from: sparkydog on February 10, 2023, 07:14:54 pmYup, it seems that the pricing I got last was a special rate. Still the same price for boards 52mm x 52mm or smaller though. Still worth it though if you can benefit from it. However, see the update to my last post. That is a 2-layer solution for you.What size is your board?

author: tooki
author_rank: Super Contributor
timestamp: February 10, 2023, 08:11:09 pm
content: Quote from: sparkydog on February 08, 2023, 10:51:23 pmPurely from an experience vs safety perspective, it would be slightly better to use an enclosed power supply. Doesn’t need to be a wall-wart, you could use something like the Meanwell RD-35A (which has 5V and 12V outputs).Or you could come in with 12V from a wall wart and use a DC-DC converter module to generate 5V from it.With that said, there’s nothing inherently wrong with your approach — I did something similar on a recent project (AC to 5V module, plus an isolated DC-DC module for a galvanically isolated section) — you just need to be aware of the consequences and requirements.I would definitely add both input and output fuses. Your AC input current is tiny, just use a slow-blow fuse so it won’t blow from the inrush. For the output, you could use a polyfuse.For your own safety when working on the project, you want everything that’s at mains voltage to be insulated. (Don’t be surprised if you unexpectedly need to work on it with the case open, powered up.) That means insulating the pins on the bottom of the PCB, for example. (I trim them short before soldering, then put 2 layers of Kapton or electrical tape over them.) And you should definitely ground the case if it’s made of metal.You’ve got plenty of room to move the DC power traces farther away from the AC input, so I would. I wouldn’t run the ground pour between them, either. (I’d probably dispense with the ground pour entirely, to be honest.) The suggestion of using L-shaped pours for the DC is a good one; just keep it away from the AC side!You don’t need such fat traces for the AC input: it’s only pulling 250mA. But they won’t hurt anything, either.I don’t like the terminal block you selected for the AC input: it doesn’t have a wire clamp if I’m understanding the datasheet correctly, and no cover over the terminals. TE 1546927-2 would be a drop-in replacement that does both. But what I prefer even more is a solution that can be disconnected, such that when disconnected, the AC cord’s terminals are insulated. A great way to do this is with pluggable terminal blocks like TE 2350397-2 (screwless, ideal for stranded wire), which plugs into either 2350513-2 (right-angle) or 2351885-2 (vertical). Similar things exist in a wide variety of pin pitches, orientations, etc.Quote from: sparkydog on February 10, 2023, 07:14:54 pmLower resistance. A plane is basically a super-fat trace.

author: thm_w
author_rank: Super Contributor
timestamp: February 10, 2023, 10:26:43 pm
content: Quote from: BillyO on February 10, 2023, 03:44:39 amBut your advice has no relevance to OPs design.What noise generation and ringing is going to occur on a 12V DC signal here?

author: sparkydog
author_rank: Regular Contributor
timestamp: February 10, 2023, 11:32:36 pm
content: Quote from: BillyO on February 10, 2023, 07:20:36 pm3.5" × 1.5". (Just under 90mm × 40mm in sane units, but KiCAD defaults to imperial and I don't feel like reworking everything. Alas, PCB design seems determined to use a mixture of units.)Quote from: tooki on February 10, 2023, 08:11:09 pmThe "final product" is going to be in its own (metal) box. Ametal-enclosedPSU (actually, several of them) like an RD-35A would be space-prohibitive. See previous comments why I'm strongly leaning this way vs. something like a Mean Well LPV/APV (and anyway, how would I fuse one of those?).Yeah, I could muck around with a DC-DC converter, but since I'm going to have extra boardsanyway(MOQ=5), it seems to make more sense to slap an IRM-10-5 on one rather than design a much more complicated multi-rail board?Quote from: tooki on February 10, 2023, 08:11:09 pmI'm adding a 500mA (0229.500MXP, specifically) fuse on the AC side. The output issupposedto be protected by the PSU, and anyway, it would be a neat trick for it to output more wattage than it's receiving. (I take it the point here is more to protect the PSU?) Anyway, would something like a16R250GUbe appropriate? Do you stick one on each side, or just on +V?Quote from: tooki on February 10, 2023, 08:11:09 pmThey're notionally sized for the 20A inrush. Overkill, yes, but if itisn'thurting anything...Quote from: tooki on February 10, 2023, 08:11:09 pmHeh. What do you think of the 6PCV-02-006 I have penciled in elsewhere?1546927-2 is a lesser amperage rating, and frankly, the inside of the "final product"isgoing to look a lot like the inside of an electric box, complete with all sorts of exposed potentially-live conductors. Some of the components involved simply don't have other options. Ireallydon't plan on working on that when the power is live!That said, I think the PCV terminals at least satisfy your "wire clamp" criteria? I could use a 4PCV-02-006...(On that note, any thoughts for insulatingsheets? Basically, something neater than electrical tape that comes in at least 4"×8" and can be cut to size?)

author: sparkydog
author_rank: Regular Contributor
timestamp: February 15, 2023, 11:34:32 pm
content: So, attached is my almost-latest version. (I've fiddled a bit with the shape of the left edge of the pours and made the traces to some of the pads 1.5mm instead of 1.0mm. Making these is work, so I'm not redoing them for such trivial changes.)Compared to the original, the DC traces have been replaced with pours and I've added fuses (0229.500MXP / 0.5A slow-blow and 16R250GU / 2.5A PTC). The PTC is a bit high for the 12V version of this that is only rated for up to 0.85A output, but a) appears to be the lowest rating of that line, and b) in theory should also work for the 5V version (2A output, but in practice I don't expect to ever draw more than ~1.5A, if that).

author: BillyO
author_rank: Super Contributor
timestamp: February 16, 2023, 12:14:21 am
content: Much nicer

author: tooki
author_rank: Super Contributor
timestamp: February 16, 2023, 12:30:04 am
content: Much nicer!Scoot the AC input terminal a few mm farther away from the fuse, so you have larger clearance. (Measure the clearance between the pins on the AC terminal, and have at least that much.)A PTC rated way above your actual current is completely pointless. Choose a model whose current selection covers your actual expected loads. (Remember that like all fuses, a PTC won’t trip at the rated current, and slight overloads won’t trip quickly.) Littelfuse makes a wide array of PTCs going down to 80mA. I don’t understand why you wouldn’t choose something more appropriate. (A PTC or fuse rated at the power supply’s limit protects the PSU. But a fuse or PTC rated even lower, to what your circuit uses, also protects your circuit!)Similarly, it makes no sense to fit a 500mA input fuse for a power supply that is rated at 250mA input current. Fuses aren’t something you normally derate.The terminal block you suggest above doesn’t meet my suggested criteria. I gave you a suggested part.As for insulating sheet: short of ordering some HDPE from aliexpress, no, I don’t know, either!! (HDPE — high-density polyethylene — is a great insulator commonly used for extremely high voltage applications, and it’s cheap.)

author: sparkydog
author_rank: Regular Contributor
timestamp: February 16, 2023, 05:22:55 pm
content: Quote from: tooki on February 16, 2023, 12:30:04 amI don't have room for that. If I move the AC terminal, I lose the silk-screening, and I'd really like to know which wire to plug in where. I moved the fuse a smidge but I can't move it much before the traces are off the edge of the board. I'm meeting my specified 2.5mm clearance, though. (Note: 2.5mm is the worst case specified creepage according tohttps://pcbdesign.smps.us/creepage.htmlfor up to 150VAC.)That said, pin-to-pin on the terminal is 8.255, andpin-to-pinwith the fuse is 8.07. I can get that trace-to-trace also by nudging the AC-N trace slightly "up and over" the fuse pad rather than straight across; is that worth doing, or is 2.5mm enough?Quote from: tooki on February 16, 2023, 12:30:04 amEh? Elsewhere I've seen the recommendation to use something rated for twice the expected current. I'm expecting a warm environment (so, thermal derating) and a few watts (possibly as high as 6W) for hours on end. The trip curves don't give me a lot of confidence that I can sustain Iholdfor hours. Plus, part of the point of this exercise is to make something that is ageneral purpose power supply, as in, I don'tknowwhat it's powering.If you're shoving a PTC on, say, a USB port, do you rate it for 50mA because you expect 99% of devices plugged in won't need more than that? Or do you rate it for 500mA because that's what the specification says,even thoughyou know 99% of devices plugged in won't draw anywhere near that?If the goal is to protect the downstream circuitry, it seems to me it would make much more sense to put that protection, oh...on the downstream circuit? Or at least to put one PTC on each of the outputs? (Of course I would then need to know how much each output is expected to supply...)Well. I suppose I can use a 60R160XF instead with the IRM-10-5, though it means I won't be able to use the 5V board to supply more than ~6W. Fortunately, that's the same form factor (at least in footprint) as a 60R110XF, which should be okay with the IRM-10-12 without limiting the board's ability to supply power....But realistically, I guess I'll look into putting PTCs on the downstream stuff (i.e.not on this board). Except the fans; shouldn't be much that can go wrong, there, and, well, they're fans. (Even if theyarelike $15 each.)Quote from: tooki on February 16, 2023, 12:30:04 amSee previous comment. Although, looking at the trip curves, it looks like a 0229.250MXP here should be fine. Fortunately, that's only a BOM change; thank you standard form factors!Quote from: tooki on February 16, 2023, 12:30:04 amDoes it come in 20A? Is there any other reason to use that other than one fewer exposed point of live current in something that's already drowning in points of exposed live current? (Seriously:disconnect power before servicing. This particular terminal block is somewhere in the middle in terms of "danger - exposed wiring". So far I'm resisting the urge to use spade terminals, as in T3sl4co1l's PSU, which would be a whole lot more convenient... or would youpreferI used those, with heat shrink over the ends?)

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 16, 2023, 10:04:59 pm
content: Quote from: tooki on February 16, 2023, 12:30:04 amAssuming the PSU is current limited, a fuse won't do anything at all, or at least it'll need a (potentially uselessly?) low melting energy so that it's blown by capacitive discharge (say, in event of a sudden short). But then almost any hot-plugging is liable to pop it.I wouldn't bother with output fusing at all, as the power level is small. Double-check the PSU datasheet of course to verify it has current limiting/protection. Usually they do hiccup mode.I would consider fusing if, for example, you had a 10A supply with <= 2A branch circuits, which should then be individually fused. A 10A SMPS should be able to muscle through such a fuse; don't expect output voltage to be maintained during a fuse-clearing event though, most likely the supply will brown out momentarily. So, if you need branches that are stable while others blow, consider using separate supplies -- or a larger one (probably 20A is enough to clear a 2A fuse without browning out?).(Conversely, this implies that, say for a 5A supply with nominal <= 2A branches, all the branches should be wired with 5A rated wire, since fusing is impractical/impossible in such a small margin.)A fuse on the primary is a wise idea. The module may be fused internally (again, check the datasheet) but you can always add more to be sure.Tim