Screaming Circuits: Circuit Design


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

Polarized non-polarized components: Inductors


We have a number of manufacturing engineers running around here at Screaming Circuits. They're very good at what they do, as are our operators and technicians. They are not, however, electrical engineers. Our parent company has a big group of electrical engineers, but they're at a different location

What that means is, though we endeavor to be experts at building things, we often don't know what the circuits and components do in your specific application. People tend to send us their difficult projects so we've probably seen just about everything possible go through our plant. But, every now and then we see something unfamiliar. It doesn't happen very often, but it does happen.

20150114_19440220150114_194410Sometimes it's an exotic new package (like the 0.3mm pitch wafer scale BGAs now
showing up). Other times, it's something a bit older, but just not clear. Rather than put a job at risk, if we aren't sure, we'll always hunt down the designer and ask.

Okay. That was a long winded intro.

We recently ran across just such an unknown; a "polarized" inductor, without an accompanying "polarity" mark on the PC board. Not only that, but the markings on the inductor were a bit ambiguous. One half is black and the other half is green. The datasheet is in black and white, so there's more room for interpretation than we're comfortable with.

At first glance, you might wonder why polarity / direction matters in an inductor. I did. It's just wire. Right? 

Almost: it's not just wire, it's coiled wire. In most cases, the direction doesn't matter, but in cases with multiple inductors, or with super high speeds, it can matter due to the fact that the coil winding direction has an influence on the flux and the actual induction.

I won't go into all of the theory, but think of walking. In most cases, it doesn't matter whether you start with your left foot or your right. However, if you're marching in a coordinated group, you want everyone to start with the same foot.

Look at the two sets of air-core inductors above. When set like this, directionality starts to make a bit of sense. Imagine the electrons being pushed around in theses things and try to picture the resulting lines of flux.

The moral of the story: eliminate ambiguity. If the part is polarized, either mark the board, or make it the direction clear to your manufacturer in build documentation. Do this even if the polarity doesn't matter to you, 'cause we don't know that.

After photographing these, I ended up recalling this bit of knowledge. It's just so rarely needed that it had vanished in to the fog. I put a few more photos after my signature.

Duane Benson
Which way did he go?
Which way did he go?

20150114_19431320150114_194348

 

Do you Need that Part? Or, is it Just Habit?

At the moment, I'm working on an Arduino compatible clock. Like most of my Arduino compatible boards, this one uses an Atmega32U4, with USB built in. With the Atmega32U4, I sacrifice a little in program memory and SRAM, but gain a bit in reduced parts count.

A USB capable Arduino-compatible is, of course, programmed via USB, and can be powered by the USB port. Most Arduino boards also have a 5 volt regulator to be used when being powered by a wall-bug power supply. Naturally, I put the USB connector on the clock board, as well as the 5 volt regulator. With the two different supplies, I also put in circuitry to auto switch sources and protect the USB host when both supplies are connected at the same time.

NeoPowerSupplyMy first PCB revision required a few hand-mods, but not many. Still, I decided to re-spin the board and remove the two mod wires. While doing so, it suddenly occurred to me - a blinding flash of the obvious - that most cell phones and other small devices are charged with a USB-connector 5 volt wall-bug power supply. Why then, would I also need a separate power supply and on-board 5 volt regulator?

By pulling the regulator off of the board, I could eliminate a few capacitors and the supply auto-select / protection circuitry. Not only did I save in component cost, but I was able to reduce the PC board size, and thus cost, by about a third.

  1. I had the 5 volt regulator in the design because Arduinos can be powered by either USB or a non-regulated power supply.
  2. The reverse power protection is necessary to prevent damage to the USB host if the other power is also connected.
  3. The auto-power switching circuit is necessary so that a user doesn't need to flip a switch or change a jumper when changing power sources.
  4. I had two extra LEDs to indicate which supply was powering the clock.

I questioned my original assumptions, found a "because it's always done that way" and eliminated it. Assumptions are meant to be challenged.

Duane Benson
Question authority!
And then get squashed
(or, squash extra space out of your PCB)

VTP - Very Tiny Parts

FreescaleKL03A while back, I wrote about a new ARM Cortex M0+ chip from Freescale. It's not the first M0+, but I do believe that it's the smallest. I've been checking stock off and on and finally found the smallest package to be in stock and available to ship.

I actually bought a couple of different types. First, there's the WLCSP 20. It's got 32K FLASH, 2K SRAM and an 8K bootloader. The real kicker is that the package is only 1.6mm X 2.0 mm. I also got a few in the QFM 16 package, which is a bit more workable at 3mm X 3mm.

Finally, I bought a Freedom development board with th 4mm X 4mm QFN 24 package. The dev board is hardware compatible with Arduino shields, so that will make for some interesting possibilities.

Anyway, here at Screaming Circuits, I'm most interested in that 1.6mm X 2.0mm package to see how easy (or difficult) it is to use - see if there are any particular layout challenges. The other stuff is just for after hours play time.

Duane Benson
I'm not a number. I'm a free development board!
(Free, as in named "Free...", not free as in "don't cost nothin")

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

Unsolicited

I have a question for you. When is the last time that you responded to an unsolicited email? It's been a very long time for me. However, I just did open up and read an unsolicited email that actually seems somewhat relevant to me. The specific subject was an offer to be a guest blogger here on blog.screamingcircuits.com. I don't know that I'll take them up on the offer. It kind of depends on what they might want to write about.

But I did jump over to their website: www.circuitspecialists.com. I've never done business with them, but they do have some interesting products and they started in a garage in 1971. Anyone who started in a garage 40+ years ago and is still around must be doing something right. Their site looks like it's more or less focused on test & measurement, prototyping, robotics and other things electronic. (I think I've heard the term "prototyping" someplace...).

What first caught my eye as relevant was their section on digital panel meters. Why would that catch my eye, you might ask? (Or you might not) The first panel meter I looked at is an "independent power supply version." Ah, the plot thickens. Just last weekend, I exploded a power supply in a robot I'm building. It didn't actually explode, but it certainly did release smoke and stopped releasing electrons at about the same time. Smoke for electrons is not  a fair trade as far as I'm concerned.

I was putting a digital Ammeter on the main power line and couldn't remember if it the meter was designed for high side or low side. Poof! I empirically determined that it was designed for low side. I should have known better because it drew power from the robot power supply without any isolation.

If my meter had an isolated or independent power supply, then I could probably have put it on the high side. Oh well. It wasn't the first time I've traded smoke for electrons, nor will it likely be the last.

Duane Benson
rhythm characterized by regular recurrence of a systematic arrangement of basic patterns in larger figures

BOM process

All of this talk about BOMs these days, (all of my talk, that is), kind of begs the question of how BOMs are put together. An Excel spreadsheet seems to be the most common "BOM management" tool in use today. Large organizations often have more formal systems, but for everyone else, it seems to be largely a manual spreadsheet process.

When I'm putting together a new design, I first look at the big parts, like MCUs and other "big" chips. Sometimes big is 3mm X 3mm, so "big" is a relative term. Then I'll put in active discreet components and connectors. Next will be specific passives (like for a crystal that requires a certain value of capacitor) and finally, the more generic components like pull-up resistors and bypass caps. This may not be the best, or even a typical process, but it seems to work for me and it more or less follows my circuit design process. There are some traps that I leave myself open to.

I pick the big components based on what the board is going to do and how much real estate I have. The next set of components are largely used to make the big components work. The specific passives attach to parts with specific requirements and the generics just get thrown in as needed. Often I don't even define the generics until after the design is complete. Take a look at this schematic clip:

Non-specific components
U3, the MCP73833 battery charger and U4, the ADM3101E RS232 line driver will both get specific part numbers right off the bat. I may change packages as I get into the layout, but I still will usually fill the BOM for those items when I put them in the schematic.

IC part of BOM

I've put U3, the charger chip in my BOM twice, each with a different package, because my preferred package isn't available at the moment but might be soon. It's not best-practice, but you can do that as long as the reference designator differs in some way and the part is labeled "DNS" (Do Not Stuff). I simply gave my alternate the part number "U3alt".

R6 and R8 get specific values because the battery charger chip calls out for specific values. Q1 will be a small P-channel MSOFET, but the specific part number can come later. All of the rest of the resistors and caps will also be defined later.

The biggest trap I have to watch for when filling out the BOM in this order is forgetting any design decisions or leaving fields blank when I go back and fill in the rest of the part number information.

Passive part of BOM
This is typical of a BOM of mine just after I've finished the layout. If I were building this by hand out of my own parts bins, this would be fine. But when sending it out for assembly, it's not. I personally know that C3 and C4 could be any of a dozen different part numbers. The only things that matter in that case are that it's .01uf, it's an 0402 and the voltage rating is 10 volts or higher. I know that R2, R3, R4 and R5 are just LED current limiting resistors and can be anything between 220 and 680 ohms for this particular circuit.

I know those things, but the assembly house doesn't know that those parts have pretty loose specs. It will just cause delays if I don't find an exact part number before sending it out. It may seem obvious, but just because it's obvious to me doesn't mean that it's obvious to anyone else. That ambiguity has to be gone before anyone else sees it.

Duane Benson
Knock three times
on the ceiling if you want p-channel.
Twice on the pipe If the answer is n-channel.

To Mod or Not to Mod? That is The Question

Many years ago, I was a product manager at a business-consumer electronics company developing some pretty leading edge display equipment. Prototyping back then was a long and painful process. A PC board might take a month or two to arrive from fabrication. Parts had to be sourced by digging through massive catalogs and then hoping that what you needed would be on the companies approved vendor list. The whole process was a bear.

Well, the soldering up part wasn't always so bad - unless you were the poor soul tasked with wire-wrapping or hand soldering the prototype.

Based on how difficult and expensive a board spin was back then, common practice was to just mod up the boards, even in production. Any given PCB might have a dozen or more cuts and mod wires. Those changes might not make it into the PCB for months. These days, though, you can get board fabbed Mod wireovernight, your parts delivered over night, and when you have all of those parts and PCBs, you can get them assembled overnight. I suspect that increase in speed is the major reason mod wires seem to be nearing extinction these days. (note that Screaming Circuits didn't build the board in this picture. It's from my personal collection)

It may not seem cheap to pay to have someone re-spin a board so speedily; especially when set next to hand soldering. But when compared to the cost of idle engineers waiting for the next rev, the cost of adding mods, the reduced reliability from having mods and the additional manufacturing time caused by modding a board; today's quick-turn parts, fab and assembly options can end up saving gobs of time and money in the long run.

Duane Benson
There are more wires in heaven and earth, Horatio, Than are soldered on your pc board.

Check Again.

How do you know? How do you know what? It could be how do you know if that new restaurant has good food, or how do you know that the car you're about to buy isn't a lemon. It could be a question of how do you know that the cigarettes you're smoking will mess your lungs up. Wait. You do know that answer to that one.

But I'm talking more about substitutions. When choosing a part, there are a wide variety of parameters to check. Some mater for your design and some don't. If you run into a part that exactly matches all of your parameters, you'll probably be okay. If that specific part is in short supply, how do you go about finding a suitable substitution?

A good example is the CDBW0520-G, Schottky diode. I had used that part in the past because it was physically small enough (SOD123) and had the stats I need. I pulled that same part number out of an old BOM to use in a new design. When I went online to check the price, I found that they were almost out of stock. I remembered when I originally searched for that part, I had a lot of trouble finding anything in that particular package. I could go to a physically bigger part, but I really didn't want to. Space isn't super tight, but tight enough.

I needed as low a forward voltage as possible, and this part drops just over a third of a volt and can pass half an amp through. My first instinct was to look at higher current versions, but they all had bigger packages. Next, I looked within the same manufacturer for a higher voltage part. I found one with a 40V max in the same SOD123. That was fine. The original was 20V.

The only bummer was that the CDBW0540-G drops half a volt. Not a great difference, but when your supply is 3V, you need to keep as much as possible. For some reason, a few days later, I searched for the part again and must have taken a different route down the parametric search because I found one from a different manufacturer with 340mV drop and a package just a hair smaller. And, it has a higher current rating to boot. That makes me happy and content.

Duane Benson
...because I live in a split level head.

Family Reference

I've written a bit about reference designators here and there. There are a few more factors that we run into now and then. Take the family panel. In case you aren't familiar with the term, it means that you have several different designs laid out into in one panel, as opposed to multiple copies of the same design in one panel.

Using a family panel can be a convenient way to deal with a multi-board design and can sometimes save a bit of money. Just a caution, though. Make sure to check with your fab house first. Some don't like family panels and some won't separate them for you. If you do have them separated prior to assembly, either at the fab house or by you, then you don't have any reference designator worries.

S 065 My-9 600 If you leave them in the panel and wish to have them machine assembled, it can get a bit more complex though. "Why?", you say. I'll tell you why. Generally, most people start at "1" for each new design. i.e. "D1, D2, D3... R1, R2, R3..." If the boards go into the machine independently, that's no problem. However, if you send the panel into a smt assembly robot, it may very well see that as your board having multiple D1's, R1's, etc. That would be rejected as an error in most cases.

If you are using the family panel approach, don't restart your numbering when you move to another one of the designs that will be in the panel. Either continue on from the last number in the prior design, add in a hundred's, with each design getting a different hundred's number or add a unique suffix on each board.

  1. Wrong way: PCB1: "R1, R2, R3, R4, C1, C2". PCB2: "R1, R2, R3, R4, C1, C2".
  2. Right way: PCB1: "R1, R2, R3, R4, C1, C2". PCB2: "R5, R6, R7, R8, C3, C4".
  3. Right way: PCB1: "R101, R102, R103, R104, C101, C102". PCB2: "R201, R202, R203, R204, C201, C202".
  4. Right way: PCB1: "R1A, R2A, R3A, R4A, C1A, C2A". PCB2: "R1B, R2B, R3B, R4B, C1B, C2B".

There are a lot of ways to do this. Just make sure that no reference designators are repeated from one board design to the next. I prefer method #3 myself.

Duane Benson
Is it immediate or extended? Does it matter?