Eagle PCB routing issues

SgtWookie

Joined Jul 17, 2007
22,230
It looks like you did the Autoroute before doing a Ratsnest to fill in the polygon - as a result, it routed all of the GND wires.

Try ripping up the wires again (use the command " RIPUP * " to get everything at once), then do the polygon fill using Ratsnest, and then temporarily remove the fill by using Ripup near the edge of the polygon. You'll see the airwires for just the items connected to GND dissappear. Then try autorouting it again; you should not see any of the GND wires routed; as those nodes will all be connected via the polygon/ground plane when you click Ratsnest again.

Autoroute does connect all of the nodes together that it can, but as Nerdgutta pointed out (and I've been suggesting) that it does some weird things, and routes some traces mighty close.

Move C4 to the left side of the opamp, and rotate it 90° so that the trace to the cap is as short as possible.

Nice job on the LED 5v anode feed; you did it almost exactly as I was suggesting - except on the far right end, where the top layer trace and the bottom layer trace connect to the anode of LED19 (trace essentially runs through the pad), and where the trace runs through the C8 pad (C7, too) by the regulator. You want only one trace per pad, wherever reasonably possible. There are other instances where that occurs, such as the lower side of R4 (to the right of the opamp). What you can do to make that area a bit neater would be to move R3 down and to the right a bit, so that the resistor serves as a jumper over the long trace from R5 to R6. Then, since you have moved C4 to the left of the opamp already, you can make the trace come straight horizontal from pin 6 of the opamp across, and straight up to R4 by dragging the corner that now is up and to the right of the opamps' pin 6.

Then you can bend the trace that goes from R4 to the high side of R3 so that you have an upside-down "T" junction, then clean up the right end of it.

On oval, "wide octagon" or rectangular pads, I avoid routing from the center via on a diagonal as Nerdgutta indicated; I always at least go vertical or horizontal to the edge of the pad, and only then go off at a 45° angle if necessary. With round or octagonal pads, it really doesn't matter what angle you enter/leave at - but I still keep everything at some multiple of 45° at the sharpest angle.

Now a bit about trace widths - What might happen if one of the LED anode pads got shorted to the ground plane by mistake? Well, you've run the same width trace for power everywhere on the board, so the trace will act like a fuse at the point where it is furthest from any component - a likely spot would be between capacitor C8 and LED19. Actually, it could fuse (fry) anywhere between where you connect +v to the board, and where the short is.

To help keep the main supply trace from burning up like that, you can increase the width of the trace. Use the Change tool (wrench) and select Width, and click on the areas of the traces that you'd like to change. You might use 24 mils for most traces, but use 32 mils or larger for the power rails. That way if a trace fries, it will most likely be right next to the part that stopped working; an easy-to-find fix.

As I mentioned before about traces running through pads, you really don't want to do that with the wider power rails, as they will act like a big heat sink. Just one trace to things like the big caps, and the IC power connections, like U1 pin 3.

Also note that the -v trace gets awfully close to your audio + in trace, then runs unnecessarily close to the +v trace, which breaks up the ground plane - not a good thing. You could move C2 down and to the left a bit, then you would have plenty of room to run the -v trace from the connector horizontally for a short ways, then down at a 45° angle, then back horizontal to the opamp power pin.

Now that you've opened that up, rotate C3 180° so the +v trace can go straight across.
If you moved the opamp and surrounding parts down just 0.1" (100 mils) then you would have room to run the +v trace ABOVE the opamp's pin 1 instead of between pins 1 and 2. You really want to avoid running a main power rail between IC pins whenever you can avoid it, as the trace has to be pretty narrow to avoid shorts.

You're a lot better off to take some extra time up front and make things as right as possible, than have to fix or scrap a whole stack of boards later. Scrapping boards gets expensive in a big hurry. You can always use them as drink coasters.
 

nerdegutta

Joined Dec 15, 2009
2,684
Guess the regulator is on the bottom side, since its mirrored...

I think the routing is better too. But should some of the caps be moved nearer the IC its supposed to 'protect'. (Or did I get the last posts from Sarge wrong? POST #30)
 

Attachments

Thread Starter

audiobob

Joined May 27, 2011
26
Guess the regulator is on the bottom side, since its mirrored...

I think the routing is better too. But should some of the caps be moved nearer the IC its supposed to 'protect'. (Or did I get the last posts from Sarge wrong? POST #30)
They look fine to me. I'm not sure what you think is wrong...
 

SgtWookie

Joined Jul 17, 2007
22,230
Yes, that's looking better; but you still have a few items to address (yeah I know, picky picky...;) )

The anode supply rail for LED1 thru LED19 now runs through all of the pads instead of being above them. That's a pretty easy fix; just takes some clicking and dragging with the SPLIT tool (directly above the ROUTE tool) with the wire bend set to 45°.

C7 (?, can't tell, trace overlaps the NAME) the 100uF cap connected to +V on the left - make it so that just one trace goes to the positive pad; slide the connecting wires to the left.

C3 (near IC1) should be moved over near pin 3 of U1.
U2 also needs a 0.1uF cap like C3. You'll need to add it to the schematic, then move it into place and route it on the board. I'd place it just to the left of U2.

C7 (by the 7805) has three traces running into the right hand pad; make the junction away from the pad, and a single trace to the pad.
C8 needs to have just 1 trace going to the upper pad.
The regulator input terminal (on left) has the trace running through the pad.

On U1, there's a top-side trace between pins 6 and 7; no reason you can't send that trace to the bottom. Same trace, pins on U2.
R7 has a trace running through the right pad. You might rotate R7 and place it below R8 to get some extra room - or just slide it to the left a bit.

Other than that, it's looking pretty good.
 

Thread Starter

audiobob

Joined May 27, 2011
26
Yes, that's looking better; but you still have a few items to address (yeah I know, picky picky...;) )

The anode supply rail for LED1 thru LED19 now runs through all of the pads instead of being above them. That's a pretty easy fix; just takes some clicking and dragging with the SPLIT tool (directly above the ROUTE tool) with the wire bend set to 45°.

C7 (?, can't tell, trace overlaps the NAME) the 100uF cap connected to +V on the left - make it so that just one trace goes to the positive pad; slide the connecting wires to the left.

C3 (near IC1) should be moved over near pin 3 of U1.
U2 also needs a 0.1uF cap like C3. You'll need to add it to the schematic, then move it into place and route it on the board. I'd place it just to the left of U2.

C7 (by the 7805) has three traces running into the right hand pad; make the junction away from the pad, and a single trace to the pad.
C8 needs to have just 1 trace going to the upper pad.
The regulator input terminal (on left) has the trace running through the pad.

On U1, there's a top-side trace between pins 6 and 7; no reason you can't send that trace to the bottom. Same trace, pins on U2.
R7 has a trace running through the right pad. You might rotate R7 and place it below R8 to get some extra room - or just slide it to the left a bit.

Other than that, it's looking pretty good.
Done with that! I wasn't sure whether or not to attach C9 (the new cap by U2) to a trace as close as possible to the pin on U2 or whether to take the shortest route to V+ (up instead of right like it currently is).

I tried to make as many more edits to multiple traces per pad as I could to reduce it to one trace.

Also, many items are off grid (on grid, but to a different grid). Is there an easy way to fix this? There are many components that have very small traces that lead a pad to the correct grid, when this really isn't necessary if I can get everything on the same grid.
 

Attachments

n1ist

Joined Mar 8, 2009
189
- The connection from R1 to R2 forms an acute angle with the trace to IC1. This can cause an "acid trap"
- The connection between C7, IC2, and the switch looks like it may be an unintentional short. If it is really supposed to be connected that way (and I think it is), I would route from IC2 to C7, Then split off to IC1 one way and to the switch and then the '3916 heading the other way.
- I was taught to use two 45-degree bends rather than a 90-degree one (like at LED14). Not sure if it is still a problem, especially for the wide traces on this board.
- Check the measurements of your actual LEDs. Some have a bit more of a ridge around the bottom; they may hit each other if packed that close
- I would label the connectors as "power" and "input"
- Do you need any bulk capacitance on the negative input rail?

/mike
 

SgtWookie

Joined Jul 17, 2007
22,230
Done with that! I wasn't sure whether or not to attach C9 (the new cap by U2) to a trace as close as possible to the pin on U2 or whether to take the shortest route to V+ (up instead of right like it currently is).
Just running a short trace from the cap's pad to the "thru" +V trace will be fine.

N1ist pointed out a few more things to tidy up on, and I agree with his assertions. I also like to use two 45° angles vs a single 90°.
You also have a trace running through U1's bypass cap's pad (C8, I think), and below that, C6, and to the right of that, R5 and, more right, C4.

You could rotate C6 180° and move it a bit to the left; that way the ground pin will be closer to the board ground point; not a big deal, but the ground plane is a bit more intact to the left of that trace than to the right of it.

If you move R5 and C4 up 0.1", then you can just use the SPLIT tool with 90° corners selected to bend/fold the traces to the pads into a single trace.

To the right of IC1, R4's lower pad has two traces connecting to it.
On that same line of thought, you're missing an opportunity to use D2 as a jumper across the traces that R4 is jumping (just rotate it 180° and move it down) and moving D1 down near IC1 pin 7 where it connects. That makes those traces a good bit shorter, and helps to avoid chopping up the ground plane so much - which means a quieter board. If you need more room in order to move R4 to the right, you can always move C9 above the "thru" +V trace - AND, you can move R5 from between C4 & C6 to the vicinity of R5 and D2, making another fairly long and convoluted trace go away.

I tried to make as many more edits to multiple traces per pad as I could to reduce it to one trace.
You're getting close. :)

Also, many items are off grid (on grid, but to a different grid). Is there an easy way to fix this? There are many components that have very small traces that lead a pad to the correct grid, when this really isn't necessary if I can get everything on the same grid.
You can get the individual components aligned to the grid by setting the grid to the desired spacing (normally 0.1" or 100mils, but frequently during parts placement, I'll go to 0.05" or 50mils), and then ctrl+left-click on the component that you wish to "snap" to the grid.

I frequently have to toggle back and fourth between 100mils and 50mil spacing in order to get everything lined up pretty well; it seems that a lot of capacitors and resistors (many components, too) have the "handle" (the + location reference) offset from where they really should be by 50 mils, or even some odd amount. Some components just are not made with a standard 0.1" grid spacing in mind; those you just sort of have to "wing it" as best you can, trying to keep things as neat as possible.

One big mistake to make is setting the grid too fine (like 1 mil or 0.001") before you place parts or run traces; it will take you a LONG time to clean up the mess! If you change your spacing from 0.1" or 100 mils, be sure to change it back as soon as you can.

It's OK if you have some short connecting traces that don't exactly align with the grid; but you can minimize them by manually routing the traces, using a 45° bend.

Just a last bit of caution; you have the anode supply for the LEDs running a bit close to the board mounting holes. Might not seem close when looking at the board layout at several times actual size, but when you see the finished item it might turn out to be a bit too close for comfort. You might wish to make the left end trace into a 45° angle to gain a bit more clearance, and pull the right end 45° angle to the left a bit more. As far as the regulator tab - well, everyone should know that it will have 5v on it, so they obviously can't cover it up with a steel washer or the like.

Come to think of it, you could always rotate R7 180° to the right and tuck it below R6, and then flip R8 around so that all three are in parallel. Run the trace from the right LM3916 pin 5 straight down under all three resistors, and connect to the R6/R7 pads from beneath the resistors (one trace per pad, thankyouplease). Then the trace from pin 6 can go straight down to R8's pad, and you will then have room to move the regulator more to the left and away from that troublesome mounting hole.

Seeing that the board is rather long, you may wish to add another mounting hole to avoid excessive flexing. If you moved D1 and D2 like I was talking about earlier, their vacated location would be a possible mounting hole location - as long as you stay mindful of the +V trace routing.
 
Last edited:

n1ist

Joined Mar 8, 2009
189
On a 7805, the tab is grounded. On a TO220 or similar package, if it is not isolated, the tab usually connects to the middle pin.

/mike
 

Thread Starter

audiobob

Joined May 27, 2011
26
Alright. I tried to follow both of your suggestions as best I could. I also rearranged the names and values so all of them will be visible when the board is manufactured. Are there any other things you see that should change? I suppose adding my name, title, and revision of the board would be a nice.
 

Attachments

Last edited:

nerdegutta

Joined Dec 15, 2009
2,684
C3 (near IC1) should be moved over near pin 3 of U1.
U2 also needs a 0.1uF cap like C3. You'll need to add it to the schematic, then move it into place and route it on the board. I'd place it just to the left of U2.
It was something like this I was talking about. I think the PCB is coming out real nice. :)
 

Thread Starter

audiobob

Joined May 27, 2011
26
It was something like this I was talking about. I think the PCB is coming out real nice. :)
Oh gotcha. Yeah, I was really just following the schematic I found online. I didn't entirely know effective it was other than that, on paper, everything looked like it should work.

If I might ask, what is the reasoning for using 45's and not 90's? I know the resulting angles are obtuse, but is that it?

Another thing I don't like is this. The ground plane is nearly split in two again.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Well, C1 and C3 are routed kind of awkwardly now.

I'd remove the traces going to them from the "thru" +V trace.
Then make one nice short, fat trace going from C1's + terminal straight up to the +V trace.
Then rotate C3 90°, and move it close to pin 3 of U1. Then make another short, fat trace from the terminal to pin 3. You want those bypass caps located as close to the power pins as you can get them, within reason.

N1ist suggested that you add a bulk capacitor for the V-; I agreed with that. You could just use a 10uF cap, or if you want to keep your values all the same, you can use another 100uF cap like C1. There's plenty of room for it to the left of C4.

The ground plane isn't as chopped up as you might think it is; there is a LOT of copper on the board. However, if you really want to, you could add some resistors with zero Ohms or jumpers going from ground to ground across some of the longer traces.
There's a jumper.lbr you can use for jumpers, or alternatively you can just drop in resistors from rcl.lbr and name them as JPn, and give them a value of 0.

You can still make the trace from the regulator output wider. 32 mils or larger would be fine.

N1ist also pointed out that the tab of the 7805 is ground and not 5v as I stated earlier. All I can say is that I was tired and had LM317's on the brain (I'd just helped a couple other people with them, and on that regulator the tab is connected to the OUT pin). However, it was still a worthwhile effort - look at how large the ground plane became around the regulator. You could turn that area of the board into a heat sink if you'd like. Fill the regulator area with square vias that have a NAME of GND, and they will thermally couple the bottom and top of the board. Then you can add a polygon on the top of the board over the regulator area (keeping clear of the top traces of course) and NAME that polygon as GND too; that way both sides of the board will act as a heat sink.
 

SgtWookie

Joined Jul 17, 2007
22,230
That looks pretty good to me; nothing obviously wrong that jumps out at me.

There's some really minor stuff that I'm not even going to mention. You could spend another week trying to get the board "perfect", but you're at the point of rapidly diminishing returns. Time to get some prototypes made.
 

Thread Starter

audiobob

Joined May 27, 2011
26
That looks pretty good to me; nothing obviously wrong that jumps out at me.

There's some really minor stuff that I'm not even going to mention. You could spend another week trying to get the board "perfect", but you're at the point of rapidly diminishing returns. Time to get some prototypes made.
Cool stuff. I think I'm going to use BatchPCB. Seems like a pretty good service and the price is low. My traces and distances should be enough where it won't overflow too badly.
 

Thread Starter

audiobob

Joined May 27, 2011
26
So a little bit of an update. The PCB will run about $26 which is well within my range and I'll be able to get sample parts to be able to complete the whole board. I should have this thing built and stuff in a few weeks depending on BatchPCB's schedule.

However, I have reached a fork in the road. Reading up on the datasheet for the LM3915, there is a page which details how to have the LED's transition smoothly. While this is a cool feature, I'm not sure how much it would take to implement it into my circuit and how much benefit it would add. That said, how would I go about adding it into my schematic? I understand the basic concept, but I'm a bit discouraged by all the resistors already in the circuit. Attached is the basic schematic for smooth transitions, and a sawtooth wave generator set to 660Hz (R = 150ohm, C = 100uF).

The three schematics are:
1. My current schematic 2. Schematic for Sawtooth Generator 3. Schematic from LM3915/6 datasheet
 

Attachments

Last edited:
Top