Screaming Circuits: Engineer stories


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

Grounded in Reality?

LED scroller 006 thin trimmed
Looking back, I think I could have done a few things different. For example, I don't really need a separate power-on LED. I could either just not populate it, or rev the schematic a little to make it a software controlled indicator rather than hard linked to the power switch. That change would allow me to put the device to sleep. The PIC18F25K20 draws somewhere around a tenth of a microamp while in sleep mode. That being the case, I might just discard the power switch all together. Otherwise, it's cool.

I could have given each LED its own via to the ground plane too. That's supposed to reduce noise a bit. Although, this will probably never be clocked high enough to make much difference, nor used in an environment where it matters.

Duane Benson
Only half of 10 the types of people will understand

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

Twitter, What is it Good For? Absolutely 555contest

I follow a few people on Twitter. A few people follow me on Twitter.

A number of web sites have engaged their readers in debates about the usefulness of Twitter (and other social media) to engineers. In general, these debates are talking about hardware engineers. A lot of software engineers pretty much live on the Internet and will embrace or invent any new thing.

The overwhelming majority of the responses that I've read put Twitter in the class of "a waste of time." Not everyone feels that way, but there's quite a few who do.  I'm still in study mode. I can see how it can take up a lot of time if you don't exercise some self control and it has a weird partial-voyeur aspect.

If I'm following, person A and person B, I'll see any conversation they are having. Most discussions are undertaken with that in mind, but some start to lean toward the personal side. Now, if person C gets in the conversation with one or both of A and B, and I'm not following C, I end up 723px-NE555_Bloc_Diagram.svg seeing part of the conversation. It's a bit like listening to someone talk on the phone and hearing only their side. It's odd.

It can lead to interesting activity though. Recently, one tweeter, Jeri (twitter.com/jeriellsworth) suggested a design contest centered around the old stalwart 555 timer. Chris (twitter.com/Chris_Gammell) picked up the ball with her and In about three days, just over Twitter, they organized it, other tweeters chimed in, sponsors offered prize money and they've set up a website for it. Fascinating.

If you're on Twitter, search for "555contest" to see the conversation in action. In any case, if you're a fan of the now 368 year old 555 timer, you might want to dig into the recesses of your brain for entry ideas. You can also follow Screaming Circuits on Twitter at "twitter.com/pcbassembly" and see for yourself if it's useful or too loaded with mindless drivel.

Duane Benson
Huh! Yeah!

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!

How Fast Is Fast? I Mean, Really?

We talk a lot about speed here at Screaming Circuits. Back in 2003, one of the main reasons our parent company started us up was because their customers were telling them that they needed prototypes faster.

So, I know that getting everything built is faster these days - we can ship fully built boards as fast as 24 hours after we receive a kit, and you can get the raw fabbed PCBs in a day too. Certainly, everyone knows that you can place an order with Digi-Key and have the parts on your desk (or in our shop) the next morning. But has the rest of the process gotten faster too? [See if you can find the shameless plug in there. Sorry]

Whether you're using Sunstone PCB123, Ultiboard, Eagle, Pads, Altium, Allegro, or any of the common Bb input pwr sect CAD packaged, you'll probably spend most of your prototyping time in the software. It's also probably the least predictable segment of the process.

What takes longer? The schematic capture or the layout? Or are both completely variable and totally unpredictable? If your boss came running into your office and said:

"Bob! Quick! We just spilled something. We need an underwater temperature sensor with a video camera that can send a real-time temperature data stream and live video feed a mile back a cable to a host computer. And we need it NOW!"

How long would "NOW" take for you?

Duane Benson
Changing your reaction to the duration of time since 2003...

Reminders and Stress

Yesterday, I wrote about how much faster we can get things done in the prototype world than we could back when many of us were starting our careers. I mentioned that the decrease in time from weeks to days needed to re-spin a board and get a new prototype run completed is a double edged sword, but I kind of only mentioned the benefits - time savings, cost savings, quicker time to revenue generation. I didn't mention the down-side.

I also didn't really elaborate on another benefit - higher quality product. Instead of shipping product with PCBs riddled with mod wire, it's fast and cheap to get new boards and new assembled prototypes built and tested. These additional test cycles allow for much more reliable product. It can even improve the quality of firmware - shorter time to get a working prototype built means more time to write and test software/firmware. It's all good.

So, what is that second sword edge that I refer to?

RCA12ax7_sq_arms_smoke Stress. Yes. Stress. Back in the days before email and electronic projectors and speedy prototypes, we could relax more. A color presentation generally had to be sent out to have color transparencies or 35mm slides made up. If the boss wanted changes, they had to be made a week or so ahead of time. Now, with electronic projectors, changes can (and are too often) made at 2:00am the morning before the big presentation.

Since I can build you a prototype in a day or so, now those marketing geeks can, and do, throw changes in just a few days before release to production. Everything has to get done faster and faster. I want it now! We enable faster turns so the expectations increase and then we enable even faster turns and the expectation increase that much more. It never stops.

Duane Benson
Sorry. Sort of...

Reminders are Good Sometimes

I was just recently reading an article on another website that caused me to reflect a bit on where we've been and how far we've come in this industry. The article covered a design engineer's experience with modding a board back in the 80's and being required to ship the board with the mods instead of getting new ones made properly.

Back in the late 80's and early 90's, I worked for a company that designed and built business-oriented displays. One of the products was particularly troublesome to get going and the first production versions shipped with something like 24 different mods. If the company had re-spun the boards, we would have added at least a month to the schedule and payed somewhere in the range of $20,000 to $40,000 dollars. If I recall correctly, one of the biggest problem areas was the PLL (phase-locked loop). We were over-driving the parts a bit and that made all of the support passives and the layout that much more critical. Not smart, but I guess that came from one of those "cost-benefit" analysis type things.

Contrast that today where you can get a new set of boards from a PCB fab company like Sunstone.com in a few days for a few hundred dollars, get the parts from Digi-Key overnight and have us (Screaming Circuits) assemble them in a day or two.

Of course, it's a bit of a double edged sword. Like when faxes and later email came along. Written communications cycles that used to be measured in days became measured in hours and minutes. The expectations changed. Can you imagine writing a letter to a company and waiting a couple of weeks to get a response?!! That's the way it used to be.

In the same vein, us here at Screaming Circuits (and some other people too) have changed the prototype cycle expectations. Can you even imagine finishing your layout and having to wait four to six weeks for assembled boards to come back? Yikes! But that's what it used to be like. We're all making things go faster and faster. It keeps getting faster and it won't slow down. But that's good because time = money so less time building = less money spent and more time selling = more money earned. Right?

Duane Benson
I... Just... Need... More... Coffee... NOW!!!!

mbed Development - USB Programming Forever

I'm still fiddling with my mbed. Although, I haven't put it to real use yet. I've got some ideas, but I just don't have the time these days. One of the nice things about its programming system is that if I do have to step away for a while, it's easy enough that I don't have to go through any kind of learning curve again. The plug and go USB programming and online IDE is that easy.

Contrast that to one of my little PIC based boards. I recently wanted to do something with one that I hadn't used for a while. I dug it up and pulled out my programmer. I somehow ended up with two different versions of the programmer software installed on my computer, and I had to try both. My programmer uses the FTDI USB/serial chip, so I had to try and guess which COM port to set my programmer software too.

Six permutations later, I had that figured out. I then loaded up an old known-working hex file and took my best guess at what the fuse settings needed to be and guessed wrong. Tried again and guessed wrong. Tried a dozen different combination and gave up and dug up the PDF of the data sheet. Once I found the setting and translated them to the language used in my programmer's software, I finally figured it out and got it all working.

Granted, if I were using this every day, I wouldn't have forgotten all those silly little details, but think about someone learning for the first time. Or, consider a hardware engineer that rarely uses microcontrollers. Once a year or so, some design does need a controller and some programming. I'm a big fan of PICs, but the programming system for many of them seems pretty archaic compared to a product like the mbed.

Duane Benson
I need gravy for the mashed potatoes in yesterday's post

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.