Friday, September 19, 2008

PCB Tutorial part 2


Pad sizes, shapes and dimensions will depend not only upon the component you are using, but also the manufacturing process used to assemble the board, among other things. There are a whole slew of standards and theories behind pad sizes and layouts, and this will be explained later. Suffice it to say at this stage that your PCB package should come with a set of basic component libraries that will get you started. For all but the simplest boards though, you’ll have to modify these basic components to suit your purpose. Over time you will build up your own library of components suitable for various requirements.

There is an important parameter known as the pad/hole ratio. This is the ratio of the pad size to the hole size. Each manufacturer will have their own minimum specification for this. As a simple rule of thumb, the pad should be at least 1.8 times the diameter of the hole, or at least 0.5mm larger. This is to allow for alignment tolerances on the drill and the artwork on top and bottom layers. This ratio gets more important the smaller the pad and hole become, and is particularly relevant to vias.

There are some common practices used when it comes to generic component pads. Pads for leaded components like resistors, capacitors and diodes should be round, with around 70 thou diameter being common. Dual In Line (DIL) components like IC’s are better suited with oval shaped pads (60 thou high by 90-100 thou wide is common). Pin 1 of the chip sould always be a different pad shape, usually rectangular, and with the same dimensions as the other pins.

Most surface mount components use rectangular pads, although surface mount SO package ICs should use oval pads. Again, with pin 1 being rectangular. Other components that rely on pin numbering, like connectors and SIP resistor packs, should also follow the “rectangular pin 1” rule.

Octagonal pads are seldom used, and should generally be avoided. As a general rule, use circular or oval pads unless you need to use rectangular.


Vias connect the tracks from one side of your board to another, by way of a hole in your board. On all but cheap home made and low end commercial prototypes, vias are made with electrically plated holes, called PlatedThrough Holes (PTH). Plated through holes allow electrical connection between different layers on your board.

What is the difference between a via and a pad? Practically speaking there is no real difference, they are both just electrically plated holes. But there are differences when it comes to PCB design packages. Pads and Vias are, and should be, treated differently. You can globally edit them separately, and do some more advanced things to be discussed later. So don’t use a pad in place of a via, and vice-versa.

Holes in vias are usually a fair bit smaller than component pads, with 0.5-0.7mm being typical.
Using a via to connect two layers is commonly called “stitching”, as you are effectively electrically stitching both layers together, like threading a needle back and forth through material. Throw the term stitching a few times into a conversation and you’ll really sound like a PCB professional!

“Polygons” are available on many PCB packages. A polygon automatically fills in (or “floods”) a desired area with copper, which “flows” around other pads and tracks. They are very useful for laying down ground planes. Make sure you place polygons after you have placed all of your tacks and pads. Polygon can either be “solid” fills of copper, or “hatched” copper tracks in a crisscross fashion. Solid fills are preferred, hatched fills are basically a thing of the past.


Electrical clearances are an important requirement for all boards. Too tight a clearance between tracks and pads may lead to “hairline” shorts and other etching problems during the manufacturing process. These can be very hard to fault find once your board is assembled. Once again, don’t “push the limits” of your manufacturer unless you have to, stay above their recommended minimum spacing if at all possible.

At least 15 thou is a good clearance limit for basic through hole designs, with 10 thou or 8 thou being used for more dense surface mount layouts. If you go below this, it’s a good idea to consult with your PCB manufacturer first.

For 240V mains on PCB’s there are various legal requirements, and you’ll need to consult the relevant standards if you are doing this sort of work. As a rule of thumb, an absolute minimum of 8mm (315 thou) spacing should be allowed between 240V tracks and isolated signal tracks. Good design practice would dictate that you would have much larger clearances than this anyway.

For non-mains voltages, the IPC standard has a set of tables that define the clearance required for various voltages. A simplified table is shown here. The clearance will vary depending on whether the tracks are on an internal layers or the external surface. They also vary with the operational height of the board above sea level, due to the thinning of the atmosphere at high altitudes. Conformal coating also improves these figures for a given clearance, and this is often used on military spec PCBs.

Component Placement & Design

An old saying is that PCB design is 90% placement and 10% routing. Whilst the actual figures are of no importance, the concept that component placement is by far the most important aspect of laying out a board certainly holds true. Good component placement will make your layout job easier and give the best electrical performance. Bad component placement can turn your routing job into a nightmare and give poor electrical performance. It may even make your board unmanufacturable. So there is a lot to think about when placing components!

Every designer will have their own method of placing components, and if you gave the same circuit (no matter how simple) to 100 different experienced designers you’d get a 100 different PCB layouts every time. So there is no absolute right way to place your components. But there are quite a few basic rules which will help ease your routing, give you the best electrical performance, and simplify large and complex designs.

At this point it is a good idea to give you an idea of the basic steps required to go about laying out a complete board:
  1. Set your snap grid, visible grid, and default track/pad sizes.
  2. Throw down all the components onto the board.
  3. Divide and place your components into functional “building blocks” where possible.
  4. Identify layout critical tracks on your circuit and route them first.
  5. Place and route each building block separately, off the board.
  6. Move completed building blocks into position on your main board.
  7. Route the remaining signal and power connections between blocks.
  8. Do a general “tidy up” of the board.
  9. Do a Design Rule Check.
  10. Get someone to check it
This is by no means a be-all and end-all check list, it’s highly variable depending on many factors. But it is a good general guide to producing a professional first-class layout.

Lets look in more detail at the procedure described above.

We have already looked at the grids and track/pad sizes, these should be the first things that you set up before you start doing anything. No exceptions!

Many people like to jump straight into placing all the components into what they think is the most optimum position on the board, all in one hit. Whilst this can work for small circuits, you don’t have much of a hope when you have more complex circuits with hundreds of components spread across many functional circuit blocks. Why?, because it’s very easy to run out of “routing space”, which is the room to lay down all your tracks. If you fix all your component positions and then try to route everything, you can easily paint yourself into a corner so to speak.

Alternatively, if you space the components out too much, you can end up with a large board that does not make efficient use of space. The hallmark of an inexperienced designer is a board that has every component evenly spaced out, and then has thousands of tracks and vias crisscrossing the board. It might work, but it can be ugly and inefficient, not to mention bigger and more expensive to manufacture.

The best way to start your layout is to get ALL of your components onto the screen first. If you have a companion schematic package, then the simplest way to do this is to get your PCB program to import your schematic design and select all the components automatically. This will also be discussed later. If all you have is a PCB program, then you’ll have to select each component from the library and place them down manually.

With all the components on screen, you should get a good indication of whether or not your parts will easily fit onto the size (and shape) of board that you require. If it looks like it’s going to be a tight fit then you know that you will have to work hard to try and keep the component spacing “tight”, and the tracking as efficient as possible. If it looks like you have plenty of room then you can be a bit more liberal in your layout. Of course, if it looks like you have buckleys chance of getting your components on the board, you’ll have to go back to the drawing board.

Now analyse your schematic and determine which parts of the design can be broken up into “building blocks”. Often this is fairly obvious. Say for example you have a complex looking active filter in your circuit. This would typically have a single input line and a single output line, but it will have lots of components and connections as part of the filter. This is a classic “building block” circuit, and one that lends itself well to combining all of these parts together in the same location. So you would grab all of these parts and start to rearrange them into their own little layout off to one side of your board. Don’t worry too much about where the actual block goes on your board yet.

You will also need to partition off electrically sensitive parts of your design into bigger blocks. One major example is with mixed digital and analog circuits. Digital and analog just do not mix, and will need to be physically and electrically separated. Another example is with high frequency and high current circuits, they do not mix with low frequency and low current sensitive circuits. More about this later.

As a general rule, your components should be neatly lined up. Having ICs in the same direction, resistors in neat columns, polarised capacitors all around the same way, and connectors on the edge of the board. Don’t do this at the expense of having an electrically poor layout, or an overly big board though. Electrical parameters should always take precedence over nicely lined up components.

Symmetry is really nice in PCB design, it’s aesthetically pleasing and just “looks right”. If you have something like two identical building block circuits side by side, and one is laid out slightly differently, it sticks out like a sore thumb. If you have placed your components wisely, 90% of your work will be done. The last 10% should just be joining the dots so to speak. Well, not quite, but good placement is a good majority of your work done. Once you are happy with the component placements, you can start to route all the different building blocks separately. When finished, it is then often a simple matter to move and arrange the building blocks into the rest
of your design.

The Design Rule Check (DRC) will be covered later, but it is an essential step to ensuring that your board is correct before manufacture. A DRC basically checks for correct connectivity of our tracks, and for correct widths and clearances. Getting someone to check your board may sound like an overly bureaucratic process, but it really is a vital step.

No matter how experienced you are at PCB design, there will always be something you overlooked. A fresh pair of eyes and a different mindset will pick up problems you would never see. If you don’t have anyone to check your board over and don’t have DRC capability, then you’ll have to do it yourself. Get a printout of your schematic and a highlighter pen. Now, compare every single electrical “net” connection on your board with the schematic, net by net. Highlight each net on the schematic as you complete it. When you are finished, there should be no electrical connections left that aren’t highlighted. You can now be fairly confident that your board is electrically correct.

next part...

No comments:

Post a Comment