Author Topic: Is this routing bad/messy?  (Read 9623 times)

0 Members and 1 Guest are viewing this topic.

Offline aaronhanceTopic starter

  • Contributor
  • Posts: 44
  • Country: gb
  • Damit
    • aaronhance.me
Is this routing bad/messy?
« on: December 16, 2015, 06:27:54 pm »
Hello! I'm looking  to get some feedback on a little bit of routing/layout of the 4 layer board I'm making. The usb data lines are matched to about 0.1mm, from what I've read this is ok. I have ground planes around and under the crystal, and the caps are near to the mcu. Is there anything here that needs correcting or improving?



Thanks!
 

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Is this routing bad/messy?
« Reply #1 on: December 16, 2015, 08:12:09 pm »
Well, I'm not an expert, but I've built more than a few functioning boards..

The crystal routing looks good, a bit overkill, but it would certainly work.
Usually, just a trace that's tied to ground around the crystal is enough, hence the name "guard ring".
Oh, and if you're running out of PCB space later on, have a look at FA-238 (3.2mm x 2.5mm) sized ones.

Without knowing what MCU you're routing for, the decoupling looks a bit odd. Usually, you do a trace from the MCU into the power-rail, and place the cap as close to that pin as possible/convenient. The other pad of the capacitor goes the shortest route possible to ground. Usually just a via down to a ground-plane.
The ground-pins of the MCUs are treated the same way. Shortest way to ground, which is usually a via.

Also, all traces seem to be the same width. You seem to have a distribution-tree going on already, which is good. I usually beef up the trace that is the "trunk" of the tree, as to reduce voltage-drops and voltage-differences on the different VDD pins of the MCU itself.
Now, if you have a power-layer going on, just ignore what I just rambled on about. :)

Oh, and yea, 0.1mm matching of the USB lines should be fine. Just double-check the datasheet for your MCU so that you don't need in-series resistors for it. If it's USB host, you might also need a pull-up for the D+ line.
 

Offline aaronhanceTopic starter

  • Contributor
  • Posts: 44
  • Country: gb
  • Damit
    • aaronhance.me
Re: Is this routing bad/messy?
« Reply #2 on: December 16, 2015, 08:55:19 pm »
Thanks for the tips, I've changed it to a power plane under the mcu and will re-arrange the caps.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5029
  • Country: ro
  • .
Re: Is this routing bad/messy?
« Reply #3 on: December 16, 2015, 09:15:09 pm »
The crystal footprint is huge compared to the mcu and other parts... have a look at digikey or other shops, they have smd crystals with built in capacitors and in much smaller footprints and with very reasonable prices.

Other comments,,, the picture is really to "suck" to give some meaningful advice... looks like an IC with huge amount of pins for the small size, with HUGE capacitors and resistors compared to the IC size and the USB connector footprint.. something doesn't seem right to me.  The traces are also looking bad, with 90 degree angles and all those vias under the IC etc etc.. 
 

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Is this routing bad/messy?
« Reply #4 on: December 16, 2015, 09:22:25 pm »
Just noticed something..

The crystall has a rectangular thing around its footprint, and the traces to it and its capacitors are intersecting it. Is that on the copper-plane?  If so, then it won't work.
 

Offline aaronhanceTopic starter

  • Contributor
  • Posts: 44
  • Country: gb
  • Damit
    • aaronhance.me
Re: Is this routing bad/messy?
« Reply #5 on: December 16, 2015, 09:31:54 pm »
Just noticed something..

The crystall has a rectangular thing around its footprint, and the traces to it and its capacitors are intersecting it. Is that on the copper-plane?  If so, then it won't work.

Thanks for pointing it out I think it may be copper, I guess I messed up when making the footprint and used that instead of a white line, partially due to eagles fantastic tool names.

EDIT: this is what I've got now:
 

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Is this routing bad/messy?
« Reply #6 on: December 16, 2015, 09:41:14 pm »
So, which mcu is this?
It would help if I could read its datasheet to see what the decoupling is supposed to be like.

Also, why 4-layer? I can't see anything on the board that would warrant it.
 

Offline aaronhanceTopic starter

  • Contributor
  • Posts: 44
  • Country: gb
  • Damit
    • aaronhance.me
Re: Is this routing bad/messy?
« Reply #7 on: December 16, 2015, 10:03:16 pm »
So, which mcu is this?
It would help if I could read its datasheet to see what the decoupling is supposed to be like.

Also, why 4-layer? I can't see anything on the board that would warrant it.

here's the datasheet:
http://www.farnell.com/datasheets/1506142.pdf

It's a PIC32MX575F256L-80I
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: Is this routing bad/messy?
« Reply #8 on: December 16, 2015, 10:03:55 pm »
When doing decoupling, the trace should go from the via, to the capacitor then on to the processor pin. This will ensure that the capacitor is the source of energy for the current spikes rather than the power plane thereby reducing the noise on the power plane.
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline aaronhanceTopic starter

  • Contributor
  • Posts: 44
  • Country: gb
  • Damit
    • aaronhance.me
Re: Is this routing bad/messy?
« Reply #9 on: December 16, 2015, 10:10:20 pm »
When doing decoupling, the trace should go from the via, to the capacitor then on to the processor pin. This will ensure that the capacitor is the source of energy for the current spikes rather than the power plane thereby reducing the noise on the power plane.

Thanks for the tip!
 

Offline john_p_wi

  • Regular Contributor
  • *
  • Posts: 83
  • Country: us
Re: Is this routing bad/messy?
« Reply #10 on: December 16, 2015, 10:21:04 pm »
You could really tighten things up, additionally I would suggest having the decoupling caps parallel to the processor, to have the traces as short as possible between the pins.  This app note is from atmel, but demonstrates similar methods:

http://www.atmel.com/images/atmel-2521-avr-hardware-design-considerations_applicationnote_avr042.pdf

Additionally, search for app notes for the processor family that you are using, there should be a wealth of knowledge contained in them.
« Last Edit: December 16, 2015, 10:23:15 pm by john_p_wi »
 

Offline aaronhanceTopic starter

  • Contributor
  • Posts: 44
  • Country: gb
  • Damit
    • aaronhance.me
Re: Is this routing bad/messy?
« Reply #11 on: December 16, 2015, 10:35:03 pm »
So, which mcu is this?
It would help if I could read its datasheet to see what the decoupling is supposed to be like.

Also, why 4-layer? I can't see anything on the board that would warrant it.

It's 4-layer because I have that fine pin pitch mcu and I also have 2x 48 pin devices, I figure 4 layer would be easier, besides 100x100 4-layer is the same price as 200x100 2-layer from the manufacturer I'm going with($75 for 5 boards).
 

Offline Gurpreet

  • Contributor
  • Posts: 42
  • Country: ca
Re: Is this routing bad/messy?
« Reply #12 on: December 16, 2015, 10:42:33 pm »
From which manufacturer are you getting the boards made from?
 

Offline aaronhanceTopic starter

  • Contributor
  • Posts: 44
  • Country: gb
  • Damit
    • aaronhance.me
Re: Is this routing bad/messy?
« Reply #13 on: December 16, 2015, 10:47:15 pm »
From which manufacturer are you getting the boards made from?

pcbway
 

Offline robotix3

  • Regular Contributor
  • *
  • Posts: 90
  • Country: us
Re: Is this routing bad/messy?
« Reply #14 on: December 16, 2015, 11:30:43 pm »
A good way for beginners to learn, I have found, is to look at reputable open-source boards and analyze what the designer is doing. Sparkfun.com has all of their in-house boards downloadable in Eagle format, I would check these out. Compare the PCB layout to the schematics. Look at trace widths, trace groupings, copper pours, via placements, etc.
 

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Is this routing bad/messy?
« Reply #15 on: December 17, 2015, 07:50:47 am »
Alright, skimmed the datasheet, and came up with how I would have done it.

All signals are on the top layer. The bottom layer (only two layers) is just a massive ground-plane.

PCB Editor view:
3D Front:
3D Back:

The two-pin header next to the USB connector is where "VDD" comes from, as I had no idea how you were getting your VDD.

Without knowing exactly what you want to do, I'd still venture to guess that two layers would be plenty for your design. TQFP-64 with 0.5mm pitch isn't really fine-pitch these days with manufactured PCBs and decent tools. Neither would some 48-pin packages change that.  I've never had to go 4-layer yet, and I regularly do designs with multiple 100+ pin components with <=0.5mm pitch. And, as I mentioned, I'm not an expert.

 

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: Is this routing bad/messy?
« Reply #16 on: December 17, 2015, 08:45:19 am »




Bottom right, there's a trace  that goes across the copper relief of the component hole. That may be an issue.
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 

Offline alexanderbrevig

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: no
  • Musician, developer and EE hobbyist
    • alexanderbrevig.com
Re: Is this routing bad/messy?
« Reply #17 on: December 17, 2015, 08:58:55 am »
Alright, skimmed the datasheet, and came up with how I would have done it.

Pretty sure you've made some mistakes on those decoupling caps though  ;)
 

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Is this routing bad/messy?
« Reply #18 on: December 17, 2015, 10:23:37 am »
Alright, skimmed the datasheet, and came up with how I would have done it.
Pretty sure you've made some mistakes on those decoupling caps though  ;)

Might have, but if you see something I've missed, let me know, and I'll update it.

I just noticed that I didn't re-do the copper-pour, so the 2-pin connector effectively shorts GND and VDD, which would be an issue if you actually tried to power this board up. Doesn't change the routing though
 

Offline alexanderbrevig

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: no
  • Musician, developer and EE hobbyist
    • alexanderbrevig.com
Re: Is this routing bad/messy?
« Reply #19 on: December 17, 2015, 10:43:54 am »
Might have, but if you see something I've missed, let me know, and I'll update it.

Right now nothing would be powered.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Is this routing bad/messy?
« Reply #20 on: December 17, 2015, 10:46:49 am »
Putting the IC at 45 degrees can help with fine pitch stuff. Looks pro too.
 

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Is this routing bad/messy?
« Reply #21 on: December 17, 2015, 11:04:42 am »
Might have, but if you see something I've missed, let me know, and I'll update it.

Right now nothing would be powered.


Gawdammit..   That'll teach me to route before my morning coffee..   Jeez.   :palm:
 

Offline stmdude

  • Frequent Contributor
  • **
  • Posts: 479
  • Country: se
Re: Is this routing bad/messy?
« Reply #22 on: December 17, 2015, 11:14:37 am »
Ok, take 2.  Now, after my coffee




 

Offline ElektroQuark

  • Supporter
  • ****
  • Posts: 1244
  • Country: es
    • ElektroQuark
Re: Is this routing bad/messy?
« Reply #23 on: December 17, 2015, 11:44:02 am »
You may need a parallel resistor of about 1M with the crystal. Not always necesary but if it refuses to start working take a look at it.

Offline v8dave

  • Regular Contributor
  • *
  • Posts: 98
  • Country: id
Re: Is this routing bad/messy?
« Reply #24 on: December 17, 2015, 12:49:25 pm »
Don't have any 90 degree track bends. Use 45. I also see a few lines that are not at 45. Mostly aesthetics but it can make routing around them easier too so try to stick to horizontal, vertical and 45.

Beef up the power rails even if just short. Use the technique someone posted for connecting the decoupling caps to the micro power pins. Power issues are the biggest cause of failure in processor designs. :)

Use smaller via's for your signal lines. This will make routing easier too.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Is this routing bad/messy?
« Reply #25 on: December 17, 2015, 02:12:39 pm »
Right now nothing would be powered.


Whoever drew this info-graphic clearly has a very poor understanding - if any - of how high frequency currents flow in a PCB, what the priorities are when routing power traces, and the roles of the decoupling cap and the board's internal plane-to-plane capacitance. I'd describe it as highly misleading, bordering on just plain wrong in some cases.

Have a read: https://www.eevblog.com/forum/beginners/how-much-noise-on-power-rail-is-normal/msg478428/#msg478428

Offline aaronhanceTopic starter

  • Contributor
  • Posts: 44
  • Country: gb
  • Damit
    • aaronhance.me
Re: Is this routing bad/messy?
« Reply #26 on: December 17, 2015, 03:49:45 pm »
Thanks for the help guys! I think I might also switch to a smaller cap size rather than 1206's
 

Offline tron9000

  • Frequent Contributor
  • **
  • Posts: 423
  • Country: gb
  • Still an Electronics Lab Tech
    • My Hack-a-day project page
Re: Is this routing bad/messy?
« Reply #27 on: December 21, 2015, 11:23:19 am »
Right now nothing would be powered.


Whoever drew this info-graphic clearly has a very poor understanding - if any - of how high frequency currents flow in a PCB, what the priorities are when routing power traces, and the roles of the decoupling cap and the board's internal plane-to-plane capacitance. I'd describe it as highly misleading, bordering on just plain wrong in some cases.

Have a read: https://www.eevblog.com/forum/beginners/how-much-noise-on-power-rail-is-normal/msg478428/#msg478428
Quote
the lowest inductance path between two points is usually through a solid plane. It may, therefore, often be much better to route from the IC pin to a via, and from the decoupling cap to another via, than it is to route from the IC pin direct to the cap. It's amazing how many engineers have a mental block about this, and insist on routing from the IC to the cap "so the IC 'knows' to get its current from the cap" or some such unscientific gobbledygook. Electrons don't "know" anything, they move around according to the laws of physics.

You know I was looking at that thinking: "there's something not quite right." and then read your other post and then it made sense.

Given that the OP is starting out on PCB's that info-graphic could lead him down the garden path.

I always though figure d) was the ideal way to minimise trace inductance?
Partsbox.io - orangise your parts!
"If you're green you can only ripen. If you're ripe you can only rot!"
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Is this routing bad/messy?
« Reply #28 on: December 21, 2015, 12:27:24 pm »
The GND layout in (d) is OK, though it could still be improved by bringing the vias closer to the respective component pins. In terms of topology, though, it's good in that:

- inductance between the IC and the cap is minimised, by using the plane to link the two rather than a surface trace, and
- inductance between the IC and the intrinsic capacitance between the power and GND planes is kept to a minimum.

The VCC layout is less good, because there's too much inductance between the connection point into the power plane and the IC pin. If it's desirable to have just a single via, it's better to put it between the capacitor and the IC. This minimises inductance between the plane and the IC, but still maintains much of the benefit of the capacitor.

Offline DutchGert

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: nl
Re: Is this routing bad/messy?
« Reply #29 on: December 22, 2015, 05:10:57 pm »
How are you programming the PIC?

Why not put VCC on an innerlayer fill?

minimise traces between pad-gnd via and cap-vcc pin

stick to 45 degrees corners, also route tracks 0/90/45 degrees
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf