PCB Design- Rules tips and tricks

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, luketeaford, Joe., lisa

Post Reply
User avatar
Maco
Wiggling with Experience
Posts: 307
Joined: Thu Jan 16, 2014 1:38 pm
Location: here and there

PCB Design- Rules tips and tricks

Post by Maco » Tue Dec 15, 2015 6:26 pm

Hey wigglers I start learning PCB design and I search for some topics but mostly are vague or have 1 or 2 points, I would like to get a sticky topic so please share your thoughs and rules tips and tricks.


Here is what I found so far:
Paul's Everything you need to know about PCBs
==============================

1) use 12mil lines and 12mil spacing for signals.
2) use 25mil lines for power as a minimum. 50mil is best
3) for standard parts like caps, resistors and ICs use 60mil pads with 40mil holes
4) for the vias (to transfer the trace from 1 side to the other) use 40mil pads with 18mil holes
5) for resistors and axial ceramic caps use 400mil pad-to-pad spacing
6) for radial/film caps use 200mil pad-to-pad spacing

1mil = 0.001inch so 60mil = 0.060in

Note: when I say pad-to-pad it's really "hole-to-hole" but I'm using standard nomenclature. You want the resistor leads bent on 400mil spacings and 95% of caps used for filters are 5mm = 200mil spacing.
Clee
Overall looks ok. Just a couple suggestions.

Personally for analog circuits I don't run traces between IC pins. I'll run them up under the chip but not between the pins. Also, I like to come off the IC pin at a right angle, even if for only a short distance.

You don't have any bypass caps. Add a 100n cap to ground on each IC power pin as close to the pin as possible.

If the pots are off-board create pads for them. That way they don't have to be laid out as a trimmer footprint. That will free up your layout.

If you're using the ground plane as the actual signal ground make sure there are no unconnected islands.

The Big Ear wrote:
Why is it so important to have the caps as close as possible to the IC?


The bypass caps control (or try to) the noise on the power traces. The cap will filter noise on the trace before it gets to the ICs power pin, and will also filter noise created by an IC before it gets to the power trace.

Your CMOS chip is going to generate spikes on the power line as it switches, like when you flush the toilet and your wife is taking a shower... she yells. You want to put a capacitor close to the pin to keep that noise from getting to other components. Not the most technical explanation, but you get the idea.
andreF
It is quite a mental exercise, but once I get started on a design it is totally addictive. Recently one layout took me 3 months to complete Dead Banana just couldn't stop fussing over it, but it all worked when i built it so nanners

Usually I place chips and route power rails and ground 1st.
Once first draft is finished, I spend at least a few sessions refining the design, moving components to better positions, thickening up traces wherever appropriate.

When I think I am done i print out the schematic and check the PCB against it and mark off the schematic with a red pen to ensure every connection is correct. Then check all the pos, neg and ground connections are done and all route back to the power pins.
Knobhell
Always work from a schematic.

Build your prototype first

Make corrections to your prototype

Prototype with the actual production parts

Layout you pcb from the final schematic

Check spacing using production parts

Double check everything, and agin.

P.s. always work from an accurate schematic
JRock
Centralize everything off the Power Bus as much as you can. There's always exceptions, but that's a good place to start.

Strategically place resistors, diodes, caps, etc. so you can run traces in between the leads.

Don't hesitate to drag the pads to where you need them. Metal Bends! thumbs up

Jumpers, Jumpers, Jumpers!!!

Leave yourself a little space while you're laying the circuit blocks out. You can pull them closer after you optimize their placement.

Don't be afraid to rip stuff up and move it around. That's what the SaveAs is for. hihi
Lizlarsen
Routing traces manually is way way easier than dealing with the autorouter in my opinion! Just have a plan going in, and break it up into little chunks. You've got a pretty densely packed board there, and thru-hole means that routing can be more difficult. Set things to a 10mil grid and do 10mil traces, don't be afraid to get them right up next to each other or use small vias. Try to have bottom-side traces go one way, and top-side traces the other way.

Usually I construct little circuit blocks as densely as my DRC will allow, route them independently, then place them on the PCB, route power, and then connect the blocks to each other. That's going to be difficult with thru-hole on this layout I bet. 56 traces goes by extremely fast. You can hide power and ground connections in eagle by entering the command "ratsnest ! gnd +12v -12v", etc. and then do the same (minus the ! symbol) when you want to show them again.

If you're finding it extremely difficult or impossible to squeeze your layout onto this board, you might want to go to a second PCB, and use 0.1" headers to connect the boards.
expresspcb.com
Placing Components

Generally, it is best to place parts only on the top side of the board.

When placing components, make sure that the snap-to-grid is turned on. Usually, a value of 0.050″ for the snap grid is best for this job.

First place all the components that need to be in specific locations. This includes connectors, switches, LEDs, mounting holes, heat sinks or any other item that mounts to an external location.

Give careful thought when placing component to minimize trace lengths. Put parts next to each other that connect to each other. Doing a good job here will make laying the traces much easier.

Arrange ICs in only one or two orientations: up or down, and, right or left. Align each IC so that pin one is in the same place for each orientation, usually on the top or left sides.

Position polarized parts (i.e. diodes, and electrolytic caps) with the positive leads all having the same orientation. Also use a square pad to mark the positive leads of these components.

You will save a lot of time by leaving generous space between ICs for traces. Frequently the beginner runs out of room when routing traces. Leave 0.350″ – 0.500″ between ICs, for large ICs allow even more.

Parts not found in the component library can be made by placing a series of individual pads and then grouping them together. Place one pad for each lead of the component. It is very important to measure the pin spacing and pin diameters as accurately as possible. Typically, dial or digital calipers are used for this job.

After placing all the components, print out a copy of the layout. Place each component on top of the layout. Check to insure that you have allowed enough space for every part to rest without touching each other.

Placing Power and Ground Traces

AftPCB2er the components are placed, the next step is to lay the power and ground traces. It is essential when working with ICs to have solid power and ground lines, using wide traces that connect to common rails for each supply. It is very important to avoid snaking or daisy chaining the power lines from part-to-part.

One common configuration is shown below. The bottom layer of the PC board includes a “filled” ground plane. Large traces feeding from a single rail are used for the positive supply.

Placing Signal Traces

When placing traces, it is always a good practice to make them as short and direct as possible.

Use vias (also called feed-through holes) to move signals from one layer to the other. A via is a pad with a plated-through hole.

Generally, the best strategy is to lay out a board with vertical traces on one side and horizontal traces on the other. Add via where needed to connect a horizontal trace to a vertical trace on the opposite side.

A good trace width for low current digital and analog signals is 0.010″.

Traces that carry significant current should be wider than signal traces. The table below gives rough guidelines of how wide to make a trace for a given amount of current.

0.010″ 0.3 Amps
0.015″ 0.4 Amps
0.020″ 0.7 Amps
0.025″ 1.0 Amps
0.050″ 2.0 Amps
0.100″ 4.0 Amps
0.150″ 6.0 Amps


When placing a trace, it is very important to think about the space between the trace and any adjacent traces or pads. You want to make sure that there is a minimum gap of 0.007″ between items, 0.010″ is better. Leaving less blank space runs the risk of a short developing in the board manufacturing process. It is also necessary to leave larger gaps when working with high voltage.

When routing traces, it is best to have the snap-to-grid turned on. Setting the snap grid spacing to 0.050″ often works well. Changing to a value of 0.025″ can be helpful when trying to work as densely as possible. Turning off the snap feature may be necessary when connecting to parts that have unusual pin spacing.

It is a common practice to restrict the direction that traces run to horizontal, vertical, or 45 degree angles.

When placing narrow traces, 0.012″ or less, avoid sharp right angle turns. The problem here is that in the board manufacturing process, the outside corner can be etched a little more narrow. The solution is to use two 45 degree bends with a short leg in between.

It is a good idea to place text on the top layer of your board, such as a product or company name. Text on the top layer can be helpful to insure that there is no confusion as to which layer is which when the board is manufactured.

Checking Your Work

After all the traces are placed, it is best to double check the routing of every signal to verify that nothing is missing or incorrectly wired. Do this by running through your schematic, one wire at a time. Carefully follow the path of each trace on your PC layout to verify that it is the same as on your schematic. After each trace is confirmed, mark that signal on the schematic with a yellow highlighter.

Inspect your layout, both top and bottom, to insure that the gap between every item (pad to pad, pad to trace, trace to trace) is 0.007″ or greater. Use the Pad Information tool to determine the diameters of pads that make up a component.

Check for missing vias. ExpressPCB will automatically insert a via when changing layers as a series of traces are placed. Users often forget that via are not automatically inserted otherwise. For example, when beginning a new trace, a via is never inserted. An easy way to check for missing via is to first print the top layer, then print the bottom. Visually inspect each side for traces that don’t connect to anything. When a missing via is found, insert one. Do this by clicking on the Pad in the side toolbar; select a via (0.056″ round via is often a good choice) from the drop down listbox, and click on the layout where the via is missing.

Check for traces that cross each other. This is easily done by inspecting a printout of each layer.

Metal components such as heat sinks, crystals, switches, batteries and connectors can cause shorts if they are placed over traces on the top layer. Inspect for these shorts by placing all the metal components on a printout of the top layer. Then look for traces that run below the metal components.

User avatar
pascualfuentes
Learning to Wiggle
Posts: 45
Joined: Mon Nov 02, 2015 3:09 pm

Post by pascualfuentes » Tue Dec 15, 2015 7:58 pm

wow this is great! much thanks! :sb:

User avatar
TripJ
Common Wiggler
Posts: 122
Joined: Thu Aug 27, 2015 12:33 am
Location: VA

Post by TripJ » Wed Dec 16, 2015 7:06 am

Thanks, great idea to consolidate best practices!

User avatar
medbot
Veteran Wiggler
Posts: 702
Joined: Mon Oct 28, 2013 2:44 am
Location: TX

Post by medbot » Thu Dec 17, 2015 2:00 am

I was just thinking about learning how to do this and then you post a great collection of tips. Thanks!

User avatar
raveboyy
Veteran Wiggler
Posts: 700
Joined: Sat Mar 15, 2014 3:45 am
Location: Brno, Czech republic, Europe

Post by raveboyy » Thu Dec 17, 2015 2:32 am

When etching boards at home and using toner transfer method you can also toner transfer the parts layout on the top side of the boards (print the legend mirrored!). It is one step more but the board looks more professional and it is harder to make a mistake when placing components..

User avatar
FetidEye
demonic space drone
Posts: 2152
Joined: Mon Dec 06, 2010 5:00 pm
Location: Red Zone
Contact:

Post by FetidEye » Thu Dec 17, 2015 4:59 am

my tips :

no 90 degree corners for the traces. make 'm 45 degrees with the 'miter' tool. (eagle)

when making a pcb for beginners to build, use bigger than standard pads.
(you can make custom parts or enlarge the existing part with right click and then 'open package' / eagle)
it is way easier to solder those, so there is less risk that (example) transistors get too hot.

a ground plane is pretty handy.

use r1 / c23 type codes for your parts (instead of the part value). This way you can alter values later without having the wrong info on you pcb.

make enough ground pads for connecting pots and jacks.

print the name of the project + a version number on the pcb

if you have room left, make a 'muck' area for mods and experimental additions.

User avatar
ac
Common Wiggler
Posts: 155
Joined: Mon Mar 10, 2014 8:51 pm
Location: Brooklyn, NY

Post by ac » Thu Dec 17, 2015 4:43 pm

Thank you for this! I just made my first couple of boards by doing a little bit of guessing with regard to tolerances and everything has worked fine, but this thread will be of great help for the next one.

User avatar
emmaker
Veteran Wiggler
Posts: 743
Joined: Sat Mar 10, 2012 5:07 pm
Location: PDX

Post by emmaker » Thu Dec 17, 2015 7:08 pm

There are some good ideas here. I work mostly for electronics companies and there are a few things that drive me f'n bonkers in synth DIY which are addressed in the thread.

1) Provide accurate schematics and use those for the board. It's funny seeing the threads on fixing something without schematics, they go on and on and become unbearable.

2) Put the part designators (Ux, Rx, Cx) on the board not the part values. Part values can change and it's hard to figure out which 100K on the board relates to R42 in the schematic.

3) Get the parts/data sheets and look to make sure the parts fit what you are doing on the board. You don't want a timing or filter cap sitting off the board with its leads acting as antennas.

4) When using bypass caps always draw current thru the cap. What I mean by this is it should go power -> cap -> load and not power -> load -> cap. While in a lot of cases for the frequencies we're working with this will work but it won't be optimal. I always view doing stuff correct even if you don't need to as a good habit to get into. That way you don't have to think about doing it correctly you just do it.

5) Unless you really know how to do ground planes don't do them. Again frequency is a factor here and for the synth stuff it's pretty low. Ground planes can bite you big time if you aren't careful by limiting current or providing cross talk. If you are wandering into the digital domain with microcomputers and converters take the time and read the data sheets. Most of those will have 'layout considerations' or demo boards to get ideas from.

6) This is a nit for me, some people might find it OK. Don't mount resistors vertically. If the resistors are mounted vertically they can get bumped/hit and broken or the leads could be shorted together. If you're going to do that just use 0805 or 1206 SMD parts. For me they are way easier to deal with than mounting a resistor vertically.

User avatar
raveboyy
Veteran Wiggler
Posts: 700
Joined: Sat Mar 15, 2014 3:45 am
Location: Brno, Czech republic, Europe

Post by raveboyy » Fri Dec 18, 2015 2:07 am

4) When using bypass caps always draw current thru the cap. What I mean by this is it should go power -> cap -> load and not power -> load -> cap.
What would be the best placement of the caps? In reality is there any difference between examples 2 & 3?
You do not have the required permissions to view the files attached to this post.

User avatar
emmaker
Veteran Wiggler
Posts: 743
Joined: Sat Mar 10, 2012 5:07 pm
Location: PDX

Post by emmaker » Fri Dec 18, 2015 5:35 pm

raveboyy:

Not on the negative side, but on the positive side there will be. In example 3 the cap is after the load.

But for audio frequencies and currents you probably won't have problems. Start getting into high frequencies (1 MHz+) and higher current then issues could come up.

User avatar
raveboyy
Veteran Wiggler
Posts: 700
Joined: Sat Mar 15, 2014 3:45 am
Location: Brno, Czech republic, Europe

Post by raveboyy » Sat Dec 19, 2015 10:06 am

emmaker wrote:raveboyy:

Not on the negative side, but on the positive side there will be. In example 3 the cap is after the load.

But for audio frequencies and currents you probably won't have problems. Start getting into high frequencies (1 MHz+) and higher current then issues could come up.
Yes I understand that the cap is after the load, but the same is in example 2, assuming the trace width and the solder applied. I think it really depends on the particular design... But of course the more the cap is ''in way'' the better.

User avatar
hox3d
Common Wiggler
Posts: 162
Joined: Fri Feb 02, 2018 6:30 am
Location: Grenoble, Alps

Post by hox3d » Tue Jul 03, 2018 2:00 pm

Sorry to revive this old thread.

Learned quite a few tricks, though.
I almost finished my layout and, I guess, I'm gonna start again. I started with small islands of components, but they're way too close from each other.

Anyway, this sentence got me thinking:
"Unless you really know how to do ground planes don't do them."

So, my question is: is there any tricks related to this?
With a two-sided board, I guess we'd use link all grounds together?
What things do I need to keep in mind in the case I want to make a ground plane?

Thanks!

aabbcc
Wiggling with Experience
Posts: 314
Joined: Fri Feb 02, 2018 10:47 am
Location: Sweden

Post by aabbcc » Tue Jul 03, 2018 2:33 pm

More on the ground planes topic, I've always wondered why some boards have ground planes which are quite hard to solder and require heating up for 599 hours while on another boards I can barely notice the difference while soldering a ground plane vs a non ground. How do you achieve the the second option, i.e. easy to solder ground planes and why don'nt everyone make them that way?

User avatar
Grimulkan
Common Wiggler
Posts: 150
Joined: Fri Aug 14, 2015 12:44 pm
Location: MN, USA

Post by Grimulkan » Tue Jul 03, 2018 2:46 pm

aabbcc wrote:More on the ground planes topic, I've always wondered why some boards have ground planes which are quite hard to solder and require heating up for 599 hours while on another boards I can barely notice the difference while soldering a ground plane vs a non ground. How do you achieve the the second option, i.e. easy to solder ground planes and why don'nt everyone make them that way?
Probably the difference between soldering boards with and without thermal relief. Large ground planes can dissipate a lot of heat when heated directly, that's why some designs have thermal relief. They look like narrow "spokes" that connect the soldering pad to the rest of the ground "pour", allowing the pad to heat up much faster.

User avatar
Grimulkan
Common Wiggler
Posts: 150
Joined: Fri Aug 14, 2015 12:44 pm
Location: MN, USA

Post by Grimulkan » Tue Jul 03, 2018 2:55 pm

Another related issue I'd appreciate advice/input on:
Analog vs digital grounds. 2 ground planes? Any problems stacking them?
Would be nice to avoid clocking noise in analog signal path.

User avatar
emmaker
Veteran Wiggler
Posts: 743
Joined: Sat Mar 10, 2012 5:07 pm
Location: PDX

Post by emmaker » Tue Jul 03, 2018 7:53 pm

In this thread I'd previously made the comment that you probably shouldn't do a ground plane unless you know what you are doing. Reason I said this is because a lot of people just press 'pour layer' on their PCB package and call it good. They don't pay attention to current flow and noise in the circuit and they also end up with 'islands'. For the most part for synth circuits you can get away with this. As an engineer that has worked in stuff from low to high frequency and digital and analog I think that it is good to develop good design habits and stick to them as much as possible. Doesn't matter if it's a synth or sensitive acquisition system I pretty much use the same rules for both as much as I can.

There are a number of issues with ground planes and a lot depends on what type of circuit you are working with. Low (< 1MHz)/high (> 1MHz) frequency, high (a few milliamps)/low (more than a few milliamps) current, analog/digital, signal vs. power and more. So there is no one set of rules for everything and you just have to do what you can. Hopefully being smart and picking the proper priorities will get the job done.

In an ideal world it would be nice to provide two grounding systems. If you're also doing digital then let's add yet another one. One for power and one for signals. This would solve a lot of problems but unless you are doing 4 or more layers and have a large board it's not very practical.

At least in my book the main issue to think about is:

Ground planes provide the return for all the power on the board back to the power connector. So a crude example would be if you have 20 ma on +15, 10 ma on -15 and 100 ma on +5 then your ground plane will need to provide a path back to handle at least 130 ma. So you have a ground plane and start adding traces, vias and component pads on the same layer. Now you have to worry about the path from the power supply and the loads. You need to make sure that the path has enough copper to support the current needed. It's the same problem of having a trace that is too thin to support the current you are carrying on it. Another issue is that you want the highest current path on the ground plane to be as direct as possible to the power connector and not ran by any power sensitive parts.

Reasons to provide separate ground traces:

Let's start with current. If there are portions of the circuit take a lot of current, especially if the current load varies then it might be a good idea to run a ground trace from that portion of the circuit directly to the power connector. Switching current loads can put glitches on the ground plane that affect sensitive or high gain circuits on the board. A classic example of this is the original 555 timer. When it changes state it sucks a lot of current and this was effecting synth circuits it was used in. Solution was to run the ground from the chip directly back to the power connector. Things to look for here are digital electronics (processors, digital chips), LEDs and anything else that uses a fair amount of current, especially if it is varied/switched.

Noise (crosstalk is later) is another thing that having separate power and ground traces might fix. Things like processors, high frequency clocks, serial busses (I2C, SPI, I2S, CAN) or anything else that might have higher frequency signals. If the circuit isn't current starved then this issue can usually be solved with proper bypassing. This may require caps and inductors but it just maybe simpler to run seperate power/ground traces.

Other things:

Islands. You look at a lot of DIY boards and they have 'islands' which are patches of copper that are not hooked to anything. Usually they are OK but a bad idea in general. These can act as capacitors or provide a path for crosstalk, especially for high frequency signals.

Crosstalk. Let's say you run a couple of audio traces next to each other. If they are close enough and there is a large enough signal one may bleed into the other resulting in crosstalk. There are two typical solutions to this problem. One is to move the traces further apart and the other is to provide an isolation trace between the two that is grounded. Sometime you even have to do this between the traces and underneath them. Personally I don't consider this a ground plane issue. I had one board that had a couple of audio traces that ran about 4" parallel to each other. I put in the isolation track between the runs, grounded it at one end and had the ground plane underneath. I was still getting crosstalk with this. Talking with a really good analog engineer he suggested putting multiple vias to the ground plane. But vias at each end and in the center which resolved the problem.

If you'd like to do some late night reading to put you to sleep you might try this, section 3.

PCB Design Guide Lines

About stacking digital and analog ground planes. I would avoid it and follow the same rules as avoiding crosstalk with signals. That is if they cross make the intersecting area as small as possible.

Jay S.

User avatar
whoop_john
Veteran Wiggler
Posts: 693
Joined: Sun Mar 17, 2013 12:03 am
Location: London UK

Post by whoop_john » Wed Jul 04, 2018 1:31 am

emmaker wrote:If you'd like to do some late night reading to put you to sleep you might try this, section 3.

PCB Design Guide Lines

Jay S.
Thanks for that link, I found it an interesting read, especially as I am working on a design with DACs and want to keep control voltages for VCOs as pristine as possible. Keeping the DAC power separate will be essential.

I remember from my youth that sample and hold circuits in synths would use the guard track technique around the cap storing the held voltage and it was useful to have a refresher course on this. I was unaware that the guard track should run on both copper layers, connected by vias at regular intervals.
Ⓞⓝⓔ ⓓⓐⓨ ⓨⓞⓤ ⓦⓘⓛⓛ ⓦⓐⓚⓔ ⓤⓟ ⓐⓝⓓ ⓕⓘⓝⓓ ⓨⓞⓤⓡⓢⓔⓛⓕ ⓓⓔⓐⓓ ⓐⓝⓓ ⓨⓞⓤ ⓦⓘⓛⓛ ⓢⓣⓐⓨ ⓛⓘⓚⓔ ⓣⓗⓐⓣ ⓕⓞⓡ ⓣⓗⓔ ⓡⓔⓢⓣ ⓞⓕ ⓨⓞⓤⓡ ⓛⓘⓕⓔ

User avatar
AlanP
Super Deluxe Wiggler
Posts: 1015
Joined: Fri Mar 14, 2014 8:37 pm
Location: New Zealand

Post by AlanP » Wed Jul 04, 2018 5:00 pm

emmaker wrote:Islands. You look at a lot of DIY boards and they have 'islands' which are patches of copper that are not hooked to anything. Usually they are OK but a bad idea in general. These can act as capacitors or provide a path for crosstalk, especially for high frequency signals.
These are usually done by people who intend their layout for home etching, rather than fabrication -- the islands mean less copper etching, which means the etchant lasts longer and the etch process is a little quicker.

slow_riot
Super Deluxe Wiggler
Posts: 4002
Joined: Tue Jun 30, 2009 8:58 pm
Location: uk

Post by slow_riot » Wed Jul 04, 2018 8:38 pm

PCB design can be seen as a component of overall EMC in a product, which can make or break a design just as much as the circuit itself.

You need to know the impedance, capacitance of every node and trace, as well as the total current flow and at what frequency.

In general, it's best to minimise loop size which means thoughtful arrangement of the sub circuits on the board.

There is so much to learn and apply. That being said, it can get obsessive and not every design calls for incredible standards and compliance, but there are more pitfalls now as opamps are much faster and more prone to instablity.

As far as ground planes go, I think there are good margins to be had in a 4 layer build, with dedicated +/-/0 V layers and one for signal. The main caveat is to watch out what happens around the inverting opamp node as excessive capacitance can cause instablity. It's also worth avoiding any signal traces on inner layers as these cannot be modified in the case of repairs or kludges.

Post Reply

Return to “Music Tech DIY”