"Intermediate" tutorial on PCB layout?

Hey all,

Wondering if anyone has links to a good intermediate-level PCB tutorial. The brief tutorial in the Sparkfun “Beginning Embedded Electronics” series is OK, but I’m at a point where I feel like I need more info, and I’m not finding much.

I’ve heard really generic comments about things like:

  1. Keep analog and digital signals separate

  2. Avoid 90 degree bends in traces

  3. Put decoupling caps near the ICs they’re supposed to protect

But right now, I’m laying out a board that’s basically an Arduino clone with some extras - RTC, port expander, etc. Eagle’s autorouter will route it 100%, but it strikes me as a REALLY messy job, though I’m not sure if it’s well founded concern or not, and I’m having trouble addressing the above concerns because I don’t understand their importance or what takes precedence on a complicated board with competing priorities.

I’m sure many of you could route this board in 5 minutes with half a hand tied behind your back, but I’m pretty overwhelmed right now. Anyone have links to comprehensive, intermediate-level tutorials on this subject? Something that picks up where the basic Sparkfun tutorial leaves off?

Oh, this is exactly what I need as well. My boards have all worked fine so far, but I’ll bet I’ve been living a charmed life, and as soon as I bump up the complexity a notch, I’ll start paying dearly for my ignorance.

Can I add a request for a fairly straightforward explanation of ground planes (what they are, when you need one, how to set one up) to the mix?

It may be a little dated by today’s standards, but I learned a lot from [High Speed Digital Design. I paid $50 for the 5th edition in 1995 and it looks like it has only gone up in price. This book will force you to think about digital circuits in terms of analog design. Details like why ground planes are useful:

High frequency currents follow the path of least inductance. The return current travels in the ground plane following the path of the signal trace.

If you do not have a ground plane, the return current is forced to follow the ground trace. This increases the inductance of the circuit.

(^ paraphrased from Page 190)

Why do we care? Inductive circuits can affect the quality of digital signals (speed, shape, etc). Inductive circuits also make good antennas. Antennas transmit and receive RF energy.

Thus if you use a ground plane, your circuit will have less inductance and be more immune to RF noise. It will also emit less RF noise. And it will support higher frequency signals.

I usually use separate ground planes under analog sections. If there is a digital section I’ll create another ground plane and connect both via a single 10-20mil trace. Power is supplied to the analog section via a similar trace in the power plane. This helps reduce digital noise in the analog section.](Amazon.com)

Thanks, Peter. That’s very useful.

Sorry if I hijacked the thread - “ill” still has a good question there.

ill_switch:
Hey all,

Wondering if anyone has links to a good intermediate-level PCB tutorial. The brief tutorial in the Sparkfun “Beginning Embedded Electronics” series is OK, but I’m at a point where I feel like I need more info, and I’m not finding much.

I’ve heard really generic comments about things like:

  1. Keep analog and digital signals separate

  2. Avoid 90 degree bends in traces

  3. Put decoupling caps near the ICs they’re supposed to protect

But right now, I’m laying out a board that’s basically an Arduino clone with some extras - RTC, port expander, etc. Eagle’s autorouter will route it 100%, but it strikes me as a REALLY messy job, though I’m not sure if it’s well founded concern or not, and I’m having trouble addressing the above concerns because I don’t understand their importance or what takes precedence on a complicated board with competing priorities.

I’m sure many of you could route this board in 5 minutes with half a hand tied behind your back, but I’m pretty overwhelmed right now. Anyone have links to comprehensive, intermediate-level tutorials on this subject? Something that picks up where the basic Sparkfun tutorial leaves off?

If you are using EAGLE, post the BRD & SCH files somewhere so we give you feedback on your layout.

-Dave Pollum

Dave, thanks for the offer. At the very least, getting help routing this board will teach me some general lessons.

I don’t have the EAGLE files handy on this PC but I do have this screen capture of one of my routing attempts:

http://i2.photobucket.com/albums/y30/de … roller.gif

The circuit has a few main areas:

  1. Lower left-center is power. There’s an SMT +5v regulator for main power, plus a voltage inverter and -5v regulator. This raises a question - when I’ve got several regulators close together like this, how do I determine the caps needed for each one?

  2. Immediately above and to the left of the power section is a real time clock (DS1307). This bit is simple and I’ve used a similar circuit many times before, but never on the same PCB as all this other stuff.

  3. Top left is a stripped-down “Arduino.” There’s the processor and resonator, plus some resistors and an FTDI header.

  4. The big IC towards the top right is a port expander to drive an LCD (header for the LCD is the long one far top right). The LCD header will be on the bottom of the board, allowing this PCB to be plugged in to the back of an LCD. Also up in that corner, a 2x6 header to provide two ports each for I2C and One Wire. Almost all of the external circuits/devices I’ll be using with this controller will be I2C or One Wire. Just below the 2x6 header is a 12mm buzzer to provide an audible alarm.

  5. The big mess in the bottom right, taking up all the room covered by the top ground plane is an amplifier circuit for a pH probe. I lifted this circuit off another hobbyist. It works on it’s own, but it’s never been put on a busy PCB like this. Do I need a separate ground plane for this big (mainly analog) section? Do I use one big ground plane on the bottom, plus separate ones on top (as I have it now) or just separate ground planes on one side only?

  6. Also evident are “standard” Arduino headers, to allow shields to be stacked on this PCB as if it was a Duemilanove. And one last lonely 3 pin header, just to the end of the LCD header, to bring out one of the digital pins with a power and GND pin for a sensor I’ll be using that’s not One-Wire compatible.

So, like I hinted in my OP above, I’ve got some digital areas, some analog areas, some sensitive crystals, plus a bunch of awkward tracks to route to the “standard” Arduino headers, which add a lot of mess. In the attempt I posted above, I had tried to route some of those traces manually, then let the autorouter finish, which made a huge mess around the resonator.

Thoughts, suggestions, helpful wishes appreciated. . .

Power and ground tracks look too narrow and meander all over the place. They should be routed first, very carefully. The route the other critical nets like clocks. The Eagle autorouter isn’t any good, do all the routing manually. A useful rule of thumb is to route the shortest tracks first, leaving the longer ones until last.

leon_heller:
Power and ground tracks look too narrow and meander all over the place. They should be routed first, very carefully. The route the other critical nets like clocks. The Eagle autorouter isn’t any good, do all the routing manually. A useful rule of thumb is to route the shortest tracks first, leaving the longer ones until last.

I addition to Leon's comments:

1- use 16 mil or wider power traces to reduce inductance.

2- use copper pour (EAGLE: polygon) on both sides connected to GND.

3- I’m not wild about the clock circuit (U$5) being so close the voltage regulators.

4- some of the resistors are too close to chips.

5- I really dislike the way that Eagle’s auto-router connects traces to oval DIP pads. I use a square pad for pin 1 and round pads for the rest. This leaves a little more room for routing traces.

6- keep analog and digital traces apart. I can’t tell just from your layout which traces are analog and which are digital in the area around U1.

7- some of the vias appear to be really small. A 20 mil via is a good choice - any board house can make them.

8- I think that it would help to print this layout on a piece of paper, actual size, to see if there is enough clearance between parts. Place actual parts on the paper.

9- You can mount 1/4 thru-hole resistors on end vertically, instead of horizontally ()-o

where () is the resistor’s body, and o is the other pin.

10- using more surface mount parts would result in the board being less cluttered.

11- Pin 1 of the non-Arduino connectors should be marked.

That’s all that comes to mind at the moment…HTH

-Dave Pollum

I don’t see by-pass caps at the Vdd to Vss pins of the ICs. By-pass caps are to supply the current an IC needs when internally switching and reduces the high speed transient currents on the power and ground traces (planes).

The ground plane (lower right area) seems to be chopped up into many pieces. This makes it no longer a low impedance plane.

There are some good app notes available on lay out and in many data sheets. Look through app notes at Analog Devices, Xilinx, Linear Tech & Micro Chip for starters. Some look to be specific to particular chips but the principles can be applied to other ICs.