ATmega324PB, How to do power trace layout for two VCC pins on PCB?

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Hi everyone,

I have one ATmega324PB on PCB in TQFP package, it has two VCC pins to which I have to route +5V trace. Trouble is that they both are on the opposite side of each other. Normally we split our +5V trace to go to each side but I am on two layer PCB (2nd layer is all ground), micro is tilted 45 degrees so I can easily fan out all the other pin traces. Due to this I can't make +5V trace to reach both sides, I am only left with PCB routing space beneath the micro.

 

OR I can drop a via and route on the bottom layer and come back with another via. But I want to keep routing on the bottom layer to the minimum and keeping the return path as clean as possible.

 

But first here is the pinout of ATmega324PB.

 

 

I think this is how it is suppose to be done. (which I can't do due to space constraints)

 

 

And this is how I am doing it, which I think is not the right way. 

 

Does this way messes with the working of the decoupling caps?

Any other way to do this? Opinions?

 

Thanks.

 

EDIT :- The complete picture.

 

Here is how my actual PCB looks like, this is no way near complete but enough to see the problem.

 

 

And zoomed out. ( right half side of PCB is complete after the MCU, left side is not. Lot of component placement is left and routing needs to be done. )

 

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Heisen wrote:
Does this way messes with the working of the decoupling caps?
No

Heisen wrote:
Any other way to do this?
ways (plural)

Example Layout of ATxmega32A4 and ATmega324PB Devices | AVR® Microcontroller Hardware Design Considerations

 

Heisen wrote:
Opinions?
Ideally, significant current shouldn't be flowing in the ground plane under a MCU; so, route there.

Jump with jumpers, zero ohm resistors, wire, bridge at headers, etc.; a PCB manufacturer may have a machine to stitch.

Four-layer PCB are common though two-layer may be required due to volume.

PCB CAD auto-routers may give you some ideas.

 


Preform SJ and PJ Jumpers | Components Corp

Jumper Links, Shorting Links | Harwin

Miniature Jumper – Mini-Link™ Series ML-100

 

edit :

Surface Mount Circuit Board Jumpers from Keystone Electronics

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jun 17, 2021 - 05:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

short answer...

Keep ind "you WANT to keep the bottom layer ground as much as possible. With a 2 layer board it is very hard to keep an entire layer ground.

 

Keep routing to a minimum.

If it is a one of you might go for 1206 0R resistors as jumpers, but you have to keep in mind the question if it will be worth it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

Does this way messes with the working of the decoupling caps?

No

Alright. yes That's what I needed to hear.

 

gchapman wrote:
Jump with jumpers, zero ohm resistors, wire, bridge at headers, etc

meslomp wrote:
If it is a one of you might go for 1206 0R resistors as jumpers,

 

Thanks, I'll look into it.

 

gchapman wrote:
Four-layer PCB are common though two-layer may be required due to volume.

2 layer board is 40% cheaper than 4 layer board. Board area is 53.76 cm². Right now I am going to do the assembly by myself with hand soldering.

 

I wonder at what quantity 4 layer board will start to make sense, with 4 layer board I will be able to reduce the overall board area with much smaller size components. But that also means I won't be able to hand solder, then comes the assembly charges by the PCB manufacturer. I guess the quantity has to be very high for this to make sense. Can 4 layer board become cheaper than 2 layer board in any scenario?

 

gchapman wrote:
PCB CAD auto-routers may give you some ideas.

Never liked them, but I will try to see what it does.

 

meslomp wrote:
Keep ind "you WANT to keep the bottom layer ground as much as possible. With a 2 layer board it is very hard to keep an entire layer ground.

Yeah, I learned about that the hard way.

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan

Last Edited: Thu. Jun 17, 2021 - 02:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I think what you're proposing to do is fine.  Personally I'd make the power traces wider, especially from the decoupling caps to the AVR pins, but that's just my own preference.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kk6gm wrote:
I'd make the power traces wider,

I would as well, much wider!

I have also found that via's placed near the AVR's pads can cause trouble with solder shorts, unless you "tent" your vias with soldermask, some PCB makers can do that, some not....

I try to avoid via's under parts, unless there is just no other way.... 

I find I can hand solder smd parts down to 0402, place solder on the pads using an iron, flux well, then heat part and pad with hot air gun and place the part.

Jim

 

 

Keys to wealth:

Invest for cash flow, not capital gains!

Wealth is attracted, not chased! 

Income is proportional to how many you serve!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I usually use 14mil traces for power to the chip (and sometimes 16mil depending on my mood). . .The busses leading from power supply section to chip area are usually 50 mil, 70 mil, or even a filled polygon.   No sense in just etching away good copper that can be put to use.

 

Does tilting at 45 deg actually provide any help on your large pcb?   Seems like the net gain might be zero, since then no traces will be straight--just wondering

 

Why are you trying to run a large power trace down the middle of C12?   I never run traces between component pads, or very very rarely & I am truly "stuck".

With a 2 layer board it is very hard to keep an entire layer ground.

It takes care, but can readily be done with just an occasional short jumper (less then 1/2 inch) here & there.   I just did one recently with two 32 TQFP packages six SO-8 & about 100 other misc fets/R/C and  the bottom is nearly "blank" gnd plane.  However, it was a slow process.  I rearranged my connections many times (can the switch go to PB3 or PC5, for example; can the PWM output be on PB1 or PD3?...etc)

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Jun 17, 2021 - 03:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Heisen wrote:
Can 4 layer board become cheaper than 2 layer board in any scenario?
Sales? (if there's such)

 

PCBShopper – A Price Comparison Site for Printed Circuit Boards

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kk6gm wrote:
Personally I'd make the power traces wider,

Indeed. My first thought on seeing your board was: "Oh my - What skinny power traces"

 

  • Your traces look about 8-thou. I'd go for 20-thou as best as I could.
  • I'd also try to route the decouplers directly if possible (you can have vias also).
  • What size passives are those ? 1206 ? Even the old-timer in the Simpsons with the 2" thick specs could solder those. Just dropping down one size can make a huge difference to the overall PCB size requirement, especially on your board with so; so; many passives.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

kk6gm wrote:

I'd make the power traces wider,

I would as well, much wider!

avrcandies wrote:
I usually use 14mil traces for power to the chip (and sometimes 16mil depending on my mood)

Sure, I will make them thicker, Is it necessary though? AVR in my case consumes max 50mA in all conditions. Considering maximum current that can pass through 6 mil trace is 1 Amp mine is just 50mA. 

 

ki0bk wrote:
I have also found that via's placed near the AVR's pads can cause trouble with solder shorts,

Oh, never thought about it that way.

 

avrcandies wrote:
Does tilting at 45 deg actually provide any help on your large pcb? 

It helped a lot, Ummn, the pcb is not that large. I will remove all the extra space at the end.

 

avrcandies wrote:
I rearranged my connections many times (can the switch go to PB3 or PC5, for example; can the PWM output be on PB1 or PD3?...etc)

I did that same, to find the optimal route for tracks.

 

avrcandies wrote:
Why are you trying to run a large power trace down the middle of C12?

I was trying to save some space in earlier design, it's just copied over. Now there is no reason to do it that way. I hope. I will find out once it is complete.

 

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For a "slow" AVR (compared to an 800MHz ARM) , being relatively close is prob fine for the cap, like 1/2 inch or so, but not 2 inches away like you sometimes might see (or much worse, no cap at all!!).   Remember we used to to use DIP with leads (pins)  & socket leads & through hole caps---so it is easy to stay way ahead of that.

 

I'd go for 20-thou as best as I could.

I like that train of thought.  In fact, I like to use the thickest traces everywhere I can, until I run out of room. Why scrimp on connectivity, especially anything carrying some actual current (e.g. other than a logic signal)?  I don't try to make my resistors smallest, but ones that reasonably fit...after all they are supposed to be heaters.  If you get an overload, bigger can be better.   Caps are especially bad...trying to pack max cap in smallest package volume, usually degrades other aspects...give the cap some elbow room to work with & have a nice cap.

 

I do wonder whether smaller parts are better in terms board flex (cracking),or perhaps it's worse, or same.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Heisen wrote:
Is it necessary though?
Yes (inductance, di/dt)

Power Supply, Power Routing, and Decoupling Capacitors | AVR040: EMC Design Considerations

[above Figure 1]

The current pulses on the power supply lines can be several hundred mA if all eight I/O lines of an I/O port changes value at the same time. If the I/O lines are not loaded, the pulse will only be a few ns.

The CPU is sometimes enough to upset a power supply :

XMega SRAM slow turnaround? - Solved (Glitchy Power Supply). | AVR Freaks

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Heisen wrote:

Sure, I will make them thicker, Is it necessary though? AVR in my case consumes max 50mA in all conditions. Considering maximum current that can pass through 6 mil trace is 1 Amp mine is just 50mA. 

 

It is much more about trace impedance, which is why I said to especially widen the traces between IC pins and decoupling capacitors.

 

Also, all the pin currents that flow to ground, through all GPIO and other IO pins, must flow into the Vcc pins.  Your AVR might only be drawing 10mA, but all of your high-to-GND currents may be ten times that amount.

Last Edited: Thu. Jun 17, 2021 - 05:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N.Winterbottom wrote:
Your traces look about 8-thou.

It's 6 mil. Yes I will make them thicker. Noted.

N.Winterbottom wrote:
What size passives are those ?

All resistors and caps are 0805. (Maybe I can go with 0603. Not sure, my hands are shaky and I only have magnifying glass.)

Transistors are SOT-23.

Crystal is 5 mm x 3.2 mm.

Regulator is SOT-223.

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan

Last Edited: Thu. Jun 17, 2021 - 05:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 Considering maximum current that can pass through 6 mil trace is 1 Amp mine is just 50mA.

Use care..you are not interested in whether the trace will "burn up"  or drop 0.43 volts along the way using the max limit ...you want a solid connection & low drop.  Doubling a thin width can lower the inductance too (albeit, not nearly as much as a plane).

Your ratio 1000 mA to 50 does seem "decent", 4 inches will be approx 0.33 ohms...but even that is 16mv drop.  However what stops you from using 12mil traces?  Looks like there is plenty of space.  12 mil is much easier to produce than pushing the limit for 6 mil traces.  which will be able to take more abuse, corrosion, etc?

 

I had a board laid out & specified that one trace would be carrying several amps & to take special note of it.  So they laid it out apparently so it would be "ok"  ....However my  opamp sensing circuit was acting very screwy...found out the signal dropped a few hundred mv from beginning to end (so the sensing was completely overshadowed).  Beefing up the trace with a tacked on wire (roughly 22 gauge) really helped! 

 

Trace Width and Spacing
The chemical and photographic processes used to produce a PCB put requirements on the minimum width of trace and the minimum spacing between traces. If a trace is made smaller than this minimum width there is some chance it will open (no connection) when manufactured. If two traces are closer together than the minimum spacing there is some chance they will short when manufactured. These parameters are usually specified as "x/y rules", where x is the minimum trace width and y is the minimum trace spacing. For example, "8/10 rules" would indicate 8 mil minimum trace width and 10 mil minimum trace spacing. These rules (especially spacing) apply to any metal on the PCB, including pad to track spacing and line widths for strings on the PCB.

Typical modern process rules are 8/8 rules with values as small as 2/2 rules being available. For Press-n-Peel people have had success using 12/12 rules, but values a little larger are easier to make work consistently. However, keep in mind that the board must be soldered and a trace within 8 mils (8/8 rules) of a pad is easier to short than one with greater spacing when hand soldered. For hand soldering 10/10 rules are much easier to solder (if the design density can allow spacing this large).

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Jun 17, 2021 - 05:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

I usually put an "L" shape and interrupt the ground plance.  Thicker traces are more valuable than pretty planes, IMO.

I don't have any real data that says that this is good, but my boards seem to work...

 

Attachment(s): 

Last Edited: Fri. Jun 18, 2021 - 06:13 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


I tend to use a ground plane on the top of the board and a vcc plane on the back. ARM chips tend to have four or five power pin pairs... if I have to break a plane on one side I'll stitch it through on the other, but the general aim is to keep as wide and fat a plane as possible. Remember that as far as RF is concerned, there's little difference between a ground and a vcc plane.

Admittedly this is an easy board; the processor doesn't need that many pins in this case; most are unused. But a similar commercial project with the same chip used all the pins bar a couple, and used the same ground/vcc planes, and met the necessary EMI requirements.

 

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

(how are people posting pictures?  The forum wouldn't let me upload an image, and it wouldn't let me link to the attachment, either.  (but it did allow uploading the attachment...)) (Firefox, MacOS...)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Bill the forum has some bug and it has been reported, I simply use copy the picture (Control C) and then paste it into the post with Control V.

 

In fact I think I always have done it this way.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

(weird.  Talk about the method I'd LEAST expect to work.  Thanks!)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tend to use a ground plane on the top of the board

Well that sounds a bit like an oxymoron----aren't there parts in the way?  Hard to make a nice sheet of plane that way!  If you are careful, you can often make a pretty solid sheet on the bottom layer. 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


As I mentioned - the ground plane and the Vcc plane are as far as RF is concerned, the same thing. As a general rule, any current that flows in the one plane has to come back via the other... I tend to put the ground on top simply from habit; it really doesn't matter.

 

Sometimes you don't get a plane; it depends what else is on there. Sometimes you need to use inner layers for ground/Vcc planes though of course you're actually better off using the outer layers for planes and the inners for traces... but the old school approach of buses go east-west on the top and north-south on the bottom works well, though there isn't really a plane; if one pays attention to spacing everything gets to where it needs to be.

 

Front side:

 

Back side:

 

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's quite striking that if current needs to get from left to right (or vice versa) in Green; it's going to have a hard time.

 

Nice looking layout though. KiCad seems to have come on a bit since I last looked at it in a 4.0.5 ish release guise.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Unshown simply because it would have made the details too small (the board is 20 x 25cm) are large margins at the extremes: top and bottom for the back and left and right for the front. The effect is lots of circular islands. The board complete runs under ten mA and when static it's essentially leakage current only; lots of 74HC.

 

Neil