Screaming Circuits: Circuit Design


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

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.