Screaming Circuits: Circuit Design


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

8 bit vs. 32 bit Microcontrollers

There's a lot of talk these days about the new generation of 32-bit microcontrollers and the demise of the 8-bit controller. I'm a big fan of the Beagleboard and mbed boards (ARM Cortex A8 and ARM Cortex M3). And the Cortex M0 processor looks to be a very promising low-end 32-bit ARM. By the looks of it, ARM could end up ruling the below-X86 world soon.

SP16-1_layout But, one consideration to the 8 vs. 32 discussion that I haven't heard much about is the start-up effort required and the barriers to entry for non-experts. The new ARM Cortex-M processors look to be a great move toward addressing the low-cost and low-power end of the microcontroller market, but they don't really address the buildability issue and the category-entry issue.

At Screaming Circuits, we run into quite a few designs in industries that are just now beginning to automate. In many of these cases, mechanical engineers, not software or electrical engineers, are tasked with putting the brains into the product. These mech folks have to learn, design, layout, build and code. The PIC and Atmel processors, with their thru-hole or big SMT packages, easy 5V power, low clock-speeds and huge base of community support make an impossible job possible for the new entrants into the embedded world. If a thru-hole part with a 20MHz clock can do the job, novice designers can greatly increase their chances for a successful design than if they have to deal with fine pitch parts and 100MHZ clocks.

In a perfect world, this wouldn't be a concern, but as it is, a lot of companies need these parts that are easy to implement for a new designer. M0's may be priced in the sub-$1.00 range, but piece price is not the only component of "cost".

Duane Benson
"Apple II forever"

LED Lighting Assembly

When I first attached a 280 ohm resistor in series with a 5mm red LED, the word on the street was that LEDs were low power, forever-lasting devices that would just about completely replace incandescent bulbs for simple binary indicators. LEDs spent a brief period as the numerical display device of choice too, until supplanted by the LCD. Regardless, the bottom line was that LEDs were really easy to work with. Just put that resistor in series - usually, you didn't even need to do the ohms law calculation - rules of thumb were good enough.

Lots of LEDs

Well, for simple binary indicators, that still holds true, but the big noise in LEDs these days has little to do with binary indicators. It's in illumination, and in illumination, all the rules are different.

800px-2007-07-24_High-power_light_emiting_diodes_(Luxeon,_Lumiled) High-brightness LED illuminations devices are some pretty seriously engineered systems. Most have current regulated power supplies. Portable applications often have buck/boost supplies allowing for constant brightness over the life of the battery. And most have serious thermal design work put into them as well. LED lighting designers not only need to worry about all those power supply issues, but also about heat sinking and exotic design techniques such as metal core PCBs and heavy copper. Though it's just an LED, the layout and assembly issues are far from trivial.

Duane Benson
Wear shades 'cause when you're cool, the sun always shines.
Or maybe someone's just trying to blind you with a bright LED flashlight because your ego got too big.

Flyback Diodes - a Question

Parallel caps A while back, I posted about putting caps in parallel. Sometimes it makes sense to do that either to reduce the effective series resistance (ESR) or to better respond to different frequencies of ripple, spikes or distortion.

But here is my question - Take a look at the schematic below. This is mostly for you motor control and power component folks, but anyone can take a stab at it.

MOSFETs typically have their own flyback diode built in. But it may not be fast enough or good enough in some way or other, so it's common practice to use external flyback diodes in parallel with the internal one. In this schematic, each leg of the H-bridge has three MOSFETs in parallel. It also has D7 and D8 as flyback diodes for the bottom legs. For the moment, ignore the fact that the top legs don't have any external flyback.

Barrier diode

Here's the question: Is is equally effective to have a single big flyback for the three parallel transistors as it is to have an individual flyback for each MOSFET?

Duane Benson
Is snow cold? Perhaps, but it's all relative.

All things are relative
All my relatives are things
My relatives took all my things

High Speed Layout & Parallel Caps

When I started designing things, I used a 20MHz scope to debug a 2MHz processor. Sometimes it was a cheap 5MHz Heathkit scope on a now ancient LM741 op Amp. Digikey still sells the same National Semiconductor part in DIP-8 and TO-5 metal can packages. Hard to believe.

Okay. Show of hands... Whom out there has put a 5MHz scope on an LM741 in a TO-5 package?Lm741_to5_2

Anyone? Anyone? Anyone?

Speed means something a little different now. I recently ran across an interesting article on the Analog Devices web site; "A Practical Guide to High-Speed Printed-Circuit-Board Layout." It has a lot of good layout hints (duh) but what caught my eye was the discussion on paralleling capacitors. Back in the day, for the most part, you'd just put a .01uf cap on each logic chip and be done with it. Even with power supplies, it was pretty much just "put as much as you have space and budget for. If you've got ripple, put in more". OpAmps required a little more work to determine capacitor values but in a lot of areas you could get by without much engineering when selecting capacitors.

Recent forays into motor control have opened my eyes to how different things are now. It's pretty much the same with switching power supplies - that's really what a PWM motor driver is anyway.

Parallel_caps We used to parallel up capacitors just to increase the value. Now, however, there are other reasons. Most PWM circuits really need low ESR (effective series resistance) capacitors. With too much ESR, you'll lose some volts in the caps, they heat up and maybe even explode. Other bad things can happen too, but that's enough of a representative sampling. Putting caps in parallel does the same thing with ESR that putting resistors in parallel does with ordinary R. That's the main reason switching power supplies have six or eight or more electrolytics instead of just one big one.

The other reason to put caps in parallel has to do with differing frequency responses. Again, something I didn't worry about too much. This one is important for high speed analog circuits and PWM circuits such as motor control and power as well. You can combine two or more different value capacitors, including a mix of electrolytic and ceramic to cover a range of frequency responses. Put the smallest (both in physical size and value) closest to the chip and with the shortest path to ground. The article goes into a lot more detail, but that's the gist of it.

Duane Benson
Yes, but can you parallel park?