Roast my board - Page 1
Forum section: electronics / general

author: aheid
author_rank: Regular Contributor
timestamp: February 28, 2019, 12:41:12 am
content: So this is my very first stab at laying out a PCB, in KiCad. Decided to do something small which might possibly be useful to me. It's a two-channel active low-pass board, for ADC buffering and similar. Went with 0802 so I could easily hand-solder.So, since I have no idea what I'm doing, what's the verdict?,or?

author: HalFET
author_rank: Frequent Contributor
timestamp: February 28, 2019, 01:02:40 am
content: Looks great for a first go at it, no remarks on the second order low pass filter. Personally I like to add a resistor to the capacitor for the second order bit, but that's not really a concern here I think. And I presume you tested the filter on a breadboard or deadbug style anyway?The layout looks nice, my only remark is the position of the via above the C6 on the silk screen. If you put the via underneath the IC you can connect C6 directly to the ground plane which is a bit nicer. Not that it really matters at these frequencies.

author: aheid
author_rank: Regular Contributor
timestamp: February 28, 2019, 01:07:36 am
content: Awesome, thanks! Good to know I didn't completely mess it upI haven't actually tested the circuit yet on a protoboard, but I'll do that before I order any PCBsWas unsure if vias under the IC was yay or nay, good to know. I'll put it there then.

author: grbk
author_rank: Contributor
timestamp: February 28, 2019, 01:15:19 am
content: Looks pretty good, especially for a first board. If it were me, I'd make two changes:- you can get those two traces on the bottom side onto the top side pretty easily. They'll be slightly longer, but it's a tiny board and low frequency so no worries there. The benefit is you now have an unbroken bottom plane, apart from your VCC vias and the header. No vias on those traces either.- I'd make your bottom plane ground and put VCC on top. Or even make VCC just a trace on top, and flood the rest of the top with ground. Generally a solid ground plane is more critical than a VCC plane. If you have ground on top and bottom, some vias connecting top and bottom wouldn't hurt, but again it's a small board and low frequency so it probably won't make a big difference.

author: aheid
author_rank: Regular Contributor
timestamp: February 28, 2019, 02:03:49 am
content: Thanks for the feedback!So when would you prefer a separate VCC plane vs double-ground? Higher current and/or lots of VCC connections?Here's a variation with double ground planes. Better, worse, stupid?edit: maybe via overkill. I nuked the top left and top right via.

author: HalFET
author_rank: Frequent Contributor
timestamp: February 28, 2019, 11:22:32 am
content: Have you considered turning C5 and C6?And the case of multiple ground planes versus each power rail on its own plane is a bit of a tricky discussion. For this type of application it doesn't matter at all. Where it starts to matter is if you have power hungry devices (i.e. FPGAs), then a low impedance power plane is a godsend, it makes decoupling so much easier. Additionally, the capacitance between the large parallel planes can help suppress some of the small high frequency switching transients I think? On the other hand, in precision applications you really want fine control over the path the current takes and avoid possible current loops, so then you might not use any plane at all. I think a full ground plane on every layer is mostly common in the RF business, though don't cite me on that.It's really a question of which performance aspect is important. There are also mechanical reasons for selecting certain fill patterns to avoid board deformation during reflow soldering and high temperature lamination steps. The mechanical aspects I can help you with, the details of the electrical aspects I'll leave to one of the long grey bearded circuit gurus here!

author: aheid
author_rank: Regular Contributor
timestamp: February 28, 2019, 11:51:00 am
content: Quote from: HalFET on February 28, 2019, 11:22:32 amYou mean a 90 deg turn? I did actually though about giving it a whirl when I get back home.Thanks for info on planes. Next project will be a stm32 dev board thing, so will probably matter a bit more there.

author: aheid
author_rank: Regular Contributor
timestamp: February 28, 2019, 01:52:59 pm
content: Quote from: HalFET on February 28, 2019, 01:02:40 amForgot to ask about this. Could you shed a bit more detail about what resistor where?

author: HalFET
author_rank: Frequent Contributor
timestamp: February 28, 2019, 02:15:03 pm
content: Quote from: aheid on February 28, 2019, 01:52:59 pmIt's not really an issue here, that's why I didn't elaborate on it. Personally I just like adding a resistor in parallel or series with the capacitor whenever I put a capacitive load on an opamp to have an exact control over the phase shift and bandwidth.

author: aheid
author_rank: Regular Contributor
timestamp: February 28, 2019, 10:05:01 pm
content: Made a version incorporating the suggestions so far.edit: Forgot, wanted to ask about via size, default in KiCad is 0.8/0.4 mm, is that ok or something else preferable?

author: bson
author_rank: Unknown
timestamp: February 28, 2019, 10:19:14 pm
content: Use power nodes rather than global labels for GND, Vcc. (That's the P key in KiCad.)It looks like you only connect Vcc to two points. I'd pour GND on both sides and stitch them, then run a 30 mil trace along the PCB perimeter for Vcc. You can also swap GND,Vcc on the connector to bring Vcc closer to the bottom edge. Since the op amp supply is decoupled it doesn't benefit as much as GND from being poured - the shortest high frequency impedance will be to the decoupling cap(s). Do try to place the cap(s) along the supply trace however.The traces on the bottom can be run on the top separated by ground pour so you don't have two traces running the same direction on top of one another. This would give you a solid GND bottom side. Instead of crossing signals, swap their positions on the connector since you're at liberty to do so.Further optimizations (that are easily quantifiable): reduce overall trace length. This might be possible for example by moving the connector to a different edge. Reduce the number of segments (shown at the bottom in KiCad). Do a "Cleanup tracks and vias" (under the Edit menu) to consolidate small bits and pieces and remove redundant editing artifacts (it happens), and see how many segments you have. Then try to reduce the number of bends to reduce the number of segments; while not hugely important in itself, this is a good habit since on more complex boards it often reveals simplifications that might not be immediately obvious. Just a good habit, and one that's easy to pursue "by the numbers."

author: aheid
author_rank: Regular Contributor
timestamp: February 28, 2019, 11:18:06 pm
content: Thanks for the feedback bson.I made an alternate version based on your suggestions, was it something like this you had in mind or did I completely miss the plot? Bottom layer is all gnd.edit: noticed opamp was out of alignment, moved it down slightly, got somewhat better track layout as a result (I think). Updated images.

author: aheid
author_rank: Regular Contributor
timestamp: February 28, 2019, 11:49:33 pm
content: Rotated the filter passives, looks a bit cleaner to me, got the segment count down as you mentioned.But worried about the via by the opamp gnd pin, is that ok or no-go?

author: HalFET
author_rank: Frequent Contributor
timestamp: February 28, 2019, 11:54:45 pm
content: That via is indeed a no-go, very likely to form solder bridges. You could shift the component upwards a bit, it'll look less pretty but then any short would be on the same net.

author: aheid
author_rank: Regular Contributor
timestamp: March 01, 2019, 12:03:52 am
content: Gut feeling was right thenI moved the passives to the left a bit, is it enough?Tiny board, great learning experience so far, that's for sure...

author: Kasper
author_rank: Frequent Contributor
timestamp: March 01, 2019, 05:48:08 am
content: Out 1 and 2:Tracks under IC go much closer to other pins of IC than needed.When connecting adjacent IC pins, if space permits, I like to route a track from each pin and connect them outside the IC, slightly away from the pins. Makes it easier to mod if say you decide to add a resistor between them. Also it is more likely to get a bridge between those IC pins and though it might not matter, since the pins are supposed to be connected anyways, your production people might not know that and waste time trying to fix the solder bridge. Those are of course the hardest bridges to remove.Vcc:Remove the track along the top. Keep the one on the bottom, it is in good order from connector to caps to IC.Try to minimize the impedance between C5, C6 and IC. Vcc side of those caps is good. Gnd side of those caps is ok but there are 2 vias in series inbetween caps and IC gnd pin. That adds impedance. More vias in parallel with them would help reduce it and help those filter caps do their job.Board dimensions:Use less decimal points in your board dimensions. You are implying you want it very precisely manufactured.

author: forrestc
author_rank: Unknown
timestamp: March 01, 2019, 08:34:44 am
content: So, my optimizations are about connector pinning, and probably some of my personal preference (not all of them are necessarily better, just more like what I would experiment with next).If you're willing to swap the ins and the outs, and rotate a couple of components, your ground plane can be contiguous across the middle of the board and you could arguably turn this into a 1 sided PCB, especially if you move the GND pin to the center. You'd end up rotating C2 180* and routing the out1 signal along the outside of the board. On the other half of the circuit, you'd rotate C4 180* and C3 180*. I personally would probably rotate R1 and R3 90 degrees as well just for cleaner signal flow, so from the input pin it goes in a straight line through R1, and onto the now bottom side of C2 and R2. Then the signal would proceed out the top of R2 and across the top of C1 and into the input pin. By doing this you also provide a clean signal path out of Pin1 of C2 toward the output pin since R1 is now rotated out of the escape path.If you're willing to separate power VCC/power Ground off to a separate 2 pin connector on the right hand side of the board then you can eliminate the VCC trace around the edge of the board and fill the entire thing with GND. You'll still want to leave a signal GND over with the signal ins and out. This would help isolate any power supply noise from the signal traces since the signal ground path into the opamp would be largely away from the signals.And one final suggestion you can definitely take or leave since I'm not sure if it's better in this case or not.... I've always found hooking something like this up is easier if each signal and each power pin has a dedicated ground pin. I personally would likely use a 2x4 header for this with each signal paired with a ground next to it, but I also tend to use smaller header pad sizes and tighter fill clearances so that my ground can get around the signal pins in a header - and I'm not saying this is a good thing, just a different thing. Another possible option would be to use two 2x2 headers separated with enough clearance that the ground can escape. If you're using 0.1 pitch headers, it's useful for the separation to be exactly 0.2" pin to pin so that you could span a 2x5 connector across them - I guess that applies no matter what the pitch, of course with different spacing to match the pitch. Of course another option (other than to leave it as it is) to add more pins in the same row, but that would quickly exceed your board size.

author: Mattylad
author_rank: Regular Contributor
timestamp: March 03, 2019, 09:43:46 pm
content: How are you mounting this board?You only have 1 hole, which I certainly would not use on a metal standoff nor use a screw directly on top without a fibre washer being used.Also why have you got the VCC going in a ring around the board like that? Just get rid of the bit that goes over the top and feed the IC via the caps as the bottom VCC track does.Moving the ground connection to be next to the vcc one would IMO be better.Add a few more vias, where the top gnd sticks out, pin it through to the bottom.