Screaming Circuits: CAD Parts Libraries


Indicating Polarity On Diodes

Everyone knows which way current flows through a diode. Right? Of course they do. Diodes only allow current to flow in one direction.

Well, sort of.

In the case of your garden variety rectifier, barrier diode, or LED, that's true. That line of thinking leads a lot of people to assume that you can indicate diode polarity by putting a plus sign "+" next to the anode.

Here's why you can't.

Zener and TVS diodes have a breakdown voltage. They are put in the circuit with their cathode on the positive side. In that configuration, they don't conduct unless the voltage rises above their breakdown point. Zeners and TVSs are used for regulation, transient suppression, and things of that sort.

But wait! There's more!

Regular diodes can be pointed backwards too. Anytime an inductive load is switched, like a solenoid or motor, you need a flyback diode to protect the switching logic. A MOSFET switching a solenoid on and off is a good case to look at.

N-MOSFET SolenoidWhen the MOSFET turns off, the current in the solenoid coil starts to drop. As it starts to drop, the magnetic field generated by the current flow starts to collapse. The collapsing magnetic field generates an opposite current, referred to as flyback, or back EMF.

To save your silicon switching device, you put a flyback diode across the coil, or motor, terminals, pointing backwards from normal current flow - with the cathode pointed toward +V. Doind so shorts the flyback current back into the coil, preventing damage to the MOSFET. These are typically Schottky diodes, but can be ordinary rectifier diodes.

A "+" plus sign alone, doesn't tell anyone anything. For more information on what to do, read this post. Just for fun, read this post too.

Duane Benson
Diodes. Not just for breakfast anymore

Using the Newest gen ARM, Part III

The continuing saga of the 0.4 mm pitch KL03 ARM microcontroller. If you haven't yet done so, read part I, and part II.

Today, I have a look at the good, the bad, and the ugly - or more accurately, the good, and the bad and ugly. As I expected, I was quite pleased with the job done here in house. The board is nice and clean, the parts are well centered, and the solder joints are solid. No surprise here.

Here's a top-view of one we did here in Screaming Circuits:

4mil top view 800

Next, I've got one that I did at home. It actually surprised me and came out better than I had expected. Here's a top-down view of the one I did at home with home-grade tools (No, I didn't intentionally make it look bad. The board surface is just a bit shinier than the one above.):

Home top view 800

Of course, "better" is a relative term. I didn't say good. I could call this both bad and ugly. I did manage to center the parts quite well - that took a lot of careful nudging with sharp tweezers and and an X-Acto knife blade.

All of those little round shiny spots are solder balls. That's what happens when you get too much solder on the board, get solder off the pads, or have the wrong reflow profile. They might look harmless, but if there are too many under the chip, the connections could be shorted.

The fillets on the 0201 capacitor are a little lean on solder in the one I did, and there's a solder ball on the right side, but, again, it looks better than I expected.

Next time, I'll post the X-rays and show what's under the hood.

Duane Benson
Carburetors, man.
That's what life is all about

USING THE NEWEST GEN ARM, Part II

I'm a bit behind in my blog work - well, way behind, actually. I started this series back in January with the intro post.

Here's where I am right now:

  1. I have three different sets of PC boards.
  2. One set, I took home to see if it's possible to solder a micro BGA at home. (As someone working at a car manufacturer might want to see if they could balance a crankshaft at home, for fun)
  3. Two sets, from our partner, Sunstone Circuits, are here in my desk with parts, ready to go through our machines.

After I've got all three sets built, I'll have them X-rayed to see how they look under the hood. Finally, I'll solder thru-hole headers on and fire up the chips to see if the shared escape system works.

Here's one of the boards without access to the inner pads:

KL03 SunstoneFF 4mil (2)-001

And, here's the shared escape:

KL03 SunstoneFF 4mil (3)-001

The main concern I have is that Reset is on one of the inside pins (B4). I'm not sure if I can get the chip to a state where it will operate properly without unobstructed access to reset.

The routing I've chosen is probably the only possible option for reset. Pin A4, right above, is used for the single-wire debug (SWD) clock. I'm assuming that can't be shared. B5 is Vdd, so that's out. It might be possible to go down. C4 defaults to one of the crystal pins, and D4 defaults to a disabled state.

In the route I've chosen, B3 is an ADC input, so it should start out high-impedance, and therefore not interfere. A3 defaults disabled, so it won't get in the way.

Next step: solder time!

One other thing - The images above show non-solder mask defined (NSMD) pads. Those are standard for BGAs 0.5mm pitch and higher. This part is 0.4mm pitch. Some manufacturers recommend solder mask defined pads (SMD) for 0.4mm and smaller. I'm actually testing several pad styles: SMD, NSMD and solder mask opening = copper.

KL03 footprint contenders

Duane Benson
Run it up the flag pole and see who solders

Component Footprint Rotation, Take II

I've noticed that a lot of CAD library footprints for two-pin polarized parts have pin one pointed up as zero degree rotation. According to IPC, pin 1 pointed to the left is zero degree rotation.

Why is this such a common error? I can't be certain, but I have a pretty good idea.

Surface mount parts, as everyone knows, generally come in reels of tape. It stands to reason, that the parts would be placed into the tape at a standard zero-degree rotation. They generally do. Before putting a perplexed look on your face, take a look at the image below.

20150220_143916
When looking at the tape, it's a pretty natural thing to pull it out and hold it horizontally - with pin 1 up - perpendicular to our angle of vision. Makes sense. It's not a stretch to look at this strip of tape and end up assuming that pin one is up at zero rotation.

However - the machines are the ones being spoken to. Not humans. The machines get the parts in line with their line of vision. That puts pin one on the left.

20150220_143650
Makes more sense when you look at it this way. Running into the machine, pin one, at zero rotation, is on your left.

For more to the part rotation story, tune your browser dial to here. Or just scroll down a little bit. It's right below.

Duane Benson
The long and winding reel leads to your pc board. Not your door.

Component Footprint Rotation

Before we (or any old assembly house) go about putting surface mount parts on your board, we need to program our assembly robots. I'm oversimplifying, but essentially, the machine program needs to know the X / Y coordinates, relative to the board origin (which is the lower left-hand corner), the part rotation, and the side of the board.

In years past, we needed a Centroid file (AKA pick-and-place file) containing all of that information. In some cases, we still need the Centroid, but not always. Today, we can get the same information from ASCII CAD files, ODB++ CAD files or Eagle .brd files. You only need a Centroid if you send us your board files in Gerber format.

If you do send us a Centroid file, you no longer need to worry about rotation. The IPC has defined the zero degree orientation, as well as proper rotation direction, but too many part footprints set the zero degree at different angles. We can't rely on the data.

While we have to ignore rotation and figure it out with other means, we still do strongly recommend that you follow IPC standards when you make your own footprints. I've got some illustrations below, showing how footprints are supposed to be oriented.

Duane Benson
There's no earthly way of knowing
which direction we are going
There's no knowing where we're rowing

Package origins

Passives orientation r2

Chip rotation

Quad and BGA

Three-pin parts

Using the Newest gen ARM Microcontrollers

KL03 on stampI've written a few times about the new Freescale KL03 ARM Cortex M0+ microcontroller. This particular part comes only in very small packages, with the smallest being a 1.6mm x 2mm WLCSP (wafer level, chip scale package) 0.4mm pitch, 20 bump, BGA. That's a mouthful - albeit a very tiny mouthful. Maybe just a toothful.

On the left, here, I've got a pair of them on a US postage stamp.

For us, it's not a particularly difficult part to assembly; just a garden variety 0.4 mm pitch BGA, as far as we're concerned. We place loads of them. But, it can be a very different story for a designer. Conventional wisdom says that a PCB designer has two choices with a part like this: a very expensive PC board, or don't use the part.

Escape routing becomes very difficult (read: expensive) at 0.4 mm pitch. This part only has six connections that need to be escaped, but that can still be a problem. You can't fit vias between the pads KL03 SunstoneFF 4mil 800to escape out the back side. You can't put vias IN the pads, unless you have them filled and plated over at the board house. That's expensive in small quantities.

This blog post series is going to examine some possible ways to use these parts with more of a standard fab, such as Sunstone quickturn. I've got three different process blank PC boards, each with four different land patterns.

I've been asked about home reflow too, so as a bonus, I've done my best to duplicate hobbyist conditions for one of the board sets.

Check back next week for the first set of results, and be sure to quote your assembly job at Screaming Circuits or your PC boards at Sunstone.com.

Duane Benson
"Screaming Reflowster" not sold here

Freescale KL03 and PCB123 at 0.4mm pitch

Small component packages seem to be a recurring theme with me. It's understandable, I guess. Super tiny packages are becoming more and more common and we build a lot of product with them.

The smallest we've built is 0.3mm pitch. Those aren't common enough to be considered standard - they're still an experimental assembly - but not many chips use them yet. 0.4mm, on the other hand, is something we see on a pretty regular basis.

What's so tough about that?

The biggest challenge with these form-factors seems to be footprint design and escape routing. I can see why. There really isn't room to follow any of the standard BGA practices. You can't fit escape vias between the pads and you can't put vias in the pads, unless they are filled and plated over at the board house. Filled and plated vias are the easiest way to go, but it can make for an expensive board fab.

KL03 WLCSP20 on a US Lincoln Penny

1-DSC_0008One of my side-projects involves trying to make the smallest possible motor driver. For this project, I've chosen the Allegro A3903 driver. It's a 3mm X 3mm DFN (dual flatpack no leads) with 0.5mm pitch pads and a thermal pad in the middle. The microcontroller will be the new Freescale KL03 32-bit ARM in a 1.6mm X 2.0mm WLCSP (wafer level chip scale) package. It also comes in a 3mm X 3mm 0.5mm pitch 16 pin QFN. Without an expensive PCB, that may be my only option.

Pick your CAD package

I'm using the newest version (5.1) of Sunstone Circuit's CAD package, PCB123, but the principles here will apply to any CAD software. If you don't already have a copy, download PCB123 V5.1 here.

If you've got fast Internet, you're done now, so go ahead and install it. You'll need the manual too, which you can get here.

I need to eat now, so stay tuned for Part 2.

Duane Benson
Nerfvana - It's like Nerdvana, but with more foam darts.

Cost Reduction in Design - More Advice for Makers

If you're looking for the absolute, cheapest possible assembly service, you'll need to look outside of North America. If you really need a decent price with good quality and good service, you can keep your gaze West of the Atlantic and East of the Pacific.

Like everything else in the modern world, design decisions can have a pretty big impact on your cost. So, lets take a look at some design decisions that can make your manufacturing more affordable.

  • Accept longer lead times

Lead times are one of the biggest factors in electronics manufacturing. Screaming Circuits can turn a kitted assembly job overnight, but it costs a lot of money to do that. Screaming Circuits also has a 20 day turn-around that is much, much more affordable. Accepting longer lead times on PCB fab will drop your cost as well.

  • Avoid leadless packages like QFNs and BGAs

We build tons of QFN and BGA boards - even down to 0.3 mm pitch micro BGAs. That's great if you need those packages. However, since all of the leads are underneath, we have to x-ray every part. That adds a bit of cost to the process. If you can, stick with TSSOPs and other parts with visible leads.

  • Use reels, or 12" or longer continuous strips

Tab routed multi panel 1024We will gladly assemble parts on strips of almost any size. But, to save costs, use full or partial reels or continuous strips of at least 12" long. It costs us less time to work with reels and continuous strips, and we pass those savings on.

  • Stick with surface mount

These days, thru-hole components tend to be hand soldered. That costs more than machine assembly, so use surface mount wherever possible. Surface mount components tend to be less expensive than thru-hole too. If you do need a few thru-hole parts, this is an opportunity to put in a little sweat equity by soldering the thru-hole yourself and save a bit of money.

  • Consider keeping your surface mount parts on one side

Putting surface mount parts on both sides of the pc board is a great way to better utilize space. However, if cost is more of a concern, and you only have a few parts to put on the back side, it may be more cost effective to move them to the top side.

If you've got a lot of parts, the additional cost for assembling both sides may be less than the cost for the extra PC board size, but with a small number of parts that's probably not the case. Quote it both ways and see which is less expensive

  • Panelize small boards

We can work with really tiny boards individually, but sticking with a larger size makes the job easier, and, again, we'll pass those saving on. If your PC board is smaller than 16 square inches, panelize it. We put in less labor and you get a price break.

By sticking with Screaming Circuits, you get the same care and quality that we give to boards going up into space, down into the ocean, and everywhere in between. By sticking with Screaming Circuits, you get a known turn-time; not an "about ..."

By following these guidelines, you get a decent price and really good quality and service.

Duane Benson
That would be telling

Choose Your Package Wisely

As I mentioned in my prior blog, there are reasons to consider different packages than just physical size.

Sometimes it is just space available on the PC board, but there may be other considerations as well. One of the first to consider with really small size packages, is the capability of your manufacturer. Not all assembly service providers can TI ESD CSP 007 croppeddeal with super-duper small parts.

That's a paperclip next to the little ESD protection chip in the photo on the left. At Screaming Circuits, we can go down to 0201 passive parts and 0.4 mm pitch BGAs. We've even done a few 0.3mm pitch BGAs, but those are pretty rare still.

Some manufacturers stop at 0402 (or even 0603) parts. If that's the case with your manufacturer, then you'll need to eliminate sizes smaller than their limit (or find someone else to build the board).

Cost might also come into play. It probably won't be enough of a factor to worry about during prototyping, but it may be worth looking at for volume production. Sometimes the smaller form-factors add cost. Sometimes the part value you need may not even be available in the smallest packages.

TI TPS62601 front and backIf both cost and size are significant drivers, weigh the cost savings from reducing the PC board area against any additional cost with smaller packages.

Noise can factor into your package choice too - especially regarding bypass capacitors on high speed chips. You want your bypass capacitors as close to the power and ground pins as possible. The higher the speeds, the more important this is. Dropping your package size down to 0402 or 0201 can make it easier to put the caps closer to power and ground pins.

Duane Benson
You don't need to ask Alice because your parts aren't ten feet tall

QFN? QFP? QFwhat?

The QFN (quad flat pack, no leads) has become my favorite integrated circuit package. It's very compact, yet is easier to use than a micro BGA.

Micro BGAs of 0.5mm and smaller pitch become a bit more difficult and costly with more than two rows of pins. At those geometries, escape routing can involve plugged and plated vias which adds complexity and cost to the board fab. QFNs can be almost as small, but have all of the pins exposed around the edges - so, no need for escape routing.

One thing that's important to note, is that despite sharing the first two letters (Q and F), the QFP and QFN footprints are not interchangeable. We do, from time to time, see boards laid out for one along with the other form packaged part. Arduino w QFN and QFP

Take a look at this PCB layout clip from the Arduino Leonardo. It has both footprints on the board. You can see how much bigger the QFP package is.

They put down both footprints because the Atmega32U4 chip used in the Leonardo sometimes has supply issues in one package or the other. This gives them the flexibility to use either without making any changes on the board.

You might consider this as an option if you have the space for a QFP and are concerned about the available of one package variant or the other.

If you do, there are some very important things to check out:

  • Make sure the pin-outs match. Some parts will vary the pin-out a bit between packages or have extra pins on one or the other.
  • Make sure the extra space won't cause noise problems. Generally, you want bypass caps as close as possible to the supply pins. This amount of extra space probably won't be a problem when using a QFN, but in some designs, it might.
  • Make sure the board won't be in an environment where unsoldered pads will be a problem. Some harsh environments could attack the unsoldered pads. If that's the case, consider conformal coat.

Duane Benson
We're always being pushed and shoved by people trying to beat the clock
But we like it - it's what we do