Screaming Circuits: Engineer stories

Musings on Open Source Hardware

I've written a bit about open source hardware before, mostly in reference to the Beagleboard. I'm pretty sold on the concept, myself. But, while open source has become a household concept in the software world, it's still fairly new to hardware. In the case of the Beagleboard, it's really cool because it can give a designer a big head start on using the Ti OMAP processor. Anything from the whole schematic down to just the BGA escape routing can be applied to any design.

But it's not just that. Say I have a little microcontroller board that I've put together. I use it for robots and other sorts of tinkering. It's PIC based and pretty simple. Right now, it just communicates with the outside world via RS232, but I want to add USB to it. I could start with Digi-Key and search for all of the various USB chips and spend hours digging through data sheets to see which one looks best/easiest to implement for my application. Or...

Beagleboard USB

Arduino USB

Or, I could take a look at the schematics for the Beagleboard and the Arduino. Beagleboard is open source hardware based on the ARM Cortex-A8 OMAP3530 processor from Ti. Arduino is open source hardware based on an 8-bit Atmel microcontroller. They both have USB interfaces and I know that both boards work well and have been pretty thoroughly debugged.

Here's two examples that a lot of other folks have already spent time on. I want to spent my design time on the unique parts of my board - the things I've done to make it easy for the types of projects that I want to do with it. USB is USB. I don't want to spend my time doing something that a million other people have already done. I can take a look at the two approaches here and pick one and be done with it. I don't have to dig through web sites to find data sheets and then try to interpret the manufacturers reference design and hope it was fully thought out and tested. I hate that. Some chips come with great reference designs. Some don't come with any and some come with half-baked schematics that only work in the very specific test environment of the chip company's lab.

I know these two work. I can pick one, plop it into my design, make sure I give proper attribution and then just run with it. Very nice and a big time saver.

Duane Benson
Eeny, meeny, miny, moe
Catch a usb-controller by the Vcc.

PCB123 ZigBee Robots, Part Four

This is the third or fourth in this series. I paused for a while and just picked it back up again. As I eat my soup and write this, it occurs to me that I've given each post a different name so if anyone actually wants to follow my progress, I've made it quite difficult to do so. I'll recap first and then later, try to be more consistent with post titles.

  1. It all started at the ESC show back in Boston with this post called "Easy Zigbee" about some ZigBee modules I found in the Microchip booth. You'll note that I'm using Microchip components in this series, but my sister company, MEC Innovation, uses a lot of Atmel chips. We like both company's chips here. Especially with good salsa.
  2. Next, I wrote about my plan in "ZigBee, Part two".
  3. The most recent post in this series was "PCB123 QFN Footprint". That's where I started with the CAD package and I got stalled with the parts library.

From now on, I'll identify this series as "PCB123 ZigBee Robots, Part X".

Anyway, enough of that rubbish. I've picked it up again and this morning created the library part for the QFN28 PIC18F2321 microcontroller. I'm lousy at building footprints so I consider that a major accomplishment.

I have a couple more footprints to make - a DFN8 regulator and a CSP BGA RS232 chip. I muddled through the microcontroller but after I do those other two chips, I should be clear enough to able to post some hints on how to make your library components in PCB123.

Duane Benson
Later - I'm going to finish my soup now.

PCB123 QFN 28 footprint

First things first. I still haven't received the little ZigBee modules. Microchip said they'd ship out on the 14th so I shouldn't expect any different. I'm going ahead and getting started on the schematic anyway.

When I get the modules, I'll probably write the code and try them out on an old PIC board that I designed and built a while back. But eventually, I want a nice small integrated package so that means a new schematic and layout. I have the schematic partially done in another CAD package, but I'm rolling with Sunstone's PCB123 this time.

QFN28 footprint drawing The first thing to do is start looking at the components. I expect the footprints will be there for all of the passives, but given that PCB123 V3 is fairly new, I would also expect that some of the more complex parts won't be there. I'm tackling the PIC 18F2321 in a QFN28 package first. It will be a good opportunity to see if I can follow my own advice and make an easily and reliably manufacturable library component.

Most of it will be easy, but I will likely put some vias in the center pad area. I'll mask them properly. I'll also make sure that I create a proper paste stencil area. It's a 6x6x0.9 mm, 28 lead QFN package. The datasheet has the basic outline, but it also references a more detailed packaging specification on the Microchip website. I'll go there and get as much footprint information as they have.

Of course, even there I can find room for confusion. Microchip lists eight 28-Lead QFN footprints. Ugh. Just to be clear, this is the 6x6x0.9 mm with .40 mm contact length. Page 135. Ironically, the page in that detailed specification is the same one as in the datasheet and it even uses the same "For the most current package drawings..." statement referring to it's self. And no where in this 192 page document could I find anything on the paste layer. I'll segment the paste opening in the middle pad and shoot for about 50% coverage.

Duane Benson
You must go here to be told to go there

ZigBee, Part Two

I like the ZigBee module from Microchip that I wrote about below. But theory and practice aren't always the same, so I've ordered two of the modules to try out.

In my spare time, I sometimes build little robots and I've wanted to try out wireless for some time now. I don't have enough time to dig into the low level stuff and figure out how to do it from scratch so these modules seem like they might just be the ticket.

I'm going to see if I can integrate some ZigBee into my robots with these modules and I'll keep you posted on the progress. The modules are backordered at Microchip until November 14th, but that will give me some time to dig out some of the old bot boards and get ready. I'll prototype up the software with my old boards and at the same time, I'll get PCB123, from Sunstone Circuits, out and do a re-design to use more surface mount and shrink the boards.

Check back here periodically to see my progress and if all goes well, I'll have the actual bots in our booth at Embedded Systems Conference, Silicon Valley in April 2009.

Duane Benson
Wireless minds want to know

The Next Big Idea?

According to the U.S. Census Bureau, more than half a million new businesses open every year in this country. Granted some of them are pizza parlors and carpet cleaners, but a lot of them are start-ups put together by an engineer with a great idea. Big business is important, but start-ups are what really drive innovation in this country.

So, what do you do if you are one of those engineers with a big idea but don't have a clue as to whether you can build it or sell it, or more importantly, make a living off of it? Some people will just quit their job and go for it. Others will work late into the night so they can keep their day-job while designing and building it. Some go on their own and some gather a team and get some venture capital money.

There are a lot of ways to answer the question in detail, but sometimes a simple rule-of-thumb can help to at least jump start the process.

For example; take your total bill of materials cost. It doesn't have to be exact because we're just getting a rough estimate. Go to Digi-Key and get costs for, say, 100 or maybe 1,000 sets of your parts.Then go to and get an online quote for the same number of pcbs. Add that up for your BOM cost. Then double that. That's your cost to a reseller. Then double it again for the price they will sell it at to an end customer.

That means if your BOM cost is $500.00, it will probably sell to customers for about $2,000. It gets a lot more complicated, but this is usually close enough to give you a "yeah, that could work" or a "hmm. I need to to be more creative."

Duane Benson
Ignore the man behind the curtain

Sponsored Spotlight - OpNeAR

Our sponsorship program recently added the OpNeAR group from The Erik Jonsson School of Engineering & Computer Science at the University of Texas at Dallas (that's a mouthful of a name). If you want it to be even longer, go ahead and spell out The Open Networking Advanced Research Lab at The... Just go to their web site.

These guys are focused on advancing wireless and optical networking technology and the group we are sponsoring just won a design contest put on by Texas Instruments. Take a look at this page for specific details on the project.

I love the tag line for the engineering school: "FEARLESS engineering" That phrase is their trademark so don't go trying to use it yourself. They beat you to it. It makes a simple, yet dramatic and powerful statement. You can't do much better than that.

Opnear_board_500Speaking of doing better... The guys won the design contest and the system they built works so well that additional students are coming in just to use it. Click on the thumbnail for a larger view. If you look closely at the board, you'll note that our board-fab partner Sunstone (AKA PCBexpress) also helped on this project.

Congratulations OpNeAR! and keep up the good work.

Screaming Circuits

Most parts in place

Mark Rules has made a bit of progress on his tiny motor controller. Someone suggested that he look at a rigid-flex board so that the driver could be wrapped around one of the motors. The idea would be to have the RS232 and MCU on one rigid board, the regulator and motor driver on a second rigid board and the connectors on a third rigid, all connected by flex. He looked at it for a while and then decided: "later."

Mr_early_layout For now, he has the placement of the four chips and all of the passives. The smallest parts  were going to be 0402, but it was getting a little tight under the board and he wanted to keep the MCU bypass cap close to the power and ground. The C-delay picked for the regulator was available in an 0201 size too, so both of those were moved to 0201 packages. Without the connectors, the whole layout measures about 1/2" x 1/2".

Right now, all the passives are under the board. As much as possible, though, none are directlyDfn8_w_stop_and_paste_w_viastr_1   under the chips. Keeping them out from directly under does take up a little more space, but it allows for easier routing of the RS232 BGA and leaves room for vias in the QFN pads for the regulator and motor driver. The big PIC won't need vias, but he may use that space for a connector.

Jennifer Twist, Engineer

Jennifer has been tasked with building an embedded video communications system. She’s been using Arm7 LPC2138 processors in prior designs but needs quite a bit more horsepower for this project so she stepped up to the Arm11 i.MX31 from Freescale. She’s got a few software hotshots that already have experience with the platform so that isn’t a worry. The big deal for her is moving from a relatively easy 64 lead QFP to the much more serious 457 ball .5mm pitch BGA.

She’s used a few small 1mm pitch BGAs before, but never anything close to this. It wasn’t just the package that got to her. She just about said “no” after reading about the 500MHz core speed for the new chip. Fortunately though, the i.MX has a rather large frequency pre-multiplier allowing for a rather sedate 32KHz reference clock to generate the screaming 500MHz+ internal clock. Still, there will be plenty of video speed and other high frequency signals running around. It will be a challenge.

There are some pretty intimidating parts here. A year ago, Jennifer wouldn’t have seen this challenge as anything but fun. The company had three layout specialists with experience on all kinds of high-speed designs. Two of those guys were laid off this spring and the last guy is dedicated to higher priority projects. It would have been nice if she could have gotten some formal training with the layout half of the CAD package but it’s all on-the-job training at this point.

Duane Benson

Custom CAD parts libraries

Back to Mark Rules and the mini control board again. He's using Eagle CAD which comes with good and not so good. The good is that Eagle is pretty powerful, yet inexpensive and easy to learn and use. The no so good is that the parts libraries tend to not have the newest parts or packages. The means before getting started with the schematic, Mark had to create the libraries.

He found a PIC18 with a QFN28 package variant, but the package didn't quite match the manufacture recommendations or Screaming Circuits' guidelines. It was a decent start but needed adjustments on the solder paste layer and the solder mask layer.

He started with a similar DFN8 packaged regulator, but in the end found it easier to start from a blank slate. The DFN10 motor driver used the regulator part as a base but required a lot of work to4qfns_paste_llayer_1  get the copper aligned, the mask in the right place and the solder paste set up. The center pad now has a segmented solder paste patter with room for two rows of three thermal vias. He needs to find a board shop that can drill and fill 8 mil vias. The FlipChip package was fairly easy, but again, will require a board house that can really register the solder mask.

The image shows copper, slik outline and solder paster layers.

Duane Benson

SMT Connectors

When we last left Mark Rules, he had made most of the component decisions for his miniature microcontroller and motor driver board. He still hadn't made a final call on the exact PIC processor. All of the options fit the same 6x6mm footprint, so there won't be any size changes regardless. Connectors looked to be the real problem.

The best he's found so far is a Digi-Key part number 609-1847-1-ND (x3), 609-1851-1-ND and 609-1854-1-ND. [Screaming Circuits will gladly accept Digi-Key part numbers in a Bill of Materials]. These are all larger then desired, totaling just over 200 square mm of board space, but it may not be possible to go smaller. That'll probably force all the connectors on one side and most of the passives on the other side with the IC's. We'll look at a couple of other suppliers just for kicks, but most likely, that will be it.

This job is mostly a layout challenge, since it's based on an existing design. There will be a few changes but not many. Still, there really isn't any safety in "just a layout." With big thru-hole parts, layout tends to not be all that important. However, when you start moving into higher speed and smaller geometries, layout becomes very important.

This isn't a high-speed design, but there are critical layout considerations. QFNs require special care. Check out our QFN layout guide. The guide will take you through the techniques required to create a solid, reliable design with QFN packaged parts. We also have our LED markation guide to promote more accurate assembly.

Speaking of LEDs, Mark ran into something else he hadn't thought of. In his prior design, he just used 1/8 Watt thru-hole resistors for the LEDs without giving thought to power requirements. His first thought here was to just use 0201 parts everywhere. That was until someone suggested he actually calculate out the power dissipation. Doing so brought the LED current-limit resistors up to 0603 size 1/10 Watt. Looking at the other resistors, he even had to move a few up to 0805 1/8 Watt.

Duane Benson
Watt are you looking at?