Screaming Circuits: Circuit Design


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?

Favorites

What's your favorite MCU package and why?

  • The DIP is big and easy to use. You can stick it in a breadboard (wireless or soldered), a socket or easily hand solder it. But, it tends to be more expensive and takes up more real estate.
  • SOIC is a good step down in size. It can be machine soldered. It's big enough that most people can hand solder in a pinch. But, as an SMT, I'm not sure it has much purpose anymore. If there's an SSOP available for the same part, why would you take the bigger SOIC package?
  • SSOP are nice and small so that, unless you are really tight on space, they'll do just fine. They aren't really any more difficult to layout than and SOIC. If you do need to hand-solder, this package is probably too small. Being smaller with everything else being equal, it might have more issues with heat dissipation than the bigger part or a smaller one with a heat slug under it.
  • QFP - these are just lie either an SOIC or SSOP, but with leads on four sides.
  • BGAs are really compact and and do a good job of keeping signals close to the PCB and to bypass caps. They can be a challenge to layout though. Many will require upping your layer count. The really fine pitch BGAs may require expensive PCB features such as blind or buried vias. CSP and WSP BGAs can be more difficult to handle because of their small size. Breathing on them wrong can toss them around like dust.
  • QFN and DFNs are somewhat newcomers to the scene. The package can lead to some very tiny components. It's great for signal cleanliness and the heat slug underneath can dissipate (with proper layout) a lot of heat. But, QFNs and DFNs seem to garner the most layout problems. Careful use of thermal vias is critical for maximum performance, but you either have to use expensive techniques, such as filled and plated vias, or you have to rationalize and get around some nearly mutually-exclusive requirements.

Yeah. They all have their pluses and minuses. Fortunately, with proper board design, our SMT machines can place all of the these types all day long without breaking a sweat. All the SMT designs, that is. We do hand place the DIPs. What's your preference?

Duane Benson
All we are is BGAs in the wind

CAD This or CAD That

I use Eagle CAD a lot. I can get away with the "Light" version, because the designs I create are small and non-commercial. I do use them sometimes to illustrate points here on my blog, but I think that still meets the qualifications of their free version. It's a good program and the multiple license levels from the free version up to the full professional version add a lot of flexibility to have the software grow with you.

Our partner, Sunstone, builds most of our PCBs here, which is a nice segue into an alternative CAD package. There are a lot of reasons to pick one CAD package over another. I won't go into that here because those reasons tend to be specific to the application. Most CAD packages are sold as a lump-sum purchase up front. A lot of them also have yearly license renewal fees. That works sometimes, but there are other times where up front costs are more important. The model that Sunstone uses for PCB123 is to provide the software at no charge and just add a little tiny bit of the software cost onto the PCB board purchase.

PCB123 isn't the only package that follows this business model and is tied into a specific PCB vendor. But, as far as I can tell, PCB123 is the only package of its sort that has enough capability to be a viable replacement for more traditional pay-first CAD packages.

I recently downloaded V4.1.11 and have started to run it through my own personal "can I use this for my stuff" test. I know it's a good package because we, here at Screaming Circuits get boards of all sorts designed with PCB123 to assemble from all manner of company. But, something can be a good package and still not fit an individuals specific requirements. Hence my personal tests.

I do find it odd, but not really an issue, that it starts you off in the layout editor instead of the schematic editor for a new design. Oh well. One click and I'm in the schematic where I can search for my parts. I use PIC chips and it's pretty rare that I find the exact chip. I always seem to have to find something close and then modify it, which just adds more opportunities for error. I know there's a jillion 28-SOIC,M28B_sml varieties, but once in a while it would be nice to just find the actual part.

Fortunately, today I'm looking for PIC18F2320 in an SOIC package. Fortunately, because it's actually there! I hit the "Insert" menu and choose "Add Part". Then I put "PIC18F23" in the search box, and there it is, but not on the computer. It was in their online labraries. (In the cloud?) It took all of about 15 seconds to automatically download the library footprint though, so first test = passed.

And the really cool thing is that once I have that part in there (for the parts found pre-made in the library), I just select the "Bill of Materials" tab down on the bottom and I can see if DigiKey has the part in stock and how much it costs.

Duane Benson
If it's in Oregon, the "cloud" is probably a rain cloud

Picking Packages

A long, long time ago, in a place pretty close to here, picking a form factor was easy. Your CPU came in a 40 pin DIP. Your logic came in 14 or 16 bit dips. You picked resistor sizes based on their current carrying needs. Transistors and other power components got a lttle more difficult, but not much. It was largely a matter of power disipation requirements.

Different story now, though. First, there's thru-hole vs smt. Then there's a plethora of options beyond that. So, what really matters? A specific resistor size may come in multiple wattages. Chips come in multiple packages - often from big DIPs all the way down to tiny QFN or BGA packages. Let's look at a few examples.

Here's a simple microcontroller: the PIC18F25K22. It's a pretty typical 8-bit PIC. You can purchase it in four different packages:

  • DIP, $2.05 each, Qty 100, Tube
  • SSOP, $1.86 each, Qty 100, Tube
  • SSOP, $1.90 each, Qty 2,100, Tape & reel
  • QFN, $1.86 each, Qty 100, Tube
  • SOIC $1.89 each, Qty 1,600, Tube
  • SOIC $1.93 each, Qty 1,600, Tape & reel

(DigiKey prices as of the posting date. Some are non-stock items) There's also the part presentation to consider, e.g. reel, cut tape, tube.

Next, look at a 1K resistor that might be used as a pull-up. (As listed in DigiKey) Thru-hole resistors range from 1/20th Watt up to multiple Watt packages. SMT parts range from 1/32 Watt up to lots. Simplifying a bit and just looking at 1/4 Watt, you can purchase 0402, 0603, 0805 and 1206 packages. For high volumes, price will be a factor, but for lower volumes, the price difference can be trivial.

If you have plenty of space to work with and you need to build by hand or for some reason need a socketed part, your choice is the DIP. If space is a bit of an issue and you may or may not hand build, then an SOIC is probably your pick. Some people will hand build QFNs and SSOP packages, but that's not realistic in anything but rare cases.

When size, speed, current or performance need to be at maximums, selection is still not that difficult. You'll often have far fewer options to choose from at the performance edges. But when there's headroom all over the place, how do you decide? Why an SOIC over n SSOP over an QFN? Why 0603 over 0402, 0805 or 1206?

Duane Benson
Peter Piper picked a peck of pickled PIC packages.

 

That Final Check...

I'm not talking about the final check that you get from an employer laying you off due to outsourcing. That's a bummer of a final check. The final check I'm talking about is a good thing. It always pays to do this kind of final check. Of course the other kind of final check pays too, but only once. This kind can pay off numerous times.

Here's the scenario: I have an MCU board that can take 5v power from either USB or from a dedicated power source. I want part of the board to receive power all the time and one small high-current section Schematic wrong pwr source to receive power only from the dedicated power source. I don't want to suck too much current out of a poor little USB.

My circuit has three different power busses: USB regulated 5V, on board regulated 5V, on board 9-12V. I even fabbed up some PCBs and built a first prototype. It needed a few mod wires, but I missed this problem. After my mods shown on the older posts, the circuit still worked, so I stopped looking for problems.

Fortunately, I took one last look before sending off for v2 PCB. Two of my bypass caps went to the wrong supply (they were supposed to go the "BRD5V" instead of "5V"). Not a huge deal and in my test set-up, it didn't prevent the circuit from working, but who knows what would have happened in real use. In any case, it would either resulted in another board spin or left the potential for intermittent problems when in use.

Duane Benson
Once again, time for oatmeal

How Many Spins?

The other day I wrote about my failure to follow my own advice. Obviously, advice is only for someone else. Just like the best standards are double. Right?

Hmmm. It got me to thinking about board spins. Years ago, I remember products produced by the company I worked for often coming out with double-digits worth of mod wires in production PC boards. I think with the ability to turn PCBs in a day or a few, that rarely happens anymore. But what about in the prototype stage?

Here at Screaming Circuits, surprisingly few repeats show up other than from people using us for small-lot production. We do see a lot of layout issues here, but likely we see a lot because we see a lot times a big multiplier of different designs here.

For my little dohickeys, I seem to need about one board spin due to design or layout problems for each five designs. Of course, mine are pretty simple. Most of my boards spins are due to me coming up with better ideas after using the thing for a while.

If my supposition is true that mods are required less often now, is it because designers are better now, tools are better now or components are better now? How many times do you typically re-spin a PCB due to design or layout problems?

Duane Benson
Four

Et Tu Embedded Passives

I don't know if or when embedded passives will become the "next big thing" in PCB design, but they are on the way. We, at Screaming Circuits, have been asked about the use of embedded passives a few times.

Embedded passives
The purported advantages of the technology lie primarily in the ares of cost reduction and space reduction. You could potentially get your bypass caps much closer to where they need to be as well. The space parameter is pretty obviously an advantage, but the jury is still out on costs. I suspect that at this moment, it's pretty difficult to find a board house that can fabricate a PCB with embedded passives.

If you're not familiar with the concept, capacitors or resistors are built up on the inner copper layers of the substrate. There are a couple different methods used such as plating, printing or thin-film. As shown in the illustration, the resistors and capacitors inside the PCB negate the need to mount them on the outside. I can see rework being a problem if any of those embedded parts has issues.

In terms of assembly, we wouldn't treat such a board any different than any other PCB. If your fab house notes that there are temperature or any other restrictions, let your assembly house know. Beyond that, all the standard rules apply.

Duane Benson
Note from Forbin: Colossus is watching

All Leadless

It wasn't too terribly long ago that just about any design could still be built all thru-hole. Okay, maybe it was a little longer ago than that. Once the big CPU chips stopped showing up in PGA (pin grid array), thru-hole PC motherboard possibilities went out. Then when blue-tooth and Zig-bee came around, most if not all of those chips came out in BGA, LGA or QFN forms - no thru-hole. Anyway, it's not too difficult to do pretty much any design in all SMT now, but what about all leadless?

DFN-8 Okay, we don't really consider passives to be leadless, but they kind of are. So, we have all of our passives in a leadless like form. Now all we have to worry about are the chips.

I'll start with a Microchip PIC18F4550 in a QFN44 package. It's got built-in USB, so I don't have to worry about a separate USB chip. I'll load up a bootloader and it will all be happy. Wireless will have to wait for version 2.0. This is going to control a two side-by-side wheel platform scooter type thing, so I'll need a gyro and accelerometer. Digi-Key just sent out their "techzone" mini-catalog/magazine featuring just some of these type parts. I'll take the Analog Devices ADXL345 three-axis accelerometer in LGA form-factor.

I only need to worry about pitch and yaw, so a dual axis gyro should be fine. I'll try out the ST Micro LPY550AL in a 5x5mm QFN package. For voltage regulation in the prototype, I'll use a Linear Technology LTC3642 in a 3x3mm DFN package. It has a 3.3 volt output and can accept 5 to 45 volts in. That gives me the flexibility of powering off of a dedicated battery pack or off the scooter main battery.

All LGA or QFN/DFN. The only problem is soldering up the prototypes and next half-dozen or so units, for all of my friends, after that. I'm not going to stick those things in a toaster, and I certainly can't hand solder them like I could with the old thru-hole or TSSOP and SOIC chips. Oh. Wait. I work for a company that does that.

Duane Benson
Fight Uni!

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