PCB Design "Best Practise"

Hello!

First off - I’m not an electronic engineer in any way shape or form. I am however, mucking around with Microcontrollers and would like to put a PCB together at some point. What I’m looking for (and cannot find, despite much googling) is a set of PCB design hints and tips/“best practise”. The kind of things I’m thinking of (some of which I know already) are:

  • What traces to put on which layer

    How to use ground planes

    Trace widths

    What size holes for different packages

    How to put mouting/fixing holes on a board

    etc etc


  • While I’m aware of some aspects of this (e.g. not having sharp turns in traces, routing traces to avoid necking), I’m just worried that there’s lots of stuf I don’t know!! Call it newbie’s anxiety to not screw up :slight_smile:

    Appreciate this isn’t a general electronics forum, but it looks like there’s a large number of people here who know their stuff!

    Look forward to any replies - who knows, maybe I’ll actually get a board in after Christmas - AFTER reading all your FAQs of course :slight_smile:

    Many thanks in advance and happy holidays!

    Cheers,

    Jon.

    This is my basic set of guidelines for doing my own PCB’s

    If predominantly through hole components then put the ground plane on the top layer, if predominantly surface mount then ground plane on the bottom

    I like trace widths for general signal traces to be 24mil or 32mil, power 50mil or more depending on the layout

    Eagle layout editor has its own packages with preset hole sizes for components and I don’t have to worry about deciding on them, if I know that the hole will be too small then placing a via on the pad with the bigger correct hole size is a quick and nasty fix but I rarely have ever done that

    With micro’s have the crystal placement and traces as tight as possible, manually route ground returns from the crystal capacitors back to the ground pin on the micro and not to the ground plane

    Board mounting holes, just one in the 4 corners usually is fine, but for most things I like to have the board the correct width to run on PCB rails in cases so that it just slides in and there are not mounting holes

    General layout is to put parts close together so that there are the shortest tracks between them possible, any wires coming into/out of the board will be connected to headers for easy removal

    Know your circuit, know where the currents flow and keep the current loops as short as possible, don’t have sensitive portions of the circuit polluted with noise from other sections

    There is a real art to pcb layout, never rush anything and get it right first time, slowly build up sections at a time and you’ll continually rearrange parts along the way and even if you think you have finished, stare at it for a few more minutes and you’ll always find parts you could tweak into better spots and once it is tweaked to the max you’ll be at the point where if you move a single part it will wreak the whole harmony of the layout, that is about the point where you know you are done

    Thanks!

    That’s exactly the kind of info I was looking for!

    Having seen a few references on this forum, I think I’m going to treat myself to Al Williams’ book in the new year - and hopefully that’ll get me going!

    Thanks again!

    Jon.

    Lots of good info from dakiller.

    First, one slight quibble - 24 mil is massively wide. I use that for power traces. For width needs, look here - http://www.geocities.com/CapeCanaveral/ … eWidth.htm Figure the amount of current you need to carry, double it and then figure out the trace width based on that. For signals, I use 10 or 12 mil. For long runs, maybe 16 mil. There’s a suprising amount of capacity in copper traces. A 16 mil, 1 oz thick copper on an external layer, runing 3 inches can carry 1 amp with minimal heating (5 deg C) though you’d probably want something like 24 or 32 mil for that kind of current.

    Keep power supply isolated from the rest of your circuits. especially for unregulated stuff (like that big ol’ filter cap). double that for AC.

    keep analog away from everything. digital signals create lots of high frequency noise that can make a mess of analog…

    put ground rings around crystals. Not always possible, but the more ground copper you have around the crystal leads, the better.

    bypass bypass bypass. also, make sure the ground connection between the chip and cap isn’t long.

    avoid long parallel signal runs.

    avoid isolated copper areas as that can lead to inductive coupling.

    keep your ground connections “short”. ideally, you would have a single plane dedicated to ground but on a 2 layer board, that’s not exactly convenient. The thing to avoid is long ground loops that create differential voltage levels. Though, with a small lower speed board its not so much of an issue. What I do is try to make a single sided design with the other side a (mostly) ground plane. A few traces won’t kill you.

    I’m sure others will disagree with me but I never use the autorouter. Laying out by hand is the only way get a decent board. Autorouters will do really stupid things that might be ok for a LM555 circuit but not for a 20 mhz PIC with analog coming in and a wall wart power supply. It’s not as bad as you would think - do it a couple of times and you discover it’s suprisingly easy.

    Philba:
    I’m sure others will disagree with me but I never use the autorouter. Laying out by hand is the only way get a decent board. Autorouters will do really stupid things that might be ok for a LM555 circuit but not for a 20 mhz PIC with analog coming in and a wall wart power supply. It’s not as bad as you would think - do it a couple of times and you discover it’s suprisingly easy.

    That is one thing I missed out, Never use the Autorouter!

    I don’t know how it is done in other software but in eagle, I lay out the pcb at the same time as drawing the schematic, put a few parts in, switch to the board and place them where they should go and start on the traces between them, you get so much better result then being dumped with a load of parts and nets after drawing the whole schematic and not knowing what should go where

    With PCB traces, I probably do use ones that are on the thick side but I’ve been use to designing for wider tolerance PCB houses or home made ones, I probably could cut down on it

    for toner transfer, I use 12 mil lines and have no problem (ok, most of the time, lol). I can usually get by with 10 mil but I sometimes have to etch a little extra long for some pesky section of the board and that puts the 10 mil lines at risk. I have to admit, I’ve done a lot of TT boards and have gotten pretty good at it. I like 12 mil because I can still put one between 100 mil pitch pads - 16 mil gets a bit dicey and 24 is a no-go.

    On the autorouter, its such a terrible crutch. people want to believe it will do the hard part of the job for them. In the end, they wind up with a mess. The funny thing is it’s just not that hard once you manually route a few boards. I think placement of the components is the hardest task - good placement gets you a very routable board. Bad placement gets you nothing but grief…

    Great! All very helpful - thanks!

    Should a ground plane cover all of the board, or only portions? How would this be affected by having both analog and digital signals on the board?

    Just to give an idea on what the board is for, it’s basically a PCB for an AVR-based robot controller board. Nothing fantastically amazing or different there - pin headers for all the MCU pins, pin header connections to the AVR’s on-board ADC from various sensors, 16MHz crystal & appropriate capacitors, PWM control of servos etc etc.

    And yes - I’m not going anywhere near the autorouter. I’ve routed a couple of single-sided boards before, so know that it isn’t as bad as it looks! (And this one will be double-sided!)

    Thanks once again!

    Jon.

    Ideally, a ground plane covers an entire layer, usually an inner one. But you can get a lot of the benefit by making all the unused areas on your pcb as copper ground. In eagle, I draw a rectangle on the entire top and bottom and name them GND. Eagle takes away the GND area where the traces are. Here is an example http://www.geocities.com/pcbs4less/toplayer.gif

    A lot of the manufacturers have good application notes for things like this.

    I came across this application note a few days ago and found it very interesting:

    High-Speed DSP Systems Design - http://focus.ti.com/lit/ug/spru889/spru889.pdf

    (it’s not only for DSPs - lots of good info in there)

    dakiller:
    That is one thing I missed out, Never use the Autorouter!

    I don’t know how it is done in other software but in eagle, I lay out the pcb at the same time as drawing the schematic, put a few parts in, switch to the board and place them where they should go and start on the traces between them, you get so much better result then being dumped with a load of parts and nets after drawing the whole schematic and not knowing what should go where

    Protel’s Autorouter is quite good. We’ve started using at work when we moved from 99SE to DXP. It’s embarrassed a few of the designers by producing neater routing in less time than they do.

    That said, it usually still needs a few tweaks and fix ups, and you must spend the time to properly definethe routing rules.

    When routing the board, it helps if the shortest tracks are routed first.

    Leon

    Philba:
    Ideally, a ground plane covers an entire layer, usually an inner one. But you can get a lot of the benefit by making all the unused areas on your pcb as copper ground. In eagle, I draw a rectangle on the entire top and bottom and name them GND. Eagle takes away the GND area where the traces are. Here is an example http://www.geocities.com/pcbs4less/toplayer.gif

    Hello,

    I tried your method but cannot find any way to name a rectangle in Eagle. I can draw and name a polygon but then cannt bet Eagle to leave cut outs around it for the same layer traces. Advice?

    John

    Sorry, I meant to say polygon. You can’t name a rectangle - polygon is the right way to do it.

    after you have layed a trace down, hit the “ratsnest” button and it will do what you want. I’d also suggest you use change (wrench looking icon) to set isolation to something like 12-16 mils.

    Don’t fight eagle, there is usually a way to do almost everything you want though it will be a bit obscure. Realize that if you think windows with eagle, you will almost certainly be wrong…

    By the way, the Al Williams book on making pcbs at home (I think that’s the title) is a great resource for learning eagle.

    Philba:
    By the way, the Al Williams book on making pcbs at home (I think that’s the title) is a great resource for learning eagle.

    I agree, this book (__*Build Your Own Printed Circuit Board*__) is a great resource. Two other great resources:
  • - [[EAGLE Tutorial](ftp://ftp.cadsoft.de/eagle/program/4.16/tutorial-eng.pdf)
  • - [[EAGLE Manual](ftp://ftp.cadsoft.de/eagle/program/4.16/manual-eng.pdf)
  • [/list]Don](ftp://ftp.cadsoft.de/eagle/program/4.16/manual-eng.pdf)](ftp://ftp.cadsoft.de/eagle/program/4.16/tutorial-eng.pdf)