According to Pete - PCB Layout Tips and Tricks


Over the years, we at SparkFun have laid out hundreds - nay, thousands - of PCB designs. Over time, we have come up with many tips and tricks that help make our lives a bit easier. Some of them you may already know, but some may be new - so today, we wanted to share them with you in this episode of “According to Pete.”

As always, feel free to leave any suggestions or questions in the comments section below. We’d also love to hear any helpful tips or tricks you’ve discovered for PCB layout? Cheers!


Comments 46 comments

  • “This thing will oscillate like a thing that oscillates a lot” I got a kick out of that line.

  • Wait.. it’s a coffee stein? I’m gonna have to re-do that picture :x

  • Have you all considered posting transcripts for the old folks who prefer the written word over YouTube(and the folks who are at work and can’t play the video)?

    • Have you all considered posting transcripts

      They have, and what they are aiming for is some way for people to add transcriptions to videos - this would be especially useful for catering to different languages, since not everybody at SFE speaks Swahili. Unfortunately, YouTube itself is not set up for that sort of collaborative effort in a structure that works. You can find more information in this comment and the SparkFun Customer Survey Results You can find a github repository of According to Pete transcripts - which is currently almost empty, but by all means.. help fill it :)

      I have done transcripts for videos before (including a feature length documentary), and beside the timesink it is (even with assiste methods, e.g. Dragon) and associated cost if contracted out, some videos - like this one - have visual presentation that would simply not translate well to the written word. If you have ever watched a movie with ‘English for the hard of hearing’ captions turned on and smiled at the “[door closes]” caption, think also of the “[explosion]” that doesn’t quite capture whether that’s just a capacitor going pop or half a building being wiped out. In this case, “[a section of the board with the power supply components is presented in a corner of the board]” to accompany Pete’s statement of keeping things together, while keeping the power supply components out of the way of the actual meat of the board, is the type of thing that one the one hand is good information to know, but if you end up having to do that for everything, really tends to spiral out of control.

      In summary, this is a fairly general overview - don’t expect to learn completely about RF interference concerns (though it is touched on!) or differential traces, etc. In fact, no EDA is shown - it is largely abstracted on a whiteboard. It’s a good, and funny, video though.

      Here’s a small index of topics for those wanting to skip a bit, at least.

      • @02:10 - Mechanical prerequisites: Is there a shape the board has to be, location of switches/jacks, etc.
      • @03:58 - Copper: weight, layers, trace widths.
      • @06:10 - Trace shapes: Don’t use an auto-router (if you can help it), angle your traces.
      • @07:28 - Parts placement: signal chains, keeping related components - uC and crystal, decoupling caps - together.
      • @11:05 - Parts placement cont’d, Sectioning: Power supply, routing to components.
      • @16:57 - Parts placement cont’d, Schematic to board example: OpAmp.
      • @22:15 - Planes, DRC and return paths.
      • @26:39 - Aesthetics and labeling: Silkscreen.
      • @27:40 - Testing your prototype - current-limit your power supply, test your traces.
      • @28:50 - Wrapping up.
    • Dave Jones has a nice PCB design tutorial doc over at his alternatezone website: http://alternatezone.com/electronics/pcbdesign.htm.

    • +a million. You guys post a lot of interesting content, but I’m almost never able to view it. Between bandwidth and courtesy limitations on my commute, and time constraints everywhere else, I just can’t deal with videos. I can read much faster than anyone talks, not to mention being able to easily skip to the most relevant content and past gratuitous cutting. Yeah, I know, I’m a dinosaur. I do appreciate that you have some tutorials over on the learn site.

  • What size of vias should i use for X mil traces? How do I determine that? Im struggling with this one :/

  • Just a suggestion on the unused op amp. It should really be configured as a voltage buffer to assure you don’t drive the output to a rail and sink or source extra current. Even tying the inputs to ground is a bad idea since you will have the open loop gain times the input offset voltage. I almost never have an unused opamp, use it in your circuit! There are plenty of places you can use a buffer. Analog Devices has a full “app note'ish” response to this question. http://www.analog.com/static/imported-files/rarely_asked_questions/unused_op-Amp_article.html

  • I would like post a question for a future ATP. There are many kinds of opto-isolators, photo-diode, photo-transistor, FET, darlington pair, open collector… etc, there are some high linearity opto-isolators like the LOC11. Can you explain the advantages, pro/con for the different types of optos?

    -Thanks

    • I don’t use a lot of different kinds of opto-isolators, but perhaps I can offer something. Normally your first consideration is whether you’re isolating an analog or digital signal. Digital signals are not demanding about linearity, but they’re often more picky about timing. An ordinary opto is fairly slow, which isn’t good for a digital signal (but handy if you’re switching nixies, and want to minimize audible noise!). Different outputs need different kinds of circuitry as well. I often use a phototransistor output, to pull a signal high or low. It’s easy to use and reasonably fast. If I need something faster, I might use a photodiode, along with the support circuitry needed (more complicated than for a phototransistor). If I’m switching AC (like for a computer controlled light dimmer), I’ll use a triac output opto. The high linearity ones are a special case - they have one emitter and TWO (matched) receivers. The idea is to use the emitter and one receiver in a feedback loop. The feedback loop adjusts the drive to the LED to produce the desired voltage from the receiver and its associated circuitry. Then, if the other receiver is connected to equivalent circuitry, it will produce the same voltage. This is only useful for analog signals, and obviously requires more support circuitry. Another approach is to have a digitizer and send the digital version over the optical link - if you’re digitizing your analog signal anyway, this is often simpler. But if you need an isolated analog signal, and you want to preserve its linearity, the high-linearity optos are a lot simpler than digitizing it, isolating it, and then converting it back to analog.

  • Like you Pete. Hey! would loved to have you as my teacher when I got my electronics courses … But it is a good thing your not……. because you would would be about 95 years old today. ;) Seriously. I love the “According to Pete” vids. Keep them coming please! IMHO 3 things the most important in order to “realise” ourselfes… Learning, learning and learning. Thank you Pete! -Eric

  • Love Logan UT, great place! Oh and nice info.

  • @Pete, Thanks for the great video. I have been learning PCB layout over the last few years. You can see my work at friedcircuits.us. I had a quick question. When I do final routing it tends to break up the ground plane. It is okay or good practice to use vias to connect broken areas to the lower ground plane so that all the ground “sections” are connected somewhere?

    Thanks.

    • Yes, absolutely. Don’t leave anything “floating”.

      • Would affect the return path not being the most direct? What would be the side affects?

        I try really hard to stick with 2 layers PCBs and sometimes you have to get creative to have routing room. At least OSHPark allows for pretty small tolerances.

        Thanks for the info on VCC routing. I do a mix of hand routing and auto routing. Then if needed if redo some of the auto routed traces.

        • No, it wouldn’t be the most direct. But that’s better than no return path at all, right? As for the side affects, that depends. How much current do you expect? Is it a signal return (like do you expect the current to vary and at what frequencies)? Remember that the outcome is probabilistic: the worse the layout, the less likely it’s going to work as intended. Also, expect to inject a little stupid into your designs in order to achieve compromises. When laying out a circuit, it’s our job as designers to minimize the stupid. Complicated boards either get more stupid or more layers, but I ‘spose those aren’t mutually exclusive.

  • Thank you, thank you, thank you; Pete! Just what I was looking for -and unable to find anywhere else on the web.

    And you managed to pack 10 years of super-dry material into 30 minutes of entertaining geeky fun :) I tend to remember things much better when presented that way.

    Some areas that I wished for more coverage:

    • through holes (via) placement optimization and minimization (on 2 layer boards); Eagle router loves to shuffle through holes in between high current sot-23 MOSFETs
    • through holes (via) in general - especially when dealing with high current path (i.e. will a peak 2 amp flow blow a through hole?)
    • non Vcc/GND copper pour areas - huh?
    • wisdom/fallacy of routing heavy GND/VCC paths around edge of board
    • sensible QA or test points - how?
    • Dude-man, I think I’m going to address your questions in the next video. There’s enough to say about these topics that I didn’t want to type it all out, and they’re good questions.

  • One gotcha I really wished someone had told me about before: trace length matters. I knew that for high speed applications the delay due to trace length was not negligible (and thus you have to worry about matching trace lengths to avoid skew), but I wasn’t aware of the transmission line effects traces had over a certain length, which depends on the sharpness of your signal’s edges (and NOT its frequency). I made a PCB that had some pretty nasty ringing on a ~1 MHz signal just because of the high slew rate.

  • Point about using a meter to check for shorts. Use the ohm range, not the beep tester, as that can depending on the meter put 9V through the circuit

  • Thanks for the new video. But some sample design would be better than imagine that. ex. 4 blocks simple two layer circuit could be more educational. But still good for newbie’s like me :)

    • I had originally intended to do it like you suggest. But the more I got into it, that harder it looked like it was going to be to make that presentation work.

  • Say PETE! Does my rework of Sparkfun’s Simon Says code to include MAGIC! earn me a mug? :)

    Simon Says Magic! https://www.sparkfun.com/news/1206

    Thanks!

    PS. Super Video. Great info. Back in the old days I used to etch my own. Resist marker pens anyone? :)

    • Oh, you… I think we need to implement this going forward, not backward. Not (at all) that your efforts aren’t appreciated (because they are, HUGELY), but everybody back to 2003 will be coming out of the woodwork trying to get one for past work. And we don’t currently have enough mugs to support that. But I swear to whomever you wish, you’ll get one for the next thing you do. Damn. I really don’t want this to sound like “what have you done for me lately?” But there you are.

      • LOL.. Fair enough. I just wanted to plug my MAGIC! code anyway.
        Now Ill have to see what else I can make the Simon do. :) Thanks!

  • So…

    not like this… or this, then?

  • How much brandy was in that coffee Pete?

  • Pete - When starting the early layout of a board, one thing I think you should have put more focus on is that most boards are composed of sections; power, IO, processor, RF, etc. That should be literally be the first thing you explain: “all PCBs are composed of simpler sections.” As you are planning your layout, you want to keep those sections in mind, and place parts that are related closely, especially for anything operating at RF frequencies such as crystals, transmitters, receivers, etc. Often those sections have requirements which dictate their layout to some extent.

  • “Are you phoning home with that??”

    HAH

  • OH BABY! I’M ALL OVER THAT MUG!

  • Heya Pete, I have been doing circuit boards ever since i was 15 years old and had my own little etching station in my dads garage. After i received my BSEE, I was fortunate enough to have a mentor take me under his wing in my 20s and teach me the ropes of PCB design and that is my profession today. I know its technically not a big deal but still a major rule and I cringe every time I see all the acid traps on Sparkfun boards. They are everywhere. For anyone that doesn’t know what an acid trap is or why we call it an acid trap is, any trace going into a pad should be perpendicular to the pad or 90 degrees or larger on both sides of a trace in relation to the pad. coming out the corner of a square pad is ideal. The copper etching chemicals may either not get far enough into the crevice to remove all the copper and could potentially cause a short. when your dealing with parts the size of a grain of salt. that is where the issues occur. WRL-11777 (LED 0) is a good example of this. can i gets my mug? jk.

    • Just to clarify for others: when you think about it, acid traps are really an extension of the common ‘no 90° angles’ rule, when you accept that that rule is actually more like ‘no inner angles under 135° degrees’. An ‘acid trap’ type trace/trace or trace/pad-edge connection essentially violates that rule because typically one side is 135°, but the other is 45°. Coming out of the corner of a square pads makes both angles relative to the edges the trace touches 135°, hence why that is ideal.

      While it’s not so much an issue with fab-produced PCBs (manufacturing methods mean acid doesn’t really get trapped anymore - though it may still cause a practically negligible etch difference), I agree that they’re best avoided. Thankfully, they’re pretty easy to fix for pads, but for trace-trace connections you do have to perform some manual drawing of lines/polies when using Eagle, which in turn makes it a bit of a mess to deal with for revisions.

  • Good video…. Does SparkFun favor a particular PCB design tool ? Is it Eagle ?

    • Currently all of our design files are released in Eagle. Mostly I think we are all just stuck in our ways of using Eagle-I don’t know that I would necessarily call it ‘favoring’. Eventually, we would like to get an Open-source PCB editor, but that’s a huge undertaking and we haven’t found a program yet that really calls to us to start transferring everything into.

      • Make sure to keep up with KiCad. I’ve found it very powerful. It’s improved a lot since two years ago.

        • I wish that ORCAD had stayed around. It used to be really friendly to newbies. EMA has made it so damn expensive no student can afford to buy it and maintain the license.

  • Great video Pete. Honestly it covered much of what I already figured out, only you condensed into a few minutes what I learned by trial and error over about 20 years. Having never been “formally” trained in the subject, it is good to have some confirmation that I am on the right track. I started home brewing my own PCB’s, first with a Sharpie and photo-etch, then to printed transparencies, and finally on to Eagle and some of the low-volume quick turnaround fab houses, along with the great tutorials Sparkfun has provided.

    I would recommend this to anyone who is just getting started with PCB design. Eagle has lots of great tools to assist, but they don’t provide the common-sense methodology of the layout as you have done. Thanks for another excellent resource. -Rob

  • 360p is unwatchable :(

    • The quality is low right now because the video was just uploaded, and it takes a while for YouTube to fully process it. Check back in a few minutes and you’ll be able to watch it in full HD.


This Week

This Month

Heartbleed

Happy Arduino Day!

SXSW Create 2014