SparkFun Forums 

Where electronics enthusiasts find answers.

Questions relating to designing PCBs
User avatar
By leon_heller
#50718
It's more usual to have ground copper pour on one or both sides. As I said previously, you'd have found things much easier if you had sorted out the power distribution first, it is the most important part of the design. It might be best to scrap the esisting design and start again.

Leon
User avatar
By bigglez
#50719
Greetings Andy,
arader wrote:Right now I have 2 layers with signal traces in both. I haven't routed the power and ground lines yet, so I'm trying to figure out the best course of action. The way I see it, I have two options:
1) move to a 4 layer board.
2) Use eagle's polygon tool to create a GND plane and a +5v plane.
I usually do the power traces first, and then flood unused areas with
a ground polygon, to finish with a two layer design. A key to
"good" (i.e. easy and functional) PCB design is to manipulate
the rats-nest and place the parts in a way to reduce interconnect
crowding. Admittedly, you have limited choices with a piggy-
back design requiring interconnects on all four edges.

You can recover from where you are (an assumption until
I see your WIP), and probably won't have to start over.
arader wrote:I'm concerned that it could be dangerous to have a large area of the board contain 5 volts by causing a short or something. Is this a valid concern? or is it standard design to have a +5V plane on a 2 layer board?
The risk of shorts is no greater. During design you can
set the clearance around polygons and trace to trace.
A greater risk of shorts occurs with solder bridges. A solder
mask is very effective at reducing these errors.

Most PCBs would have a ground plane if there's only room
for one plane type. Ground is the universal reference and
most circuits have more ground connections than supply
connections. (There are exceptions, mostly with high current
and/or high-side driver circuits found in motor drivers,
relay drivers, printer hammer drivers, LED matrices, etc.).

I would favour a few wire links on a two layer board over
a link-free four layer board, for a prototype or budget
limited hobby project.

Looking forward to seeing your WIP layout!

Comments Welcome!
By arader
#50780
yeah, I'm definitely thinking this would have been easier if I started with the power lines first. Anyway, my greatest challenge is due to the fact that I don't have a single source of power on my board, the lines have to run to each edge in order for me to be able to daisy chain them.

Here's a screen shot of my board:
Image
I'm definitely confident in the component placing, I went through several iterations before landing on this. I'm super happy that I got all of the other routes on 2 layers, I really didn't think I was going to be able to :)

Here's the eagle files, let me know if I've left anything out: led_backpack.zip

the zip file contains:
backpack.pro - the project file
backpack.sch - the schematic
backpack.brd - the board
voidsplat.lbr - the custom library parts. Anything not in here is in the default eagle libraries.

thanks for all the great advice and help so far :)
User avatar
By bigglez
#50784
Greetings Andy,
I've downloaded and opened the files. No surprises so
far - but you are really painted-into-a-corner on this one!

Additional tools that you can use to ease the design is a
variation on "gate swapping" - a process of swapping like
components to ease the layout. As the parts being swapped
are identical the electrical function is not changed.

Another tool is to swap IO pins on the uC. This can be
resolved with software/firmware IO mapping. The goal is
to remove trace crowding and extra vias.

Next up is to change the physical placement of the IC
packages to reduce crowding. I think you already have
done so, as I see IC packages off-grid and rotated.
There's nothing wrong with this approach, but in the
days of hand assembly it was unwelcome (too easy to
make a human parts placement error).
arader wrote: Anyway, my greatest challenge is due to the fact that I don't have a single source of power on my board, the lines have to run to each edge in order for me to be able to daisy chain them.
Are you willing to change the connector placements?
I know you have a matrix concept with small jumpers
in North, South, East, and West directions. Why not
place the connectors in a parallel mechanical arrangement
(instead of NEWS)? The PCB interconnects will be much
easier, for example, pin1 and pin6 of each connector
are bussed together and would be easy to do with
Poly fills on one layer of the PCB.
arader wrote: Here's the eagle files, let me know if I've left anything out:
For future reference the EAGLE files are self-contained,
meaning the library parts are copied into the SCH and
BRD files. You don't need to supply any other library
file to transfer the design to another user.

Comments Welcome!
User avatar
By bigglez
#50787
Greetings Andy,
arader wrote:Here's the eagle files, let me know if I've left anything out
I'm guessing that you created the EAGLE library symbol for
the LED matrix? I saw a couple of problems with it, and
using the Data Sheet, I've corrected it.

Part of the issue is that the dims are in metric, but the
pins are 100mil (standard) pitch. The rows are 24mm
apart (945mils). The layout needs to be very precise as
there is not much room for error. I opened the pad holes
to 30mils (pin diameter is 0.51mm) as I think you'll
have trouble placing the LED on a PCB if the pads and
holes are too small.

I've updated a copy of the PCB layout, and I see that
there is a clearance violation from the LED pads to the
connector pads. The connectors won't fit on-grid in the
space (assuming the PCB is exactly the same size as
the LED housing).

I can see why you had so many parts off grid - I nudged
the connector off grid and the pad to edge violation has
cleared.

At this point I think you have taken on an expert level
project, and I would not feel comfortable putting my
money on the table to fab this board and expect it to work.
(But I might be less of a risk taker than you).

So far you have a concept and an untried circuit while
pushing the limits of the BatchPCB service. Would it not
make more sense to build a prototype (avoiding PCB
design and layout issues) and test the concept and firmware
as a working model?

Here's the EAGLE files that I been working on this evening:
http://www.stonard.com/SFE/backpack_1.brd
http://www.stonard.com/SFE/backpack_1.sch

Comments Welcome!
User avatar
By leon_heller
#50801
Just out of curiosity I imported that PCB into the Pulsonix software I use, and configured it for four layers - two signal and ground and power planes - and tried the (rather good) autorouter on it. I normally get 100% or something close to it with my designs, but that board failed at 81% completion. That was with 6 mil tracks and 0.5 mm vias. The component placement could be improved a lot. I don't think I'd have any problems routing it manually, but it would take quite a long time.

It was a useful exercise. I'm beta-testing a new version of Pulsonix, and it threw up a bug when I used the net completion function.

I've attached an image of the routed PCB. I routed the power and ground connections manually. I just used the router default settings, spending some time getting the optimum settings would improve things.

I think you have some placement errors, as Peter pointed out.


Leon

Image
By arader
#50822
wow guys, thanks for the awesome help so far :) I don't think this would have been nearly as fun if I didn't have you guys for advice!

It looks like it's time for another round of re-design :) I think you're right Peter, this is becoming more and more of an expert project. I don't necessarily mind spending money to learn something, but I don't really want to waste time on something that is broken from the start.

I'm going to re-do the board, this time without the demux/mux chips and the 4 edge connectors. It should be much easier to do the board with only an avr, 2 shift registers, and the LED matrix.

A few questions then before I go again. What exactly do you mean by "off grid"? I know my part placement is pretty random, but I would have thought with SMD parts there isn't really a concept of a grid? What does it mean to be "on grid"? Also, it sounds like what I'll want to do this time around is put a ground pour on both sides before anything else, run the +5V lines to the parts, and then proceed with the remaining traces. Is there anything else in there that should be done in a certain order to make it easier?

thanks again guys, I really appreciate the time you've spent with me on this :D

edit: Leon: that's awesome about the bug, yay beta testing!
User avatar
By leon_heller
#50824
I got an update later that fixed the bug.

Putting a couple of the other chips on the other side would probably help.

Leon
User avatar
By bigglez
#50855
Greetings Andy,
arader wrote:I'm going to re-do the board, this time without the demux/mux chips and the 4 edge connectors. It should be much easier to do the board with only an avr, 2 shift registers, and the LED matrix.
Another approach is to have two PCBs. A second two-layer
PCB is actually cheaper than a single four-layer, everything
else being equal. The second PCB can piggy-back on the
first, effectively doubling the available area.
arader wrote:A few questions then before I go again. What exactly do you mean by "off grid"?
Before CADCAM tools the PCB design was done manually
with "analog" tools (Sticky tape and mylar sheets, followed
by photo-reduction in a technical camera). As an aid the
drafting light-table was covered with a precision 100mil
(0.1 inch grid). Keeping parts on the grid made the process
much easier to maintain, etc. The first round of pick and
place automatic assembly tools were also designed for
100mil steps, and of couse most electronic parts had been
redesigned with 100mil lead spacing.

With CADCAM we use the computer to store the "data"
instead of the analog artwork, so the grid concept is
less important.

Having said that, I strongly suggest sticking with 100mil
pitch. Its somewhat coarse by today's standards, so
using 50mil or 25mil is also wise. I found your first
PCB to be on 5mil pitch, suggesting that parts were
nudged off the 100mil meridians.
arader wrote: I know my part placement is pretty random, but I would have thought with SMD parts there isn't really a concept of a grid? What does it mean to be "on grid"?
I found the opposite to be true. SMT parts don't have
holes, so the origin of the pads is taken as the
geometric centre. I found my first designs with SMT
to have lots of DRC errors! To further complicate things
the SMT footprint area varies for the same size package
depending upon the soldering method. I had to redraw
some SMT parts so that I could use a soldering iron,
where the part's footprint was desinged for IR reflow.
arader wrote: Also, it sounds like what I'll want to do this time around is put a ground pour on both sides before anything else, run the +5V lines to the parts, and then proceed with the remaining traces. Is there anything else in there that should be done in a certain order to make it easier?
I think that the NEWS placement of the connectors is a
problem, and I'd suggest moving them to be parallel
and nearer the centre of the PCB. From there you can
shorten many traces by "gate-swapping" and IO pin-swapping.

As most of the parts are SMT, the majority of the traces
will be on top (unless you flip some ICs to the bot side).
So making the bot layer a continuous plane and carving out
areas when a signal trace is placed on the bot layer.
The single plane can be split to form islands of ground
and supply.

If you remove the interface parts and leave the LED
drivers and uC you can add a second piggy-back board
for these later. By adding mechanical holes in the
corners you can attach the boards by standoffs. Or,
pick a mating connector that serves as both a mechanical
and electrical interface. Should be possibly to find a
common type that serves as a cable connection to
one PCB or as the bridge to another PCB.

This complication is only justified if you can't get everything
on one PCB.

Comments Welcome!