Screaming Circuits: CAD Parts Libraries

Accursed Diode Marking

Am I a broken record? Pretty much - especially when it comes to confusing diode marketing.

For example, everyone knows what the diode symbol looks like, and pretty much everyone knows which side is the anode and which is the cathode. Right? It's just like in the following picture:

Diode symbol

Is that big enough?

Normally, the clearest way to indicate polarity on an LED is to put something like this diode symbol in silk screen next to, or between, the copper pads. In theory, that should remove ambiguity.

Ambiguity in marking is the enemy of polarized parts. Unfortunately, as I cover in this, and many other blog articles, LED manufactures seem to conspire against us all when marking is concerned.

Backwards looking diode silkWe recently ran across a case of built-in ambiguity. The PC board had, what looked like, a very clear marking. The image on the right is from the assembly drawing, which is just a blow-up of the board silk screen and documentation layer.

With that marking, I'd quickly come to the conclusion that the anode is on the right and the cathode is on the left. I'd even confidently state that it's a sure thing and extremely unlikely to cause any problems. But...

Here's where I'd be very wrong, and why it's so important to always check the datasheet when dealing with diodes. Take a look at the following clip from the component's datasheet. Scroll down to the bottom of the image for the punch line.

Diode funky cathode mark

Wow. I can't even...

The board designer was just following the datasheet. That's a perfectly proper thing to do, except when the manufacturer flips a coin like appears to have happened here. In this case, dispense with the symbol altogether and use "A", for anode and/or "K" for cathode in the silk screen. (Use "K" because "C" looks too much like a reference designator for a capacitor.)

Duane Benson
In the land of the insane, only the sane are crazy

Fiducials and Odd PC Boards

One of the handy aspects of getting boards assembled at Screaming Circuits is that we don't require fiducial marks for standard process boards. I would say that we build far more boards without fiducials than with. That's cool, but there are sometimes when fiducials really are a good idea. In fact, if you've got room on the PC board, they're always a good idea (just because something isn't required, doesn't mean that it's not a good idea).

Some boards are more in need of the marks than others. For example, not long ago, we got a rigid flex board in. It had three separate rigid boards connected by flex, designed to be folded into a stack. It looked pretty similar to the mock up in this image. Rigid flex mockup

The boards didn't have any fiducial marks. Normally, what we do, is find a via hole, thru-hole pin hole, or some similar feature to use as a fiducial. That usually works, but not always. In this case, the length of the flex varied slightly from board to board. The PCB color was also very low contrast, which made it difficult for the machine to consistently recognize any mark we picked.

That meant our machines had a hard time finding the "home" spot, and we had to reset for each of the connected boards. Finding a spot on one board did not guarantee that we'd know where to place parts on the other two boards in the set.

In this case, it would have been far better if the boards were a consistent distance apart, and if each of the three boards had a set of fiducial marks.

What makes a good fidicual?

Most CAD packages have fiducial marks in their components library. Basically, it needs to be a metal dot surrounded by an area without any copper or solder mask. More than one is best. It should be an asymmetrical pattern that can only be oriented one way.

I've got some more details in this article here.

Duane Benson
Routed up like a fiducial
Another rigid flex in the night

USB Type-C Connectors

It wasn't terribly long ago that pretty much every cell phone came out with its own custom charging cable. It was a major step forward when they all (except Apple) standardized on the USB micro-B connector.

However, there are a number of limitations with the. First, it takes a minimum of three attempts to get the orientation right when trying to plug in a cable. Second, it's limited in maximum current carrying capacity.


Now, along comes the USB 3.1 Type-C cable and connector. It's similar in size, universally polarized (the connector and the cable can be plugged in any end to any end and in any orientation), it has much higher data thru-put, and it's spec'ed to carry up to 3 Amps. Further, it has alternate modes so other standards, such as DisplayPort and Thunderbolt.

SMT - TH uUSB with PCBThe connectors are larger than the micro-B, as you can see in the comparison photo above: micro-B, Type-C with only surface mount connections, and Type-C with both surface mount and thru-hole wiring, and a US dime. The size difference won't be an issue in most cases, but it could be in really small devices. My guess is that we'll be talking about a smaller, Type-D connector, not long from now.

All three of the shown surface mount connectors have thru-hole mounting tabs. That adds strength, but it does bring one caution with it. Looking at the micro-B connector in the image on the right, you can see that the tabs are formed out of the same sheet metal as the shell.

You can also see that the tabs don't stick all the way through the PC board. This can lead to some deception when soldering. Without the tabs protruding, it's easy to believe that you don't have enough solder in the connection. If you feed more solder in, it will likely wick along the tab, and end up inside the receptacle, preventing the cable from being plugged in. If you're hand soldering or reworking these type of connectors, keep a close watch on the amount of solder you're using.

Duane Benson
Fester Bester Tester is alive and well and living where?

The Common Parts Library

The two most common causes of delay in small volume manufacturing here at Screaming Circuits (and presumably, others like us) are component availability, and footprint mismatches. 

Trim pot wrong footprintWe don't substitute parts without your approval for a number of reasons. I've written about those reasons a few times before. (Here, here, and here)

Incorrect footprints can lead to a host of headaches as well. (Read more here, here, and here)

Until recently, I haven't seen a lot of progress toward solving these problems for the hordes of engineers that don't have big support departments at their disposal. In fact, with the proliferation of newer, and small, component packages, and evolution of the supply chain, it's really gotten worse.

However, there are a couple of Knights in Shining Armor riding in to try and solve both problems. The Common Parts Library (CPL), created by Octopart, aims to create a list of components with the highest probability of being available and staying available (there are no guarantees where component supply is concerned). Read more about the CPL in my article posted on

The other exciting entrant is SnapEDA. SnapEDA has a massive, and growing, library of component footprints. I've used their footprints with good success for high pin-count devices, and other parts with complex packages. It can save a lot of time and give better confidence that all of the pins go to the right functions. Read about one of my success stories here, also on

Duane Benson
Map makers put fake roads in as copyright traps
These folks don't do that. Nice.

Those Danged LEDs again.

I fell into one of my own favorite traps last week: the dreaded LED footprint mess.

I designed a board based on the Microchip PIC32 - it's a ChipKIT Arduino-compatible board - that has a number of RGB LEDs. on it. I used Part number LTST-C19HE1WT, from Lite-On. Their datasheet is easy to find, and they put the footprint information right up front, just the way we like it.

Almost all is well, but I somehow missed taking my own advice, and I didn't double check the footprint.The footprint I used is more or less 180 degrees off from this one. The common Anode is still on pin 4, but the numbering is different. It's got pin one in the same place, then pin two is in the lower left. Pin 3 is on the same place, and pin 4 is on the upper right. That's the conventional pin numbering order.

Fortunately, the fix won't require any mod wires. If I rotate the LEDs 180 degrees, the anode will be in the right spot. All I'll need to do is adjust my software for the correct R, G, and B pin locations.

Duane Benson
I'm dizzy with rotation

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


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.

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.

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