Screaming Circuits: Tips and tools


How to Build a footprint

Well, not really how to build one in a technical sense, but some thoughts on how to better ensure that you get it right. In theory, it shouldn't be that difficult. You download the datasheet and build the land pattern based on the information in the datasheet. That usually works, but not always.

I had a thru-hole battery holder that didn't match up with any of the land patterns in my library, so I modified one that was close. That worked mostly okay, but there was one measurement in the data sheet that was a little ambiguous. I ended up with the mounting holes being off by a millimeter or so. Not too much, but enough to make the fit difficult.

I went in and shifted the leads over by the same amount, used it again, got another PCB fabbed and discovered that I had shifted the pins the wrong way! Then it hit me. In the first application, I had the battery holder on the bottom side of the PCB but I had looked at it through the mounting holes from the top side of the PCB. D'oh! One reason why I'm not a professional designer.

The other part was a little tiny SMT trim pot. Since there are pretty close to a million different little trim pots, the likelihood of me finding an exact match in my CAD library was precisely zero. I didn't want to Gieger VR mistake close re-invent the little zig zag resistor symbol, so I just found a part that looked the same. Well, it was almost the same. The footprint I found is for a 4mm x 4mm part and the part I ordered is 3mm x 3mm. That's a tiny trim pot. Somehow, when looking at the datasheet, I got the measurements wrong. Once the part came in the mail, it was quite obviously too small.

The pad pretty much ends right at the edge of the trim pot. We won't be able to reflow that part. No solder paste would be touching the pads on the trim pot. I'll see if our guys on the floor can figure out how to get the thing soldered on there. If they can't, I'll need to look for a larger part to put in it's place.

Fortunately, I physically looked at the part and the PCB before assembly. Unfortunately, I got the measurements wrong. If at all possible, get some sample parts before you order your PCBs. Then you can print out a 1:1 image of your PCB and lay the parts out on it. That would have saved me in both of the above cases.

Duane Benson
Is it "datasheets" or "data sheets"?

Loopy Ground Loops

A while back, I posed a question about using flood fill (AKA copper pours). I've been reading a lot about ground loops lately which brought me back to that original question.

LED scroll ground plane Some people suggest segmenting your ground plane between analog and digital sections. Some people suggest segmenting the ground plane for individual critical ground return paths. The follow on to my original question is: On non-exotic designs does segmenting ground planes really help? There's actually two questions, with the second being: At what clock speed does it make sense to start worrying about issues caused by ground return paths / ground loops? There are probably more questions. Those are just the two rattling around in my head at the moment.

Interestingly, though, when I wrote the original post, there didn't seem to be a clear "most common" between pour and no pour PCBs. Today, I'd have to say that the majority of designs we see here at Screaming Circuits do use flood-fill ground planes, either internal or external.

Duane Benson
You can solve ground and noise problems by just not hooking up power

On Final For Landing on Runway 0805

S part pad shift in oven process Keep out areas can be a problem when adapting a CAD component land pattern, but that's not the only potential problem. Sometimes the part may be close, but the footprint is different enough to cause problems, as in the picture on the right.

You can also run into issues that don't necessarily cause PCB assembly problems, but can be expensive none the less.

Say you are designing with a small microcontroller and the schematic symbol and land pattern don't exist for the one you're using, but something close does. Even though the two parts may look like pin for pin replacements, they may have a few differences.

The PIC family has a number of examples of this. For example, the PIC18F2321 and the PIC18F2455 have enough similarities that they look like pin for pin replacements. However, upon closer inspection, you'll find that RC3 exists on the 18F2321, but doesn't on the 18F2455. SCK/SCL and SDI/SDA are in differnt places on the two processors. You could end up with a bunch of jumpers and a PCB re-spin if you just used one land pattern for the other. It pays to check for those little details.

Duane Benson
Turn left at the big tree, and go until you see the creek.

Via Caps

The best way of dealing with via-in-pad requirements is to have the vias filled and plated over at the board house. There can still be some issues with that technique, but if done right, is very reliable and the best way to go. But, what do you do for a Klondike bar? I mean what do you do if you can't afford to fill and plate over your vias, or don't have the time? Well, if your vias are in a BGA pad and you don't want to have them filled and plated over, than you can just go back to the drawing board because your board most likely won't work. There may be some secret, prototype-only things that your assembly house can do, but avoid it at all costs.

If your vias are under a QFN or SOT-23 or something bigger like that, you have more options. Don't leave them open. Worms will use the open vias as homes. You can usually use soldermask to cap your vias in cases like this.

Soldermasked vias side view for blog

C is not an option. A and B can work. D can work also, but should be your last choice. With the tight masking like in A, most manufacturers recommend that the soldermask cap be about 100 to 125 micron wider than the diameter of the via. B is self evident - just make it bigger.

The pitfalls with D are that solder will still get sucked down into the via which can lead to excess voiding. Or, the via cap could pop open which results in effectively a C. With all soldermask via caps, top ot bottom, you need to check carefully to ensure that the soldermask gives a complete seal. And there is always a risk of the cap breaking. Ugh. Now do you see why everyone recommends filling and plating?

Duane Benson
The worms crawl in
The worms crawl out
The worms play pinochle on your snout

Little Chippy Challenges

And in terms of "Chippy", in this context, I'm referring to chip-caps and any other tiny little two-connector components. When considering surface mount, most people think of the many-connector parts, like BGAs and QFNs as the challenging components. That's mostly true. However, the little passives can be big bears too if not treated properly.

Two part tombstone You can have tombstoning problems. This can be caused by unequal sized pads, unequal sized traces going to the pads or inequality in copper plane in a different layer. A big part on one side can cause tombstoning too - the big part's thermal mass may slow the solder paste melt on one side of the part, leading to  tombstoning.H Skewed passive via in pad

Via-in-pad is still a problem too. Open vias can lead to unreliable connections, tombstoning or crooked  parts.

Soldermask tombstoning for blog Solder mask can cause problems too. Too thick a solder mask can prevent the part from reaching the solder and can cause tombstoning. That thick solder mask can also interfere with out-gassing in the reflow oven which can cause solder ball splatter. (A = okay, B = at risk if mask is too thick).

Duane Benson
It just goes to show you...
It's always something.

Missed it by That Much...

Yucky brd C6 Running a DRC (design rule check) before sending your PCB out for fab and assembly is a must. It's also a minimum. Not everything is caught by all DRCs.

For example, if you look at these PCB images, you'll undoubtedly spot the problem right away. These passed the Eagle DRC. I'm not saying all CAD packages will miss this kind of thing, but you should always expect that something might get through. Yucky brd I2C

Of course, if you end up selecting the wrong component footprint, or if the footprint library part was created incorrectly, the DRC definitely won't catch it. A DRC also won't likely help if you output your Gerbers incorrectly, i.e., positive output vs. negative output.

Just like you don't completely trust an autorouter, you shouldn't completely trust your CAD packages ERC and DRCs. Spend a little time manually double checking things too.

Duane Benson
Bring out the cone of silence

To Lead or not to Lead. That is the question

Back at the Embedded Systems Conference in September, I had a number of folks ask me about mixing leaded and lead-free components on a PCB. It's a difficult situation for some people - especially when using old and very new BGA form-factor components.

We generally tell people to follow the BGA. Since the BGA has those little solder balls on it, it's the most sensitive to temperature as far as soldering is concerned. Reflow a leaded BGA at no-lead temperatures and the flux may all burn off and the solder may sag down too far and bridge or dry and crack. Do the reverse and reflow a no-lead BGA at leaded temps and you won't get a good intermetalic mix and the solder joint will be prone to cracking and other bad stuff.

In most cases no-lead components, other than BGAs can be used on a leaded board. Going the other way isn't always so easy though because of the additional 20 degrees C in the no-lead process. Everything's more sensitive to moisture absorption so baking parts or keeping them sealed in moisture-free packaging is more important. Some components may melt, especially chip LEDs. And metal can capacitors can pop.

In a prototype world, where you just need to see if something works, you can sometimes get away with a lot more than you can in production, but it's still not an easy question to answer. Unfortunately if you're in the situation of one of the guys that asked about it and have one leaded BGA and one no-lead BGA, you may have to get one of the BGAs re-balled or you may just need to redesign on of them out. No easy answer there.

Duane Benson
My 24 hours is almost come
When I to sulphrous and tormenting flames
Must reflow up myself

Passive Problems

Here's a common scenario: You have an array of small components. Maybe some SOT23 transistors or a set Common ground 0402s schof LEDs. On one side, you have wires and chips and stuff hooked up all over the place. On the other side, you have a ground plane.

The easCommon ground 0402s 
lay1y route would just plop the grounded pad of the part right on the ground plane.  You would get better heat sinking if needed. You's get a much more direct path to ground. It would be quicker to lay out.

But - and there's almost always a "but" to such questions - you could get tombstoning. Especially if the parts are 0402s or smaller. You would also likely have soldering problems because the plane will act like a heat sink and may keep the solder paste from melting.

If you really need to, You could do the pad directly on plane thing, but you'd probably have to hand retouch each connection on the big pad and maybe rework tombstoned or crooked parts.

Common ground 0402s lay2 Much better would be to do something like the image on the right. You could also use thermal pads in the plane. With really small parts though, you might still be opening yourself up to soldering problems because of the heatsinking of the plane. The thermal pads would typically have three connections to the plane in a setup like this and that could still be an unequal amount of copper connecting on one side vs the other. You generally want to have the same amount of copper on both sides of the small parts.

You could also just run the eight traces straight to the plane. How would you approach this seemingly simple but surprisingly error-prone layout?

Duane Benson
You'll take the left road and I'll take the right road
And I'll be in reflow before you

Another Via-in-Pad reason

Just the other day - No not that one. The other one - I was reading through some of the open source BB Empty pcb via in connector pads Beagleboard information again and I came across an interesting tid bit. In one of the early revisions, they had some issues with SMT connectors ripping off the board. The pads detached from the board. I know that's not  a common issue, but it does happen.

Their solution was to put vias in the pads to strengthen the connection between the pads and the PCB. I hadn't thought of that, but it makes perfect sense. Note the four dimples in each of the pads on the audio connector footprint in this image. Also note that they are small and closed off.

If you've got some concern about losing your SMT connectors, you might want to consider the via-in-pad solution. Do, please, cap or plug them though.

Duane Benson
Who plays pinochle on your snout?

Panelization

A lot of small quantity PCBs come individually routed these days, but when they get too small or come in larger quantities, panels can be very nice to have. When you have your PCBs panelized, what's your preferred method? And why?

We get questions about this reasonably often: "What's the best way to panelize my boards?" For our shop, we have some guidelines on how to go about it (make sure to follow the specific guidelines from whatever manufacturer is assembling your boards), but the guidelines don't specify whether you should use V-score or tab routed. That's a decision left to you.

V-score section What if you don't know? Well, it depends then, but you can easily eliminate a few options. For example, if you have curves in your board outline, you can't V-score. V-scoring only works in straight lines. With curves or odd shapes, you have to use tab-routed. If your outline is a pure rectangle, V-scoring tends to require less board-edgBoth tab and 
v-scoree so you can get a bit more out of your PCB real estate. But it's more difficult to deal with on very thin boards and V-scoring leaves a rougher edge after snapping the boards apart.

Two of the key disadvantages of tab-routing are the greater waste area and the nubs that stick out after separating the boards. You can leave the nubs, sand them down or use a clean-up router.

Here's my take on it: A) If it truly doesn't matter, use whichever method is less expensive or that you think looks prettier. B) If you have curves or other odd shapes, you'll probably need to go with tab-routed. C) If your boards are rectangles and you can deal with the less-smooth board edge, go for the V-score.

Duane Benson
Tab. Not Diet Coke.